URL
https://opencores.org/ocsvn/System09/System09/trunk
Subversion Repositories System09
Compare Revisions
- This comparison shows the changes necessary to convert path
/
- from Rev 6 to Rev 7
- ↔ Reverse comparison
Rev 6 → Rev 7
/trunk/rtl/vhdl/cpu09.vhd
82,6 → 82,12
-- Added extra ALU function |
-- ASR8 slightly changed in the ALU. |
-- |
-- Version 1.9 - 20 August 2005 |
-- LSR8 is now handled in ASR8 and ROR8 case in the ALU, |
-- rather than LSR16. There was a problem with single |
-- operand instructions using the MD register which is |
-- sign extended on the first 8 bit fetch. |
-- |
library ieee; |
use ieee.std_logic_1164.all; |
use ieee.std_logic_unsigned.all; |
1093,10 → 1099,10
out_alu <= left xor right; -- eor/xor |
when alu_lsl16 | alu_asl8 | alu_rol8 => |
out_alu <= left(14 downto 0) & carry_in; -- rol8/asl8/lsl16 |
when alu_lsr16 | alu_lsr8 => |
out_alu <= carry_in & left(15 downto 1); -- lsr |
when alu_ror8 | alu_asr8 => |
out_alu <= "00000000" & carry_in & left(7 downto 1); -- ror8/asr8 |
when alu_lsr16 => |
out_alu <= carry_in & left(15 downto 1); -- lsr16 |
when alu_lsr8 | alu_asr8 | alu_ror8 => |
out_alu <= "00000000" & carry_in & left(7 downto 1); -- ror8/asr8/lsr8 |
when alu_neg => |
out_alu <= right - left; -- neg (right=0) |
when alu_com => |