vhdl语言描述的4位十进制的频率计的设计内容摘要:

6 位锁存器 library ieee。 use。 use。 entity latch4 is port(d:in std_logic_vector(15 downto 0)。 ena,clk:in std_logic。 q:out std_logic_vector(15 downto 0))。 end latch4。 architecture one of latch4 is begin process(clk,ena,d) variable cqi:std_logic_vector(15 downto 0)。 begin if ena=39。 039。 then cqi:=cqi。 elsif clk39。 event and clk=39。 139。 then cqi:=d。 end if。 q=cqi。 end process。 end one。 LED 控制模块 library ieee。 use。 use。 entity led_controller is port(d:in std_logic_vector(3 downto 0)。 a:out std_logic_vector(6 downto 0))。 end led_controller。 architecture one of led_controller is begin process(d) begin case d is when 0000= a=0111111。 when 0001= a=0000110。 when 0010= a=1011011。 when 0011= a=1001111。 when 0100= a=1100110。 when 0101= a=1101101。 when 0110= a=1111101。 when 0111= a=0000111。 when 1000= a=1111111。 when 1001= a=1101111。 when 1010= a=1110111。 when 1011= a=1111100。 when 1100= a=0111001。 when 1101= a=1011110。 when 1110= a=1111001。 when 1111= a=1110001。 when others= null。 end case。 end process。 end。 控制模块 lib。
阅读剩余 0%
本站所有文章资讯、展示的图片素材等内容均为注册用户上传(部分报媒/平媒内容转载自网络合作媒体),仅供学习参考。 用户通过本站上传、发布的任何内容的知识产权归属用户或原始著作权人所有。如有侵犯您的版权,请联系我们反馈本站将在三个工作日内改正。