Skip to content

Commit

Permalink
[Cider | Fud2] Rename fud2 stuff to reduce confusion (#2334)
Browse files Browse the repository at this point in the history
Quick set of renaming to reduce the confusion with the `flags` stuff
which should make it clear where things belong
  • Loading branch information
EclecticGriffin authored Nov 5, 2024
1 parent 48f5002 commit d87b1a2
Show file tree
Hide file tree
Showing 26 changed files with 79 additions and 79 deletions.
6 changes: 3 additions & 3 deletions fud2/scripts/calyx.rhai
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ fn calyx_setup(e) {
e.rule("calyx", "$calyx-exe -l $calyx-lib-path -b $backend $args $in > $out");
e.rule("calyx-pass", "$calyx-exe -l $calyx-lib-path -p $pass $args $in > $out");

e.config_var_or("flags", "calyx.flags", "-p none");
e.config_var_or("cider-calyx-passes", "cider.calyx-passes", "-p none");
e.rule(
"calyx-with-flags",
"$calyx-exe -l $calyx-lib-path $flags $args $in > $out",
"calyx-cider",
"$calyx-exe -l $calyx-lib-path $cider-calyx-passes $args $in > $out",
);
}

Expand Down
2 changes: 1 addition & 1 deletion fud2/scripts/cider.rhai
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ op(
|e, input, output| {
e.build_cmd(
[output],
"calyx-with-flags",
"calyx-cider",
[input],
[],
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ rule calyx
command = $calyx-exe -l $calyx-lib-path -b $backend $args $in > $out
rule calyx-pass
command = $calyx-exe -l $calyx-lib-path -p $pass $args $in > $out
flags = -p none
rule calyx-with-flags
command = $calyx-exe -l $calyx-lib-path $flags $args $in > $out
cider-calyx-passes = -p none
rule calyx-cider
command = $calyx-exe -l $calyx-lib-path $cider-calyx-passes $args $in > $out

cider-exe = $calyx-base/target/debug/cider
cider-converter = $calyx-base/target/debug/cider-data-converter
Expand All @@ -35,7 +35,7 @@ rule dump-to-interp
command = $cider-converter --to cider $converter-flags $in > $out
build data.dump: dump-to-interp $sim_data | $cider-converter

build pseudo_cider: calyx-with-flags _from_stdin_calyx.futil
build pseudo_cider: calyx-cider _from_stdin_calyx.futil
build interp_out.dump: run-cider pseudo_cider | data.dump
build _to_stdout_dat.json: interp-to-dump interp_out.dump | $cider-converter

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ rule calyx
command = $calyx-exe -l $calyx-lib-path -b $backend $args $in > $out
rule calyx-pass
command = $calyx-exe -l $calyx-lib-path -p $pass $args $in > $out
flags = -p none
rule calyx-with-flags
command = $calyx-exe -l $calyx-lib-path $flags $args $in > $out
cider-calyx-passes = -p none
rule calyx-cider
command = $calyx-exe -l $calyx-lib-path $cider-calyx-passes $args $in > $out

yxi = $calyx-base/target/debug/yxi
rule yxi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ rule calyx
command = $calyx-exe -l $calyx-lib-path -b $backend $args $in > $out
rule calyx-pass
command = $calyx-exe -l $calyx-lib-path -p $pass $args $in > $out
flags = -p none
rule calyx-with-flags
command = $calyx-exe -l $calyx-lib-path $flags $args $in > $out
cider-calyx-passes = -p none
rule calyx-cider
command = $calyx-exe -l $calyx-lib-path $cider-calyx-passes $args $in > $out

python = python3
build json-dat.py: get-rsrc
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ rule calyx
command = $calyx-exe -l $calyx-lib-path -b $backend $args $in > $out
rule calyx-pass
command = $calyx-exe -l $calyx-lib-path -p $pass $args $in > $out
flags = -p none
rule calyx-with-flags
command = $calyx-exe -l $calyx-lib-path $flags $args $in > $out
cider-calyx-passes = -p none
rule calyx-cider
command = $calyx-exe -l $calyx-lib-path $cider-calyx-passes $args $in > $out

python = python3
build json-dat.py: get-rsrc
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ rule calyx
command = $calyx-exe -l $calyx-lib-path -b $backend $args $in > $out
rule calyx-pass
command = $calyx-exe -l $calyx-lib-path -p $pass $args $in > $out
flags = -p none
rule calyx-with-flags
command = $calyx-exe -l $calyx-lib-path $flags $args $in > $out
cider-calyx-passes = -p none
rule calyx-cider
command = $calyx-exe -l $calyx-lib-path $cider-calyx-passes $args $in > $out

python = python3
build json-dat.py: get-rsrc
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ rule calyx
command = $calyx-exe -l $calyx-lib-path -b $backend $args $in > $out
rule calyx-pass
command = $calyx-exe -l $calyx-lib-path -p $pass $args $in > $out
flags = -p none
rule calyx-with-flags
command = $calyx-exe -l $calyx-lib-path $flags $args $in > $out
cider-calyx-passes = -p none
rule calyx-cider
command = $calyx-exe -l $calyx-lib-path $cider-calyx-passes $args $in > $out

python = python3
build json-dat.py: get-rsrc
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ rule calyx
command = $calyx-exe -l $calyx-lib-path -b $backend $args $in > $out
rule calyx-pass
command = $calyx-exe -l $calyx-lib-path -p $pass $args $in > $out
flags = -p none
rule calyx-with-flags
command = $calyx-exe -l $calyx-lib-path $flags $args $in > $out
cider-calyx-passes = -p none
rule calyx-cider
command = $calyx-exe -l $calyx-lib-path $cider-calyx-passes $args $in > $out

vivado-dir = /test/xilinx/vivado
vitis-dir = /test/xilinx/vitis
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ rule calyx
command = $calyx-exe -l $calyx-lib-path -b $backend $args $in > $out
rule calyx-pass
command = $calyx-exe -l $calyx-lib-path -p $pass $args $in > $out
flags = -p none
rule calyx-with-flags
command = $calyx-exe -l $calyx-lib-path $flags $args $in > $out
cider-calyx-passes = -p none
rule calyx-cider
command = $calyx-exe -l $calyx-lib-path $cider-calyx-passes $args $in > $out

vivado-dir = /test/xilinx/vivado
vitis-dir = /test/xilinx/vitis
Expand Down
8 changes: 4 additions & 4 deletions fud2/tests/snapshots/tests__test@calyx_to_cider-debug.snap
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ rule calyx
command = $calyx-exe -l $calyx-lib-path -b $backend $args $in > $out
rule calyx-pass
command = $calyx-exe -l $calyx-lib-path -p $pass $args $in > $out
flags = -p none
rule calyx-with-flags
command = $calyx-exe -l $calyx-lib-path $flags $args $in > $out
cider-calyx-passes = -p none
rule calyx-cider
command = $calyx-exe -l $calyx-lib-path $cider-calyx-passes $args $in > $out

build tb.sv: get-rsrc

Expand All @@ -37,7 +37,7 @@ rule dump-to-interp
command = $cider-converter --to cider $converter-flags $in > $out
build data.dump: dump-to-interp $sim_data | $cider-converter

build pseudo_cider: calyx-with-flags _from_stdin_calyx.futil
build pseudo_cider: calyx-cider _from_stdin_calyx.futil
build _to_stdout_cider-debug: run-cider-debug pseudo_cider | data.dump

default _to_stdout_cider-debug
6 changes: 3 additions & 3 deletions fud2/tests/snapshots/tests__test@calyx_to_verilog.snap
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ rule calyx
command = $calyx-exe -l $calyx-lib-path -b $backend $args $in > $out
rule calyx-pass
command = $calyx-exe -l $calyx-lib-path -p $pass $args $in > $out
flags = -p none
rule calyx-with-flags
command = $calyx-exe -l $calyx-lib-path $flags $args $in > $out
cider-calyx-passes = -p none
rule calyx-cider
command = $calyx-exe -l $calyx-lib-path $cider-calyx-passes $args $in > $out

build _to_stdout_verilog.sv: calyx _from_stdin_calyx.futil
backend = verilog
Expand Down
6 changes: 3 additions & 3 deletions fud2/tests/snapshots/tests__test@plan_axi-wrapped.snap
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ rule calyx
command = $calyx-exe -l $calyx-lib-path -b $backend $args $in > $out
rule calyx-pass
command = $calyx-exe -l $calyx-lib-path -p $pass $args $in > $out
flags = -p none
rule calyx-with-flags
command = $calyx-exe -l $calyx-lib-path $flags $args $in > $out
cider-calyx-passes = -p none
rule calyx-cider
command = $calyx-exe -l $calyx-lib-path $cider-calyx-passes $args $in > $out

yxi = $calyx-base/target/debug/yxi
rule yxi
Expand Down
6 changes: 3 additions & 3 deletions fud2/tests/snapshots/tests__test@plan_calyx-noverify.snap
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ rule calyx
command = $calyx-exe -l $calyx-lib-path -b $backend $args $in > $out
rule calyx-pass
command = $calyx-exe -l $calyx-lib-path -p $pass $args $in > $out
flags = -p none
rule calyx-with-flags
command = $calyx-exe -l $calyx-lib-path $flags $args $in > $out
cider-calyx-passes = -p none
rule calyx-cider
command = $calyx-exe -l $calyx-lib-path $cider-calyx-passes $args $in > $out

build /output.ext: calyx /input.ext
backend = verilog
Expand Down
8 changes: 4 additions & 4 deletions fud2/tests/snapshots/tests__test@plan_calyx-to-cider.snap
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ rule calyx
command = $calyx-exe -l $calyx-lib-path -b $backend $args $in > $out
rule calyx-pass
command = $calyx-exe -l $calyx-lib-path -p $pass $args $in > $out
flags = -p none
rule calyx-with-flags
command = $calyx-exe -l $calyx-lib-path $flags $args $in > $out
cider-calyx-passes = -p none
rule calyx-cider
command = $calyx-exe -l $calyx-lib-path $cider-calyx-passes $args $in > $out

build /output.ext: calyx-with-flags /input.ext
build /output.ext: calyx-cider /input.ext

default /output.ext
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ rule calyx
command = $calyx-exe -l $calyx-lib-path -b $backend $args $in > $out
rule calyx-pass
command = $calyx-exe -l $calyx-lib-path -p $pass $args $in > $out
flags = -p none
rule calyx-with-flags
command = $calyx-exe -l $calyx-lib-path $flags $args $in > $out
cider-calyx-passes = -p none
rule calyx-cider
command = $calyx-exe -l $calyx-lib-path $cider-calyx-passes $args $in > $out

cocotb-makefile-dir = $calyx-base/yxi/axi-calyx/cocotb
sim_data = /test/data.json
Expand Down
6 changes: 3 additions & 3 deletions fud2/tests/snapshots/tests__test@plan_calyx-to-firrtl.snap
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ rule calyx
command = $calyx-exe -l $calyx-lib-path -b $backend $args $in > $out
rule calyx-pass
command = $calyx-exe -l $calyx-lib-path -p $pass $args $in > $out
flags = -p none
rule calyx-with-flags
command = $calyx-exe -l $calyx-lib-path $flags $args $in > $out
cider-calyx-passes = -p none
rule calyx-cider
command = $calyx-exe -l $calyx-lib-path $cider-calyx-passes $args $in > $out

yxi = $calyx-base/target/debug/yxi
rule yxi
Expand Down
6 changes: 3 additions & 3 deletions fud2/tests/snapshots/tests__test@plan_calyx-to-verilog.snap
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ rule calyx
command = $calyx-exe -l $calyx-lib-path -b $backend $args $in > $out
rule calyx-pass
command = $calyx-exe -l $calyx-lib-path -p $pass $args $in > $out
flags = -p none
rule calyx-with-flags
command = $calyx-exe -l $calyx-lib-path $flags $args $in > $out
cider-calyx-passes = -p none
rule calyx-cider
command = $calyx-exe -l $calyx-lib-path $cider-calyx-passes $args $in > $out

build /output.ext: calyx /input.ext
backend = verilog
Expand Down
6 changes: 3 additions & 3 deletions fud2/tests/snapshots/tests__test@plan_calyx-to-yxi.snap
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ rule calyx
command = $calyx-exe -l $calyx-lib-path -b $backend $args $in > $out
rule calyx-pass
command = $calyx-exe -l $calyx-lib-path -p $pass $args $in > $out
flags = -p none
rule calyx-with-flags
command = $calyx-exe -l $calyx-lib-path $flags $args $in > $out
cider-calyx-passes = -p none
rule calyx-cider
command = $calyx-exe -l $calyx-lib-path $cider-calyx-passes $args $in > $out

yxi = $calyx-base/target/debug/yxi
rule yxi
Expand Down
6 changes: 3 additions & 3 deletions fud2/tests/snapshots/tests__test@plan_cider.snap
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ rule calyx
command = $calyx-exe -l $calyx-lib-path -b $backend $args $in > $out
rule calyx-pass
command = $calyx-exe -l $calyx-lib-path -p $pass $args $in > $out
flags = -p none
rule calyx-with-flags
command = $calyx-exe -l $calyx-lib-path $flags $args $in > $out
cider-calyx-passes = -p none
rule calyx-cider
command = $calyx-exe -l $calyx-lib-path $cider-calyx-passes $args $in > $out

cider-exe = $calyx-base/target/debug/cider
cider-converter = $calyx-base/target/debug/cider-data-converter
Expand Down
6 changes: 3 additions & 3 deletions fud2/tests/snapshots/tests__test@plan_debug.snap
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ rule calyx
command = $calyx-exe -l $calyx-lib-path -b $backend $args $in > $out
rule calyx-pass
command = $calyx-exe -l $calyx-lib-path -p $pass $args $in > $out
flags = -p none
rule calyx-with-flags
command = $calyx-exe -l $calyx-lib-path $flags $args $in > $out
cider-calyx-passes = -p none
rule calyx-cider
command = $calyx-exe -l $calyx-lib-path $cider-calyx-passes $args $in > $out

cider-exe = $calyx-base/target/debug/cider
cider-converter = $calyx-base/target/debug/cider-data-converter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ rule calyx
command = $calyx-exe -l $calyx-lib-path -b $backend $args $in > $out
rule calyx-pass
command = $calyx-exe -l $calyx-lib-path -p $pass $args $in > $out
flags = -p none
rule calyx-with-flags
command = $calyx-exe -l $calyx-lib-path $flags $args $in > $out
cider-calyx-passes = -p none
rule calyx-cider
command = $calyx-exe -l $calyx-lib-path $cider-calyx-passes $args $in > $out

gen-firrtl-primitives-script = $calyx-base/tools/firrtl/generate-firrtl-with-primitives.py
rule generate-firrtl-with-primitives
Expand Down
6 changes: 3 additions & 3 deletions fud2/tests/snapshots/tests__test@plan_primitive-uses.snap
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ rule calyx
command = $calyx-exe -l $calyx-lib-path -b $backend $args $in > $out
rule calyx-pass
command = $calyx-exe -l $calyx-lib-path -p $pass $args $in > $out
flags = -p none
rule calyx-with-flags
command = $calyx-exe -l $calyx-lib-path $flags $args $in > $out
cider-calyx-passes = -p none
rule calyx-cider
command = $calyx-exe -l $calyx-lib-path $cider-calyx-passes $args $in > $out

build /output.ext: calyx /input.ext
backend = primitive-uses
Expand Down
6 changes: 3 additions & 3 deletions fud2/tests/snapshots/tests__test@plan_profiler.snap
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ rule calyx
command = $calyx-exe -l $calyx-lib-path -b $backend $args $in > $out
rule calyx-pass
command = $calyx-exe -l $calyx-lib-path -p $pass $args $in > $out
flags = -p none
rule calyx-with-flags
command = $calyx-exe -l $calyx-lib-path $flags $args $in > $out
cider-calyx-passes = -p none
rule calyx-cider
command = $calyx-exe -l $calyx-lib-path $cider-calyx-passes $args $in > $out

cells = cells.json
tdcc-json = fsm.json
Expand Down
6 changes: 3 additions & 3 deletions fud2/tests/snapshots/tests__test@plan_xo.snap
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ rule calyx
command = $calyx-exe -l $calyx-lib-path -b $backend $args $in > $out
rule calyx-pass
command = $calyx-exe -l $calyx-lib-path -p $pass $args $in > $out
flags = -p none
rule calyx-with-flags
command = $calyx-exe -l $calyx-lib-path $flags $args $in > $out
cider-calyx-passes = -p none
rule calyx-cider
command = $calyx-exe -l $calyx-lib-path $cider-calyx-passes $args $in > $out

vivado-dir = /test/xilinx/vivado
vitis-dir = /test/xilinx/vitis
Expand Down
6 changes: 3 additions & 3 deletions interp/tests/runt.toml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ timeout = 10
name = "invoke compiled"
paths = ["control/invoke/*.futil"]
cmd = """
fud2 {} --from calyx --to dat --through cider -s calyx.flags=" -p compile-invoke" -s sim.data={}.data -s calyx.args="--log off" | jq --sort-keys
fud2 {} --from calyx --to dat --through cider -s cider.calyx-passes=" -p compile-invoke" -s sim.data={}.data -s calyx.args="--log off" | jq --sort-keys
"""

[[tests]]
Expand Down Expand Up @@ -138,7 +138,7 @@ fud2 --from calyx --to dat \
--through cider \
-s sim.data={}.data \
-s calyx.args="--log off" \
-s calyx.flags="-p all" \
-s cider.calyx-passes="-p all" \
-s cider.flags="--no-verify" \
{} | jq --sort-keys
"""
Expand All @@ -164,7 +164,7 @@ fud2 --from calyx --to dat \
--through cider \
-s sim.data={}.data \
-s calyx.args="--log off" \
-s calyx.flags=" -p compile-invoke" \
-s cider.calyx-passes=" -p compile-invoke" \
{} | jq --sort-keys
"""

Expand Down

0 comments on commit d87b1a2

Please sign in to comment.