aboutsummaryrefslogtreecommitdiffstats
path: root/spiflash/testbench.v
diff options
context:
space:
mode:
Diffstat (limited to 'spiflash/testbench.v')
-rw-r--r--spiflash/testbench.v18
1 files changed, 15 insertions, 3 deletions
diff --git a/spiflash/testbench.v b/spiflash/testbench.v
index 6b4aaef..3a61414 100644
--- a/spiflash/testbench.v
+++ b/spiflash/testbench.v
@@ -5,9 +5,10 @@ module testbench;
initial begin
$dumpfile("testbench.vcd");
$dumpvars(0, testbench);
- repeat (10000) @(posedge clk);
- $display("<END>");
- $finish;
+ repeat (100000) @(posedge clk);
+ $display("");
+ $display("[TIMEOUT]");
+ $stop;
end
wire [31:0] gpio_i = 0;
@@ -18,6 +19,17 @@ module testbench;
wire spi_mosi;
wire spi_miso;
+ always @(gpio_o) begin
+ $write("<GPIO:%02x>", gpio_o[7:0]);
+ if (gpio_o == 63) begin
+ $display("[OK]");
+ $finish;
+ end
+ if (gpio_o % 8 == 7) begin
+ $display("");
+ end
+ end
+
top uut (
.clk (clk ),
.gpio_i (gpio_i ),