How to enable ASCII tracing when running on the simulator

  • version

    1.0.0beta1

  • scope

    Example.

    This code is provided as example code for a user to base their code on.

  • description

    How to enable ASCII tracing when running on the simulator

Compile the following code:

#include <xs1.h>

port p = XS1_PORT_1A;
int main() {
  int x;
  p :> x;
  return 0;
}

Upon running, the ASCII simulator trace can be enabled via:

Run -> Run Configurations -> Simulator -> Dump simulator trace

This will send the trace directly to the console view

For example, The input from the port ‘p’ into variable ‘x’ will produce the corresponding line in the trace file:

tile[0]@0- -A-.----000100cc (main +  8) : in r0(0x0), res[r0(0x10200)] @2127

See the tools user guide (Tracing Table) for further information on the trace format

Note: If required, the trace can be redirected to a file via:

Run -> Run Configurations -> Simulator -> Trace to file: