Line 1... |
Line 1... |
# $Id: w11a_tb_guide.txt 352 2011-01-02 13:01:37Z mueller $
|
# $Id: w11a_tb_guide.txt 376 2011-04-17 12:24:07Z mueller $
|
|
|
Guide to running w11a test benches
|
Guide to running w11a test benches
|
|
|
Table of content:
|
Table of content:
|
|
|
Line 122... |
Line 122... |
-> 1220255.0 ns 61003: DONE
|
-> 1220255.0 ns 61003: DONE
|
-> real 1m9.738s user 1m9.588s sys 0m0.096s
|
-> real 1m9.738s user 1m9.588s sys 0m0.096s
|
|
|
3. System tests benches ---------------------------------------------------
|
3. System tests benches ---------------------------------------------------
|
|
|
The system tests allow to verify to verify the full 11/70 SoC design.
|
The system tests allow to verify to verify a full system design.
|
In this case vhdl test bench code contains
|
In this case vhdl test bench code contains
|
- (simple) models of the memories used on the FPGA boards
|
- (simple) models of the memories used on the FPGA boards
|
- drivers for the rlink connection (currently just serialport)
|
- drivers for the rlink connection (currently just serialport)
|
- code to interface the rlink data stream to a UNIX 'named pipe',
|
- code to interface the rlink data stream to a UNIX 'named pipe',
|
implemented with a C routine which is called via VHPI from VHDL.
|
implemented with a C routine which is called via VHPI from VHDL.
|
This way the whole ghdl simulation can be controlled via a di-directional
|
This way the whole ghdl simulation can be controlled via a di-directional
|
byte stream.
|
byte stream.
|
|
|
The rlink backend process, currently a perl script named pi_rri, can connect
|
The rlink backend process can connect either via a named pipe to a ghdl
|
either via a named pipe to a ghdl simulation, or via a serial port to a
|
simulation, or via a serial port to a FPGA board. This way the same tests
|
FPGA board. This way the same tests can be executed in simulation and
|
can be executed in simulation and on real hardware.
|
on real hardware.
|
|
|
Currently two backend implementations are available:
|
|
- pi_rri: written in perl (old, slow, but full functionality)
|
|
- ti_tti: written in C++ and Tcl (new, fast, but as of V0.53 only with
|
|
limited functionality; will replace pi_rri).
|
|
|
4. Available system tests benches -----------------------------------------
|
4. Available system tests benches -----------------------------------------
|
|
|
|
4a. rlink tester -----------------------------------------------------
|
|
|
|
The sys_tst_rlink design is a test target for validating the rlink
|
|
and rbus functionality at all levels.
|
|
|
|
- sys_tst_rlink_n2 test bench
|
|
|
|
cd $RETROBASE/rtl/sys_gen/tst_rlink/nexys2/tb
|
|
make tb_tst_rlink_n2
|
|
time ti_rri --run="tbw tb_tst_rlink_n2" --fifo --logl=3 -- \
|
|
"package require tst_rlink" "tst_rlink::setup" "tst_rlink::test_all" |\
|
|
tee tb_tst_rlink_n2_dsim.log | egrep "(-[EW]:|FAIL|PEND|DONE)"
|
|
-> 1769140.0 ns 88446: DONE
|
|
-> real 0m15.289s
|
|
|
|
4b. w11a systems -----------------------------------------------------
|
|
|
The stimulus file used in the w11a core test can be executed in the
|
The stimulus file used in the w11a core test can be executed in the
|
full system context (both s3board and nexys2 versions) with the
|
full system context (both s3board and nexys2 versions) with the
|
following commands. Note that the cycle number printed in the DONE
|
following commands. Note that the cycle number printed in the DONE
|
line can now vary slightly because the response time of the rlink
|
line can now vary slightly because the response time of the rlink
|
backend process and thus scheduling of backend vs. ghdl process
|
backend process and thus scheduling of backend vs. ghdl process
|
can affect the result.
|
can affect the result.
|
|
|
- sys_w11a_s3 system test
|
- sys_w11a_s3 test bench
|
|
|
cd $RETROBASE/rtl/sys_gen/w11a/s3board/tb
|
cd $RETROBASE/rtl/sys_gen/w11a/s3board/tb
|
make tb_w11a_s3
|
make tb_w11a_s3
|
time pi_rri --fifo --timeout=40. --cmax=3 \
|
time pi_rri --fifo --timeout=40. --cmax=3 \
|
--run="tbw tb_w11a_s3" -- \
|
--run="tbw tb_w11a_s3" -- \
|
@../../../../w11a/tb/tb_pdp11core_stim.dat |\
|
@../../../../w11a/tb/tb_pdp11core_stim.dat |\
|
tee tb_w11a_s3_stim2_dsim.log | egrep "(-[EW]:|FAIL|PEND|DONE)"
|
tee tb_w11a_s3_stim2_dsim.log | egrep "(-[EW]:|FAIL|PEND|DONE)"
|
-> 7757655.0 ns 387873: DONE
|
-> 7757655.0 ns 387873: DONE
|
-> real 0m49.835s user 0m50.203s sys 0m0.696s
|
-> real 0m49.835s user 0m50.203s sys 0m0.696s
|
|
|
- sys_w11a_n2 system test
|
- sys_w11a_n2 test bench
|
|
|
cd $RETROBASE/rtl/sys_gen/w11a/nexys2/tb
|
cd $RETROBASE/rtl/sys_gen/w11a/nexys2/tb
|
make tb_w11a_n2
|
make tb_w11a_n2
|
time pi_rri --fifo --timeout=40. --cmax=3 \
|
time pi_rri --fifo --timeout=40. --cmax=3 \
|
--run="tbw tb_w11a_n2" -- \
|
--run="tbw tb_w11a_n2" -- \
|