forked from Github_Repos/cvw
formatting
This commit is contained in:
parent
d0c486df54
commit
2a0c59d5a7
@ -58,15 +58,18 @@ module alu #(parameter WIDTH=32) (
|
|||||||
logic [WIDTH-1:0] rotA; // XLEN bit input source to shifter
|
logic [WIDTH-1:0] rotA; // XLEN bit input source to shifter
|
||||||
logic [1:0] shASelect; // select signal for shifter source generation mux
|
logic [1:0] shASelect; // select signal for shifter source generation mux
|
||||||
|
|
||||||
assign shASelect = {W64,SubArith};
|
|
||||||
|
|
||||||
|
// Extract control signals from ALUControl.
|
||||||
|
assign {W64, SubArith, ALUOp} = ALUControl;
|
||||||
|
|
||||||
|
// Pack control signals into shifter select
|
||||||
|
assign shASelect = {W64,SubArith};
|
||||||
|
|
||||||
if (`ZBS_SUPPORTED) begin: zbsdec
|
if (`ZBS_SUPPORTED) begin: zbsdec
|
||||||
decoder #($clog2(WIDTH)) maskgen (B[$clog2(WIDTH)-1:0], MaskB);
|
decoder #($clog2(WIDTH)) maskgen (B[$clog2(WIDTH)-1:0], MaskB);
|
||||||
assign CondMaskB = (BSelect[0]) ? MaskB : B;
|
assign CondMaskB = (BSelect[0]) ? MaskB : B;
|
||||||
end else assign CondMaskB = B;
|
end else assign CondMaskB = B;
|
||||||
|
|
||||||
|
|
||||||
// Sign/Zero extend mux
|
// Sign/Zero extend mux
|
||||||
if (WIDTH == 64) begin // rv64 must handle word s/z extensions
|
if (WIDTH == 64) begin // rv64 must handle word s/z extensions
|
||||||
always_comb
|
always_comb
|
||||||
@ -99,9 +102,6 @@ module alu #(parameter WIDTH=32) (
|
|||||||
assign Rotate = BSelect[2] & (ALUSelect == 3'b001); //NOTE: Do we want to move this logic into the Decode Stage?
|
assign Rotate = BSelect[2] & (ALUSelect == 3'b001); //NOTE: Do we want to move this logic into the Decode Stage?
|
||||||
end else assign Rotate = 1'b0;
|
end else assign Rotate = 1'b0;
|
||||||
|
|
||||||
// Extract control signals from ALUControl.
|
|
||||||
assign {W64, SubArith, ALUOp} = ALUControl;
|
|
||||||
|
|
||||||
// Addition
|
// Addition
|
||||||
assign CondInvB = SubArith ? ~CondMaskB : CondMaskB;
|
assign CondInvB = SubArith ? ~CondMaskB : CondMaskB;
|
||||||
assign {Carry, Sum} = CondShiftA + CondInvB + {{(WIDTH-1){1'b0}}, SubArith};
|
assign {Carry, Sum} = CondShiftA + CondInvB + {{(WIDTH-1){1'b0}}, SubArith};
|
||||||
|
@ -69,7 +69,7 @@ module bmuctrl(
|
|||||||
// Main Instruction Decoder
|
// Main Instruction Decoder
|
||||||
always_comb
|
always_comb
|
||||||
casez({OpD, Funct7D, Funct3D})
|
casez({OpD, Funct7D, Funct3D})
|
||||||
// ALUSelect_BSelect_ZBBSelect_BRegWrite_BW64_BALUOp
|
// ALUSelect_BSelect_ZBBSelect_BRegWrite_BW64_BALUOp_IllegalBitmanipInstrD
|
||||||
// ZBS
|
// ZBS
|
||||||
17'b0010011_0100100_001: BMUControlsD = `BMUCTRLW'b111_0001_000_1_0_1_0; // bclri
|
17'b0010011_0100100_001: BMUControlsD = `BMUCTRLW'b111_0001_000_1_0_1_0; // bclri
|
||||||
17'b0010011_0100101_001: if (`XLEN == 64)
|
17'b0010011_0100101_001: if (`XLEN == 64)
|
||||||
|
Loading…
Reference in New Issue
Block a user