Chargement…
Chargement…
The entity add_sub_4bit has i_a, i_b (slv 3 downto 0), i_sub (std_logic), o_result (slv 3 downto 0), o_carry (std_logic).
4-bit adder/subtractor. If i_sub='0': addition A+B. If i_sub='1': subtraction A-B. o_carry indicates overflow.
i_ai_bi_subo_resulto_carry