diff options
author | gatecat <gatecat@ds0.me> | 2022-04-04 19:49:44 +0100 |
---|---|---|
committer | gatecat <gatecat@ds0.me> | 2022-04-04 19:49:44 +0100 |
commit | c4e47ba1a85d840c31d4be5c3f2c032664abd814 (patch) | |
tree | 55f1c17d18c9fef59779dbbd63120b02b22b320c /generic | |
parent | fcf2bf6a95eea59fe676a22a7d5d13561a626191 (diff) | |
download | nextpnr-c4e47ba1a85d840c31d4be5c3f2c032664abd814.tar.gz nextpnr-c4e47ba1a85d840c31d4be5c3f2c032664abd814.tar.bz2 nextpnr-c4e47ba1a85d840c31d4be5c3f2c032664abd814.zip |
generic: Allow bel pins without wires
Signed-off-by: gatecat <gatecat@ds0.me>
Diffstat (limited to 'generic')
-rw-r--r-- | generic/arch.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/generic/arch.cc b/generic/arch.cc index c4814bab..0aece64f 100644 --- a/generic/arch.cc +++ b/generic/arch.cc @@ -119,7 +119,8 @@ void Arch::addBelInput(BelId bel, IdString name, WireId wire) pi.wire = wire; pi.type = PORT_IN; - wire_info(wire).bel_pins.push_back(BelPin{bel, name}); + if (wire != WireId()) + wire_info(wire).bel_pins.push_back(BelPin{bel, name}); } void Arch::addBelOutput(BelId bel, IdString name, WireId wire) @@ -131,7 +132,8 @@ void Arch::addBelOutput(BelId bel, IdString name, WireId wire) pi.wire = wire; pi.type = PORT_OUT; - wire_info(wire).bel_pins.push_back(BelPin{bel, name}); + if (wire != WireId()) + wire_info(wire).bel_pins.push_back(BelPin{bel, name}); } void Arch::addBelInout(BelId bel, IdString name, WireId wire) @@ -143,7 +145,8 @@ void Arch::addBelInout(BelId bel, IdString name, WireId wire) pi.wire = wire; pi.type = PORT_INOUT; - wire_info(wire).bel_pins.push_back(BelPin{bel, name}); + if (wire != WireId()) + wire_info(wire).bel_pins.push_back(BelPin{bel, name}); } void Arch::addGroupBel(IdStringList group, BelId bel) { groups[group].bels.push_back(bel); } |