mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-27 10:55:51 +00:00
Automatically select new objects in abc and techmap passes
This commit is contained in:
parent
79b3afa011
commit
b96ffed69b
3 changed files with 19 additions and 1 deletions
|
@ -459,6 +459,7 @@ static void abc_module(RTLIL::Design *design, RTLIL::Module *current_module, std
|
|||
RTLIL::Wire *wire = new RTLIL::Wire;
|
||||
wire->name = remap_name(w->name);
|
||||
module->wires[wire->name] = wire;
|
||||
design->select(module, wire);
|
||||
}
|
||||
|
||||
std::map<std::string, int> cell_stats;
|
||||
|
@ -488,6 +489,7 @@ static void abc_module(RTLIL::Design *design, RTLIL::Module *current_module, std
|
|||
cell->connections["\\A"] = RTLIL::SigSpec(module->wires[remap_name(c->connections["\\A"].chunks[0].wire->name)]);
|
||||
cell->connections["\\Y"] = RTLIL::SigSpec(module->wires[remap_name(c->connections["\\Y"].chunks[0].wire->name)]);
|
||||
module->cells[cell->name] = cell;
|
||||
design->select(module, cell);
|
||||
continue;
|
||||
}
|
||||
if (c->type == "\\AND" || c->type == "\\OR" || c->type == "\\XOR") {
|
||||
|
@ -498,6 +500,7 @@ static void abc_module(RTLIL::Design *design, RTLIL::Module *current_module, std
|
|||
cell->connections["\\B"] = RTLIL::SigSpec(module->wires[remap_name(c->connections["\\B"].chunks[0].wire->name)]);
|
||||
cell->connections["\\Y"] = RTLIL::SigSpec(module->wires[remap_name(c->connections["\\Y"].chunks[0].wire->name)]);
|
||||
module->cells[cell->name] = cell;
|
||||
design->select(module, cell);
|
||||
continue;
|
||||
}
|
||||
if (c->type == "\\MUX") {
|
||||
|
@ -509,6 +512,7 @@ static void abc_module(RTLIL::Design *design, RTLIL::Module *current_module, std
|
|||
cell->connections["\\S"] = RTLIL::SigSpec(module->wires[remap_name(c->connections["\\S"].chunks[0].wire->name)]);
|
||||
cell->connections["\\Y"] = RTLIL::SigSpec(module->wires[remap_name(c->connections["\\Y"].chunks[0].wire->name)]);
|
||||
module->cells[cell->name] = cell;
|
||||
design->select(module, cell);
|
||||
continue;
|
||||
}
|
||||
assert(0);
|
||||
|
@ -532,6 +536,7 @@ static void abc_module(RTLIL::Design *design, RTLIL::Module *current_module, std
|
|||
for (auto &conn : c->connections)
|
||||
cell->connections[conn.first] = RTLIL::SigSpec(module->wires[remap_name(conn.second.chunks[0].wire->name)]);
|
||||
module->cells[cell->name] = cell;
|
||||
design->select(module, cell);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue