mirror of
https://github.com/YosysHQ/yosys
synced 2026-07-22 15:15:51 +00:00
WIP
This commit is contained in:
parent
015ab4e45b
commit
f592f2f3af
203 changed files with 4575 additions and 4481 deletions
|
|
@ -298,12 +298,12 @@ void FfMergeHelper::remove_output_ff(const pool<std::pair<Cell *, int>> &bits) {
|
|||
for (auto &it : bits) {
|
||||
Cell *cell = it.first;
|
||||
int idx = it.second;
|
||||
SigSpec q = cell->getPort(ID::Q);
|
||||
SigSpec q = cell->getPort(TW::Q);
|
||||
initvals->remove_init(q[idx]);
|
||||
dff_driver.erase((*sigmap)(q[idx]));
|
||||
q[idx] = module->addWire(stringf("$ffmerge_disconnected$%d", autoidx++));
|
||||
cell->setPort(ID::Q, q);
|
||||
initvals->set_init(cell->getPort(ID::Q), (*initvals)(q));
|
||||
cell->setPort(TW::Q, q);
|
||||
initvals->set_init(cell->getPort(TW::Q), (*initvals)(q));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -312,7 +312,7 @@ void FfMergeHelper::mark_input_ff(const pool<std::pair<Cell *, int>> &bits) {
|
|||
Cell *cell = it.first;
|
||||
int idx = it.second;
|
||||
if (cell->hasPort(ID::D)) {
|
||||
SigSpec d = cell->getPort(ID::D);
|
||||
SigSpec d = cell->getPort(TW::D);
|
||||
// The user count was already at least 1
|
||||
// (for the D port). Bump it as it is now connected
|
||||
// to the merged-to cell as well. This suffices for
|
||||
|
|
@ -338,11 +338,11 @@ void FfMergeHelper::set(FfInitVals *initvals_, RTLIL::Module *module_)
|
|||
for (auto cell : module->cells()) {
|
||||
if (cell->is_builtin_ff()) {
|
||||
if (cell->hasPort(ID::D)) {
|
||||
SigSpec d = (*sigmap)(cell->getPort(ID::D));
|
||||
SigSpec d = (*sigmap)(cell->getPort(TW::D));
|
||||
for (int i = 0; i < GetSize(d); i++)
|
||||
dff_sink[d[i]].insert(std::make_pair(cell, i));
|
||||
}
|
||||
SigSpec q = (*sigmap)(cell->getPort(ID::Q));
|
||||
SigSpec q = (*sigmap)(cell->getPort(TW::Q));
|
||||
for (int i = 0; i < GetSize(q); i++)
|
||||
dff_driver[q[i]] = std::make_pair(cell, i);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue