OpenCores
URL https://opencores.org/ocsvn/w11/w11/trunk

Subversion Repositories w11

[/] [w11/] [tags/] [w11a_V0.6/] [doc/] [man/] [man1/] [tbw.1] - Blame information for rev 24

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 22 wfjm
.\"  -*- nroff -*-
2
.\"  $Id: tbw.1 550 2014-02-03 08:16:57Z mueller $
3
.\"
4
.\" Copyright 2013- by Walter F.J. Mueller 
5
.\"
6
.\" ------------------------------------------------------------------
7
.
8
.TH TBW 1 2011-11-06 "Retro Project" "Retro Project Manual"
9
.\" ------------------------------------------------------------------
10
.SH NAME
11
tbw \- wrapper script to start ghdl based VHDL test benches
12
.\" ------------------------------------------------------------------
13
.SH SYNOPSIS
14
.
15
.SY tbw
16
.I TBPROG
17
.RI [ FILEDEF ]...
18
.RI [ GHDL-OPTIONS ]...
19
.
20
.SY tbw
21
.B \-\-help
22
.YS
23
.
24
.\" ------------------------------------------------------------------
25
.SH DESCRIPTION
26
Executes the \fBghdl\fP based test bench \fITBPROG\fP in an environment
27
defined by the descriptor file \fItbw.dat\fP and the \fIFILEDEF\fP
28
arguments. Any additional options \fIGHDL-OPTIONS\fP are passed on to the test
29
bench executable.
30
 
31
.SS Backgroud
32
The VHDL implementation in \fBghdl\fP has no direct support for passing
33
command line arguments to the VHDL code. All test benches in the Retro
34
project use therefore fixed build-in generic file names. By convention
35
they refer to symlinks (see \fBsymlink\fP(7)) which are setup by
36
\fBtbw\fP to point to a specific file prior to the execution of the
37
test bench.
38
 
39
.SS Default behaviour
40
In the simplest case \fBtbw\fP assumes a test bench with a single stimulus
41
file which is opened by convention as \'_stim\'. The default
42
stimulus file is named \'_stim.dat\'. \fBtbw\fP will simply
43
define \'_stim\' as a symlink refering to \'_stim.dat\',
44
or if defined to \fIFILEDEF\fP, and execute \fITBPROG\fP. In essence
45
 
46
.EX
47
    ln -s -f _stim.dat _stim
48
     
49
.EE
50
.
51
.SS Using a \fItbw.dat\fP configuration file
52
When the generic file name or the stimulus file name does not follow the
53
simple default pattern or more than one input file is required a
54
configuration file can be used to define the setup. It has the fixed
55
name \fItbw.dat\fP and is searched the current working directory. The
56
format is described in section FILES.
57
 
58
In this case the \fIFILEDEF\fP argument can be specified as 'tag=value'
59
pairs where tag refers to a generic name and value gives the concrete
60
file name. Useful when several input files are to be specified.
61
.
62
.SS Test benches controlled with \fBti_rri\fP
63
In this case the communication between test bench and the controlling
64
\fBti_rri\fP is done via two named pipes (see \fBfifo\fP(7)). The test
65
bench might open in addition a configuration file. This setup is also
66
defined via the \fItbw.dat\fP file, for details see section FILES.
67
.
68
.\" ------------------------------------------------------------------
69
.SH GHDL OPTIONS
70
All options are passed on to the test bench executable. The list of
71
available options for a \fBghdl\fP generated executable can be inquired
72
with the "\fB\-\-help\fR" option. Some especially useful options are:
73
.
74
.\" ----------------------------------------------
75
.IP "\fB\-\-wave=\fIfile\fR"
76
dump signal values into a wave file (use file type .ghw). Far superior
77
to the VCD format and allows to inspect all VHDL records and all data types
78
with \fBgtkwave\fP(1).
79
.
80
.\" ----------------------------------------------
81
.IP "\fB\-\-stack-max-size\fP=\fIn\fR"
82
set maximum stack size. Very helpful in case of very large models. A value
83
of \fIn\fP=16384 is in general enough for all generated models, which usually
84
have a large number of very simple processes.
85
.
86
.\" ----------------------------------------------
87
.IP "\fB\-\-stop-time\fI=t\fR"
88
stop the simulation at time \fIt\fP (in VHDL notation, e.g. 100ns).
89
.
90
.\" ----------------------------------------------
91
.IP "\fB\-\-disp-time\fR"
92
display time as simulation advances.
93
.
94
.\" ----------------------------------------------
95
.IP "\fB\-\-trace-processes\fR"
96
display process name before each cycle.
97
.
98
.\" ------------------------------------------------------------------
99
.SH FILES
100
.IP "\fI./tbw.dat\fR" 4
101
This configuration file is searched for in the current working directory
102
and holds associations between generic file names and concrete file names
103
for one or more test bench executables. It contains sections of the format
104
 
105
.EX
106
    [\fITBPROG\fP]
107
     = 
108
     = 
109
...
110
.EE
111
 
112
.RS
113
.IP "\fBUsage with Stimulus file based test benches\fR" 4
114
\fBtbw\fP will create a \fBsymlink\fP(7) with the generic name which
115
refers to the given concrete file name. A typical example is
116
 
117
.EX
118
    [tb_nx_cram_memctl_as]
119
    tb_nx_cram_memctl_stim = tb_nx_cram_memctl_stim.dat
120
.EE
121
 
122
.IP "\fBUsage with test benches controlled with ti_rri\fR"
123
The special token \fI\fP indicates that a named pipe is used
124
rather than a normal file. In this case \fBtbw\fP will create a
125
\fBfifo\fP(7) rather than a symlink. Another special token is
126
 \fI\fP, it simply translates to \fI/dev/null\fP and can be
127
used as default value for configuration files. Currently all
128
\fBrlink\fP based test benches use the same generic names and have
129
a setup like
130
 
131
.EX
132
    [tb_w11a_n3]
133
    rlink_cext_fifo_rx = 
134
    rlink_cext_fifo_tx = 
135
    rlink_cext_conf = 
136
.EE
137
 
138
.RE
139
.
140
.\" ------------------------------------------------------------------
141
.SH EXAMPLES
142
.SS Stimulus file based test benches
143
Test benches are usually self-checking and produce a comprehensive log file.
144
For each checked response the line contains the word \fICHECK\fP and either
145
an \fIOK\fP or a \fIFAIL\fP, in the later case in general with an indication
146
of whats wrong.
147
Other unexpected behaviour, like timeouts, will also result in a line
148
containing the word \fIFAIL\fP.
149
When the simulation stops a line with the word \fIDONE\fP is printed.
150
These test benches are usually run like
151
 
152
.EX
153
  tbw  [stimfile] | tee  | egrep "(FAIL|DONE)"
154
.EE
155
 
156
where
157
.RS 2
158
.PD 0
159
.IP "\-" 2
160
\fBtbw\fP sets up the stimulus file and runs the test bench executable
161
.IP "\-"
162
\fBtee\fP ensures that the full log is saved
163
.IP "\-"
164
\fBegrep\fP filters \fIFAIL\fP and \fIDONE\fP lines, a successful run will
165
produce a single \fIDONE\fP line
166
.PD
167
.RE
168
 
169
.SS Test benches controlled with \fBti_rri\fP
170
In these cases the test bench is started via \fBti_rri\fP using the
171
\fB\-\-run\fP and \fB\-\-fifo\fP options. Also here Usually a pipe with
172
\fBtee\fP and \fBegrep\fP is used, a typical example is
173
 
174
.EX
175
  ti_rri \-\-run="tbw tb_tst_rlink_n3" \-\-fifo \-\-logl=3 \-\- \\
176
        "package require tst_rlink" \\
177
        "tst_rlink::setup" "tst_rlink::test_all" |\\
178
     tee tb_tst_rlink_n3_dsim.log |\\
179
     egrep "(\-[EFW]:|FAIL|PEND|DONE)"
180
.EE
181
 
182
.
183
.\" ------------------------------------------------------------------
184
.SH "SEE ALSO"
185
.BR ti_rri (1),
186
.BR gtkwave (1),
187
.BR symlink (7),
188
.BR fifo (7)
189
 
190
.\" ------------------------------------------------------------------
191
.SH AUTHOR
192
Walter F.J. Mueller 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.