mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-23 17:15:33 +00:00
Prepare for situation when port of the signal cannot be found
This commit is contained in:
parent
291b36afeb
commit
53695e6729
2 changed files with 8 additions and 2 deletions
|
@ -58,10 +58,14 @@ struct Netlist {
|
|||
return sigbit_driver_map.at(sig);
|
||||
}
|
||||
|
||||
RTLIL::SigBit& driver_port(RTLIL::SigBit sig)
|
||||
RTLIL::SigSpec driver_port(RTLIL::SigBit sig)
|
||||
{
|
||||
RTLIL::Cell *cell = driver_cell(sig);
|
||||
|
||||
if (!cell) {
|
||||
return RTLIL::SigSpec();
|
||||
}
|
||||
|
||||
for (auto &port : cell->connections_) {
|
||||
if (ct.cell_output(cell->type, port.first)) {
|
||||
RTLIL::SigSpec port_sig = sigmap(port.second);
|
||||
|
@ -72,6 +76,8 @@ struct Netlist {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
return RTLIL::SigSpec();
|
||||
}
|
||||
|
||||
void setup_netlist(RTLIL::Module *module, const CellTypes &ct)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue