Blackbox all whiteboxes after synthesis
authorgatecat <gatecat@ds0.me>
Wed, 17 Mar 2021 12:16:53 +0000 (12:16 +0000)
committergatecat <gatecat@ds0.me>
Wed, 17 Mar 2021 21:07:20 +0000 (21:07 +0000)
This prevents issues like processes in whiteboxes triggering an error in
the JSON backend.

Signed-off-by: gatecat <gatecat@ds0.me>
16 files changed:
techlibs/achronix/synth_achronix.cc
techlibs/anlogic/synth_anlogic.cc
techlibs/coolrunner2/synth_coolrunner2.cc
techlibs/easic/synth_easic.cc
techlibs/ecp5/synth_ecp5.cc
techlibs/efinix/synth_efinix.cc
techlibs/gowin/synth_gowin.cc
techlibs/greenpak4/synth_greenpak4.cc
techlibs/ice40/synth_ice40.cc
techlibs/intel/synth_intel.cc
techlibs/intel_alm/synth_intel_alm.cc
techlibs/machxo2/synth_machxo2.cc
techlibs/nexus/synth_nexus.cc
techlibs/sf2/synth_sf2.cc
techlibs/xilinx/synth_xilinx.cc
tests/arch/ecp5/mux.ys

index b203828d2c2cd0cd4ef355fb06ee8fd5c7f9278d..a31cbfc141688ca6d462464fb143b3604f0d5c5e 100644 (file)
@@ -173,6 +173,7 @@ struct SynthAchronixPass : public ScriptPass {
         run("hierarchy -check");
         run("stat");
         run("check -noinit");
+        run("blackbox =A:whitebox");
       }
 
     if (check_label("vout"))
index d953fae5e3f97ee683d01d3183ca4ad90fc8d07a..604ca81ad8c794682c375983ee48a5c9bac73053 100644 (file)
@@ -211,6 +211,7 @@ struct SynthAnlogicPass : public ScriptPass
                        run("hierarchy -check");
                        run("stat");
                        run("check -noinit");
+                       run("blackbox =A:whitebox");
                }
 
                if (check_label("edif"))
index 47102fbb1f7acc392e68f83ad485adb85afc3460..a746ac222d0868df09c3bc677303a295aa33575f 100644 (file)
@@ -192,6 +192,7 @@ struct SynthCoolrunner2Pass : public ScriptPass
                        run("hierarchy -check");
                        run("stat");
                        run("check -noinit");
+                       run("blackbox =A:whitebox");
                }
 
                if (check_label("json"))
index 897bc1c40ed7139e086690341eef94d662a82108..9b78b44af60536f98bfe4cc7efca90f8e23c617e 100644 (file)
@@ -175,6 +175,7 @@ struct SynthEasicPass : public ScriptPass
                        run("hierarchy -check");
                        run("stat");
                        run("check -noinit");
+                       run("blackbox =A:whitebox");
                }
 
                if (check_label("vlog"))
index 3cee9722e102e6d89464b189ba0f74e8140c58a6..482e7a1400b6bb8f92fec6021607ad5b00fd7060 100644 (file)
@@ -385,6 +385,7 @@ struct SynthEcp5Pass : public ScriptPass
                        run("hierarchy -check");
                        run("stat");
                        run("check -noinit");
+                       run("blackbox =A:whitebox");
                }
 
                if (check_label("blif"))
index 001b05945151ddd81ecf2df9bcfa82801542c1c2..613063e34c44b3226316bfb5829411adfe0590d5 100644 (file)
@@ -213,6 +213,7 @@ struct SynthEfinixPass : public ScriptPass
                        run("hierarchy -check");
                        run("stat");
                        run("check -noinit");
+                       run("blackbox =A:whitebox");
                }
 
                if (check_label("edif"))
index 5bf0894da12b36cbb82207da536583b5f32d8fbf..55a6bb66ce12f6db818202b362490f572fe6929e 100644 (file)
@@ -289,6 +289,7 @@ struct SynthGowinPass : public ScriptPass
                        run("hierarchy -check");
                        run("stat");
                        run("check -noinit");
+                       run("blackbox =A:whitebox");
                }
 
                if (check_label("vout"))
index d9af340d970d3311e92dbfaa56629963a784982a..26d913ab33b41e29761d544b5acd6b4b5ec66329 100644 (file)
@@ -196,6 +196,7 @@ struct SynthGreenPAK4Pass : public ScriptPass
                        run("hierarchy -check");
                        run("stat");
                        run("check -noinit");
+                       run("blackbox =A:whitebox");
                }
 
                if (check_label("json"))
index b945889fe43f70eba8a34188289c0e0ed8114e89..ea038d325ac225e77aebb7211991b4423505d1d6 100644 (file)
@@ -417,6 +417,7 @@ struct SynthIce40Pass : public ScriptPass
                        run("hierarchy -check");
                        run("stat");
                        run("check -noinit");
