mirror of
https://github.com/YosysHQ/yosys
synced 2025-08-08 04:01:25 +00:00
extract_rdff: Add initvals parameter.
This is not used yet, but will be needed when read port reset/initial value support lands.
This commit is contained in:
parent
33513d923a
commit
afd5366fc2
4 changed files with 18 additions and 11 deletions
|
@ -51,15 +51,19 @@ struct MemoryNordffPass : public Pass {
|
|||
extra_args(args, argidx, design);
|
||||
|
||||
for (auto module : design->selected_modules())
|
||||
for (auto &mem : Mem::get_selected_memories(module))
|
||||
{
|
||||
bool changed = false;
|
||||
for (int i = 0; i < GetSize(mem.rd_ports); i++)
|
||||
if (mem.extract_rdff(i))
|
||||
changed = true;
|
||||
SigMap sigmap(module);
|
||||
FfInitVals initvals(&sigmap, module);
|
||||
for (auto &mem : Mem::get_selected_memories(module))
|
||||
{
|
||||
bool changed = false;
|
||||
for (int i = 0; i < GetSize(mem.rd_ports); i++)
|
||||
if (mem.extract_rdff(i, &initvals))
|
||||
changed = true;
|
||||
|
||||
if (changed)
|
||||
mem.emit();
|
||||
if (changed)
|
||||
mem.emit();
|
||||
}
|
||||
}
|
||||
}
|
||||
} MemoryNordffPass;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue