Package: anycore-dbg-supplement
SimEnvA new toolset to reliably packing, and spawning a RISC-V workload (app) for any simulation purpose.An app is packed into asimenv, which is basically the rootfs containing all the essentials for a simulation. The tool learns what are the essentials by analyzing the workload's syscall trace. When simulating with the proper PK/FESVR, the dynamic instruction stream is even reproducible.The motivation is to help Dr. Rotenberg's microarchitecture research group and ECE721 students using SPEC CPU2006 and CPU2017 workloads (usually checkpointed workloads) with ease.Runatool-app-repo --helpto learn how to create a workload repository, andatool-simenv --helpto learn how to use a workload repository.$ atool-app-repo --help
Usage: atool-app-repo [OPTIONS] COMMAND [ARGS]...

  The app repository management utility

Options:
  --help  Show this message and exit.

Commands:
  addckpt     Import a checkpoint.
  addsysroot  Import a pristine sysroot.
  init        Create an empty app repository.
  learn       Analyze an app for how to create SimEnv.
  subrepo     Spawn a sub-repository with the selected apps.$ atool-simenv --help
Usage: atool-simenv [OPTIONS] COMMAND [ARGS]...

  The simenv utility

Options:
  --repo-path DIRECTORY  Override the SimEnv repository path given by the
                         environmental variable "ATOOL_SIMENV_REPO_PATH".

  --help                 Show this message and exit.

Commands:
  list    List available apps and checkpoints in the SimEnv repository.
  mkgen   Generate a Makefile for a simenv, at current dir.
  spawn   Spawn a simenv.
  verify  Perform integrity checking for a simenv.* If you are using bash/zsh/fish, you can:runeval "$(_ATOOL_SIMENV_COMPLETE=source_$(basename $SHELL) atool-simenv)"to enable the auto completion for atool-simenv.runeval "$(_ATOOL_APP_REPO_COMPLETE=source_$(basename $SHELL) atool-app-repo)"to enable the auto completion for atool-app-repo.Misc.SpecResultVerification/spike_trim.py- Trim out the extra header/tail message produced by spike or pk during the simulation. Useful if you want to automatically verify the STDOUT output of a SPEC simulation.Checkpointing/ChkptDescFileGen/smpt2ckptdesc.py- Convert the Simpoint output file to the checkpoint job description file accepted by Spike.Checkpointing/DumpHTIF/chkpt_htif_dump.py- Show the HTIF syscalls recorded in a checkpoint file. When restoring a checkpoint, those syscalls will be executed in sequence to bring back the state ofHTIF FESVR.TetherSim/SimTetheringController.py- Controller for721simsworking in tethering mode.To work with trace dumpCpuTraceAnalysis/trace2google.py- Analyze the trace dumped byspikeor721simand output the result in Google's Trace Event Format.To visualize the result, usespeedscope(recommend) or Chromium'sabout://tracing.ifignore_symbol.yamlexists in CWD, it will be read to filter out the defined function calls. SeeCpuTraceAnalysis/ignore_symbol.yamlfor an example.CpuTraceAnalysis/trace2tracevis.py- Analyze and visualize the trace dumped byspikeor721simin a homebrew timeline frontend (usingtimeline-js).ifignore_symbol.yamlexists in CWD - Will be read to filter out the defined function calls. SeeCpuTraceAnalysis/ignore_symbol.yamlfor an example.It's recommended to usetrace2google.py.Because the trace_vis frontend uses timeline-js, which is not intended for visualizing tracing result, it can be very slow and unresponsive when working with trace with a large amount of event.Viewing the trace2google.py output with speedscopeViewing the trace2google.py output with Chrome's about:tracingViewing the trace using homebrew TraceVis frontend (use timeline-js)WIP.