Skip to content

Parameter files

The single Kathryn executable takes exactly one argument: a parameter file (see the params/ directory). The parameter file selects what to run and where output goes.

ParamReader::getKeyVal (src/frontEnd/cmd/paramReader.cpp) parses each line by whitespace. A line is one of:

  • A comment — its first token is ; (the whole line is skipped).
  • A key/value — exactly three tokens, key = value (the middle token must literally be =).
  • Blank lines are ignored; any other shape is a fatal error, and a duplicate key is a fatal error.
; path to riscv result folder
prefix = /path/to/KOut/riscv/
buildSimMode = gcr

There are no sections and no quoting — a value is a single whitespace-delimited token.

Each key below is read by real code in src/ or appears in a shipped file in params/.

KeyPurpose
testTypeSelects the entry point. cfe.cpp::start() dispatches on this value (see the table below).
prefixOutput directory for a simulation run (read as params["prefix"] by the RISC-V, O3, Kride, and autoSim managers).
vcdFileDestination path for the VCD waveform (used by blinkSample.cpp and cacheSimParams).
profFileDestination path for the ZEP profiler report.
buildSimModeSimulator JIT stages — g/c/r = generate / compile / run (see The Hybrid Simulator).
genFolderOutput folder for generated Verilog (read as genFolder by GenController::initEnv).
topFileNameBase name of the emitted top .v file.
topModNameVerilog module name of the top module.
limitCycleCycle limit for co-simulation runs (stoull(params["limitCycle"])).
workloadCo-sim workload set — standard or cpp (simCtrlComb.h).

Generation keys and simulation keys are distinct, and testType decides which set matters:

flowchart TB
    P["params file"] --> R["ParamReader::getKeyVal<br/>(key = value, ; comments)"]
    R --> T{"testType"}
    T -->|"sim: testSimple,<br/>testO3Sim, testKrideSim, ..."| S["Hybrid Simulator<br/>needs prefix or vcdFile/profFile<br/>plus buildSimMode"]
    T -->|"gen: testGen,<br/>testGenO3"| G["Verilog generator<br/>needs genFolder,<br/>topFileName, topModName"]
    T -->|"co-sim: testKrideRideCombSim"| C["Kride vs RIDECORE compare<br/>needs workload, limitCycle"]

The params/ directory ships one file per scenario. Their testType values map to entry points via cfe.cpp::start():

FiletestTypePurpose
smParamstestSimpleAuto simulation regression suite (src/test/autoSim); the smoke test.
o3ParamstestO3SimKride out-of-order superscalar simulation.
o3GenParamstestGenO3Kride out-of-order → Verilog generation (has synName).
krideParamstestKrideSimKride standalone simulation.
krideRideParamstestKrideRideCombSimCo-simulation vs RIDECORE, standard workload, limitCycle = 10000.
krideRideCxxParamstestKrideRideCombSimCo-simulation vs RIDECORE, cpp workload, longer limitCycle.
rideParamstestRideSimRIDECORE via Verilator (needs BUILD_RIDECORE=ON).
cacheSimParamstestSimpleCacheAccCache-accelerator simulation; sets vcdFile, profFile, and slotFile.
genParamstestGenSmall generator test cases.
blinkParams(none)Paths for the standalone blinkSample.cpp demo (vcdFile / profFile only).
tutorialParams(none)Single genPath for the tutorial generation demo.