mirror of
https://github.com/YosysHQ/yosys.git
synced 2026-08-22 14:17:27 +02:00
formalff: Set new replaced_by_gclk attribute on removed dff's clks
This attribute can be used by formal backends to indicate which clocks were mapped to the global clock. Update the btor and smt2 backend which already handle clock inputs to understand this attribute.
This commit is contained in:
@@ -239,6 +239,17 @@ struct Smt2Worker
|
||||
clock_negedge.erase(bit);
|
||||
}
|
||||
|
||||
for (auto wire : module->wires())
|
||||
{
|
||||
auto gclk_attr = wire->attributes.find(ID::replaced_by_gclk);
|
||||
if (gclk_attr != wire->attributes.end()) {
|
||||
if (gclk_attr->second == State::S1)
|
||||
clock_posedge.insert(sigmap(wire));
|
||||
else if (gclk_attr->second == State::S0)
|
||||
clock_negedge.insert(sigmap(wire));
|
||||
}
|
||||
}
|
||||
|
||||
for (auto wire : module->wires())
|
||||
{
|
||||
if (!wire->port_input || GetSize(wire) != 1)
|
||||
|
||||
Reference in New Issue
Block a user