Skip to content

Compare#2597

Open
pedropontesgarcia wants to merge 2 commits intoarea-profiler/AreaExtractfrom
compare
Open

Compare#2597
pedropontesgarcia wants to merge 2 commits intoarea-profiler/AreaExtractfrom
compare

Conversation

@pedropontesgarcia
Copy link
Collaborator

Shamelessly copy-pasting from the readme:

Compare

Compare is a tool for comparing simulation and synthesis results for multiple
Calyx designs. It reads a CSV recipe, runs the corresponding
simulation and synthesis flows, and produces a summary table (CSV or visual).

Input

Column Description
DESIGN Calyx design file (e.g., example.futil)
COMP_SIM "True" to run simulation
SIM_DATA Input data file for simulation
COMP_SYNTH "True" to run synthesis and place & route
SYNTH_VAR Area variable to extract (e.g., ff)
SYNTH_PERIOD Clock period used for synthesis (e.g., 7.00)

Output

Column Description
DESIGN Design name
SIM_CYCLES Cycle count from simulation
SYNTH_STATUS Whether timing was met
SYNTH_AREA Extracted area value
EXEC_TIME SIM_CYCLES x SYNTH_PERIOD

Installation and usage

$ uv tool install .
$ compare -h                                                                                                                                 (base) 
usage: compare [-h] [-v] [-p] [-o OUTPUT] input

The default output is stdout, but an output file can be specified with -o.
The table can also be printed in "visual mode" with -p. Verbose mode can be
enabled with -v.

@pedropontesgarcia
Copy link
Collaborator Author

Note that this PR depends on the AreaExtract PR!

@pedropontesgarcia pedropontesgarcia changed the base branch from main to area-profiler/AreaExtract December 4, 2025 06:05
if row["COMP_SIM"].lower() == "true":
subprocess.run(
[
"fud2",
Copy link
Contributor

@ayakayorihiro ayakayorihiro Dec 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To save this script some runtime, you can actually run Verilator without the profiler to obtain cycle counts! Like this:

fud2 <calyx_file> -o <out_file> --to dat --through verilator -s sim.data=<data_file>

The first entry in the json should be the cycle count :) I'd highly recommend doing this because the profiler is so slow...
(Note: the --through verilator is important since Cider doesn't produce cycle counts.)

@ayakayorihiro ayakayorihiro force-pushed the area-profiler/AreaExtract branch 2 times, most recently from 29b65ae to e0e814b Compare January 5, 2026 19:32
@github-actions
Copy link
Contributor

github-actions bot commented Mar 7, 2026

This pull request has not seen activity in 14 days and is being marked as stale. If you're continuing work on this, please reply and state how to get this PR in a mergeable state or what issues it is blocked on. If the PR is not ready for review, please mark it as a draft. The PR will be closed in 7 days if there is no further activity.

@github-actions
Copy link
Contributor

This stale PR is being closed because it has not seen any activity in 7 days. If you're planning to continue work on it, please reopen it and mention how to make progress on it.

@github-actions github-actions bot closed this Mar 14, 2026
@ayakayorihiro ayakayorihiro reopened this Mar 15, 2026
@github-actions github-actions bot removed the S: Stale label Mar 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants