calyx icon indicating copy to clipboard operation
calyx copied to clipboard

Using fud priority causes warning

Open sgpthomas opened this issue 1 year ago • 2 comments
trafficstars

I wanted to make verilator the default verilog simulator for fud, so I set the stages.verilog.priority key to 1. This works, but causes a warning saying that the key is unknown. I don't think that this should generate a warning.

The warning happens because the Verilog stage doesn't define it as a known key in the known_opts function. It seems silly to have to add the priority key for every stage, so maybe there's a way we can always have this be a known opt for all stages.

Of course this is not a big deal at all. And maybe fud2 will just supercede fud and this is not worth fixing.

sgpthomas avatar Jan 26 '24 22:01 sgpthomas

Argh that's odd! The logic for checking is here and we can change it to not check the priority key: https://github.com/calyxir/calyx/blob/main/fud/fud/stages/init.py#L218

However, it's kind of weird that we use the stage options magic to encode priority stuff anyways. fud2 should probably make a better trade-off here (CC @sampsyo).

rachitnigam avatar Jan 27 '24 02:01 rachitnigam

Thanks for the ping! I haven't implemented anything like priority in fud2 yet. Seems worth doing. Currently, the first thing that the BFS algorithm finds "wins" unless you use --through! Food for thought… I also don't know what the right UI would be for this yet.

sampsyo avatar Jan 27 '24 22:01 sampsyo