aboutsummaryrefslogtreecommitdiffstats
path: root/frontends/liberty
diff options
context:
space:
mode:
authorargama <argama@gmail.com>2018-10-14 01:42:48 +0800
committerargama <argama@gmail.com>2018-10-14 01:42:48 +0800
commit455638e00dff4951e666fb91fbd80de6b9e95f9f (patch)
tree733cbac752c1af8a60fdb1416318f8fef89586fe /frontends/liberty
parent9850de405a11fe93e4562c86be0a0830b83c2785 (diff)
downloadyosys-455638e00dff4951e666fb91fbd80de6b9e95f9f.tar.gz
yosys-455638e00dff4951e666fb91fbd80de6b9e95f9f.tar.bz2
yosys-455638e00dff4951e666fb91fbd80de6b9e95f9f.zip
detect ff/latch before processing other nodes
Diffstat (limited to 'frontends/liberty')
-rw-r--r--frontends/liberty/liberty.cc17
1 files changed, 17 insertions, 0 deletions
diff --git a/frontends/liberty/liberty.cc b/frontends/liberty/liberty.cc
index 0a5bd84de..0018d6dac 100644
--- a/frontends/liberty/liberty.cc
+++ b/frontends/liberty/liberty.cc
@@ -634,6 +634,8 @@ struct LibertyFrontend : public Frontend {
}
}
+ // some liberty files do not put ff/latch at the beginning of a cell
+ // try to find "ff" or "latch" and create FF/latch before processing all other nodes
for (auto node : cell->children)
{
if (!flag_lib) {
@@ -645,6 +647,21 @@ struct LibertyFrontend : public Frontend {
goto skip_cell;
}
}
+ }
+
+ for (auto node : cell->children)
+ {
+ /*
+ if (!flag_lib) {
+ if (node->id == "ff" && node->args.size() == 2)
+ create_ff(module, node);
+ if (node->id == "latch" && node->args.size() == 2)
+ if (!create_latch(module, node, flag_ignore_miss_data_latch)) {
+ delete module;
+ goto skip_cell;
+ }
+ }
+ */
if (node->id == "pin" && node->args.size() == 1)
{