ImageVerifierCode 换一换
格式:DOCX , 页数:18 ,大小:32.64KB ,
资源ID:23608944      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/23608944.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(eda程序.docx)为本站会员(b****7)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

eda程序.docx

1、eda程序library ieee; -秒计时器use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; entity second is port(rst,clk:in std_logic; sectomun:out std_logic; secge:out std_logic_vector(3 downto 0); secshi: std_logic_vector(3 downto 0);end second;architecture one of second is begin process(rst,clk)variab

2、le sec1: std_logic_vector(3 downto 0);variable sec2: std_logic_vector(3 downto 0);begin if rst=1 then sec1:=”0000”;sec2:=”0000”;elsif clkevent and clk=1 then if sec1=”0000” then sec1:=”0000”; else sec2:=sec2+1;end if; else sec1:=sec1+1; end if;if sec1=”1001” and sec2=”0101” then sectomun=1; else sec

3、tomun=0; end if;end if;end process;secge=sec1;secshi=sec2;end;library ieee; -分计时器use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; entity minute is port(rst:in std_logic; sectomun:in std_logic; muntohour:out std_logic; munge:out integer range 0 to 9; munshi: out integer range 0 to 5);end

4、 minute;architecture one of minute is begin process(rst,sectomun)variable mun1:integer range 0 to 9;variable mun2:integer range 0 to 5;begin if rst=1 then mun1:=0;mun2:=0;elsif sectomunevent and sectomun=1 then mun1:=mun1+1; if mun1=10 then mun1:=0; mun2:=mun2+1;end if; if mun2=6 then mun2:=0; munto

5、hour=1; else muntohour=0; end if;end if;munge=mun1;munshi=mun2;end process;end;library ieee; -小时计时器use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; entity hour is port(rst:in std_logic; muntohour:in std_logic; hourge:out integer range 0 to 9; hourshi: out integer range 0 to 2);end hour;

6、architecture one of hour is begin process(rst,muntohour)variable hour1:integer range 0 to 9;variable hour2:integer range 0 to 2;begin if rst=1 then hour1:=0;hour2:=0;elsif muntohourevent and muntohour=1 then hour1:=hour1+1; if hour1=10 then hour1:=0; hour2:=hour2+1; end if;if hour1=4 and hour2=2 the

7、n hour1:=0;hour2:=0; end if;end if;hourge=hour1;hourshi=hour2;end process;end;library ieee; -设置时钟use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; entity settime is port(s1,s0:in std_logic; hourge,munge:buffer integer range 0 to 9; hourshi:buffer integer range 0 to 2; munshi:buffer integ

8、er range 0 to 5);end entity settime;architecture one of settime issignal sets:std_logic_vector(1 downto 0);beginsetshourshi=hn2;hourgemunshi=min2;mungehourshi=hn2;hourge=hn1;munshi=min2;mungenull;end case;end process;end;library ieee;-7段译码器use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all

9、; entity led_7 is port(ain:in integer range 0 to 9; led7s:out std_logic_vector(0 to 6); end entity led_7; architecture behav of led_7 isbegin process(ain) begin case ain is when 0=led7sled7sled7sled7sled7sled7sled7sled7sled7sled7sled7s=0000000; end case;end process;end behav;library IEEE; -分频计use IE

10、EE.std_logic_1164.all;use IEEE.std_logic_arith.all;use IEEE.std_logic_unsigned.all;entity fenpin is port (rst,clk : in STD_LOGIC; pin: out STD_LOGIC);end fenpin;architecture a of fenpin is signal count: integer range 0 to 4; signal t:std_logic;begin process (rst,clk) begin if rst=1 then count=0; els

11、if clkevent and clk=1 then count= count + 1 ;t=t; if count=4 then count=0;t=not t; end if ; end if; pin=t; end process;end a;library ieee; -闹钟use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; entity alarm is port(pin,muntohour:in std_logic; alarm:out std_logic );end entity alarm;architec

12、ture one of alarm isbeginprocess(muntohour,pin)beginif muntohour=1 then alarm=pin;else alarmCLKK,rst=RET_T,sectomun=SECCO, secge=SEC_1,secshi=SEC_2);U2:minute port map(rst=RET_T,muntohour=MINCO,sectomun=SECCO, munge=MIN_1,munshi=MIN_2);U3:hour port map(rst=RET_T,muntohour=MINCO,hourge=HOUR_1,hourshi

13、=HOUR_2);U4:settime port map(s1=S1,s0=S0,secge=SEC_1,secshi=SEC_2, munge=MIN_1,munshi=MIN_2,hourge=HOUR_1,hourshi=HOUR_2);U5:fenpin port map(clk=CLKK,rst=RET_T,pin=PIN);U6:alarm port map(pin=PIN,muntohour=MINCO,alarm=ALARM1);U7:led_7 port map(ain=SEC_1,ain=SEC_2,ain=MIN_1,ain=MIN_2,ain=HOUR_1,ain=HO

14、UR_2);END one;library ieee; -秒计时器use ieee.std_logic_1164.all;use ieee.std_logic_arith.all; use ieee.std_logic_unsigned.all; entity second is port(rst,clk:in std_logic; sectomun:out std_logic; secge:out std_logic_vector( 0 to 3); secshi: out std_logic_vector( 0 to 3);end second;architecture one of se

15、cond is begin process(rst,clk)variable sec1:std_logic_vector( 0 to 3);variable sec2:std_logic_vector( 0 to 2);begin if rst=1 then sec1:=0000;sec2:=0000;elsif clkevent and clk=1 then sec1:=sec1+1; if sec1=1010 then sec1:=0000; sec2:=sec2+1;end if; if sec2=110 then sec2:=0000; end if; if sec1=0000 and

16、 sec2=1010 then sectomun=1; else sectomun=0; end if;end if;secge=sec1;secshi=sec2;end process;end;library ieee; -分计时器use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; entity minute is port(rst:in std_logic; sectomun:in std_logic; muntohour:out std_logic; munge:out std_logic_vector( 0 to

17、3); munshi: out std_logic_vector( 0 to 3);end entity;architecture one of minute is beginprocess(rst,sectomun)variable mun1:std_logic_vector( 0 to 3);variable mun2:std_logic_vector( 0 to 3);begin if rst=1 then mun1:=0;mun2:=0;elsif sectomunevent and sectomun=1 then mun1:=mun1+1; if mun1=10 then mun1:

18、=0; mun2:=mun2+1;end if; if mun2=6 then mun2:=0; muntohour=1; else muntohour=0; end if;end if;munge=mun1;munshi=mun2;end process;end;library ieee; -小时计时器use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; entity hour is port(rst:in std_logic; muntohour:in std_logic; hourge:out std_logic_ve

19、ctor( 0 to 3); hourshi: out std_logic_vector( 0 to 2);end hour;architecture one of hour is begin process(rst,muntohour)variable hour1:std_logic_vector( 0 to 3);variable hour2:std_logic_vector( 0 to 2);begin if rst=1 then hour1:=0;hour2:=0;elsif muntohourevent and muntohour=1 then hour1:=hour1+1; if

20、hour1=10 then hour1:=0; hour2:=hour2+1; end if;if hour1=4 and hour2=2 then hour1:=0;hour2:=0; end if;end if;hourge=hour1;hourshi=hour2;end process;end;library ieee; -设置时钟use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; entity settime is port(s1,s0:in std_logic; hourge,munge:buffer std_l

21、ogic_vector( 0 to 3); hourshi:buffer std_logic_vector( 0 to 2); munshi:buffer std_logic_vector( 0 to 3);end entity settime;architecture one of settime issignal sets:std_logic_vector(1 downto 0);beginsetshourshi=hn2;hourgemunshi=min2;mungehourshi=hn2;hourge=hn1;munshi=min2;mungenull;end case;end proc

22、ess;end;library ieee;-7段译码器use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; entity led_7 is port(ain:in std_logic_vector( 0 to 3); led7s:out std_logic_vector(0 to 6); end entity led_7; architecture behav of led_7 isbegin process(ain) begin case ain is when 0=led7sled7sled7sled7sled7sled7sled7sled7sled7sled7sled7s=0000000; end case;end process;end behav;library IEEE; -分频计use

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1