URL
https://opencores.org/ocsvn/cpu_lecture/cpu_lecture/trunk
[/] [cpu_lecture/] [trunk/] [src/] [alu.vhd] - Diff between revs 2 and 11
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 2 |
Rev 11 |
Line 325... |
Line 325... |
Q_FLAGS(4) <= (L_SBIW_D(15) and not I_D(15))
|
Q_FLAGS(4) <= (L_SBIW_D(15) and not I_D(15))
|
xor (I_D(15) and not L_SBIW_D(15)); -- Signed
|
xor (I_D(15) and not L_SBIW_D(15)); -- Signed
|
|
|
when ALU_SREG =>
|
when ALU_SREG =>
|
case I_BIT(2 downto 0) is
|
case I_BIT(2 downto 0) is
|
when "000" => Q_FLAGS(0) <= I_BIT(3);
|
when "000" => Q_FLAGS(0) <= not I_BIT(3);
|
when "001" => Q_FLAGS(1) <= I_BIT(3);
|
when "001" => Q_FLAGS(1) <= not I_BIT(3);
|
when "010" => Q_FLAGS(2) <= I_BIT(3);
|
when "010" => Q_FLAGS(2) <= not I_BIT(3);
|
when "011" => Q_FLAGS(3) <= I_BIT(3);
|
when "011" => Q_FLAGS(3) <= not I_BIT(3);
|
when "100" => Q_FLAGS(4) <= I_BIT(3);
|
when "100" => Q_FLAGS(4) <= not I_BIT(3);
|
when "101" => Q_FLAGS(5) <= I_BIT(3);
|
when "101" => Q_FLAGS(5) <= not I_BIT(3);
|
when "110" => Q_FLAGS(6) <= I_BIT(3);
|
when "110" => Q_FLAGS(6) <= not I_BIT(3);
|
when others => Q_FLAGS(7) <= I_BIT(3);
|
when others => Q_FLAGS(7) <= not I_BIT(3);
|
end case;
|
end case;
|
|
|
when ALU_SUB =>
|
when ALU_SUB =>
|
L_DOUT <= L_SUB_DR & L_SUB_DR;
|
L_DOUT <= L_SUB_DR & L_SUB_DR;
|
Q_FLAGS(0) <= cy(L_SUB_DR(7), L_RI8(7), L_D8(7)); -- Carry
|
Q_FLAGS(0) <= cy(L_SUB_DR(7), L_RI8(7), L_D8(7)); -- Carry
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.