xilinx_dsp: Add multonly scratchpad var to bypass
authorDavid Shah <dave@ds0.me>
Mon, 27 Jan 2020 11:19:27 +0000 (11:19 +0000)
committerDavid Shah <dave@ds0.me>
Sat, 1 Feb 2020 15:30:43 +0000 (15:30 +0000)
Signed-off-by: David Shah <dave@ds0.me>
passes/pmgen/xilinx_dsp.cc

index 81c3c57c4bcb54746705f9aed58ab271b65c5a79..ae7967d7c1b0a4307a74f57f27e829d2522c43c9 100644 (file)
@@ -767,6 +767,9 @@ struct XilinxDspPass : public Pass {
                log("to a maximum length of 20 cells, corresponding to the smallest Xilinx 7 Series\n");
                log("device.\n");
                log("\n");
+               log("This pass is a no-op if the scratchpad variable 'xilinx_dsp.multonly' is set\n");
+               log("to 1.\n");
+               log("\n");
                log("\n");
                log("Experimental feature: addition/subtractions less than 12 or 24 bits with the\n");
                log("'(* use_dsp=\"simd\" *)' attribute attached to the output wire or attached to\n");
@@ -805,6 +808,10 @@ struct XilinxDspPass : public Pass {
                        family = "xcu";
 
                for (auto module : design->selected_modules()) {
+
+                       if (design->scratchpad_get_bool("xilinx_dsp.multonly"))
+                               continue;
+
                        // Experimental feature: pack $add/$sub cells with
                        //   (* use_dsp48="simd" *) into DSP48E1's using its
                        //   SIMD feature