diff options
author | Clifford Wolf <clifford@clifford.at> | 2018-10-17 12:21:17 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-17 12:21:17 +0200 |
commit | 8395c18cb54c64712bb36f8d968a26d13330bdd4 (patch) | |
tree | a6eda83bf3178d2af9ae84b9cb83a8c0277432da /frontends | |
parent | f4ad05e133ce60f514b5fe6c5264acf5c17ce728 (diff) | |
parent | 455638e00dff4951e666fb91fbd80de6b9e95f9f (diff) | |
download | yosys-8395c18cb54c64712bb36f8d968a26d13330bdd4.tar.gz yosys-8395c18cb54c64712bb36f8d968a26d13330bdd4.tar.bz2 yosys-8395c18cb54c64712bb36f8d968a26d13330bdd4.zip |
Merge pull request #660 from tklam/parse-liberty-detect-ff-latch
Handling ff/latch in liberty files
Diffstat (limited to 'frontends')
-rw-r--r-- | frontends/liberty/liberty.cc | 17 |
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) { |