An API for controlling the simulator at runtime.
The simulator's behavior can be modified while it is running. For example, human-readable trace output can be enabled and disabled around code of interest.
There are two ways to modify simulator behavior: programmatically, by calling various sim_* functions, and interactively, by entering commands like "sim set functional true" at the tile-monitor prompt. Typing "sim help" at that prompt provides a list of interactive commands.
All interactive commands can also be executed programmatically by passing a string to the sim_command function.
#define _sim_syscall |
( |
|
syscall_num, |
|
|
|
nr, |
|
|
|
args... |
|
) |
| |
Value:Make a special syscall to the simulator itself, if running under simulation. This is used as the implementation of other functions and should not be used outside this file.
- Parameters
-
syscall_num | The simulator syscall number. |
nr | The number of additional arguments provided. |
- Returns
- Varies by syscall.
Definition at line 298 of file sim.h.
#define SIM_CHIP_ALL (-1) |
Reference all chip devices.
Definition at line 379 of file sim_def.h.
#define SIM_CHIP_MEMCTL 0x001 |
Use with with SIM_PROFILER_CHIP_xxx to control the memory controllers.
Definition at line 364 of file sim_def.h.
#define SIM_CHIP_MPIPE 0x008 |
Use with with SIM_PROFILER_CHIP_xxx to control the MPIPE interface.
Definition at line 373 of file sim_def.h.
#define SIM_CHIP_PCIE 0x004 |
Use with with SIM_PROFILER_CHIP_xxx to control the PCIe interface.
Definition at line 370 of file sim_def.h.
#define SIM_CHIP_TRIO 0x010 |
Use with with SIM_PROFILER_CHIP_xxx to control the TRIO interface.
Definition at line 376 of file sim_def.h.
#define SIM_CHIP_XAUI 0x002 |
Use with with SIM_PROFILER_CHIP_xxx to control the XAUI interface.
Definition at line 367 of file sim_def.h.
#define SIM_CONTROL_SHAPING_BPS 2 |
#define SIM_CONTROL_SHAPING_GBE_0 0x0 |
#define SIM_CONTROL_SHAPING_GBE_1 0x1 |
#define SIM_CONTROL_SHAPING_GBE_2 0x2 |
#define SIM_CONTROL_SHAPING_GBE_3 0x3 |
#define SIM_CONTROL_SHAPING_MULTIPLIER 0 |
#define SIM_CONTROL_SHAPING_PPS 1 |
#define SIM_CONTROL_SHAPING_TYPE_BITS 2 |
#define SIM_CONTROL_SHAPING_UNITS_BITS 2 |
#define SIM_CONTROL_SHAPING_UNITS_GIGA 3 |
Provide a number in giga units.
Definition at line 450 of file sim_def.h.
#define SIM_CONTROL_SHAPING_UNITS_KILO 1 |
Provide a number in kilo units.
Definition at line 444 of file sim_def.h.
#define SIM_CONTROL_SHAPING_UNITS_MEGA 2 |
Provide a number in mega units.
Definition at line 447 of file sim_def.h.
#define SIM_CONTROL_SHAPING_UNITS_SINGLE 0 |
Provide a number in single units.
Definition at line 441 of file sim_def.h.
#define SIM_CONTROL_SHAPING_XGBE_0 0x4 |
#define SIM_CONTROL_SHAPING_XGBE_1 0x5 |
Dump everything that is dumpable.
Definition at line 344 of file sim_def.h.
#define SIM_DUMP_BACKTRACE 0x400 |
#define SIM_DUMP_DTLB 0x008 |
#define SIM_DUMP_ITLB 0x004 |
#define SIM_DUMP_L1D 0x020 |
#define SIM_DUMP_L1I 0x010 |
#define SIM_DUMP_L2 0x040 |
#define SIM_DUMP_REGS 0x001 |
Dump the general-purpose registers.
Definition at line 308 of file sim_def.h.
#define SIM_DUMP_SNITLB 0x100 |
#define SIM_DUMP_SNL1I 0x200 |
#define SIM_DUMP_SNREGS 0x080 |
#define SIM_DUMP_SPRS 0x002 |
#define SIM_DUMP_VALID_LINES 0x800 |
Only dump valid lines in caches.
Definition at line 341 of file sim_def.h.
#define SIM_TRACE_ALL (-1) |
Turn on all tracing when passed to simulator_set_tracing().
Definition at line 288 of file sim_def.h.
#define SIM_TRACE_CYCLES 0x01 |
Enable –trace-cycle when passed to simulator_set_tracing().
Definition at line 261 of file sim_def.h.
#define SIM_TRACE_DISASM 0x08 |
Enable –trace-disasm when passed to simulator_set_tracing().
Definition at line 270 of file sim_def.h.
#define SIM_TRACE_L2_CACHE 0x40 |
Enable –trace-l2 when passed to simulator_set_tracing().
Definition at line 279 of file sim_def.h.
#define SIM_TRACE_LINES 0x80 |
Enable –trace-lines when passed to simulator_set_tracing().
Definition at line 282 of file sim_def.h.
#define SIM_TRACE_MEMORY_CONTROLLER 0x20 |
Enable –trace-memory-controller when passed to simulator_set_tracing().
Definition at line 276 of file sim_def.h.
Turn off all tracing when passed to simulator_set_tracing().
Definition at line 285 of file sim_def.h.
#define SIM_TRACE_REGISTER_WRITES 0x04 |
Enable –trace-register-writes when passed to simulator_set_tracing().
Definition at line 267 of file sim_def.h.
#define SIM_TRACE_ROUTER 0x02 |
Enable –trace-router when passed to simulator_set_tracing().
Definition at line 264 of file sim_def.h.
#define SIM_TRACE_STALL_INFO 0x10 |
Enable –trace-stall-info when passed to simulator_set_tracing().
Definition at line 273 of file sim_def.h.
#define SIM_WATCHPOINT_EXECUTE 4 |
#define SIM_WATCHPOINT_READ 1 |
#define SIM_WATCHPOINT_WRITE 2 |