Update mm_testbench

This commit is contained in:
Byron Lathi
2022-04-07 10:48:10 -05:00
parent 7434621209
commit 5548f9d02a
2 changed files with 12 additions and 0 deletions

View File

@@ -6,6 +6,7 @@ timeprecision 1ns;
logic clk_50, clk, cs;
logic rw, MM_cs;
logic rst;
logic [3:0] RS, MA;
logic [7:0] data_in;
logic [7:0] data_out;
@@ -56,6 +57,10 @@ task enable(logic [7:0] data);
endtask
initial begin
rst <= '1;
repeat(5) @(posedge clk);
rst <= '0;
cpu_addr <= 16'h0abc;
write_reg(4'h0, 8'hcc);
$display("Address: %x", mm_address);

View File

@@ -15,3 +15,10 @@ add wave -group {dut} -radix hexadecimal sim:/testbench/dut/*
onfinish stop
run -all
if { [coverage attribute -name TESTSTATUS -concise] == "1"} {
echo Warning
quit -f -code 0
}
quit -code [coverage attribute -name TESTSTATUS -concise]