clmul passes lint

This commit is contained in:
Kevin Kim 2023-02-11 19:16:13 -08:00
parent d7c540d047
commit 76bc1b5999

View File

@ -37,14 +37,26 @@ module clmul #(parameter WIDTH=32) (
// Note: only generates the bottom WIDTH bits of the carryless multiply.
// To get the high bits or the reversed bits, the inputs can be shifted and reversed
// as they are in zbc where this is instantiated
/*
genvar i;
for (i=0; i<WIDTH; i++) begin
assign pp[i] = ((A & {(WIDTH){B[i]}}) << i); // Fill partial product array
// ClmulResult ^= pp[i];
end
assign ClmulResult = pp.xor();
*/
genvar i,j;
for (i=1; i<WIDTH;i++) begin:outer //loop fills partial product array
for (j=0;j<=i;j++) begin: inner
assign pp[i][j] = A[i]&B[j];
end
end
for (i=1;i<WIDTH;i++) begin:xortree
assign ClmulResult[i] = ^pp[i:0][i];
end
assign ClmulResult[0] = A[0]&B[0];
endmodule