+                       run("blackbox =A:whitebox");
                }
 
                if (check_label("blif"))
index a513528f74f23001a8f7b669e4b14af17ad91f78..1d8e660a08503fc5d2ec8bb4d2fda2a281ddac69 100644 (file)
@@ -233,6 +233,7 @@ struct SynthIntelPass : public ScriptPass {
                        run("hierarchy -check");
                        run("stat");
                        run("check -noinit");
+                       run("blackbox =A:whitebox");
                }
 
                if (check_label("vqm")) {
index 6719eb65cd0e2d1a82e2fc3094f73c99cac642dc..11b6d0525a575c924c10167ab4b09c00770fdeab 100644 (file)
@@ -274,6 +274,7 @@ struct SynthIntelALMPass : public ScriptPass {
                        run("hierarchy -check");
                        run("stat");
                        run("check");
+                       run("blackbox =A:whitebox");
                }
 
                if (check_label("quartus")) {
index bd56fbba9308b1b4248f9e1d2ee84d7faa85e6d5..bba8f48308d38562629ed560739d601efb202ac4 100644 (file)
@@ -212,6 +212,7 @@ struct SynthMachXO2Pass : public ScriptPass
                {
                        run("hierarchy -check");
                        run("stat");
+                       run("blackbox =A:whitebox");
                }
 
                if (check_label("blif"))
index 7f36eb2827ed08e91dd721da6be4ae825d564ee0..9134b6e2a81f7df1232b60403a6355838f800c67 100644 (file)
@@ -406,6 +406,7 @@ struct SynthNexusPass : public ScriptPass
                        run("hierarchy -check");
                        run("stat");
                        run("check -noinit");
+                       run("blackbox =A:whitebox");
                }
 
                if (check_label("json"))
index a0061ebd0fec10675dfee3635235c3617d8893a5..22cc4a1ae52644df331c995eecd79da3d8d3f1fd 100644 (file)
@@ -228,6 +228,7 @@ struct SynthSf2Pass : public ScriptPass
                        run("hierarchy -check");
                        run("stat");
                        run("check -noinit");
+                       run("blackbox =A:whitebox");
                }
 
                if (check_label("edif"))
index 0adec57a2d585cae5ea9064308c533a4154e49ed..80d120fe1e556c461787bf5409e6a54a2e1c6434 100644 (file)
@@ -662,6 +662,7 @@ struct SynthXilinxPass : public ScriptPass
                        run("hierarchy -check");
                        run("stat -tech xilinx");
                        run("check -noinit");
+                       run("blackbox =A:whitebox");
                }
 
                if (check_label("edif")) {
index 92463aa3248d064fbf0d3543c15c6fbd77d3e012..db63dda5f94c4a7c54d937d5ae46c5cbc1f26bf2 100644 (file)
@@ -15,9 +15,9 @@ proc
 equiv_opt -assert -map +/ecp5/cells_sim.v synth_ecp5 # equivalency check
 design -load postopt # load the post-opt design (otherwise equiv_opt loads the pre-opt design)
 cd mux4 # Constrain all select calls below inside the top module
-select -assert-count 1 t:L6MUX21
-select -assert-count 4 t:LUT4
-select -assert-count 2 t:PFUMX
+select -assert-max 1 t:L6MUX21
+select -assert-max 4 t:LUT4
+select -assert-max 2 t:PFUMX
 
 select -assert-none t:LUT4 t:L6MUX21 t:PFUMX %% t:* %D
 
@@ -27,9 +27,9 @@ proc
 equiv_opt -assert -map +/ecp5/cells_sim.v synth_ecp5 # equivalency check
 design -load postopt # load the post-opt design (otherwise equiv_opt loads the pre-opt design)
 cd mux8 # Constrain all select calls below inside the top module
-select -assert-count 1 t:L6MUX21
-select -assert-count 7 t:LUT4
-select -assert-count 2 t:PFUMX
+select -assert-max 1 t:L6MUX21
+select -assert-max 7 t:LUT4
+select -assert-max 2 t:PFUMX
 
 select -assert-none t:LUT4 t:L6MUX21 t:PFUMX %% t:* %D
 
@@ -39,8 +39,8 @@ proc
 equiv_opt -assert -map +/ecp5/cells_sim.v synth_ecp5 # equivalency check
 design -load postopt # load the post-opt design (otherwise equiv_opt loads the pre-opt design)
 cd mux16 # Constrain all select calls below inside the top module
-select -assert-count 8 t:L6MUX21
-select -assert-count 26 t:LUT4
-select -assert-count 12 t:PFUMX
+select -assert-max 12 t:L6MUX21
+select -assert-max 34 t:LUT4
+select -assert-max 17 t:PFUMX
 
 select -assert-none t:LUT4 t:L6MUX21 t:PFUMX %% t:* %D