From 5bdc5cc032fb64912437fd118497d8aeac2a651f Mon Sep 17 00:00:00 2001 From: Nekkit6 Date: Tue, 19 Sep 2023 22:49:45 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D1=80=D0=B0=D0=B2=D0=BA=D0=B0=20tb=5Fdat?= =?UTF-8?q?a=5Fmem?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Labs/03. Register file and memory/tb_data_mem.sv | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Labs/03. Register file and memory/tb_data_mem.sv b/Labs/03. Register file and memory/tb_data_mem.sv index d7807cfd..1f1e686c 100644 --- a/Labs/03. Register file and memory/tb_data_mem.sv +++ b/Labs/03. Register file and memory/tb_data_mem.sv @@ -103,7 +103,7 @@ parameter STEP = 8; for (i = 0; i < 4; i = i + 1) begin if(i==0) begin repeat(2)@(posedge CLK); - RDa = RD; + #1; RDa = RD; end else if(RD !== RDa) begin $display("incorrect conversion of the reading address = %h, time: %t", A, $time); @@ -121,6 +121,13 @@ parameter STEP = 8; $display("reading from data memory must be synchronous, time: %t", $time); err_count = err_count + 1; end + @(posedge CLK); + i = {14{1'b1}}; + repeat(2) @(posedge CLK); + if (RD === 'd3735928559) begin + $display("incorrect reading from address = %d, data = %h", A, RD); + err_count = err_count + 1; + end $display("Number of errors: %d", err_count); if( !err_count ) $display("\ndata_mem SUCCESS!!!\n"); $finish();