EasyManua.ls Logo

COBHAM GRMON3 - CPU Cache Support; Tcl Integration; Shells; Commands

COBHAM GRMON3
239 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
GRMON3-UM
June 2019, Version 3.1.0
22 www.cobham.com/gaisler
mand looks up one address by walking the MMU table printing out every step taken and the result. To simply
print out the result of such a translation, use the va command.
The memory commands that are prefixed with a v work with virtual addresses, the addresses given are translated
before listing or writing physical memory. If the MMU is not enabled, the vmem command for example is an alias
for mem. See Section 3.4.7, “Displaying memory contents” for more information.
NOTE: Many commands are affected by that the MMU is turned on, such as the disassemble command.
3.4.15. CPU cache support
The LEON optionally implements Level-1 instruction-cache and data-cache. GRMON supports the CPU's cache
by adopting certain operations depending on if the cache is activated or not. The user may also be able to access
the cache directly. This is however not normally needed, but may be useful when debugging or analyzing different
cache aspects. By default the L1-cache is turned on by GRMON , the cctrl command can be used to change the
cache control register. The commandline switches -nic and -ndc disables instruction and data cache respec-
tively.
With the icache and dcache commands it is possible to view and modify the current content of the cache or check
if the cache is consistent with the memory. Both caches can be flushed instantly using the commands cctrl flush.
The data cache can be flushed instantly using the commands dcache flush. The instruction cache can be flushed
instantly using the commands icache flush.
The GRLIB Level-2 cache is supported using the l2cache command.
3.5. Tcl integration
GRMON has built-in support for Tcl 8.6. All commands lines entered in the terminal will pass through a Tcl-
interpreter. This enables loops, variables, procedures, scripts, arithmetics and more for the user. I.a. it also provides
an API for the user to extend GRMON.
3.5.1. Shells
GRMON creates several independent TCL shells, each with its own set of commands and variables. I.e. changing
active CPU in one shell does not affect any other shell. In the commandline version there one shell available for
the user by default, the CLI shell, which is accessed from the terminal. In the GUI is possible to create and view
multiple shells.
Additional custom user shells for the commandline interface can be created with the command usrsh. Each custom
user shell has an associated Tcl interpreter running in a separate execution thread.
When the GDB service is running, a GDB shell is also available from GDB by using the command mon.
There is also a system shell and an execution shell running in the background that GRMON uses internally. Some
hooks must be loaded into these shells to work, see Appendix C, Tcl API for more information.
3.5.2. Commands
There are two groups of commands, the native Tcl commands and GRMON's commands. Information about the
native Tcl commands and their syntax can be found at the Tcl website [http://www.tcl.tk/]. The GRMON com-
mands' syntax documentation can be found in Appendix B, Command syntax.
The commands have three types of output:
1. Standard output. GRMON's commands prints information to standard output. This information is often
structured in a human readable way and cannot be used by other commands. Most of the GRMON commands
print some kind of information to the standard output, while very few of the Tcl commands does that.
Setting the variable ::grmon::settings:suppress_output to 1 will stop GRMON commands
from printing to the standard output, i.e. the TCL command puts will still print it's output. It is also possible to
put the command silent in front of another GRMON command to suppress the output of a single command,
e.g. grmon3> puts [expr [silent mem 0x40000000 4] + 4]

Table of Contents