aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/algo.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/kernel/algo.h b/kernel/algo.h
index 9626c780e..f029ad6ab 100644
--- a/kernel/algo.h
+++ b/kernel/algo.h
@@ -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)