Add .blackbox support to blif front-end
authorClifford Wolf <clifford@clifford.at>
Tue, 15 Oct 2019 22:00:27 +0000 (00:00 +0200)
committerClifford Wolf <clifford@clifford.at>
Tue, 15 Oct 2019 22:00:27 +0000 (00:00 +0200)
Signed-off-by: Clifford Wolf <clifford@clifford.at>
frontends/blif/blifparse.cc

index d17cacf296c6c6a5aed3258a4605e830cd0c3be7..bfcfad78ad5dfec9a9a267fa4dbca799cf012f7e 100644 (file)
@@ -174,6 +174,12 @@ void parse_blif(RTLIL::Design *design, std::istream &f, IdString dff_name, bool
                        if (module == nullptr)
                                goto error;
 
+                       if (!strcmp(cmd, ".blackbox"))
+                       {
+                               module->attributes["\\blackbox"] = RTLIL::Const(1);
+                               continue;
+                       }
+
                        if (!strcmp(cmd, ".end"))
                        {
                                for (auto &wp : wideports_cache)