diff options
author | myrtle <gatecat@ds0.me> | 2022-07-08 15:03:07 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-08 15:03:07 +0200 |
commit | 664cec54b92844745e21a4e86dcf8e3cca09d781 (patch) | |
tree | 004f2b14ed5a3b0584c4998d9f0a5598cc52ab28 /common/kernel/context.cc | |
parent | 86396c41d64d2583ec1dffca4298e83d927f0762 (diff) | |
parent | 09e388f453d9cf998391495349c88e5478b62e34 (diff) | |
download | nextpnr-664cec54b92844745e21a4e86dcf8e3cca09d781.tar.gz nextpnr-664cec54b92844745e21a4e86dcf8e3cca09d781.tar.bz2 nextpnr-664cec54b92844745e21a4e86dcf8e3cca09d781.zip |
Merge pull request #999 from YosysHQ/gatecat/pseudocell-api
netlist: Add PseudoCell API
Diffstat (limited to 'common/kernel/context.cc')
-rw-r--r-- | common/kernel/context.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/common/kernel/context.cc b/common/kernel/context.cc index e35d3e49..014394a6 100644 --- a/common/kernel/context.cc +++ b/common/kernel/context.cc @@ -30,6 +30,9 @@ WireId Context::getNetinfoSourceWire(const NetInfo *net_info) const if (net_info->driver.cell == nullptr) return WireId(); + if (net_info->driver.cell->isPseudo()) + return net_info->driver.cell->pseudo_cell->getPortWire(net_info->driver.port); + auto src_bel = net_info->driver.cell->bel; if (src_bel == BelId()) @@ -47,6 +50,8 @@ WireId Context::getNetinfoSourceWire(const NetInfo *net_info) const SSOArray<WireId, 2> Context::getNetinfoSinkWires(const NetInfo *net_info, const PortRef &user_info) const { + if (user_info.cell->isPseudo()) + return SSOArray<WireId, 2>(1, user_info.cell->pseudo_cell->getPortWire(user_info.port)); auto dst_bel = user_info.cell->bel; if (dst_bel == BelId()) return SSOArray<WireId, 2>(0, WireId()); |