Testbench : HowTo


#1

Hi.
I am new to TinyFPGA and solved to program the BX with the sample program and also did some modifications. Very fine.
But if I use the sim in Apio I get the following error message:
Error: no testbench found for simulation
What does that mean? Is there some description what I need to do? Manual?

thanx for help in advance.


#2

It means you do not have a top_tb.v file. You need the tb (testbench) file to run simulations.

Here is a not very good one for blinky:


#3

Hi
Everything fine. Works. Thank you
Regards


#4

I tried using this tb file, but the LED signal from ‘t’ is always ‘x’ (unknown) in gtkwave.

What follows is the start of the tob_tb.vcd file. How does it compare to yours? I assume I should see a 0$ or 1$ somewhere (because of the $var wire 1 $ LED $end line?) but I don’t. I haven’t actually looked into the gtkwave format yet, so I don’t know what should be in it.

$date
Thu Oct 3 19:42:09 2019
$end
$version
Icarus Verilog
$end
$timescale
1ps
$end
$scope module tb $end
$scope module t $end
$var wire 1 ! CLK $end
$var wire 1 " USBPU $end
$var wire 32 # blink_pattern [31:0] $end
$var wire 1 $ LED $end
$var reg 26 % blink_counter [25:0] $end
$upscope $end
$upscope $end
$enddefinitions $end
#0
$dumpvars
bx %
x$
b101010001110111011100010101 #
0"
0!
$end
#31000
1!
#62000
0!
#93000
1!
#124000
0!

Eric