Added final checks to "synth" and "synth_xilinx"
authorClifford Wolf <clifford@clifford.at>
Sun, 15 Feb 2015 12:00:00 +0000 (13:00 +0100)
committerClifford Wolf <clifford@clifford.at>
Sun, 15 Feb 2015 12:00:00 +0000 (13:00 +0100)
techlibs/common/synth.cc
techlibs/xilinx/synth_xilinx.cc

index a50db53ee151f6642aaa6270e0dad18e4f5f5df3..56ab6eaff679d209f0d613df929b337a0c373a3e 100644 (file)
@@ -90,12 +90,14 @@ struct SynthPass : public Pass {
                log("        techmap\n");
                log("        opt -fast\n");
        #ifdef YOSYS_ENABLE_ABC
-               log("\n");
-               log("    abc:\n");
                log("        abc -fast\n");
                log("        opt -fast\n");
        #endif
                log("\n");
+               log("    check:\n");
+               log("        hierarchy -check\n");
+               log("        check\n");
+               log("\n");
        }
        virtual void execute(std::vector<std::string> args, RTLIL::Design *design)
        {
@@ -172,15 +174,20 @@ struct SynthPass : public Pass {
                        Pass::call(design, "opt -full");
                        Pass::call(design, "techmap");
                        Pass::call(design, "opt -fast");
+
+                       if (!noabc) {
+               #ifdef YOSYS_ENABLE_ABC
+                               Pass::call(design, "abc -fast");
+                               Pass::call(design, "opt -fast");
+               #endif
+                       }
                }
 
-       #ifdef YOSYS_ENABLE_ABC
-               if (check_label(active, run_from, run_to, "abc") && !noabc)
+               if (check_label(active, run_from, run_to, "check"))
                {
-                       Pass::call(design, "abc -fast");
-                       Pass::call(design, "opt -fast");
+                       Pass::call(design, "hierarchy -check");
+                       Pass::call(design, "check");
                }
-       #endif
 
                log_pop();
        }
index 7812fa29014cc9e54f6af028f4368f5c5e7db13c..02207593a2b9d0e571d58c22c4c5c4a21e91694f 100644 (file)
@@ -98,6 +98,10 @@ struct SynthXilinxPass : public Pass {
                log("        techmap -map +/xilinx/cells_map.v\n");
                log("        clean\n");
                log("\n");
+               log("    check:\n");
+               log("        hierarchy -check\n");
+               log("        check -noinit\n");
+               log("\n");
                log("    edif:\n");
                log("        write_edif synth.edif\n");
                log("\n");
@@ -195,6 +199,12 @@ struct SynthXilinxPass : public Pass {
                        Pass::call(design, "clean");
                }
 
+               if (check_label(active, run_from, run_to, "check"))
+               {
+                       Pass::call(design, "hierarchy -check");
+                       Pass::call(design, "check -noinit");
+               }
+
                if (check_label(active, run_from, run_to, "edif"))
                {
                        if (!edif_file.empty())