aboutsummaryrefslogtreecommitdiff
path: root/src/rtl/keywrap.v
diff options
context:
space:
mode:
Diffstat (limited to 'src/rtl/keywrap.v')
-rw-r--r--src/rtl/keywrap.v4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rtl/keywrap.v b/src/rtl/keywrap.v
index 73a861c..d6a2b5e 100644
--- a/src/rtl/keywrap.v
+++ b/src/rtl/keywrap.v
@@ -262,7 +262,7 @@ module keywrap #(parameter ADDR_BITS = 13)
end
if (rlen_we)
- rlen_reg <= write_data[12 : 0];
+ rlen_reg <= write_data[(RLEN_BITS - 1) : 0];
if (a0_we)
a0_reg <= write_data;
@@ -374,7 +374,7 @@ module keywrap #(parameter ADDR_BITS = 13)
api_rd_delay_new = timeout_reg;
if (address == {{PAD{1'h0}}, ADDR_RLEN})
- api_rd_delay_new = {19'h0, rlen_reg};
+ api_rd_delay_new = {{(32 - RLEN_BITS){1'h0}}, rlen_reg};
if (address == {{PAD{1'h0}}, ADDR_A0})
api_rd_delay_new = core_a_result[63 : 32];