diff options
author | crupest <crupest@outlook.com> | 2021-12-24 19:35:39 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2021-12-24 19:35:39 +0800 |
commit | 700da23188ef4059c15b4b71786c32c7bfbbfa73 (patch) | |
tree | 92d5bfb8dfa58a4c1fedbb2217fda5bd9c1305ec /computer-organization-experiment/alu.vhdl | |
parent | c17673ea6b100f7b8766c6acccfb38e356a9c286 (diff) | |
download | life-700da23188ef4059c15b4b71786c32c7bfbbfa73.tar.gz life-700da23188ef4059c15b4b71786c32c7bfbbfa73.tar.bz2 life-700da23188ef4059c15b4b71786c32c7bfbbfa73.zip |
...
Diffstat (limited to 'computer-organization-experiment/alu.vhdl')
-rw-r--r-- | computer-organization-experiment/alu.vhdl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/computer-organization-experiment/alu.vhdl b/computer-organization-experiment/alu.vhdl index 75a9961..5eed3df 100644 --- a/computer-organization-experiment/alu.vhdl +++ b/computer-organization-experiment/alu.vhdl @@ -13,8 +13,8 @@ end entity; architecture Behavioral of alu is begin S <= A + B when ALUC(2 downto 0) = B"000" - else A and B when ALUC(2 downto 0) ?= B"001" - else A - B when ALUC(2 downto 0) ?= B"100" + else A - B when ALUC(2 downto 0) ?= B"001" + else A and B when ALUC(2 downto 0) ?= B"100" else A or B when ALUC(2 downto 0) ?= B"101" else A xor B when ALUC(2 downto 0) ?= B"010" else std_logic_vector(signed(A) sll 16) and H"FFFF0000" when ALUC(2 downto 0) ?= B"110" |