calyx icon indicating copy to clipboard operation
calyx copied to clipboard

[fud] State/stage conflation confuses implied state detection

Open rachitnigam opened this issue 3 years ago • 1 comments

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.

rachitnigam avatar Jan 13 '22 05:01 rachitnigam

Removing the bug label because the PR above fixes the immediate problem.

rachitnigam avatar Jan 14 '22 12:01 rachitnigam