中易网

模8计数器的VHDL代码是什么啊?

答案:3  悬赏:20  
解决时间 2021-01-17 10:39
  • 提问者网友:捧腹剧
  • 2021-01-17 01:58
模8计数器的VHDL代码是什么啊?
最佳答案
  • 二级知识专家网友:胯下狙击手
  • 2021-01-17 02:43
设计一个3位二进制计数器,就是模8计数器。
全部回答
  • 1楼网友:痴妹与他
  • 2021-01-17 05:21
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
entity modulo_8_counter is
port (clk :in std_logic;
c_out:out std_logic_vector (2 downto 0));
end modulo_8_counter;
architecture Behavioral of modulo_8_counter is
signal iq: integer ;
begin
process (clk ,iq)
begin
if clk'event and clk='1' then
if iq=7 then iq<=0;
else iq<=iq+1;
end if;
end if;
c_out<=conv_std_logic_vector (iq,3);
end process;
end Behavioral;
采纳吧
  • 2楼网友:从此江山别
  • 2021-01-17 04:01
建议你好好看看数字电路的书和VHDL的书。肯定会解决的
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息!
大家都在看
推荐信息