The chart is saved as it looks on screen, with the View menu's theme, colours, lines, text size and title. The sizes are in screen pixels, and the text keeps its size, so a smaller figure has larger text for its width.
Summary
Alignment ▾
Offset0
The offset is how many positions the gem5 stream is shifted against the RTL stream. FlowCompare finds it by itself, and it is 0 whenever both JSONs cover the main program. Change it only if the checks say the streams part.
Verdict
Metrics over the compared instructions
Can the two runs be compared?
Compare a gem5 run with the CVA6 RTL, instruction by instruction
FlowCompare lines up the instructions both runs commit, tells you how far gem5's cycle count is from the RTL's, and shows which instructions gain or lose the cycles.
Or drop a MinorFlow JSON and a CVA6Flow JSON of the same program anywhere on this window.
The verdict says how much faster or slower gem5 is than the RTL.
The metrics set the two runs' counters side by side.
The chart follows the gap across the program, in cycles or any other metric, or draws both runs.
The tables name the instructions that open it.
x axis
Figure Mode. F or Esc brings the page back.
How to use FlowCompare
What it shows
FlowCompare takes one program run twice: once on gem5's MinorCPU, as a MinorFlow JSON, and once on the CVA6 RTL, as a CVA6Flow JSON. Both runs commit the same instructions in the same order, so it pairs them one by one, the first with the first, and compares when each pair commits. It tells you how far gem5's cycle count is from the RTL's, and which instructions gain or lose the cycles.
The daxpy example compared: the verdict, the metrics and the checks, the chart with what it plots and its x axis, and the tabs of the tables below it.
Each compared instruction has a position, its place in commit order counted from 0, which the chart, the tables and the tooltip all use.
Opening two JSONs
Compare an Example loads a program already run on both: on gem5 with the configuration matched to CVA6, and on the RTL. The Example list at the top chooses the program, and Compare beside it loads the one chosen at any time. To compare your own runs, Open Two JSONs…, or Open JSONs… at the top, picks a MinorFlow JSON and a CVA6Flow JSON of the same program together, and dropping both anywhere on the window does the same.
The start page, before anything is compared.
Each JSON says which tool wrote it, so it goes to its own slot, gem5 or RTL, in whichever order they come, and a click on a slot picks one JSON, which replaces the one of its kind. A JSON of another schema is refused, with a note that says how to make it again. After an example loads, the line under the toolbar says where its two JSONs came from.
The verdict, metrics and checks
The verdict says how much faster or slower gem5 is than the RTL over the main program, with start-up and exit left out, from the first compared instruction's commit to the last one's. It agrees with the cycle error the calibration tables report to within a few cycles. Its colour grades its size whichever the sign: green within 1% of the RTL, amber within 5% and red beyond.
The verdict graded amber, the three checks passed, and the rows the two tools count differently framed.
The metrics set both runs' counters side by side over the same instructions, with gem5 minus the RTL and the error, that difference as a share of the RTL. A row marked * is counted differently by the two tools, so it is shown for reference and not as model error. Hold the pointer over a row for what it counts. A figure reads - when a JSON lists what feeds it as degraded. The viewers' Main Code cycles start at the first fetch, which comes earlier on the RTL, so one viewer's cycles minus the other's is not the difference shown here.
The checks say whether the two runs can be compared at all: the same number of instructions, the same instructions position by position, by class and by mnemonic, and the main program found in both. ✓ passes, ! needs a look and ✗ fails. A red check withholds the verdict, since two different instruction streams have no model error to measure, and the two JSONs are then probably not the same program, or one of them is a slice. The Alignment menu shifts one stream against the other, which a normal comparison never needs.
Reading the chart
The chart follows the gap along the program, from position 0 on the left to the last one on the right. The buttons over it choose what it plots, one panel each over the same x axis: Cycles, IPC, the cache misses and accesses, the branches, the mispredicted branches and the wrong-path records. A click adds or removes a metric, and a Shift-click shows one alone. Each metric keeps one colour, on its button, its panel and its Difference and Relative lines. Every count runs from the first compared instruction, so it ends at the figure in the metrics card.
Cycles and IPC in Difference: the two runs keep in step until the loop starts, and from there gem5 pulls ahead.
Difference, or D, plots gem5 minus the RTL. Above zero gem5's figure is the higher one, shaded in gem5's colour, and below zero the RTL's is, shaded in the RTL's colour, and each panel says in words what that means for its metric. For Cycles the height is how many cycles gem5 is behind after each instruction: a flat stretch means both run in step, a slope means a stretch of code runs at a different speed on the two, and a jump means one instruction cost very different amounts. A cache miss counts when it happens, so a run that starts its next miss a little earlier leads by one until the other catches up.
Relative, or R, plots the same as a percentage of the RTL, which for Cycles ends at the verdict. It starts once the RTL has counted 1% of its total, since a ratio of small counts swings wildly. Both runs, or B, draws each run on its own line, gem5's in its colour over the RTL's.
Both runs' IPC, zoomed into positions 10,200 to 10,500, where the loop starts.
The x axis switch under the chart gives each instruction the same width with Instructions, or makes each as wide as the RTL cycles it took with Cycles, so a stall takes room and a fast stretch shrinks. IPC is taken over the window of instructions set beside the buttons, so its line starts once that many have committed. When the stretch in view holds more positions than the chart has pixels, the line is the average of each pixel's positions and a faint band shows their range. If the two streams part, a dashed red line marks where, and the chart right of it cannot be trusted.
Moving along the chart
Hold the pointer over the chart to read every panel at one position: each run's figure, their difference and that difference in % of the RTL, then the cycles the instruction there moved the gap by and both runs' commit cycles. A line marks the position on every panel, and a click opens its stage-by-stage timing under the tables.
The tooltip of the position under the pointer, with the figures of every panel.
Drag across the chart to zoom into a stretch, and its panels then scale to it. + and - zoom in and out, about the pointer while it is over the chart and about the middle otherwise, ← and → move along it, and Home and End jump to its ends. Over the chart the wheel moves along it while zoomed in and scrolls the page otherwise, Shift and the wheel or a sideways swipe always move along it, and Ctrl and the wheel stays the browser's zoom. The scrollbar under the chart moves it too, the Positions boxes take a stretch typed in, and Fit All, 0 or a double-click shows the whole program again.
A drag across the chart, the stretch it zooms into shaded until the button is let go.
The tables
Where the cycles go lists each instruction of the program with how many times it ran, the cycles it took on each run on average, from the previous instruction's commit to its own, and the total it adds to the gap, in gem5's colour where gem5 spends more and in the RTL's where the RTL does. The largest totals come first, so the top rows explain most of the verdict, and all the totals add up to its cycles. Neighbouring rows can sit anywhere in the program. By mnemonic adds up every execution of one mnemonic, all the fld of the program as one row, with the other spellings the program uses for it in brackets, as in addi (li, mv), and its class, the coarse kind both tools agree on: load, store, alu, branch, fp, muldiv, csr or amo. Biggest single steps lists the single executions that moved the gap the most.
The largest total first, the first row chosen, and the timing of its biggest step opened below.
A click on a row marks its executions on the chart, moves a zoom that left out its position, and opens below the stage-by-stage timing of the execution at that position, the one that moved the gap the most. Each stage is given in cycles before its own commit, since the two runs start at different cycles, and the # is the record's id in its JSON, for finding it in a viewer. ↑ and ↓ move through the rows, ← and → switch tables once a row or a tab has the focus, and Esc clears the chosen row and its marks.
View and Export
View, or V, hides any part of the page or of the chart, gives the chart a title, and sets the theme, as L does, the colours, colour-blind safe, greyscale or your own, whether the Difference and Relative lines take their metric's colour or the gap's, the line width and the chart's text size. Figure Mode, or F, leaves the chart alone on the page for a screenshot, and Reset View puts every choice back but the theme. The page remembers these choices in this browser.
The View menu.
Screenshot, or S, saves the window as a PNG at three times its resolution, and the key keeps the tooltip under the pointer in it. Export saves the chart alone as it is in view, zoom included, as a PNG, as an SVG that stays sharp in a document or as CSV data for pgfplots or a spreadsheet, at the size chosen there, made taller when its panels would not fit, and on a see-through background if you ask. The CSV can keep at most 2,000 rows, each stretch's first, last, lowest and highest, small enough for LaTeX. Copy Summary copies the verdict, the metrics and the checks as text.
The Export menu.
Keys
?
Open and close this Help
Esc
Close the open menu, this Help or Figure Mode, then clear the chosen row and its marks
DRB
Difference, Relative and Both runs
+-
Zoom the chart in and out, and = zooms in too
0
Fit All
←→
Move along a zoomed chart, or switch tables once a row or a tab has the focus
HomeEnd
The start or the end of a zoomed chart
↑↓
The previous or the next row of the table
V
The View menu
L
Switch between the dark and light themes
F
Figure Mode on and off
S
Screenshot, keeping the tooltip under the pointer
The keys work wherever the focus is, except while typing in a box, and each control with a key names it in its tooltip. In the Positions boxes, Enter shows the stretch typed and Esc puts back the one in view, and on a slot, Enter or Space opens the browser's file picker.