可调分频器设计VHDL代码Quartus仿真

名称:可调分频器设计VHDL代码Quartus仿真

软件:Quartus

语言:VHDL

代码功能:

可调分频器设计

输入分频系数,输出分频后的信号


FPGA代码Verilog/VHDL代码资源下载:www.hdlcode.com


演示视频:

设计文档:

分频器仿真.doc

分频器仿真

1.工程文件

Quartus9.0版本

2.程序文件

3.程序编译


4.仿真

4.1仿真文件


4.2仿真结果












部分代码展示:

library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity quartus_div_clk is
port(
clk:in std_logic;--输入50M时钟
A:in std_logic_vector(15 downto 0);--输入A分频系数
clk_out:out std_logic--输出分频结果
);
end;
architecture art of quartus_div_clk is
signal count:std_logic_vector(15 downto 0):="0000000000000000";--定义计数器
signal M:std_logic_vector(15 downto 0):="0000000000000000";----分频系数
signal M_2:std_logic_vector(15 downto 0):="0000000000000000";--M_2为M的一半
signal M_reg:std_logic_vector(15 downto 0):="0000000000000000";--寄存器缓存
signal M_count:std_logic_vector(15 downto 0):="0000000000000000";
signal M_changed:std_logic:='0';--M信号改变指示
signal clk_data:std_logic:='0';--输出频率
begin
--M_2为M的一半
M<=A;
M_2<='0' & M(15 downto 1);--左移1位相当于除以2
process(clk)
begin
if clk'event and clk='1' then
   M_reg<=M;--将M缓存于M_reg
end if;
end process;
process(clk)
begin
if clk'event and clk='1' then
   if(M_reg/=M) then--M_reg和M不相等时
M_changed<='1';--M信号改变指示为1
else
   M_changed<='0';
end if;
end if;
end process;

代码文件(付费下载):



1、代码文件需要付费后才可见。
2、支付问题请联系微信公众号客服。
3、优质Verilog/VHDL代码资源,所见即所得。
Verilog/VHDL资源下载 » 可调分频器设计VHDL代码Quartus仿真

注册为本站会员,充值100得150,详情咨询客服

目前为止共有 *** 位优秀的会员加入! 立刻加入会员