1
0
mirror of https://github.com/wfjm/w11.git synced 2026-03-10 12:58:23 +00:00

add gwstart, a gtkwave starter [skip ci]

This commit is contained in:
wfjm
2022-12-23 20:36:17 +01:00
parent b504079cad
commit f0f12dc407
12 changed files with 743 additions and 4 deletions

View File

@@ -28,7 +28,9 @@ The full set of tests is only run for tagged releases.
### Summary
### New features
- gwstart: gtkwave starter
- tools/xxdp: add directory with xxdp setup and patch scripts
### Changes
- tools changes
- tools/asm-11/lib/push_pop.mac: add push2
@@ -90,7 +92,7 @@ The full set of tests is only run for tagged releases.
- remove Atlys support (only test designs, a w11 design was never done)
- cleanup code base, use page,mmr\*,pdr,par instead of segment,ssr\*,sdr,sar
([see blog](https://wfjm.github.io/blogs/w11/2022-08-18-on-segments-and-pages.html))
- sysid encodes now system type, allows to distinguish w11,SimH,e11
- sysid encodes now system type, allows to distinguish w11,SimH,E11
- CPU bug fixes in pdp11_mmu and pdp11_sequencer
- cleanup SimH setup files (\*.scmd), use autoconfig, set disk types
- asm-11 has now limited macro support
@@ -153,7 +155,7 @@ The full set of tests is only run for tagged releases.
- encodes emulator(15),type(14:12),cpu_number(11:09) and serial number(8:0)
- pdp11_reg70: set sysid to 010123 --> real w11
- *.scmd: set sysid to 110234 --> emu Simh
- *.ecmd: set sysid to 120345 --> emu e11
- *.ecmd: set sysid to 120345 --> emu E11
### Bug Fixes
- rtl/w11a
- pdp11_mmu: BUGFIX: correct trap and PDR A logic, see

View File

@@ -2,13 +2,14 @@ This directory tree contains **many tools** and is organized in
| Directory | Content |
| --------- | ------- |
| [asm-11](asm-11) | environment for `asm-11` assembler |
| [asm-11](asm-11) | environment for the `asm-11` assembler |
| [bin](bin) | support scripts and tools |
| [bin_xilinx_wrapper](bin_xilinx_wrapper) | wrappers for Xilinx environments |
| [dasm-11](dasm-11) | environment for `dasm-11` disassembler |
| [dasm-11](dasm-11) | environment for the `dasm-11` disassembler |
| [dox](dox) | configuration files for Doxygen |
| [exptest](exptest) | configuration files for `ostest` and other expect based tests |
| [fx2](fx2) | firmware for Cypress FX2 USB interface |
| [gwstart](gwstart) | environment for the `gwstart` command |
| [make](make) | make includes |
| [man](man) | man pages |
| [mcode](mcode) | miscellaneous stand-alone codes for system tests |

43
tools/bin/gwstart Executable file
View File

@@ -0,0 +1,43 @@
#!/bin/bash
# $Id: gwstart 1336 2022-12-23 19:31:01Z mueller $
# SPDX-License-Identifier: GPL-3.0-or-later
# Copyright 2016-2022 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
#
# Revision History:
# Date Rev Version Comment
# 2022-12-22 1334 1.2 main Tcl code in tools/gwstart/bin; -w -> -nw
# 2016-10-03 812 1.1 add -w option
# 2016-07-23 792 1.0 Initial version
#
optnw=""
# handle options
while (( $# > 0 )) ; do
case $1 in
-nw) optnw=$1 ; shift 1 ;;
-*) echo "gwstart-E: invalid option '$1'"; exit 1 ;;
*) break;;
esac
done
# complain if no wave file specified
if (( $# == 0 )) ; then
echo "Usage: gwstart [opts] ghw-file tcl-commands ..."
echo " Options:"
echo " -w enable Tcl command line on stdio"
exit 1
fi
# use -S to start gtkwave without wish
# use -T to start gtkwave with wish (Note -S plus --wish crash gtkwave 3.3.73)
if [[ -n "$optnw" ]] ; then
ghwsopt+=" -S"
else
ghwsopt+=" -T"
fi
ghwfile=$1
shift 1
gtkwave $ghwsopt ${RETROBASE}/tools/gwstart/bin/gwinit.tcl $ghwfile -- -- "$@"
stty sane

7
tools/gwstart/README.md Normal file
View File

@@ -0,0 +1,7 @@
This directory tree contains the **environment for the gwstart command**
and is organized in
| Directory | Content |
| --------- | ------- |
| [bin](bin) | Tcl sources |
| [lib](lib) | library with w11 signal definitions |

View File

@@ -0,0 +1,15 @@
# $Id: gwinit.tcl 1335 2022-12-22 14:23:24Z mueller $
# SPDX-License-Identifier: GPL-3.0-or-later
# Copyright 2016-2022 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
#
# Revision History:
# Date Rev Version Comment
# 2022-12-22 1334 1.1 main Tcl code now in tools/gwstart/bin
# 2016-07-23 792 1.0 Initial version
#
source "$::env(RETROBASE)/tools/gwstart/bin/gwutil.tcl"
source "$::env(RETROBASE)/tools/gwstart/bin/gwsigdb.tcl"
source "$::env(RETROBASE)/tools/gwstart/bin/gwsigdisp.tcl"
gwtools::doinit

View File

@@ -0,0 +1,221 @@
# $Id: gwsigdb.tcl 1194 2019-07-20 07:43:21Z mueller $
# SPDX-License-Identifier: GPL-3.0-or-later
# Copyright 2016- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
#
# Revision History:
# Date Rev Version Comment
# 2016-10-03 812 1.1 gwlssig,gwlshier: support selection; use pglobre
# 2016-07-23 792 1.0 Initial version
#
package provide gwtools 1.0
namespace eval gwtools {
variable siglist; # list of full signal names without index range
variable sigtype; # hash with index range per signal
variable sighier; # hash with list of signals per hierarchy path
array set sigtype {}
array set sighier {}
#
# addsighier: add a signal to sighier array of lists ---------------
#
proc addsighier {nam} {
variable sighier
#puts "+++2a '$nam'"
if {[regexp -- {^(.*)\.(.*)$} $nam match path last]} {
if {! [info exists sighier($path)]} {addsighier $path}
lappend sighier($path) $last
#puts "+++2b '$path' '$last'"
}
return
}
#
# initsigdb: setup siglist,sigtype,sighier from gtkwave facilities -
#
proc initsigdb {} {
variable siglist
variable sigtype
variable sighier
# get all facilities
set nfac [ gtkwave::getNumFacs ]
set faclist {}
for {set i 0} {$i < $nfac } {incr i} {
lappend faclist [ gtkwave::getFacName $i ]
}
# Note: for ghdl+ghw gtkwave often reports one signal multiple times in
# the list of facilities. Using '-unique' removes them
set faclist [lsort -unique -dictionary $faclist]
foreach fac $faclist {
# split into name + index
set nam {}
set ind {}
if {! [regexp -- {^(.*)\[(\d*)\]$} $fac match nam ind]} {
set nam $fac
}
#puts "+++1 '$nam' '$ind'"
if {! [info exists sigtype($nam)]} {
addsighier $nam
set sigtype($nam) $ind; # if no index --> empty list
} else {
lappend sigtype($nam) $ind
}
}
# collaps index list in [high:low]
foreach sig [array names sigtype] {
if {[llength $sigtype($sig)]} {
set ilist [lsort -integer $sigtype($sig)]
set ibeg [lindex $ilist 0]
set iend [lindex $ilist end]
set sigtype($sig) "\[$iend:$ibeg\]"
#puts "+++3 '$sig' '$sigtype($sig)'"
}
}
# resort sighier lists (recursive adding of parents via addsighier
# can break sorting order
foreach sig [array names sighier] {
set sighier($sig) [lsort -dictionary $sighier($sig)]
}
# finally setup siglist (from array names of sigtype)
set siglist [lsort -dictionary [array names sigtype]]
return
}
#
# gwlshier: list hierarchy table (with collapsed indices) ----------
#
proc gwlshier {args} {
variable sighier
set rtxt {}
# process options
array set opts {re 0 sig 0}
while {[llength $args]} {
set arg [lindex $args 0]
set next 1
switch -glob $arg {
-re { set opts(re) 1}
-sig { set opts(sig) 1}
-* { error "bad option $arg"}
default { break }
}
set args [lrange $args $next end]
}
# if no selection specifier given take all (like -re .*)
if {! [llength $args]} {
set opts(re) 1
set args {.*}
}
# process hierarchy path names
set hlist [lsort -dictionary [array names sighier]]
set hiers {}
foreach arg $args {
# trim white space (allows to write '{\out\ }' to prevent a '\}'
set re [string trim $arg]
if {! $opts(re)} {
set re [pglobre $re]
}
foreach hier $hlist {
if {[regexp -- $re $hier]} {
lappend hiers $hier
}
}
}
set hiers [lsort -unique -dictionary $hiers]
foreach hier $hiers {
append rtxt "$hier\n"
if ($opts(sig)) { # show signals when -sig option seen
array unset namind
array set namind {}
foreach val $sighier($hier) {
if {[regexp -- {^(.*)\[(\d*)\]$} $val match nam ind]} {
lappend namind($nam) $ind
} else {
set namind($val) {}
}
}
foreach nam [lsort -dictionary [array names namind]] {
if {[llength $namind($nam)]} {
set ilist [lsort -integer $namind($nam)]
set ibeg [lindex $ilist 0]
set iend [lindex $ilist end]
append rtxt " $nam\[$ibeg:$iend\]\n"
} else {
append rtxt " $nam\n"
}
}
}
}
return [string trimright $rtxt]
}
#
# gwlssig: list signal table ---------------------------------------
#
proc gwlssig {args} {
variable siglist
variable sigtype
# process options
array set opts {list 0 re 0}
while {[llength $args]} {
set arg [lindex $args 0]
set next 1
switch -glob $arg {
-list { set opts(list) 1}
-re { set opts(re) 1}
-* { error "bad option $arg" }
default { break }
}
set args [lrange $args $next end]
}
# if no selection specifier given take all (like -re .*)
if {! [llength $args]} {
set opts(re) 1
set args {.*}
}
# process signal names
set sigs {}
foreach arg $args {
# trim white space (allows to write '{\out\ }' to prevent a '\}'
set re [string trim $arg]
if {! $opts(re)} {
set re [pglobre $re]
}
foreach sig $siglist {
if {[regexp -- $re $sig]} {
lappend sigs "$sig$sigtype($sig)"
}
}
}
set sigs [lsort -unique -dictionary $sigs]
if ($opts(list)) { return $sigs }
set rtxt {}
foreach sig $sigs {
append rtxt "$sig\n"
}
return [string trimright $rtxt]
}
namespace export gwlshier
namespace export gwlssig
}
namespace import gwtools::gwlshier
namespace import gwtools::gwlssig

View File

@@ -0,0 +1,103 @@
# $Id: gwsigdisp.tcl 1336 2022-12-23 19:31:01Z mueller $
# SPDX-License-Identifier: GPL-3.0-or-later
# Copyright 2016-2022 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
#
# Revision History:
# Date Rev Version Comment
# 2022-12-22 1334 1.2 add gwadd
# 2016-10-03 812 1.1 gwaddsig: use gwlssig
# 2016-09-18 809 1.0.1 double '\' in signal names passed to gtkwave:: procs
# 2016-07-23 792 1.0 Initial version
#
package provide gwtools 1.0
namespace eval gwtools {
#
# gwaddsig ---------------------------------------------------------
#
proc gwaddsig {args} {
variable siglist
variable sigtype
# process options
array set opts {re 0 rad ""}
while {[llength $args]} {
set arg [lindex $args 0]
set next 1
switch -glob $arg {
-re { set opts(re) 1}
-bin { set opts(rad) "bin"}
-oct { set opts(rad) "oct"}
-dec { set opts(rad) "dec"}
-sdec { set opts(rad) "sdec"}
-hex { set opts(rad) "hex"}
-asc { set opts(rad) "asc"}
-* { error "bad option $arg" }
default { break }
}
set args [lrange $args $next end]
}
if {! [llength $args]} {return "gwaddsig-W: no signals specified"}
# get signal names
set olist "-list"
if {$opts(re)} {lappend olist "-re"}
set sigs [gwlssig {*}$olist {*}$args]
if {! [llength $sigs]} {return "gwaddsig-W: no signals matched"}
# now add signals to display
foreach sig $sigs {
# double '\' in signal names, gtkwave needs this for some reason...
set sig [string map {\\ \\\\} $sig]
gtkwave::addSignalsFromList $sig
if {$opts(rad) ne ""} {
gtkwave::highlightSignalsFromList $sig
switch $opts(rad) {
bin {gtkwave::/Edit/Data_Format/Binary}
oct {gtkwave::/Edit/Data_Format/Octal}
dec {gtkwave::/Edit/Data_Format/Decimal}
sdec {gtkwave::/Edit/Data_Format/Signed_Decimal}
hex {gtkwave::/Edit/Data_Format/Hex}
}
}
}
return [llength $sigs]
}
#
# gwaddcom ---------------------------------------------------------
#
proc gwaddcom {{text ""}} {
::gtkwave::/Edit/Insert_Comment $text
}
#
# gwadd ------------------------------------------------------------
#
proc gwadd {fname} {
variable liblist
foreach lib $liblist {
set fullname "$lib/${fname}.tcl"
if { [file exists $fullname] } {
if { [catch {source $fullname} errmsg] } {
puts "gwadd-E: failed to source \"$fname\" with error message:"
if {[info exists errorInfo]} {puts $errorInfo} else {puts $errmsg}
return
}
return
}
}
return "gwadd-W: file $fname not found"
}
namespace export gwaddsig
namespace export gwaddcom
namespace export gwadd
}
namespace import gwtools::gwaddsig
namespace import gwtools::gwaddcom
namespace import gwtools::gwadd

View File

@@ -0,0 +1,115 @@
# $Id: gwutil.tcl 1336 2022-12-23 19:31:01Z mueller $
# SPDX-License-Identifier: GPL-3.0-or-later
# Copyright 2016-2022 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
#
# Revision History:
# Date Rev Version Comment
# 2022-12-22 1334 1.2 provide liblist, initialize from GWSTART_LIB
# 2016-10-03 812 1.1 pglobre: new path-glob to re converter
# 2016-07-23 792 1.0 Initial version
#
package provide gwtools 1.0
namespace eval gwtools {
#
# doargs: handle remaining level args (after two --) ---------------
#
proc doargs {} {
variable liblist
# getArgv gives full argv ! --> remove all up to and including 2nd '--'
set args [gtkwave::getArgv]; # seems broken, nothing returned
set iarg 0
set ndd 0
foreach arg $args {
incr iarg
if {$arg eq "--"} {incr ndd}
if {$ndd == 2} {break}
}
set args [lrange $args $iarg end]
# now process args as option/value pairs # not yet functional
# -I path --> lappend
# -A set --> gwadd
# -E script --> source
foreach {opt val} $args {
if { $opt eq "-I"} {
lappend liblist $val
} elseif { $opt eq "-A"} {
gwadd $val
} elseif { $opt eq "-E"} {
if { [catch {source $val} errmsg] } {
puts "-E: failed to source file \"$val\" with error message:"
if {[info exists errorInfo]} {puts $errorInfo} else {puts $errmsg}
}
} else {
puts "gwstart-E: invalid option '$opt'"
}
}
return
}
#
# doinit: handle default initialization ----------------------------
#
proc doinit {} {
variable liblist
variable siglist
# set up include lib list from GWSTART_LIB
if [info exists ::env(GWSTART_LIB)] {
set liblist [split $::env(GWSTART_LIB) ":"]
} else {
set liblist [list "."]
}
# puts "+++1 #argv [llength [gtkwave::getArgv]]"
# set up signals database
set t0 [clock milliseconds]
initsigdb
set t1 [clock milliseconds]
# handle command line args
doargs
# setup display after gdo files processed
# this ensures that Zoom_Best_Fit works correctly
gtkwave::setMarker 0; # -> initial values shown
gtkwave::/Edit/Set_Trace_Max_Hier 3; # -> good comprise
gtkwave::/Time/Zoom/Zoom_Best_Fit; # -> best initial picture
set t2 [clock milliseconds]
puts [format \
"gwtools init done: #fac=%5d #sig=%5d #wav=%3d; time %5.3fs/%5.3fs" \
[gtkwave::getNumFacs] \
[llength $siglist] \
[llength [gtkwave::getDisplayedSignals]] \
[expr {0.001*($t1-$t0)}] \
[expr {0.001*($t2-$t1)}] \
]
return
}
#
# pglobre: convert a path-glob specification to a regular expression
#
proc pglobre {pglob} {
# trim white space (allows to write '{\out\ }' to prevent a '\}'
set re [string trim $pglob]
# escape all regexp chars
set re [string map { . \\.
[ \\[
] \\]
^ \\^
\\ \\\\
} $re ]
# and map ** and * to regexp
set re [string map { ** .*
* [^.]*
} $re]
set re "^${re}\$"
return $re
}
}

28
tools/gwstart/lib/mmu.tcl Normal file
View File

@@ -0,0 +1,28 @@
# $Id: mmu.tcl 1336 2022-12-23 19:31:01Z mueller $
# SPDX-License-Identifier: GPL-3.0-or-later
# Copyright 2022- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
#
# pdp11_mmu basics
#
gwaddcom "mmu"
gwaddsig {**.vmbox.mmu.clk}
gwaddsig {**.vmbox.mmu.cntl.req}
gwaddsig {**.vmbox.mmu.moni.istart}
gwaddsig {**.vmbox.mmu.moni.vstart}
gwaddsig -oct {**.vmbox.mmu.mmr12.r_mmr2}
gwaddsig -oct {**.vmbox.mmu.mmr12.vaddr}
gwaddsig -sdec {**.vmbox.mmu.mmr12.r_mmr1.ra_delta}
gwaddsig -dec {**.vmbox.mmu.mmr12.r_mmr1.ra_num}
gwaddsig -sdec {**.vmbox.mmu.mmr12.r_mmr1.rb_delta}
gwaddsig -dec {**.vmbox.mmu.mmr12.r_mmr1.rb_num}
gwaddsig {**.vmbox.mmu.aib_*}
gwaddsig {**.vmbox.mmu.r_mmr0.abo_nonres}
gwaddsig {**.vmbox.mmu.r_mmr0.abo_length}
gwaddsig {**.vmbox.mmu.r_mmr0.abo_rdonly}
gwaddsig {**.vmbox.mmu.r_mmr0.trap_mmu}
gwaddsig {**.vmbox.mmu.r_mmr0.ena_trap}
gwaddsig {**.vmbox.mmu.r_mmr0.inst_compl}
gwaddsig -oct {**.vmbox.mmu.r_mmr0.page_mode}
gwaddsig {**.vmbox.mmu.r_mmr0.page_dspace}
gwaddsig -oct {**.vmbox.mmu.r_mmr0.page_num}
gwaddsig {**.vmbox.mmu.r_mmr0.ena_mmu}

View File

@@ -0,0 +1,12 @@
# $Id: sequencer.tcl 1336 2022-12-23 19:31:01Z mueller $
# SPDX-License-Identifier: GPL-3.0-or-later
# Copyright 2022- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
#
# pdp11_sequencer basics
#
gwaddcom "sequencer"
gwaddsig {**.seq.clk}
gwaddsig {**.seq.r_state}
gwaddsig -oct {**.dpath.gr.pc}
gwaddsig -oct {**.seq.ireg}
gwaddsig {**.seq.mmu_moni.istart}

View File

@@ -0,0 +1,20 @@
# $Id: vmbox.tcl 1336 2022-12-23 19:31:01Z mueller $
# SPDX-License-Identifier: GPL-3.0-or-later
# Copyright 2022- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
#
# pdp11_vmbox basics
#
gwaddcom "vmbox"
gwaddsig {**.vmbox.clk}
gwaddsig {**.vmbox.r_regs.state}
gwaddsig {**.vmbox.r_regs.trap_mmu}
gwaddsig {**.vmbox.vm_cntl.req}
gwaddsig {**.vmbox.vm_cntl.cacc}
gwaddsig {**.vmbox.vm_cntl.macc}
gwaddsig {**.vmbox.vm_cntl.wacc}
gwaddsig -oct {**.vmbox.vm_addr}
gwaddsig -oct {**.vmbox.vm_din}
gwaddsig -oct {**.vmbox.vm_dout}
gwaddsig {**.vmbox.vm_stat.ack}
gwaddsig {**.vmbox.vm_stat.err}
gwaddsig {**.vmbox.vm_stat.trap_mmu}

172
tools/man/man1/gwstart.1 Normal file
View File

@@ -0,0 +1,172 @@
.\" -*- nroff -*-
.\" $Id: gwstart.1 1336 2022-12-23 19:31:01Z mueller $
.\" SPDX-License-Identifier: GPL-3.0-or-later
.\" Copyright 2022- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
.\"
.\" ------------------------------------------------------------------
.
.TH GWSTART 1 2022-12-23 "Retro Project" "Retro Project Manual"
.\" ------------------------------------------------------------------
.SH NAME
gwstart \- gtkwave starter
.\" ------------------------------------------------------------------
.SH SYNOPSIS
.
.SY gwstart
.RI [ -nw ]
.I FILE
.YS
.
.\" ------------------------------------------------------------------
.SH DESCRIPTION
\fBgwstart\fP starts \fBgtkwave\fP(1) with wave file \fIFILE\fP and adds
several Tcl commands that provide a convenient interface for the inspection
of the signal hierarchy generated by \fBghdl\fP(1) and the definition of
display traces. The additional Tcl commands are:
.RS 2
.PD 0
.IP "\fBgwlssig\fP" 12
list signals
.IP "\fBgwaddsig\fP" 12
add a signal trace to the display
.IP "\fBgwaddcom\fP" 12
add a comment separator to the display
.IP "\fBgwadd\fP" 12
add a signal definition set to the display
.PD
.RE
.PP
The typical usage is to first explore the signal hierarchy interactively
with \fBgwlssig\fP and to create a display with the relevant signals with
\fBgwaddsig\fP. In a second step, signal definition sets, usually just
lists of \fBgwaddsig\fP and \fBgwaddcom\fP commands, are defined and stored
in project-specific files. After that, \fBgwstart\fP is usually started with
the environment variable \fBGWSTART_LIB\fP, which points to the directory
of the project-specific signal definition set files.
The definition of a display is then quickly done with one or more
\fPgwadd\fP commands.
.\" ------------------------------------------------------------------
.SH OPTIONS
.
.\" ----------------------------------------------
.IP "\fB\-nw\fP"
Disables Tcl command line input on \fIstdio\fP.
.
.\" ------------------------------------------------------------------
.SH TCL COMMANDS
.\" ----------------------------------------------
.SY gwlssig
.RI [ -re ]
.RI [ SIGNAM ]...
.YS
Lists all signals that match \fISIGNAM\fP. By default \fISIGNAM\fP is
interpreted as a glob pattern, where a '*' wildcard matches name components
between the hierarchy separator '.' and a '**' wildcard matches name components
across hierarchy separator boundaries.
If the \fB-re\fP option is specified, \fISIGNAM\fP is interpreted as a regular
expression.
If no \fISIGNAM\fP is specified, all available signals are listed.
See EXAMPLES - TCL section.
.\" ----------------------------------------------
.SY gwaddsig
.RI [ OPTION ]...
.RI [ SIGNAM ]...
.YS
Adds all signals that match \fISIGNAM\fP to the display. The \fISIGNAM\fP
name syntax is the same as for the \fBgwlssig\fP command. The available
\fIOPTION\fPs are
.RS 2
.PD 0
.IP "\fB-re\fP" 6
interpret \fISIGNAM\fP as regular expression, default is glob
.IP "\fB-bin\fP" 6
use binary as data format
.IP "\fB-oct\fP" 6
use octal as data format
.IP "\fB-dec\fP" 6
use decimal as data format
.IP "\fB-sdec\fP" 6
use signed decimal as data format
.IP "\fB-hex\fP" 6
use hexadecimal as data format
.IP "\fB-asc\fP" 6
use ASCII as data format
.PD
.RE
.\" ----------------------------------------------
.SY gwaddcom
.I TEXT
.YS
Add a comment separator with text \fITEXT\fP to the display.
.\" ----------------------------------------------
.SY gwadd
.I SETNAME
.YS
Process the signal definition set \fISETNAME\fP. The command searches for a
file \fISETNAME\fP.tcl in the gwadd search path and sources it.
The file must contain Tcl commands that are valid in the \fBgtkwave\fP(1)
environment. Usually, these files contain only \fBgwaddcom\fP and
\fBgwaddsig\fP commands. The search path is defined via the
\fBGWSTART_LIB\fP environment variable.
.
.\" ------------------------------------------------------------------
.SH ENVIRONMENT
.IP \fBGWSTART_LIB\fP 4
Defines a ':' separated path list used by the \fBgwadd\fP command.
If not defined, the default '.' is used.
.
.\" ------------------------------------------------------------------
.SH EXAMPLES - COMMAND
.IP "\fBgwstart -w tb_w11a_c7.ghw\fP" 4
Starts \fBgtkwave\fP(1) with Tcl command line input enabled on \fIstdio\fP
and reads the file \fItb_w11a_c7.ghw\fP.
.
.\" ------------------------------------------------------------------
.SH EXAMPLES - TCL
Some examples for the additional Tcl commands provided by \fBgwstart\fP.
.IP "\fBgwlssig {**.clk}\fP" 4
Lists all signals with the name \fIclk\fP. The leading \fI**.\fP matches
all instances of the hierarchy.
.
.IP "\fBgwlssig -re {.*\.clk}\fP" 4
Same result as previous example, now with regular expression match instead
of glob match. Lists all signals with the name \fIclk\fP.
.
.IP "\fBgwlssig {**.treq_*}\fP" 4
Lists all signals with a name starting with \fItreq_\fP. Output like
.EX
top.tb_cmoda7_sram.uut.sys70.w11a.seq.r_status.treq_mmu
top.tb_cmoda7_sram.uut.sys70.w11a.seq.r_status.treq_tbit
top.tb_cmoda7_sram.uut.sys70.w11a.seq.r_status.treq_ysv
.EE
.IP "\fBgwaddsig {**.seq.r_status.treq_*}\fP" 4
Add all signals with a name starting with \fItreq_\fP of the entity
\fI**.seq.r_status\fP to the display. A leading '**.' is often used to
shorten the name pattern and write only the minimal required for uniqueness.
.
.IP "\fBgwaddsig -oct {**.vmbox.vm_addr}\fP" 4
Add the signal \fIaddr\fP from entity \fI**.vmbox\fP to the display and use
octal as data format.
.
.IP "\fBgwaddcom mmu\fP" 4
Adds a comment separator titled "mmu" to the display.
.
.IP "\fBgwadd vmbox\fP" 4
Process the signal definition set \fIvmbox\fP. The command will search for a
file \fImmu.tcl\fP in the gwadd seach path and source it.
.
.\" ------------------------------------------------------------------
.SH "SEE ALSO"
.BR gtkwave (1),
.BR ghdl (1)
.
.\" ------------------------------------------------------------------
.SH AUTHOR
Walter F.J. Mueller <W.F.J.Mueller@gsi.de>