From cc8b25b0196053cf58e8724df57b3c97033aaf03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joachim=20Stro=CC=88mbergson?= Date: Fri, 7 Sep 2018 09:52:01 +0200 Subject: Test write to all positions in the mem. --- src/tb/tb_keywrap_mem.v | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/tb/tb_keywrap_mem.v') 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; -- cgit v1.2.3