aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJoachim StroĢˆmbergson <joachim@secworks.se>2018-09-07 09:52:01 +0200
committerJoachim StroĢˆmbergson <joachim@secworks.se>2018-09-07 09:52:01 +0200
commitcc8b25b0196053cf58e8724df57b3c97033aaf03 (patch)
tree0128e78e2aa9b9e1979ddb8d6e0e3cc32d8499c2 /src
parentef8a8eae18b6cd4aae7c19940a1d9be389f8952e (diff)
Test write to all positions in the mem.
Diffstat (limited to 'src')
-rw-r--r--src/tb/tb_keywrap_mem.v6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/tb/tb_keywrap_mem.v b/src/tb/tb_keywrap_mem.v
index 0cc8ca0..58169b9 100644
--- a/src/tb/tb_keywrap_mem.v
+++ b/src/tb/tb_keywrap_mem.v
@@ -146,7 +146,7 @@ module tb_keywrap_mem();
reg [13 : 0] addr_ctr;
$display("Content of the memory:");
- for (addr_ctr = 0 ; addr_ctr <= API_ADDR_MAX ; addr_ctr = addr_ctr + 1)
+ for (addr_ctr = 0 ; addr_ctr < API_ADDR_MAX ; addr_ctr = addr_ctr + 1)
begin
tb_api_addr = addr_ctr;
#(CLK_PERIOD);
@@ -206,11 +206,11 @@ module tb_keywrap_mem();
//----------------------------------------------------------------
task test_api_write;
begin : test_api_write
- reg [(API_ADDR_BITS - 1) : 0] addr_ctr;
+ reg [API_ADDR_BITS : 0] addr_ctr;
$display("** TC API WRITE START");
- for (addr_ctr = 0 ; addr_ctr < API_ADDR_MAX ; addr_ctr = addr_ctr + 1)
+ for (addr_ctr = 0 ; addr_ctr < (API_ADDR_MAX + 1); addr_ctr = addr_ctr + 1)
begin
tb_api_we = 1;
tb_api_addr = addr_ctr;