Skip to content

Commit

Permalink
Merge pull request #667 from stineje/main
Browse files Browse the repository at this point in the history
fix elements forgot to delete from zknh32.sv
  • Loading branch information
davidharrishmc authored Mar 12, 2024
2 parents d11afcf + 41ab94c commit 4695418
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 29 deletions.
28 changes: 0 additions & 28 deletions src/ieu/kmu/zknh32.sv
Original file line number Diff line number Diff line change
Expand Up @@ -37,32 +37,4 @@ module zknh32 (
sha256 sha256(A, ZKNHSelect[1:0], sha256res); // 256-bit SHA support: sha256{sig0/sig1/sum0/sum1}
sha512_32 sha512(A, B, ZKNHSelect[2:0], sha512res); // 512-bit SHA support: sha512{sig0h/sig0l/sig1h/sig1l/sum0r/sum1r}
mux2 #(32) resultmux(sha256res, sha512res, ZKNHSelect[3], ZKNHResult); // SHA256 vs. SHA512 result mux

/*
sha256sig0 #(32) sha256sig0(A, sha256sig0res);
sha256sig1 #(32) sha256sig1(A, sha256sig1res);
sha256sum0 #(32) sha256sum0(A, sha256sum0res);
sha256sum1 #(32) sha256sum1(A, sha256sum1res);
sha512sig0h sha512sig0h(A, B, sha512sig0hres);
sha512sig0l sha512sig0l(A, B, sha512sig0lres);
sha512sig1h sha512sig1h(A, B, sha512sig1hres);
sha512sig1l sha512sig1l(A, B, sha512sig1lres);
sha512sum0r sha512sum0r(A, B, sha512sum0rres);
sha512sum1r sha512sum1r(A, B, sha512sum1rres);
// Result Select Mux
always_comb
casez(ZKNHSelect)
4'b0000: ZKNHResult = sha256sig0res;
4'b0001: ZKNHResult = sha256sig1res;
4'b0010: ZKNHResult = sha256sum0res;
4'b0011: ZKNHResult = sha256sum1res;
4'b0100: ZKNHResult = sha512sig0hres;
4'b0101: ZKNHResult = sha512sig0lres;
4'b0110: ZKNHResult = sha512sig1hres;
4'b0111: ZKNHResult = sha512sig1lres;
4'b1000: ZKNHResult = sha512sum0rres;
4'b1001: ZKNHResult = sha512sum1rres;
default: ZKNHResult = 0;
endcase */
endmodule
2 changes: 1 addition & 1 deletion src/ieu/kmu/zknh64.sv
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
module zknh64 (
input logic [63:0] A, B,
input logic [3:0] ZKNHSelect,
output logic [63:0] ZKNHResult
output logic [63:0] ZKNHResult
);

logic [31:0] sha256_32;
Expand Down

0 comments on commit 4695418

Please sign in to comment.