eda课程设计基于vhdl的四路抢答器内容摘要:

elsif cp=0100then q=0100。 elsif cp=1000then q=1000。 end if。 end if。 end process。 end store_arc。 图 按键存储电路仿真图 2 锁存器模块 library ieee。 use。 entity lock is port(d:in std_logic_vector(3 downto 0)。 6 / 15 clk,clr:in std_logic。 q:out std_logic_vector(3 downto 0)。 alm:out std_logic)。 end lock。 architecture lockb_arc of lock is signal al:std_logic。 signal ql:std_logic_vector(3 downto 0)。 begin process(clk,clr) begin if clr=39。 039。 then ql=0000。 al=39。 039。 elsif clk39。 event and clk=39。 139。 then ql=d。 al=d(0) or d(1) or d(2) or d(3)。 end if。 end process。 alm=al。 q=ql。 end lockb_arc。 图 锁存器仿真波形 7 / 15 译码电路模块 library ieee。 use。 entity decode is port(clr,clk:in std_logic。 ssin: in std_logic_vector(3 downto 0)。 ssout: out std_logic_vector(6 downto 0))。 end decode。 architecture decode_arc of decode is begin process(ssin) begin if clr=39。 039。 then ssout=0000000。 elsif clk39。 event and clk=39。 139。 then case ssin is when0001=ssout=0000110。 when0010=ssout=1011011。 when0011=ssout=1001111。 when0100=ssout=1100110。 when others=ssout=0000000。 end case。 end if。 8 / 15 end process。 end decode_arc。 图 译码电路的仿真 4 编码模块 library ieee。 use。 entity encode is port(d: in std_logic_vector(3 downto 0)。 q:out std_logic_vector(3 downto 0))。 end encode。 architect。
阅读剩余 0%
本站所有文章资讯、展示的图片素材等内容均为注册用户上传(部分报媒/平媒内容转载自网络合作媒体),仅供学习参考。 用户通过本站上传、发布的任何内容的知识产权归属用户或原始著作权人所有。如有侵犯您的版权,请联系我们反馈本站将在三个工作日内改正。