mirror of
https://github.com/openhwgroup/cvw
synced 2025-02-11 06:05:49 +00:00
Simplified Shifter Right input
This commit is contained in:
parent
27ec8ff893
commit
7e026f3e78
@ -51,8 +51,8 @@ module alu #(parameter WIDTH=32) (
|
|||||||
assign {Carry, Sum} = A + CondInvB + {{(WIDTH-1){1'b0}}, SubArith};
|
assign {Carry, Sum} = A + CondInvB + {{(WIDTH-1){1'b0}}, SubArith};
|
||||||
|
|
||||||
// Shifts
|
// Shifts
|
||||||
assign Right = (Funct3[2:0] == 3'b101); // sra or srl
|
assign Right = Funct3[2]; // sra or srl
|
||||||
shifter sh(A, B[5:0], Right, SubArith, W64, Shift);
|
shifter sh(A, B[`LOG_XLEN-1:0], Right, SubArith, W64, Shift);
|
||||||
|
|
||||||
// condition code flags based on add/subtract output
|
// condition code flags based on add/subtract output
|
||||||
// Overflow occurs when the numbers being added have the same sign
|
// Overflow occurs when the numbers being added have the same sign
|
||||||
|
Loading…
Reference in New Issue
Block a user