Added "read_blif -sop"
authorClifford Wolf <clifford@clifford.at>
Sat, 18 Jun 2016 10:33:13 +0000 (12:33 +0200)
committerClifford Wolf <clifford@clifford.at>
Sat, 18 Jun 2016 10:33:13 +0000 (12:33 +0200)
frontends/blif/blifparse.cc

index 3b4b6d86f0c71bbd1c31abb840a4dba1ad6200fd..1f6d0ee375e018d2d93b4c2d5b16f909390eaf4d 100644 (file)
@@ -456,23 +456,28 @@ struct BlifFrontend : public Frontend {
                log("\n");
                log("Load modules from a BLIF file into the current design.\n");
                log("\n");
+               log("    -sop\n");
+               log("        Create $sop cells instead of $lut cells\n");
+               log("\n");
        }
        virtual void execute(std::istream *&f, std::string filename, std::vector<std::string> args, RTLIL::Design *design)
        {
+               bool sop_mode = false;
+
                log_header(design, "Executing BLIF frontend.\n");
 
                size_t argidx;
                for (argidx = 1; argidx < args.size(); argidx++) {
                        std::string arg = args[argidx];
-                       // if (arg == "-lib") {
-                       //      flag_lib = true;
-                       //      continue;
-                       // }
+                       if (arg == "-sop") {
+                               sop_mode = true;
+                               continue;
+                       }
                        break;
                }
                extra_args(f, filename, args, argidx);
 
-               parse_blif(design, *f, "\\DFF", true);
+               parse_blif(design, *f, "\\DFF", true, sop_mode);
        }
 } BlifFrontend;