mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-24 01:25:33 +00:00
Activity clear pass
This commit is contained in:
parent
6d4d6a6eff
commit
151be52500
1 changed files with 43 additions and 0 deletions
|
@ -126,6 +126,22 @@ struct ActivityProp {
|
|||
}
|
||||
};
|
||||
|
||||
struct ActivityClear {
|
||||
Module *module;
|
||||
|
||||
ActivityClear(Module *module) : module(module)
|
||||
{
|
||||
for (Wire *wire : module->wires()) {
|
||||
wire->set_string_attribute("$ACKT", "");
|
||||
wire->set_string_attribute("$DUTY", "");
|
||||
}
|
||||
for (auto cell : module->cells()) {
|
||||
cell->set_string_attribute("$ACKT:", "");
|
||||
cell->set_string_attribute("$DUTY:", "");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
struct ActivityPropPass : public Pass {
|
||||
ActivityPropPass() : Pass("activity_prop", "Attaches wire activity to cell ports") {}
|
||||
void help() override
|
||||
|
@ -152,4 +168,31 @@ struct ActivityPropPass : public Pass {
|
|||
}
|
||||
} ActivityPropPass;
|
||||
|
||||
struct ActivityClearPass : public Pass {
|
||||
ActivityClearPass() : Pass("activity_clear", "Clears activity attached to cells and wires") {}
|
||||
void help() override
|
||||
{
|
||||
// |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
|
||||
log("\n");
|
||||
log(" activity_clear\n");
|
||||
log("\n");
|
||||
}
|
||||
void execute(std::vector<std::string> args, RTLIL::Design *design) override
|
||||
{
|
||||
log_header(design, "Executing Activity clearing pass\n");
|
||||
|
||||
size_t argidx;
|
||||
for (argidx = 1; argidx < args.size(); argidx++) {
|
||||
// No options currently. When adding in the future make sure to update docstring with [options]
|
||||
break;
|
||||
}
|
||||
extra_args(args, argidx, design);
|
||||
|
||||
for (auto module : design->modules()) {
|
||||
ActivityClear worker(module);
|
||||
}
|
||||
}
|
||||
} ActivityClearPass;
|
||||
|
||||
|
||||
PRIVATE_NAMESPACE_END
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue