forked from Github_Repos/cvw
added comments to zbc units
This commit is contained in:
parent
aad4d13603
commit
465aad372a
@ -89,11 +89,13 @@ module alu #(parameter WIDTH=32) (
|
||||
if (WIDTH == 64) assign ALUResult = W64 ? {{32{FullResult[31]}}, FullResult[31:0]} : FullResult;
|
||||
else assign ALUResult = FullResult;
|
||||
|
||||
//NOTE: This looks good and can be merged.
|
||||
if (`ZBC_SUPPORTED) begin: zbc
|
||||
zbc #(WIDTH) ZBC(.A(A), .B(B), .Funct3(Funct3), .ZBCResult(ZBCResult));
|
||||
end else assign ZBCResult = 0;
|
||||
|
||||
|
||||
//NOTE: Unoptimized, eventually want to look at ZBCop/ZBSop/ZBAop/ZBBop from decoder to select from a B instruction or the ALU
|
||||
if (`ZBC_SUPPORTED) begin : zbcdecoder
|
||||
always_comb
|
||||
case ({Funct7, Funct3})
|
||||
|
@ -33,8 +33,7 @@ module clmul #(parameter WIDTH=32) (
|
||||
input logic [WIDTH-1:0] A, B, // Operands
|
||||
output logic [WIDTH-1:0] ClmulResult); // ZBS result
|
||||
|
||||
logic [(WIDTH*WIDTH)-1:0] s;
|
||||
logic [WIDTH-1:0] intial;
|
||||
logic [(WIDTH*WIDTH)-1:0] s; // intermediary signals for carry-less multiply
|
||||
|
||||
integer i;
|
||||
integer j;
|
||||
|
@ -38,10 +38,10 @@ module zbc #(parameter WIDTH=32) (
|
||||
logic [WIDTH-1:0] RevA, RevB;
|
||||
logic [WIDTH-1:0] x,y;
|
||||
|
||||
|
||||
bitreverse #(WIDTH) brA(.a(A), .b(RevA));
|
||||
bitreverse #(WIDTH) brB(.a(B), .b(RevB));
|
||||
|
||||
//NOTE: Optimize this when doing decoder stuff.
|
||||
always_comb begin
|
||||
casez (Funct3)
|
||||
3'b001: begin //clmul
|
||||
|
Loading…
Reference in New Issue
Block a user