mirror of
https://github.com/YosysHQ/yosys
synced 2026-07-25 08:32:34 +00:00
check make always_latch exempt.
This commit is contained in:
parent
0e82bbefe5
commit
391c0e5f89
8 changed files with 26 additions and 10 deletions
|
|
@ -63,7 +63,8 @@ struct CheckPass : public Pass {
|
|||
log(" -nolatches\n");
|
||||
log(" also check for latch cells ($dlatch, $adlatch, $dlatchsr and their\n");
|
||||
log(" $_DLATCH_*/$_DLATCHSR_* mappings) remaining in the design. Use this\n");
|
||||
log(" before techmapping in flows that must not emit latches.\n");
|
||||
log(" before techmapping in flows that must not emit latches. Cells marked\n");
|
||||
log(" with the 'always_latch' attribute are not reported.\n");
|
||||
log("\n");
|
||||
log(" -latchonly\n");
|
||||
log(" check only for latch cells (as listed under -nolatches), skipping all\n");
|
||||
|
|
@ -142,10 +143,10 @@ struct CheckPass : public Pass {
|
|||
// latch-only mode only flags latches, skipping the (potentially false-positive mid-flow) undriven/driver/loop checks below
|
||||
if (latchonly) {
|
||||
for (auto cell : module->cells())
|
||||
if (
|
||||
if ((
|
||||
cell->type.in(ID($dlatch), ID($adlatch), ID($dlatchsr)) ||
|
||||
cell->type.begins_with("$_DLATCH_") || cell->type.begins_with("$_DLATCHSR_")
|
||||
) {
|
||||
) && !cell->get_bool_attribute(ID::always_latch)) {
|
||||
log_warning("Cell %s.%s is a latch of type %s.\n", module, cell, cell->type.unescape());
|
||||
counter++;
|
||||
}
|
||||
|
|
@ -300,7 +301,8 @@ struct CheckPass : public Pass {
|
|||
if (
|
||||
nolatches && (
|
||||
cell->type.in(ID($dlatch), ID($adlatch), ID($dlatchsr)) ||
|
||||
cell->type.begins_with("$_DLATCH_") || cell->type.begins_with("$_DLATCHSR_"))
|
||||
cell->type.begins_with("$_DLATCH_") || cell->type.begins_with("$_DLATCHSR_")) &&
|
||||
!cell->get_bool_attribute(ID::always_latch)
|
||||
) {
|
||||
log_warning("Cell %s.%s is a latch of type %s.\n", module, cell, cell->type.unescape());
|
||||
counter++;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue