Change addr_decode test to use new io locations
Instead of whatever was there before, the new io locations are ram, rom, and the hex digits.
This commit is contained in:
@@ -7,7 +7,9 @@ timeprecision 1ns;
|
|||||||
logic [15:0] addr;
|
logic [15:0] addr;
|
||||||
logic ram_cs;
|
logic ram_cs;
|
||||||
logic rom_cs;
|
logic rom_cs;
|
||||||
logic io_cs;
|
logic hex_cs;
|
||||||
|
|
||||||
|
int cs_count = ram_cs + rom_cs + hex_cs;
|
||||||
|
|
||||||
addr_decode dut(.*);
|
addr_decode dut(.*);
|
||||||
|
|
||||||
@@ -16,13 +18,16 @@ initial begin : TEST_VECTORS
|
|||||||
for (int i = 0; i < 2**16; i++) begin
|
for (int i = 0; i < 2**16; i++) begin
|
||||||
addr <= i;
|
addr <= i;
|
||||||
#1
|
#1
|
||||||
|
assert(cs_count < 2)
|
||||||
|
else
|
||||||
|
$error("Multiple chip selects present!");
|
||||||
if (i < 16'h7ff0) begin
|
if (i < 16'h7ff0) begin
|
||||||
assert(ram_cs == '1)
|
assert(ram_cs == '1)
|
||||||
else
|
else
|
||||||
$error("Bad CS! addr=%4x should have ram_cs!", addr);
|
$error("Bad CS! addr=%4x should have ram_cs!", addr);
|
||||||
end
|
end
|
||||||
if (i >= 16'h7ff0 && i < 16'h8000) begin
|
if (i >= 16'h7ff0 && i < 16'h7ff2) begin
|
||||||
assert(io_cs == '1)
|
assert(hex_cs == '1)
|
||||||
else
|
else
|
||||||
$error("Bad CS! addr=%4x should have io_cs!", addr);
|
$error("Bad CS! addr=%4x should have io_cs!", addr);
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user