Skip to content

Commit

Permalink
Fix KSU and prng for linting tests + move to last version of COMPRESS
Browse files Browse the repository at this point in the history
  • Loading branch information
cmomin committed Oct 9, 2024
1 parent 57e352d commit 148cf54
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions hdl/smaesh_hpc/MSKkey_holder.v
Original file line number Diff line number Diff line change
Expand Up @@ -239,9 +239,9 @@ reg in_branch_compute_last, in_padding, in_fetch_new_key, in_fetch_last_key, in_
// Assign the words_per_share_bound
always@(*) begin
case(cfg_key_size)
KSIZE_192: words_per_share_bound = in_padding ? NW_OFFSET192-1 : AMW_192-1;
KSIZE_256: words_per_share_bound = AMW_256-1;
default: words_per_share_bound = AMW_128-1;
KSIZE_192: words_per_share_bound = in_padding ? (SIZE_CNT'(NW_OFFSET192-1)) : (SIZE_CNT'(AMW_192-1));
KSIZE_256: words_per_share_bound = (SIZE_CNT'(AMW_256-1));
default: words_per_share_bound = (SIZE_CNT'(AMW_128-1));
endcase
end

Expand All @@ -262,7 +262,7 @@ always@(*) begin
// through the pipeline.
case(cfg_key_size)
KSIZE_192: begin
last_refresh_word = (share_idx == 1) & (word_idx == NW_OFFSET192-1);
last_refresh_word = (share_idx == 1) & (word_idx == (SIZE_CNT'(NW_OFFSET192-1)));
end
KSIZE_256: begin
last_refresh_word = (share_idx == 0) & (word_idx == words_per_share_bound);
Expand Down
2 changes: 1 addition & 1 deletion hdl/smaesh_hpc/rnd_gen/prng_top.v
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ always @(*) begin
core_update = 1;
// Stay in RESEED for LAT_INIT+1 cycles.
// The +1 stands for the cycle for the output to go through reg_rnd_out.
if (cnt_fsm == LAT_INIT) begin
if (cnt_fsm == (ADDR'(LAT_INIT))) begin
nextstate = RUNNING;
end
end
Expand Down
2 changes: 1 addition & 1 deletion sboxes-compress/compress
Submodule compress updated 1 files
+2 −2 scripts/compress.py

0 comments on commit 148cf54

Please sign in to comment.