Services and Modeling for Embedded Software Development
Embecosm divider strip
Prev  Next

11.6.1.  Simple Test for the Model with JTAG Debug Interface

The program is run in the same way as earlier tests. For example from the build directory as follows.

$ ./sysc-models/jtag-soc/jtag-soc ../simple.cfg progs-or32/uart-loop-intr
	  

As before a xterm screen will appear, and characters typed at the keyboard will be reflected. This time however the console will also log the results of the various JTAG commands.

             SystemC 2.2.0 --- May 16 2008 10:30:46
        Copyright (c) 1996-2006 by all Contributors
                    ALL RIGHTS RESERVED

  <Lots of Or1ksim startup messages>

Reset after 200 ns.
Instruction shifted after 160 ns.
Module selected after 2920 ns.
WRITE_COMMAND after 5 us.
GO_COMMAND after 4200 ns.
- NPC = 0x00142c.
Read: 'F'
Read: 'a'
Read: 'r'
Read: 'e'
Read: 'w'
Read: 'e'
Read: 'l'
Read: 'l'
Read: ' '
Read: 'G'
Read: 'a'
Read: 'l'
Read: 'a'
Read: 'x'
Read: 'y'
WRITE_COMMAND after 5 us.
GO_COMMAND after 4200 ns.
- NPC = 0x0012b0.
Read: '!'
WRITE_COMMAND after 5 us.
GO_COMMAND after 4200 ns.
- NPC = 0x001284.
	  

The values for the next program counter can be compared against an ordered name table for the UART application.

$ or32-elf-nm progs-or32/uart-loop-intr | sort
00000100 T _start
00001000 T _set
00001094 T _clr
00001164 T _is_set
0000121c T _is_clr
000012c8 T _main
00001564 T _simexit
00001584 T _simputc
000015a4 T _simputh
000016f0 T _simputs
	  

It can be seen that the first value (0x00142c) falls within the main function, while the second (0x0012b0) and third (0x001284) fall within the flag testing function, is_clr.

Embecosm divider strip