Skip to main content

Pipeline Trace Decoder

Use pipeline to convert a detailed simulation log into pipeline.bin, or extract one tile's trace as JSON. For interactive inspection, launch Portrait from a tutorial's GOAL=debugx output directory and select a tile.

Command-Line Usage​

Creating a Binary Trace​

pipeline arch=sdr log=bench-sim.log trace=pipeline.bin
OptionDescription
arch=<arch>Architecture of the log, e.g. sdr. Always name it: the default is not sdr.
log=<file>Input simulator log file
trace=<file>Output binary trace file

Extracting a Tile as JSON​

pipeline trace=pipeline.bin tile=T<col>.<row>

This loads the specified tile's data from the binary file and outputs JSON to stdout.

Reading a trace​

Look for long stalls, missing receives, and repeated instructions. Compare the cycle where data arrives with the cycle where it is consumed. A trace can only show events recorded in its input log; use files from the same run.

Pipeline Stages​

SDR traces show these 11 pipeline stages:

IndexNameFull NameMeaning
0pfPre-FetchInstruction address generation
1fmFetch MemoryInstruction memory access
2fFetchInstruction fetch / decode
3cCheckDependency/hazard checking
4dDecodeFull instruction decode
5rReadRegister/operand read
6eExecuteALU/FPU execution
7mMemoryMemory access stage
8xeXtendExtended execution / completion
9wWrite-backResult write-back to register file
10wmWrite MemoryMemory write-back
  • Schrödinger (11-stage pipeline): pf → fm → f → c → d → r → e → m → x → w → wm

JSON output​

Tile JSON includes archname, a pipeline array of cycle records, and an insn array of instructions. Stage entries identify the instruction and whether it stalled or advanced. Instruction sequence entries include cycles, operand addresses, and values. Use Portrait to navigate these together with the source listing.