eda技术课程设计-四人抢答器设计内容摘要:

gic。 states:out std_logic_vector(3 downto 0))。 end qdjb。 architecture one of qdjb is signal sinor,ringf,tmp:std_logic。 signal t:std_logic_vector(5 downto 0)。 begin sinor=a or b or c or d。 p1:process(a,rst,b,c,d,tmp) begin if rst=39。 139。 then tmp=39。 139。 states=0000。 elsif tmp=39。 139。 then if a=39。 139。 then states=0001。 tmp=39。 039。 elsif b=39。 139。 then states=0010。 tmp=39。 039。 elsif c=39。 139。 then states=0011。 tmp=39。 039。 elsif d=39。 139。 then states=0100。 tmp=39。 039。 else tmp=39。 139。 states=0000。 end if。 end if。 end process p1。 p2rocess(clk2,en,rst,t) begin if rst=39。 139。 then t=000000。 ringf=39。 039。 elsif clk239。 event and clk2=39。 139。 then if en=39。 039。 and sinor=39。 139。 then if t111111 then ringf=not ringf。 t=t+1。 else ringf=39。 039。 end if。 end if。 end if。 end process p3。 ring=ringf。 end one。 library ieee。 use。 use。 entity js is 计时 port(clk,rst,en,stop:in std_logic。 warn:buffer std_logic。 ta,tb:buffer std_logic_vector(3 downto 0))。 end js。 architecture one of js is signal co:std_logic。 begin p1:process(clk,rst,en,stop,ta) begin if rst=39。 139。 or stop=39。 139。 then ta=0000。 elsif clk39。 event and clk=39。 139。 then co=39。 039。 if en=39。 139。 then if ta=0000 then ta=1001。 co=39。 139。 else ta=ta1。 end if。 end if。 end if。 end process p1。 p2:process(co,rst,en,stop,tb) begin if rst=39。 139。 or stop=39。 139。 then tb=0010。 elsif co39。 event and。
阅读剩余 0%
本站所有文章资讯、展示的图片素材等内容均为注册用户上传(部分报媒/平媒内容转载自网络合作媒体),仅供学习参考。 用户通过本站上传、发布的任何内容的知识产权归属用户或原始著作权人所有。如有侵犯您的版权,请联系我们反馈本站将在三个工作日内改正。