CPUのつくりかたfor VHDL 3回目 出力をまとめる
出力をまとめてみます。
入力信号A,Bの信号が足し算されて、出力がCにまとめてでます。
entity C1-3 is port( RST_N : in std_logic; TRIG : in std_logic; IN_A : in std_logic; IN_B : in std_logic; OUT_C : out std_logic_vector(1 downto 0); ) end C1-3; architecture rtl of C1-3 is begin process(RST_N,TRIG) begin if RST_N='0' then OUT_C <="00"; elsif(rising_edge(TRIG)) then OUT_C(0)<=IN_A xor IN_B; OUT_C(1)<=IN_A and IN_B; end if; end process; end rtl;