基于vhdl的数字时钟论文内容摘要:

VHDL,模拟器对编辑后的程序进行模拟,如果达不到设计要求,则可以重新修改程序,直到通过功能模拟。 (3) 逻辑综合与优化 将通过功能模拟的程序放到 VHDL 编译器中,进行逻辑综合与优化。 (4) 门级模拟对电路用 VHDL。 仿真器仿真。 可对门级电路的延时、定时状态、驱动能力等进行仿真。 如不符合要求,可重复步骤 (3),再门级模拟,直到符合要求止。 (5) 版图生成 用相应的软件处理后,就可以拿去制版。 第 三 章 数字 电子钟的工作原理 系统设计方案 顶层原理图 秒和分钟计数器 功 能: 60 进制计数器 接 口: clk 时钟输入 qout1个位 BCD 输出 qout2十位 BCD 输出 carry进位信号输出 library ieee。 use。 use。 use。 entity fen60 is port (clk : in std_logic。 rst : in std_logic。 qout1 : out std_logic_vector(3 downto 0)。 qout2 : out std_logic_vector(3 downto 0)。 carry : out std_logic )。 end fen60。 architecture behave of fen60 is signal tem1:std_logic_vector(3 downto 0)。 signal tem2:std_logic_vector(3 downto 0)。 begin process(clk,rst) begin if(rst=39。 039。 )then tem1=0000。 tem2=0000。 elsif clk39。 event and clk=39。 139。 then if tem1=1001 then tem1=0000。 if tem2=0101 then tem2=0000。 carry=39。 139。 else tem2=tem2+1。 carry=39。 039。 end if。 else tem1=tem1+1。 end if。 end if。 qout1=tem1。 qout2=tem2。 end process。 end behave。 小时计数器 实体名: fen24 功 能: 24 进制计数器 接 口: clk 时钟输入 qout1个位 BCD 输出 qout2十位 BCD 输出 carry进位信号输出 library ieee。 use。 use。 use。 entity fen24 is port (clk : in std_logic。 rst : in std_logic。 qout1 : out std_logic_vector(3 downto 0)。 qout2 : out std_logic_vector(3 downto 0)。 carry : out std_logic )。 end fen24。 architecture behave of fen24 is signal tem1:std_logic_vector(3 downto 0)。 signal tem2:std_logic_vector(3 downto 0)。 begin process(clk,rst) begin if(rst=39。 039。 )then tem1=0010。 tem2=0001。 elsif clk39。 event and clk=39。 139。 then if (tem2=0010 and tem1=0011) then tem1=0000。 tem2=0000。 carry=39。 139。 else carry=39。 039。 if tem1=1001 then tem1=0000。 if tem2=1001 then tem2=0000。 else tem2=tem2+1。 end if。 else tem1=tem1+1。 end if。 end if。 end if。 qout1=tem1。 qout2=tem2。 end process。 end behave。 六选一的控制电路 实体名: sel 功 能:实现六个数码显示管扫描显示 接 口: clk 时钟输入 qin1第一个数码显示管要显示内容。
阅读剩余 0%
本站所有文章资讯、展示的图片素材等内容均为注册用户上传(部分报媒/平媒内容转载自网络合作媒体),仅供学习参考。 用户通过本站上传、发布的任何内容的知识产权归属用户或原始著作权人所有。如有侵犯您的版权,请联系我们反馈本站将在三个工作日内改正。