fixed controller lint, changed byte unit mux select name and input width

This commit is contained in:
Kevin Kim 2023-03-02 11:36:12 -08:00
parent 96995c5593
commit 44d40afca8
3 changed files with 5 additions and 4 deletions

View File

@ -30,7 +30,8 @@
`include "wally-config.vh" `include "wally-config.vh"
module byteUnit #(parameter WIDTH=32) ( module byteUnit #(parameter WIDTH=32) (
input logic [WIDTH-1:0] A, B, // Operands input logic [WIDTH-1:0] A, // Operands
input logic ByteSelect, // LSB of Immediate
output logic [WIDTH-1:0] ByteResult); // rev8, orcb result output logic [WIDTH-1:0] ByteResult); // rev8, orcb result
logic [WIDTH-1:0] OrcBResult, Rev8Result; logic [WIDTH-1:0] OrcBResult, Rev8Result;
@ -41,6 +42,6 @@ module byteUnit #(parameter WIDTH=32) (
assign Rev8Result[WIDTH-i-1:WIDTH-i-8] = A[i+7:i]; assign Rev8Result[WIDTH-i-1:WIDTH-i-8] = A[i+7:i];
end end
assign ByteResult = (B[0]) ? OrcBResult : Rev8Result; assign ByteResult = (ByteSelect) ? OrcBResult : Rev8Result;
endmodule endmodule

View File

@ -54,7 +54,7 @@ module zbb #(parameter WIDTH=32) (
logic [WIDTH-1:0] ExtResult; // sign/zero extend result logic [WIDTH-1:0] ExtResult; // sign/zero extend result
cnt #(WIDTH) cnt(.A(A), .B(B), .W64(W64), .CntResult(CntResult)); cnt #(WIDTH) cnt(.A(A), .B(B), .W64(W64), .CntResult(CntResult));
byteUnit #(WIDTH) bu(.A(A), .B(B), .ByteResult(ByteResult)); byteUnit #(WIDTH) bu(.A(A), .ByteSelect(B[0]), .ByteResult(ByteResult));
ext #(WIDTH) ext(.A(A), .B(B), .ExtResult(ExtResult)); ext #(WIDTH) ext(.A(A), .B(B), .ExtResult(ExtResult));

View File

@ -244,7 +244,7 @@ module controller(
assign ALUControlD = {W64D, SubArithD, ALUOpD}; assign ALUControlD = {W64D, SubArithD, ALUOpD};
if (`ZBS_SUPPORTED | `ZBA_SUPPORTED | `ZBB_SUPPORTED | `ZBC_SUPPORTED) begin: bitmanipi //change the conditional expression to OR any Z supported flags if (`ZBS_SUPPORTED | `ZBA_SUPPORTED | `ZBB_SUPPORTED | `ZBC_SUPPORTED) begin: bitmanipi //change the conditional expression to OR any Z supported flags
bmuctrl bmuctrl(.clk, .reset, .StallD, .FlushD, .InstrD, .ALUSelectD, .BSelectD, .ZBBSelectD, .BRegWriteD, BW64D, BALUOpD, .StallE, .FlushE, .ALUSelectE, .BSelectE, .ZBBSelectE); bmuctrl bmuctrl(.clk, .reset, .StallD, .FlushD, .InstrD, .ALUSelectD, .BSelectD, .ZBBSelectD, .BRegWriteD, .BW64D, .BALUOpD, .StallE, .FlushE, .ALUSelectE, .BSelectE, .ZBBSelectE);
end else begin: bitmanipi end else begin: bitmanipi
assign ALUSelectD = Funct3D; assign ALUSelectD = Funct3D;
assign ALUSelectE = Funct3E; assign ALUSelectE = Funct3E;