From f52b5b39edf3075fbee7244aabea1a12f6cdc70b Mon Sep 17 00:00:00 2001 From: Alessandro Comodi Date: Mon, 15 Mar 2021 11:02:56 +0100 Subject: fpga_interchange: tests: add techmap optional source file Signed-off-by: Alessandro Comodi --- fpga_interchange/examples/tests/counter/CMakeLists.txt | 2 ++ fpga_interchange/examples/tests/counter/remap.v | 11 +++++++++++ fpga_interchange/examples/tests/counter/run.tcl | 2 +- 3 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 fpga_interchange/examples/tests/counter/remap.v (limited to 'fpga_interchange/examples/tests/counter') diff --git a/fpga_interchange/examples/tests/counter/CMakeLists.txt b/fpga_interchange/examples/tests/counter/CMakeLists.txt index 60375770..0da62934 100644 --- a/fpga_interchange/examples/tests/counter/CMakeLists.txt +++ b/fpga_interchange/examples/tests/counter/CMakeLists.txt @@ -5,6 +5,7 @@ add_interchange_test( tcl run.tcl xdc counter_basys3.xdc sources counter.v + techmap remap.v ) add_interchange_test( @@ -14,4 +15,5 @@ add_interchange_test( tcl run.tcl xdc counter_arty.xdc sources counter.v + techmap remap.v ) diff --git a/fpga_interchange/examples/tests/counter/remap.v b/fpga_interchange/examples/tests/counter/remap.v new file mode 100644 index 00000000..6dfc0b4a --- /dev/null +++ b/fpga_interchange/examples/tests/counter/remap.v @@ -0,0 +1,11 @@ +module INV(input I, output O); + +LUT1 #(.INIT(2'b01)) _TECHMAP_REPLACE_ (.I0(I), .O(O)); + +endmodule + +module BUF(input I, output O); + +LUT1 #(.INIT(2'b10)) _TECHMAP_REPLACE_ (.I0(I), .O(O)); + +endmodule diff --git a/fpga_interchange/examples/tests/counter/run.tcl b/fpga_interchange/examples/tests/counter/run.tcl index 7cd9f10f..ffea3b2e 100644 --- a/fpga_interchange/examples/tests/counter/run.tcl +++ b/fpga_interchange/examples/tests/counter/run.tcl @@ -3,7 +3,7 @@ yosys -import read_verilog $::env(SOURCES) synth_xilinx -nolutram -nowidelut -nosrl -nocarry -nodsp -techmap -map ../remap.v +techmap -map $::env(TECHMAP) # opt_expr -undriven makes sure all nets are driven, if only by the $undef # net. -- cgit v1.2.3