Merge pull request #660 from tklam/parse-liberty-detect-ff-latch

Handling ff/latch in liberty files
This commit is contained in:
Clifford Wolf 2018-10-17 12:21:17 +02:00 committed by GitHub
commit 8395c18cb5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 17 additions and 0 deletions

View File

@ -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) for (auto node : cell->children)
{ {
if (!flag_lib) { if (!flag_lib) {
@ -645,6 +647,21 @@ struct LibertyFrontend : public Frontend {
goto skip_cell; 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) if (node->id == "pin" && node->args.size() == 1)
{ {