calyx
calyx copied to clipboard
[fud] State/stage conflation confuses implied state detection
fud has the ability to automatically detect the name of the input and output state based on the suffix of the file. For example:
fud e in.futil -o out.sv
is the same as:
fud e in.futil -o out.sv --from futil --to verilog
The logic for discovering implied state looks at the configuration for a stage and returns the name of the stage: https://github.com/cucapra/calyx/blob/master/fud/fud/exec.py#L22
However, this means that if the name of the final state is different from the final stage, then we'll get a mysterious output saying:
No stage named `<stage>`
The key problem is that fud is returning the name of the stage in the state because the configuration only provides a way to define behavior for stages, not states.
A possible solution is adding a [state] array to the configuration to specify information associated with states and provide suffixes there instead of a stage's configuration.
Removing the bug label because the PR above fixes the immediate problem.