mirror of
https://github.com/tillitis/tillitis-key1.git
synced 2025-02-10 03:49:51 -05:00
Display errors in tb_tk1 even if DEBUG is 0
Always display errors to make them easy to find and troubleshoot.
This commit is contained in:
parent
97b1ea6df2
commit
1a450cfddb
@ -18,7 +18,7 @@ module tb_tk1 ();
|
|||||||
//----------------------------------------------------------------
|
//----------------------------------------------------------------
|
||||||
// Internal constant and parameter definitions.
|
// Internal constant and parameter definitions.
|
||||||
//----------------------------------------------------------------
|
//----------------------------------------------------------------
|
||||||
parameter DEBUG = 1;
|
parameter DEBUG = 0;
|
||||||
|
|
||||||
parameter CLK_HALF_PERIOD = 1;
|
parameter CLK_HALF_PERIOD = 1;
|
||||||
parameter CLK_PERIOD = 2 * CLK_HALF_PERIOD;
|
parameter CLK_PERIOD = 2 * CLK_HALF_PERIOD;
|
||||||
@ -353,17 +353,16 @@ module tb_tk1 ();
|
|||||||
#(CLK_PERIOD);
|
#(CLK_PERIOD);
|
||||||
tb_cs = 1'h0;
|
tb_cs = 1'h0;
|
||||||
|
|
||||||
if (DEBUG) begin
|
|
||||||
if (read_data == expected) begin
|
if (read_data == expected) begin
|
||||||
|
if (DEBUG) begin
|
||||||
$display("--- Reading 0x%08x from 0x%02x.", read_data, address);
|
$display("--- Reading 0x%08x from 0x%02x.", read_data, address);
|
||||||
end
|
end
|
||||||
|
end
|
||||||
else begin
|
else begin
|
||||||
$display("--- Error: Got 0x%08x when reading from 0x%02x, expected 0x%08x", read_data,
|
$display("--- Error: Got 0x%08x when reading from 0x%02x, expected 0x%08x", read_data,
|
||||||
address, expected);
|
address, expected);
|
||||||
error_ctr = error_ctr + 1;
|
error_ctr = error_ctr + 1;
|
||||||
end
|
end
|
||||||
$display("");
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
endtask // read_check_word
|
endtask // read_check_word
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user