
Example Session Using ZISIM
7-27
zisim{3}>
set break pc 0x2050
Breakpoint 1 on PC at address 0x2050
zisim{4}>
set break symbol main
Breakpoint 2 on PC at address 0x2010 of main
zisim{5}>
run
(0) 0x2000 2cfb movl r12, 0xfb ! r12 = 0x00fb
(1) 0x2001 3cf7 movh r12, 0xf7 ! r12 = 0xf7fb
(2) 0x2002 a6d0 mov r13, 0x0 ! r13 = 0x0000
(3) 0x2003 2460 movl r4, 0x60 ! r4 = 0x0060
(4) 0x2004 3400 movh r4, 0x0 ! r4 = 0x0060
(5) 0x2005 bc54 mov r5, r4 ! r5 = 0x0060
(6) 0x2006 a051 add r5, 0x1 ! hwflag = 0x0030
(6) 0x2006 a051 add r5, 0x1 ! r5 = 0x0061
(7) 0x2007 6054 st r5, r4, 0 ! INT-DATA[0x0060] = 0x0061
(8) 0x2008 bb1d mov rpc, r13 ! rpc = 0x0000
(9) 0x2009 2510 movl r5, 0x10 ! r5 = 0x0010
(10) 0x200a 3520 movh r5, 0x20 ! r5 = 0x2010
(12) 0x200c a750 call r5 ! rpc = 0x200d
(PC BREAKPOINT #2)................ Instruction Count=000013 PC=0x2010
zisim{6}>
show reg gpr
r0 = 0x0000 r1 = 0x0000
r2 = 0x0000 r3 = 0x0000
r4 = 0x0060 r5 = 0x2010
r6 = 0x0000 r7 = 0x0000
r8 = 0x0000 r9 = 0x0000
r10 = 0x0000 r11 = 0x0000
r12 = 0xf7fb r13 = 0x0000
r14 = 0x0000 r15 = 0x0000
zisim{7}>
disable trace write
After the final command, the simulator will no longer print the instruction
flow trace.
zisim{8}>
run
Hello World!
(SYSTEM HALT)..................... Instruction Count=000673 PC=0x200e
Execution halts when a breakpoint is reached, a system halt occurs, or
the maximum instruction count is reached. A system halt refers to setting
halt mode as defined by the %smode control register. Execution statistic
information can be seen by using
show stats
command.
zisim{9}>
show stats
673 instructions executed
88 load instructions ( 13.08%)
65 - single ( 9.66%)
23 - double ( 3.42%)
56 store instructions ( 8.32%)
37 - single ( 5.50%)
19 - double ( 2.82%)