
7-2
ZISIM Simulator
A simple script file that turns-on instruction tracing and then executes the
program
test.exe
is shown below.
load test.exe
enable trace write
run 100000
exit
Assuming the file
batch.scr
contains the commands shown above, you
can generate a trace file for
test.exe
as follows:
% zisim400 -s batch.scr > test.trace
(Unix for ZSP400
architecture)
% zisimg2 -s batch.scr > test.trace
(Unix for ZSPG2
architecture)
C:\zisim400 -s batch.scr > test.trace
(Windows for ZSP400
architecture)
C:\zisimg2 -s batch.scr > test.trace
(Windows for ZSPG2
architecture)
Refer also to
Section 7.2.21, “script,” page 7-15
.
7.1.2 Interactive Mode
In interactive mode, ZISIM is invoked from the shell using the following
command:
zisim400 [
executable_file
] [
options
]
zisimg2 [executable_file] options
An executable file may or may not be specified, followed by zero or more
command-line options separated by spaces The executable file is a ZSP
binary file generated using the SDK compiler, assembler, and linker tools,
as explained in other chapters of this document. ZISIM processes the
source file according to the specified command-line options (refer to
Table 7.1
). If no options are specified, ZISIM initializes itself, then
prompts the user with the ZISIM prompt:
zisim{1}>
The simulator is now ready to accept and respond to ZISIM commands,
which are described in
Section 7.2, “ZISIM Commands,”
. An executable
file may be loaded from within ZISIM using the
load exe
command.