From d1f43c6fa8ae67582073796000247aebc7ec8d50 Mon Sep 17 00:00:00 2001 From: Rachit Nigam Date: Sat, 2 Nov 2024 17:05:33 -0400 Subject: [PATCH] Separate flag for specifying lib path in `fud2` (#2325) Add a `calyx.lib_path` argument for the `fud2` stage. --- fud2/fud-core/src/script/plugin.rs | 14 ++++++++++---- fud2/scripts/calyx.rhai | 8 +++++--- .../tests__test@calyx_through_cider_to_dat.snap | 7 ++++--- ...est@calyx_through_firrtl_to_verilog-refmem.snap | 7 ++++--- .../tests__test@calyx_through_icarus_to_dat.snap | 7 ++++--- .../tests__test@calyx_through_icarus_to_vcd.snap | 7 ++++--- ...tests__test@calyx_through_verilator_to_dat.snap | 7 ++++--- ...tests__test@calyx_through_verilator_to_vcd.snap | 7 ++++--- ...tests__test@calyx_through_xrt-trace_to_vcd.snap | 7 ++++--- .../tests__test@calyx_through_xrt_to_dat.snap | 7 ++++--- .../tests__test@calyx_to_cider-debug.snap | 7 ++++--- .../snapshots/tests__test@calyx_to_verilog.snap | 7 ++++--- .../snapshots/tests__test@plan_axi-wrapped.snap | 7 ++++--- .../snapshots/tests__test@plan_calyx-noverify.snap | 7 ++++--- .../snapshots/tests__test@plan_calyx-to-cider.snap | 7 ++++--- .../tests__test@plan_calyx-to-cocotb-axi.snap | 7 ++++--- .../tests__test@plan_calyx-to-firrtl.snap | 7 ++++--- .../tests__test@plan_calyx-to-verilog.snap | 7 ++++--- .../snapshots/tests__test@plan_calyx-to-yxi.snap | 7 ++++--- fud2/tests/snapshots/tests__test@plan_cider.snap | 7 ++++--- fud2/tests/snapshots/tests__test@plan_debug.snap | 7 ++++--- .../tests__test@plan_firrtl-with-primitives.snap | 7 ++++--- .../snapshots/tests__test@plan_primitive-uses.snap | 7 ++++--- .../tests/snapshots/tests__test@plan_profiler.snap | 8 ++++---- fud2/tests/snapshots/tests__test@plan_xo.snap | 7 ++++--- 25 files changed, 107 insertions(+), 77 deletions(-) diff --git a/fud2/fud-core/src/script/plugin.rs b/fud2/fud-core/src/script/plugin.rs index 608d0caf09..6f5bb3ca17 100644 --- a/fud2/fud-core/src/script/plugin.rs +++ b/fud2/fud-core/src/script/plugin.rs @@ -495,10 +495,16 @@ impl ScriptRunner { static_files: impl Iterator, ) -> &mut Self { for (name, data) in static_files { - let ast = self - .engine - .compile(String::from_utf8(data.to_vec()).unwrap()) - .unwrap(); + let file = String::from_utf8(data.to_vec()).unwrap(); + let compile_res = self.engine.compile(file); + + let ast = match compile_res { + Ok(ast) => ast, + Err(e) => { + let msg = format!("Failed to parse `{name}': {e}",); + panic!("{msg}"); + } + }; let functions = self.resolver.as_mut().unwrap().register_data(name, ast); self.rhai_functions = self.rhai_functions.merge(&functions); diff --git a/fud2/scripts/calyx.rhai b/fud2/scripts/calyx.rhai index 83162e51cf..a9e9a9de3b 100644 --- a/fud2/scripts/calyx.rhai +++ b/fud2/scripts/calyx.rhai @@ -6,14 +6,16 @@ export let calyx_setup = calyx_setup; fn calyx_setup(e) { e.config_var("calyx-base", "calyx.base"); e.config_var_or("calyx-exe", "calyx.exe", "$calyx-base/target/debug/calyx"); + e.config_var_or("calyx-lib-path", "calyx.lib_path", "$calyx-base"); e.config_var_or("args", "calyx.args", ""); - e.rule("calyx", "$calyx-exe -l $calyx-base -b $backend $args $in > $out"); - e.rule("calyx-pass", "$calyx-exe -l $calyx-base -p $pass $args $in > $out"); + + 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.rule( "calyx-with-flags", - "$calyx-exe -l $calyx-base $flags $args $in > $out", + "$calyx-exe -l $calyx-lib-path $flags $args $in > $out", ); } diff --git a/fud2/tests/snapshots/tests__test@calyx_through_cider_to_dat.snap b/fud2/tests/snapshots/tests__test@calyx_through_cider_to_dat.snap index f08660d1f4..613d325bbc 100644 --- a/fud2/tests/snapshots/tests__test@calyx_through_cider_to_dat.snap +++ b/fud2/tests/snapshots/tests__test@calyx_through_cider_to_dat.snap @@ -8,14 +8,15 @@ rule get-rsrc calyx-base = /test/calyx calyx-exe = $calyx-base/target/debug/calyx +calyx-lib-path = $calyx-base args = rule calyx - command = $calyx-exe -l $calyx-base -b $backend $args $in > $out + command = $calyx-exe -l $calyx-lib-path -b $backend $args $in > $out rule calyx-pass - command = $calyx-exe -l $calyx-base -p $pass $args $in > $out + command = $calyx-exe -l $calyx-lib-path -p $pass $args $in > $out flags = -p none rule calyx-with-flags - command = $calyx-exe -l $calyx-base $flags $args $in > $out + command = $calyx-exe -l $calyx-lib-path $flags $args $in > $out cider-exe = $calyx-base/target/debug/cider cider-converter = $calyx-base/target/debug/cider-data-converter diff --git a/fud2/tests/snapshots/tests__test@calyx_through_firrtl_to_verilog-refmem.snap b/fud2/tests/snapshots/tests__test@calyx_through_firrtl_to_verilog-refmem.snap index 3ff1ae5137..cee7375ba0 100644 --- a/fud2/tests/snapshots/tests__test@calyx_through_firrtl_to_verilog-refmem.snap +++ b/fud2/tests/snapshots/tests__test@calyx_through_firrtl_to_verilog-refmem.snap @@ -8,14 +8,15 @@ rule get-rsrc calyx-base = /test/calyx calyx-exe = $calyx-base/target/debug/calyx +calyx-lib-path = $calyx-base args = rule calyx - command = $calyx-exe -l $calyx-base -b $backend $args $in > $out + command = $calyx-exe -l $calyx-lib-path -b $backend $args $in > $out rule calyx-pass - command = $calyx-exe -l $calyx-base -p $pass $args $in > $out + command = $calyx-exe -l $calyx-lib-path -p $pass $args $in > $out flags = -p none rule calyx-with-flags - command = $calyx-exe -l $calyx-base $flags $args $in > $out + command = $calyx-exe -l $calyx-lib-path $flags $args $in > $out yxi = $calyx-base/target/debug/yxi rule yxi diff --git a/fud2/tests/snapshots/tests__test@calyx_through_icarus_to_dat.snap b/fud2/tests/snapshots/tests__test@calyx_through_icarus_to_dat.snap index 56cd7ebad5..6418275a23 100644 --- a/fud2/tests/snapshots/tests__test@calyx_through_icarus_to_dat.snap +++ b/fud2/tests/snapshots/tests__test@calyx_through_icarus_to_dat.snap @@ -8,14 +8,15 @@ rule get-rsrc calyx-base = /test/calyx calyx-exe = $calyx-base/target/debug/calyx +calyx-lib-path = $calyx-base args = rule calyx - command = $calyx-exe -l $calyx-base -b $backend $args $in > $out + command = $calyx-exe -l $calyx-lib-path -b $backend $args $in > $out rule calyx-pass - command = $calyx-exe -l $calyx-base -p $pass $args $in > $out + command = $calyx-exe -l $calyx-lib-path -p $pass $args $in > $out flags = -p none rule calyx-with-flags - command = $calyx-exe -l $calyx-base $flags $args $in > $out + command = $calyx-exe -l $calyx-lib-path $flags $args $in > $out python = python3 build json-dat.py: get-rsrc diff --git a/fud2/tests/snapshots/tests__test@calyx_through_icarus_to_vcd.snap b/fud2/tests/snapshots/tests__test@calyx_through_icarus_to_vcd.snap index 3d0b116ef9..1fc8ab77aa 100644 --- a/fud2/tests/snapshots/tests__test@calyx_through_icarus_to_vcd.snap +++ b/fud2/tests/snapshots/tests__test@calyx_through_icarus_to_vcd.snap @@ -8,14 +8,15 @@ rule get-rsrc calyx-base = /test/calyx calyx-exe = $calyx-base/target/debug/calyx +calyx-lib-path = $calyx-base args = rule calyx - command = $calyx-exe -l $calyx-base -b $backend $args $in > $out + command = $calyx-exe -l $calyx-lib-path -b $backend $args $in > $out rule calyx-pass - command = $calyx-exe -l $calyx-base -p $pass $args $in > $out + command = $calyx-exe -l $calyx-lib-path -p $pass $args $in > $out flags = -p none rule calyx-with-flags - command = $calyx-exe -l $calyx-base $flags $args $in > $out + command = $calyx-exe -l $calyx-lib-path $flags $args $in > $out python = python3 build json-dat.py: get-rsrc diff --git a/fud2/tests/snapshots/tests__test@calyx_through_verilator_to_dat.snap b/fud2/tests/snapshots/tests__test@calyx_through_verilator_to_dat.snap index 3adf6da679..672c0039f9 100644 --- a/fud2/tests/snapshots/tests__test@calyx_through_verilator_to_dat.snap +++ b/fud2/tests/snapshots/tests__test@calyx_through_verilator_to_dat.snap @@ -8,14 +8,15 @@ rule get-rsrc calyx-base = /test/calyx calyx-exe = $calyx-base/target/debug/calyx +calyx-lib-path = $calyx-base args = rule calyx - command = $calyx-exe -l $calyx-base -b $backend $args $in > $out + command = $calyx-exe -l $calyx-lib-path -b $backend $args $in > $out rule calyx-pass - command = $calyx-exe -l $calyx-base -p $pass $args $in > $out + command = $calyx-exe -l $calyx-lib-path -p $pass $args $in > $out flags = -p none rule calyx-with-flags - command = $calyx-exe -l $calyx-base $flags $args $in > $out + command = $calyx-exe -l $calyx-lib-path $flags $args $in > $out python = python3 build json-dat.py: get-rsrc diff --git a/fud2/tests/snapshots/tests__test@calyx_through_verilator_to_vcd.snap b/fud2/tests/snapshots/tests__test@calyx_through_verilator_to_vcd.snap index 4b47721931..d8d24f6839 100644 --- a/fud2/tests/snapshots/tests__test@calyx_through_verilator_to_vcd.snap +++ b/fud2/tests/snapshots/tests__test@calyx_through_verilator_to_vcd.snap @@ -8,14 +8,15 @@ rule get-rsrc calyx-base = /test/calyx calyx-exe = $calyx-base/target/debug/calyx +calyx-lib-path = $calyx-base args = rule calyx - command = $calyx-exe -l $calyx-base -b $backend $args $in > $out + command = $calyx-exe -l $calyx-lib-path -b $backend $args $in > $out rule calyx-pass - command = $calyx-exe -l $calyx-base -p $pass $args $in > $out + command = $calyx-exe -l $calyx-lib-path -p $pass $args $in > $out flags = -p none rule calyx-with-flags - command = $calyx-exe -l $calyx-base $flags $args $in > $out + command = $calyx-exe -l $calyx-lib-path $flags $args $in > $out python = python3 build json-dat.py: get-rsrc diff --git a/fud2/tests/snapshots/tests__test@calyx_through_xrt-trace_to_vcd.snap b/fud2/tests/snapshots/tests__test@calyx_through_xrt-trace_to_vcd.snap index 6531aaf4f2..b21f872b0c 100644 --- a/fud2/tests/snapshots/tests__test@calyx_through_xrt-trace_to_vcd.snap +++ b/fud2/tests/snapshots/tests__test@calyx_through_xrt-trace_to_vcd.snap @@ -8,14 +8,15 @@ rule get-rsrc calyx-base = /test/calyx calyx-exe = $calyx-base/target/debug/calyx +calyx-lib-path = $calyx-base args = rule calyx - command = $calyx-exe -l $calyx-base -b $backend $args $in > $out + command = $calyx-exe -l $calyx-lib-path -b $backend $args $in > $out rule calyx-pass - command = $calyx-exe -l $calyx-base -p $pass $args $in > $out + command = $calyx-exe -l $calyx-lib-path -p $pass $args $in > $out flags = -p none rule calyx-with-flags - command = $calyx-exe -l $calyx-base $flags $args $in > $out + command = $calyx-exe -l $calyx-lib-path $flags $args $in > $out vivado-dir = /test/xilinx/vivado vitis-dir = /test/xilinx/vitis diff --git a/fud2/tests/snapshots/tests__test@calyx_through_xrt_to_dat.snap b/fud2/tests/snapshots/tests__test@calyx_through_xrt_to_dat.snap index 5aa1580b4b..d805775a18 100644 --- a/fud2/tests/snapshots/tests__test@calyx_through_xrt_to_dat.snap +++ b/fud2/tests/snapshots/tests__test@calyx_through_xrt_to_dat.snap @@ -8,14 +8,15 @@ rule get-rsrc calyx-base = /test/calyx calyx-exe = $calyx-base/target/debug/calyx +calyx-lib-path = $calyx-base args = rule calyx - command = $calyx-exe -l $calyx-base -b $backend $args $in > $out + command = $calyx-exe -l $calyx-lib-path -b $backend $args $in > $out rule calyx-pass - command = $calyx-exe -l $calyx-base -p $pass $args $in > $out + command = $calyx-exe -l $calyx-lib-path -p $pass $args $in > $out flags = -p none rule calyx-with-flags - command = $calyx-exe -l $calyx-base $flags $args $in > $out + command = $calyx-exe -l $calyx-lib-path $flags $args $in > $out vivado-dir = /test/xilinx/vivado vitis-dir = /test/xilinx/vitis diff --git a/fud2/tests/snapshots/tests__test@calyx_to_cider-debug.snap b/fud2/tests/snapshots/tests__test@calyx_to_cider-debug.snap index 02e2d828ce..310c3c58d8 100644 --- a/fud2/tests/snapshots/tests__test@calyx_to_cider-debug.snap +++ b/fud2/tests/snapshots/tests__test@calyx_to_cider-debug.snap @@ -8,14 +8,15 @@ rule get-rsrc calyx-base = /test/calyx calyx-exe = $calyx-base/target/debug/calyx +calyx-lib-path = $calyx-base args = rule calyx - command = $calyx-exe -l $calyx-base -b $backend $args $in > $out + command = $calyx-exe -l $calyx-lib-path -b $backend $args $in > $out rule calyx-pass - command = $calyx-exe -l $calyx-base -p $pass $args $in > $out + command = $calyx-exe -l $calyx-lib-path -p $pass $args $in > $out flags = -p none rule calyx-with-flags - command = $calyx-exe -l $calyx-base $flags $args $in > $out + command = $calyx-exe -l $calyx-lib-path $flags $args $in > $out build tb.sv: get-rsrc diff --git a/fud2/tests/snapshots/tests__test@calyx_to_verilog.snap b/fud2/tests/snapshots/tests__test@calyx_to_verilog.snap index af413d8098..5513165821 100644 --- a/fud2/tests/snapshots/tests__test@calyx_to_verilog.snap +++ b/fud2/tests/snapshots/tests__test@calyx_to_verilog.snap @@ -8,14 +8,15 @@ rule get-rsrc calyx-base = /test/calyx calyx-exe = $calyx-base/target/debug/calyx +calyx-lib-path = $calyx-base args = rule calyx - command = $calyx-exe -l $calyx-base -b $backend $args $in > $out + command = $calyx-exe -l $calyx-lib-path -b $backend $args $in > $out rule calyx-pass - command = $calyx-exe -l $calyx-base -p $pass $args $in > $out + command = $calyx-exe -l $calyx-lib-path -p $pass $args $in > $out flags = -p none rule calyx-with-flags - command = $calyx-exe -l $calyx-base $flags $args $in > $out + command = $calyx-exe -l $calyx-lib-path $flags $args $in > $out build _to_stdout_verilog.sv: calyx _from_stdin_calyx.futil backend = verilog diff --git a/fud2/tests/snapshots/tests__test@plan_axi-wrapped.snap b/fud2/tests/snapshots/tests__test@plan_axi-wrapped.snap index 98d04f45ed..49c51234db 100644 --- a/fud2/tests/snapshots/tests__test@plan_axi-wrapped.snap +++ b/fud2/tests/snapshots/tests__test@plan_axi-wrapped.snap @@ -8,14 +8,15 @@ rule get-rsrc calyx-base = /test/calyx calyx-exe = $calyx-base/target/debug/calyx +calyx-lib-path = $calyx-base args = rule calyx - command = $calyx-exe -l $calyx-base -b $backend $args $in > $out + command = $calyx-exe -l $calyx-lib-path -b $backend $args $in > $out rule calyx-pass - command = $calyx-exe -l $calyx-base -p $pass $args $in > $out + command = $calyx-exe -l $calyx-lib-path -p $pass $args $in > $out flags = -p none rule calyx-with-flags - command = $calyx-exe -l $calyx-base $flags $args $in > $out + command = $calyx-exe -l $calyx-lib-path $flags $args $in > $out yxi = $calyx-base/target/debug/yxi rule yxi diff --git a/fud2/tests/snapshots/tests__test@plan_calyx-noverify.snap b/fud2/tests/snapshots/tests__test@plan_calyx-noverify.snap index 826c669cf1..e325b5ccae 100644 --- a/fud2/tests/snapshots/tests__test@plan_calyx-noverify.snap +++ b/fud2/tests/snapshots/tests__test@plan_calyx-noverify.snap @@ -8,14 +8,15 @@ rule get-rsrc calyx-base = /test/calyx calyx-exe = $calyx-base/target/debug/calyx +calyx-lib-path = $calyx-base args = rule calyx - command = $calyx-exe -l $calyx-base -b $backend $args $in > $out + command = $calyx-exe -l $calyx-lib-path -b $backend $args $in > $out rule calyx-pass - command = $calyx-exe -l $calyx-base -p $pass $args $in > $out + command = $calyx-exe -l $calyx-lib-path -p $pass $args $in > $out flags = -p none rule calyx-with-flags - command = $calyx-exe -l $calyx-base $flags $args $in > $out + command = $calyx-exe -l $calyx-lib-path $flags $args $in > $out build /output.ext: calyx /input.ext backend = verilog diff --git a/fud2/tests/snapshots/tests__test@plan_calyx-to-cider.snap b/fud2/tests/snapshots/tests__test@plan_calyx-to-cider.snap index 83cbe5a555..8f45c6c56c 100644 --- a/fud2/tests/snapshots/tests__test@plan_calyx-to-cider.snap +++ b/fud2/tests/snapshots/tests__test@plan_calyx-to-cider.snap @@ -8,14 +8,15 @@ rule get-rsrc calyx-base = /test/calyx calyx-exe = $calyx-base/target/debug/calyx +calyx-lib-path = $calyx-base args = rule calyx - command = $calyx-exe -l $calyx-base -b $backend $args $in > $out + command = $calyx-exe -l $calyx-lib-path -b $backend $args $in > $out rule calyx-pass - command = $calyx-exe -l $calyx-base -p $pass $args $in > $out + command = $calyx-exe -l $calyx-lib-path -p $pass $args $in > $out flags = -p none rule calyx-with-flags - command = $calyx-exe -l $calyx-base $flags $args $in > $out + command = $calyx-exe -l $calyx-lib-path $flags $args $in > $out build /output.ext: calyx-with-flags /input.ext diff --git a/fud2/tests/snapshots/tests__test@plan_calyx-to-cocotb-axi.snap b/fud2/tests/snapshots/tests__test@plan_calyx-to-cocotb-axi.snap index 59b6022570..ede6820917 100644 --- a/fud2/tests/snapshots/tests__test@plan_calyx-to-cocotb-axi.snap +++ b/fud2/tests/snapshots/tests__test@plan_calyx-to-cocotb-axi.snap @@ -8,14 +8,15 @@ rule get-rsrc calyx-base = /test/calyx calyx-exe = $calyx-base/target/debug/calyx +calyx-lib-path = $calyx-base args = rule calyx - command = $calyx-exe -l $calyx-base -b $backend $args $in > $out + command = $calyx-exe -l $calyx-lib-path -b $backend $args $in > $out rule calyx-pass - command = $calyx-exe -l $calyx-base -p $pass $args $in > $out + command = $calyx-exe -l $calyx-lib-path -p $pass $args $in > $out flags = -p none rule calyx-with-flags - command = $calyx-exe -l $calyx-base $flags $args $in > $out + command = $calyx-exe -l $calyx-lib-path $flags $args $in > $out cocotb-makefile-dir = $calyx-base/yxi/axi-calyx/cocotb sim_data = /test/data.json diff --git a/fud2/tests/snapshots/tests__test@plan_calyx-to-firrtl.snap b/fud2/tests/snapshots/tests__test@plan_calyx-to-firrtl.snap index 4f01a5d194..aa4dec5543 100644 --- a/fud2/tests/snapshots/tests__test@plan_calyx-to-firrtl.snap +++ b/fud2/tests/snapshots/tests__test@plan_calyx-to-firrtl.snap @@ -8,14 +8,15 @@ rule get-rsrc calyx-base = /test/calyx calyx-exe = $calyx-base/target/debug/calyx +calyx-lib-path = $calyx-base args = rule calyx - command = $calyx-exe -l $calyx-base -b $backend $args $in > $out + command = $calyx-exe -l $calyx-lib-path -b $backend $args $in > $out rule calyx-pass - command = $calyx-exe -l $calyx-base -p $pass $args $in > $out + command = $calyx-exe -l $calyx-lib-path -p $pass $args $in > $out flags = -p none rule calyx-with-flags - command = $calyx-exe -l $calyx-base $flags $args $in > $out + command = $calyx-exe -l $calyx-lib-path $flags $args $in > $out yxi = $calyx-base/target/debug/yxi rule yxi diff --git a/fud2/tests/snapshots/tests__test@plan_calyx-to-verilog.snap b/fud2/tests/snapshots/tests__test@plan_calyx-to-verilog.snap index 2082b62aa2..0c65b25fcf 100644 --- a/fud2/tests/snapshots/tests__test@plan_calyx-to-verilog.snap +++ b/fud2/tests/snapshots/tests__test@plan_calyx-to-verilog.snap @@ -8,14 +8,15 @@ rule get-rsrc calyx-base = /test/calyx calyx-exe = $calyx-base/target/debug/calyx +calyx-lib-path = $calyx-base args = rule calyx - command = $calyx-exe -l $calyx-base -b $backend $args $in > $out + command = $calyx-exe -l $calyx-lib-path -b $backend $args $in > $out rule calyx-pass - command = $calyx-exe -l $calyx-base -p $pass $args $in > $out + command = $calyx-exe -l $calyx-lib-path -p $pass $args $in > $out flags = -p none rule calyx-with-flags - command = $calyx-exe -l $calyx-base $flags $args $in > $out + command = $calyx-exe -l $calyx-lib-path $flags $args $in > $out build /output.ext: calyx /input.ext backend = verilog diff --git a/fud2/tests/snapshots/tests__test@plan_calyx-to-yxi.snap b/fud2/tests/snapshots/tests__test@plan_calyx-to-yxi.snap index 50bf573b57..0d7ff1a59e 100644 --- a/fud2/tests/snapshots/tests__test@plan_calyx-to-yxi.snap +++ b/fud2/tests/snapshots/tests__test@plan_calyx-to-yxi.snap @@ -8,14 +8,15 @@ rule get-rsrc calyx-base = /test/calyx calyx-exe = $calyx-base/target/debug/calyx +calyx-lib-path = $calyx-base args = rule calyx - command = $calyx-exe -l $calyx-base -b $backend $args $in > $out + command = $calyx-exe -l $calyx-lib-path -b $backend $args $in > $out rule calyx-pass - command = $calyx-exe -l $calyx-base -p $pass $args $in > $out + command = $calyx-exe -l $calyx-lib-path -p $pass $args $in > $out flags = -p none rule calyx-with-flags - command = $calyx-exe -l $calyx-base $flags $args $in > $out + command = $calyx-exe -l $calyx-lib-path $flags $args $in > $out yxi = $calyx-base/target/debug/yxi rule yxi diff --git a/fud2/tests/snapshots/tests__test@plan_cider.snap b/fud2/tests/snapshots/tests__test@plan_cider.snap index f4b2e54167..c739d8aeb0 100644 --- a/fud2/tests/snapshots/tests__test@plan_cider.snap +++ b/fud2/tests/snapshots/tests__test@plan_cider.snap @@ -8,14 +8,15 @@ rule get-rsrc calyx-base = /test/calyx calyx-exe = $calyx-base/target/debug/calyx +calyx-lib-path = $calyx-base args = rule calyx - command = $calyx-exe -l $calyx-base -b $backend $args $in > $out + command = $calyx-exe -l $calyx-lib-path -b $backend $args $in > $out rule calyx-pass - command = $calyx-exe -l $calyx-base -p $pass $args $in > $out + command = $calyx-exe -l $calyx-lib-path -p $pass $args $in > $out flags = -p none rule calyx-with-flags - command = $calyx-exe -l $calyx-base $flags $args $in > $out + command = $calyx-exe -l $calyx-lib-path $flags $args $in > $out cider-exe = $calyx-base/target/debug/cider cider-converter = $calyx-base/target/debug/cider-data-converter diff --git a/fud2/tests/snapshots/tests__test@plan_debug.snap b/fud2/tests/snapshots/tests__test@plan_debug.snap index ab98c29201..6c1bd36112 100644 --- a/fud2/tests/snapshots/tests__test@plan_debug.snap +++ b/fud2/tests/snapshots/tests__test@plan_debug.snap @@ -10,14 +10,15 @@ build tb.sv: get-rsrc calyx-base = /test/calyx calyx-exe = $calyx-base/target/debug/calyx +calyx-lib-path = $calyx-base args = rule calyx - command = $calyx-exe -l $calyx-base -b $backend $args $in > $out + command = $calyx-exe -l $calyx-lib-path -b $backend $args $in > $out rule calyx-pass - command = $calyx-exe -l $calyx-base -p $pass $args $in > $out + command = $calyx-exe -l $calyx-lib-path -p $pass $args $in > $out flags = -p none rule calyx-with-flags - command = $calyx-exe -l $calyx-base $flags $args $in > $out + command = $calyx-exe -l $calyx-lib-path $flags $args $in > $out cider-exe = $calyx-base/target/debug/cider cider-converter = $calyx-base/target/debug/cider-data-converter diff --git a/fud2/tests/snapshots/tests__test@plan_firrtl-with-primitives.snap b/fud2/tests/snapshots/tests__test@plan_firrtl-with-primitives.snap index 344ae279b1..155a828cfd 100644 --- a/fud2/tests/snapshots/tests__test@plan_firrtl-with-primitives.snap +++ b/fud2/tests/snapshots/tests__test@plan_firrtl-with-primitives.snap @@ -8,14 +8,15 @@ rule get-rsrc calyx-base = /test/calyx calyx-exe = $calyx-base/target/debug/calyx +calyx-lib-path = $calyx-base args = rule calyx - command = $calyx-exe -l $calyx-base -b $backend $args $in > $out + command = $calyx-exe -l $calyx-lib-path -b $backend $args $in > $out rule calyx-pass - command = $calyx-exe -l $calyx-base -p $pass $args $in > $out + command = $calyx-exe -l $calyx-lib-path -p $pass $args $in > $out flags = -p none rule calyx-with-flags - command = $calyx-exe -l $calyx-base $flags $args $in > $out + command = $calyx-exe -l $calyx-lib-path $flags $args $in > $out gen-firrtl-primitives-script = $calyx-base/tools/firrtl/generate-firrtl-with-primitives.py rule generate-firrtl-with-primitives diff --git a/fud2/tests/snapshots/tests__test@plan_primitive-uses.snap b/fud2/tests/snapshots/tests__test@plan_primitive-uses.snap index b831f243c5..5242f4ec0b 100644 --- a/fud2/tests/snapshots/tests__test@plan_primitive-uses.snap +++ b/fud2/tests/snapshots/tests__test@plan_primitive-uses.snap @@ -8,14 +8,15 @@ rule get-rsrc calyx-base = /test/calyx calyx-exe = $calyx-base/target/debug/calyx +calyx-lib-path = $calyx-base args = rule calyx - command = $calyx-exe -l $calyx-base -b $backend $args $in > $out + command = $calyx-exe -l $calyx-lib-path -b $backend $args $in > $out rule calyx-pass - command = $calyx-exe -l $calyx-base -p $pass $args $in > $out + command = $calyx-exe -l $calyx-lib-path -p $pass $args $in > $out flags = -p none rule calyx-with-flags - command = $calyx-exe -l $calyx-base $flags $args $in > $out + command = $calyx-exe -l $calyx-lib-path $flags $args $in > $out build /output.ext: calyx /input.ext backend = primitive-uses diff --git a/fud2/tests/snapshots/tests__test@plan_profiler.snap b/fud2/tests/snapshots/tests__test@plan_profiler.snap index 7b42740530..53ecb7ea71 100644 --- a/fud2/tests/snapshots/tests__test@plan_profiler.snap +++ b/fud2/tests/snapshots/tests__test@plan_profiler.snap @@ -1,7 +1,6 @@ --- source: fud2/tests/tests.rs description: "emit plan: profiler" -snapshot_kind: text --- build-tool = fud2 rule get-rsrc @@ -9,14 +8,15 @@ rule get-rsrc calyx-base = /test/calyx calyx-exe = $calyx-base/target/debug/calyx +calyx-lib-path = $calyx-base args = rule calyx - command = $calyx-exe -l $calyx-base -b $backend $args $in > $out + command = $calyx-exe -l $calyx-lib-path -b $backend $args $in > $out rule calyx-pass - command = $calyx-exe -l $calyx-base -p $pass $args $in > $out + command = $calyx-exe -l $calyx-lib-path -p $pass $args $in > $out flags = -p none rule calyx-with-flags - command = $calyx-exe -l $calyx-base $flags $args $in > $out + command = $calyx-exe -l $calyx-lib-path $flags $args $in > $out cells = cells.json tdcc-json = fsm.json diff --git a/fud2/tests/snapshots/tests__test@plan_xo.snap b/fud2/tests/snapshots/tests__test@plan_xo.snap index 3255dbca6b..840133a979 100644 --- a/fud2/tests/snapshots/tests__test@plan_xo.snap +++ b/fud2/tests/snapshots/tests__test@plan_xo.snap @@ -8,14 +8,15 @@ rule get-rsrc calyx-base = /test/calyx calyx-exe = $calyx-base/target/debug/calyx +calyx-lib-path = $calyx-base args = rule calyx - command = $calyx-exe -l $calyx-base -b $backend $args $in > $out + command = $calyx-exe -l $calyx-lib-path -b $backend $args $in > $out rule calyx-pass - command = $calyx-exe -l $calyx-base -p $pass $args $in > $out + command = $calyx-exe -l $calyx-lib-path -p $pass $args $in > $out flags = -p none rule calyx-with-flags - command = $calyx-exe -l $calyx-base $flags $args $in > $out + command = $calyx-exe -l $calyx-lib-path $flags $args $in > $out vivado-dir = /test/xilinx/vivado vitis-dir = /test/xilinx/vitis