-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
454b29b
commit 447b6f7
Showing
1 changed file
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
--- | ||
source: fud2/tests/tests.rs | ||
description: "emit request: calyx -> cider-debug" | ||
--- | ||
build-tool = fud2 | ||
rule get-rsrc | ||
command = $build-tool get-rsrc $out | ||
|
||
python = python3 | ||
build json-dat.py: get-rsrc | ||
rule hex-data | ||
command = $python json-dat.py --from-json $in $out | ||
rule json-data | ||
command = $python json-dat.py --to-json $out $in | ||
sim_data = /test/data.json | ||
datadir = sim_data | ||
build $datadir: hex-data $sim_data | json-dat.py | ||
rule sim-run | ||
command = ./$bin +DATA=$datadir +CYCLE_LIMIT=$cycle-limit $args > $out | ||
cycle-limit = 500000000 | ||
|
||
calyx-base = /test/calyx | ||
calyx-exe = $calyx-base/target/debug/calyx | ||
args = | ||
rule calyx | ||
command = $calyx-exe -l $calyx-base -b $backend $args $in > $out | ||
rule calyx-pass | ||
command = $calyx-exe -l $calyx-base -p $pass $args $in > $out | ||
flags = -p none | ||
rule calyx-with-flags | ||
command = $calyx-exe -l $calyx-base $flags $args $in > $out | ||
|
||
build tb.sv: get-rsrc | ||
|
||
cider-exe = $calyx-base/target/debug/cider | ||
cider-converter = $calyx-base/target/debug/cider-data-converter | ||
rule run-cider-debug | ||
command = $cider-exe -l $calyx-base --data data.dump $in debug || true | ||
pool = console | ||
rule run-cider | ||
command = $cider-exe -l $calyx-base --data data.dump $in > $out | ||
rule dump-to-interp | ||
command = $cider-converter --to cider $in > $out | ||
rule interp-to-dump | ||
command = $cider-converter --to json $in > $out | ||
build data.dump: dump-to-interp $sim_data | $cider-converter | ||
|
||
build pseudo_cider: calyx-with-flags _from_stdin_calyx.futil | ||
build _to_stdout_cider-debug: run-cider-debug pseudo_cider | data.dump | ||
|
||
default _to_stdout_cider-debug |