Added support for "active high" and "active low" latches in BLIF back-end
authorClifford Wolf <clifford@clifford.at>
Fri, 22 Apr 2016 16:00:46 +0000 (18:00 +0200)
committerClifford Wolf <clifford@clifford.at>
Fri, 22 Apr 2016 16:00:46 +0000 (18:00 +0200)
backends/blif/blif.cc

index f9de87d9fcd2571ce607f1816323247357a78cbc..27f08ea1a9ab6d875329d6e96e69865aefe2d688 100644 (file)
@@ -317,6 +317,18 @@ struct BlifDumper
                                continue;
                        }
 
+                       if (!config->icells_mode && cell->type == "$_DLATCH_N_") {
+                               f << stringf(".latch %s %s al %s%s\n", cstr(cell->getPort("\\D")), cstr(cell->getPort("\\Q")),
+                                               cstr(cell->getPort("\\E")), cstr_init(cell->getPort("\\Q")));
+                               continue;
+                       }
+
+                       if (!config->icells_mode && cell->type == "$_DLATCH_P_") {
+                               f << stringf(".latch %s %s ah %s%s\n", cstr(cell->getPort("\\D")), cstr(cell->getPort("\\Q")),
+                                               cstr(cell->getPort("\\E")), cstr_init(cell->getPort("\\Q")));
+                               continue;
+                       }
+
                        if (!config->icells_mode && cell->type == "$lut") {
                                f << stringf(".names");
                                auto &inputs = cell->getPort("\\A");