基于vhdl语言的数字时钟设计说明书内容摘要:
001) and (count1631 )then count=count+7。 elsif (count1631) then count=count+1。 else count=000001。 dount=dount+1。 end if。 end if。 end process。 monthout=dount。 dateout=count。 end fun。 11 扫描显示模块设计 该模块的作用是将时钟产生的微秒、秒、分、小时、星期和日期信号 以扫描的形式显示输出。 其中一控制信号实现数码管的复用,控制显示微秒、秒、分 、小时或星期、日期。 输入: clk1 为 扫描时钟 , reset 为清零复位键 , ms、 sec、 min、 hour、 month、 date、 week分别为微秒 、 秒 、 分 、 小时 、月、日、星期显示信号, showweek 为控制信号 输出: dp 为 数码管小数点显示 信号 led 为七段数码管显示信号 sel为位选信号 源代码如下: library ieee。 use。 use。 use。 entity seltime is port( clk1,reset,showweek:in std_logic。 ms,sec,min,hour:in std_logic_vector(6 downto 0)。 month:in std_logic_vector(4 downto 0)。 date:in std_logic_vector(5 downto 0)。 week:in std_logic_vector(3 downto 0)。 dp:out std_logic。 led:out std_logic_vector(6 downto 0)。 sel:out std_logic_vector(7 downto 0))。 end entity seltime。 architecture fun of seltime is signal count:std_logic_vector(3 downto 0)。 signal daout:std_logic_vector(3 downto 0)。 signal d:std_logic_vector(4 downto 0)。 begin p1 : process(clk1,reset) begin if(reset=39。 039。 )then count=0000。 elsif(clk139。 event and clk1=39。 139。 ) then if(count1101)then count=0000。 d=countamp。 showweek。 else count=count+1。 d=countamp。 showweek。 end if。 end if。 end process p1。 p2: process(d) begin case d is when00011 =daout=ms(3 downto 0)。 sel=01111111。 dp=39。 139。 when00101=daout(3)=39。 039。 daout(2 downto 0)=ms(6downto4)。 sel=10111111。 dp=39。 139。 when00111 =daout=sec(3 downto 0)。 sel=11111110。 dp=39。 039。 12 when01001=daout(3)=39。 039。 daout(2downto0)=sec(6 downto 4)。 sel=11111101。 dp=39。 139。 when01011 =daout=min(3 downto 0)。 sel=11111011。 dp=39。 039。 when01101=daout(3)=39。 039。 daout(2downto0)=min(6downto 4)。 sel=11110111。 dp=39。 139。 when01111 =daout=hour(3 downto 0)。 sel=11101111。 dp=39。 039。 when10001=daout(3downto2)=00。 daout(1downto0)=hour(5downto4)。 sel=11011111。 dp=39。 139。 when10010 =daout=week。 sel=01111111。 dp=39。 139。 when10100 =daout=date(3 downto 0)。 sel=11111110。 dp=39。 139。 when10110=daout(3downto2)=00。 daout(1downto0)=date(5downto4)。 sel=11111101。 dp=39。 139。 when11000 =daout=month(3 downto 0)。 sel=11111011。 dp=39。 139。 when11010 =daout(3 downto 1)=000。 daout(0)=month(4)。 sel=11110111。 dp=39。 139。 when others=sel=11111111。 end case。 end process p2。 p3: process(daout) begin case daout is when0000=led=0000001。 when0001=led=1001111。 when0010=led=0010010。 when0011=led=0000110。 when0100=led=1001100。 when0101=led=0100100。 when0110=led=0100000。 when0111=led=0001111。 when1000=led=0000000。 when1001=led=0000100。 when others=null。 end case。 end process p3。 end fun。 整点报时模块设计 该模块的作用是 当时钟计数到整点时蜂鸣器 报警,以实现整点报时功能。 输入: clk 计数时钟信号, speaksec 秒输出信号, speakmin 分输出信号 输出:报警信号 源代码如下: library ieee。 use。 use。 entity speaker is port(clk:in std_logic。 speaksec:in std_logic_vector(6 downto 0)。 speakmin:in std_logic_vector(6 downto 0)。 speak:out std_logic)。 end entity speaker。 architecture fun of speaker is begin process(clk,speakmin) begin 13 if(clk 39。 event and clk=39。 139。 )then if(speakmin=0000000 and speaksec=0000000)then speak=39。 139。 else speak=39。 039。 end if。 end if。 end process。 end fun。 五 :附录 顶层文件源代码 : library ieee。 use。 entity clock_top is port(clk_in,reset,setmin,sethour,setweek,setstop,showweek:in std_logic。 dp:out std_logic。 sel:out std_logic_vector(7 downto 0)。 led:out std_logic_vector(6 downto 0)。 speak: out std_logic)。 end clock_top。 architecture a of clock_top is COMPONENT div PORT(clk_in,setstop: in std_logic。 clk_out1,clk_out2: out STD_LOGIC)。 END COMPONENT。 COMPONENT msecond PORT(clk,reset: in std_logic。 daout:out std_logic_vector(6 downto 0)。 ensecond:out std_logic)。 END COMPONENT。 COMPONENT second PORT(clk,setclk,reset,setmin: in std_logic。 daout:out std_logic_vector(6 downto 0)。 enmin:OUT STD_LOGIC)。 END COMPONENT。 COMPONENT minute PORT(clk,setclk,reset,sethour:in std_logic。 enhour:out std_logic。 daout:out std_logic_vector(6 downto 0))。 END COMPONENT。 COMPONENT hour PORT(clk,setclk,reset,setweek:in std_logic。 enweek:out std_logic。 daout:out std_logic_vector(6 downto 0))。 END COMPONENT。 COMPONENT weeker 14 PORT(clk,reset:in std_logic。 weekout:out std_logic_vector(3 downto 0))。 END COMPONENT。 COMPONENT date PORT(clk,reset:in std_logic。 monthout:out std_logic_vector(4 downto 0)。 dateout:out std_logic_vector(5 downto 0))。 END COMPONENT。 COMPONENT seltime port(clk1,reset,showweek:in std_logic。 ms,sec,min,hour:in std_logic_vector(6 downto 0)。 week:in std_logic_vector(3 downto 0)。 month:in std_logic_vector(4 downto 0)。 date:in std_logic_vector(5 downto 0)。 dp:out std_logic。 sel:out std_logic_vector(7 downto 0)。 led:out std_logic_vector(6 downto 0))。 END COMPONENT。 COMPONENT speaker PORT(clk:in std_logic。 speaksec:in std_logic_vector(6 downto 0)。 speakmin:in std_logic_vector(6 downto 0)。 speak:out std_logic)。 END COMPONENT。 signal da0out,dalout,dallout,dalllout:std_logic_vector(6 downto 0)。 signal dallllout:std_logic_vector(3 downto 0)。 signal month0out:std_logic_vector(4 downto 0)。 signal date0out:std_logic_vector(5 downto 0)。 signal ensecond_re,enmin_re,enhour_re,enweek_re,dp_re,clk00,clk01:std_logic。 begin u1:div port map (clk_in=clk_in, setstop=setstop, clk_out1=clk00, clk_ou。基于vhdl语言的数字时钟设计说明书
相关推荐
( 3)数据锁存器: library IEEE。 use。 18 Unment the following library declaration if using arithmetic functions with Signed or Unsigned values use。 Unment the following library declaration if instantiating
成绩统计表中。 图413 录入模块界面 证书模块用户单击证书后,系统自动导入到证书模块。 证书模块界面如图414所示。 此系统可以完成证书所需要各种功能。 可进行打印预览。 图414 证书模块界面 帮助文件的设计 在Visual (即HTML样式)的帮助系统,HTML样式的帮助文件可以由HTML Help WorkShop 创建。 本系统将建立HTML样式的帮助文件
pt 则被作为系统默认的脚本语言。 ASP 程序其实是以扩展名为 .asp 的纯文本形式存在于 WEB 服务器上的,可以用任何文本编辑器打开它, ASP 程序中可以包含纯文本、 HTML 标记以及脚本命令。 只需将 .asp 程序放在 Web 服务器的虚拟目录下(该目录必须要有可执行权限),就可以通过 WWW 的方式访问 ASP 程序了。 要学好 ASP 程序的设计,必须掌握脚本的编写
”中,如“二次铣削 [1]”。 当提及的参考文献为文中直接说明时,其序号应该与正文排齐,如“由文献 [8, 10~ 14]可知”。 经济、管理类论文引用文献,若引用的是原话,要加引号,一般写在段中; 若引的不是原文只是原意,文前只需用冒号或逗号,而不用引号。 在参考文献之外,若有注释的话,建议采用夹注,即紧接文句,用圆括号标明。 不得将引用文献标示置于各级标题处。 参考文献书写格式应符合
1100图 34 指令寄存器仿真波形 第三章 八位 RISCCPU各模块设计与仿真 10 011001 11001100、 00110011 四个数据, 则当 state 为 0 时,传输高八位,当state 为 1 时,传输低八位。 其中 第 15 至 第 13 位存入 opcode 中 并替换旧数据 ,第 12 至 第 0 位存入 str_addr 中 并替换旧数据。 累加器 累加器
d_data_1 = read_data_1, Read_data_2 = read_data_2, Sign_extend = Sign_extend, Function_opcode = Instruction( 5 DOWNTO 0 ), ALUOp = ALUop, ALUSrc = ALUSrc, Zero = Zero, ALU_Result = ALU_Result,