diff options
author | gatecat <gatecat@ds0.me> | 2021-05-20 19:45:27 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-20 19:45:27 +0100 |
commit | 54b8364ceaa3be52cf5161e268cdefa96588e749 (patch) | |
tree | d9d27b52b2f1383ec1ddae612d6ae0a8a0d5489a /fpga_interchange/fpga_interchange.cpp | |
parent | 5a41d2070c8a7c065d4e3fbfb70b3a3fbd19b319 (diff) | |
parent | 9dce00a4e7b9bdaf1b2bbc0c9d8c2ccc830c65b1 (diff) | |
download | nextpnr-54b8364ceaa3be52cf5161e268cdefa96588e749.tar.gz nextpnr-54b8364ceaa3be52cf5161e268cdefa96588e749.tar.bz2 nextpnr-54b8364ceaa3be52cf5161e268cdefa96588e749.zip |
Merge pull request #711 from acomodi/interchange-site-to-pseudo-pips
interchange: phys: add site instance idstr for pseudo tile PIPs
Diffstat (limited to 'fpga_interchange/fpga_interchange.cpp')
-rw-r--r-- | fpga_interchange/fpga_interchange.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/fpga_interchange/fpga_interchange.cpp b/fpga_interchange/fpga_interchange.cpp index 60331382..cf89ef1c 100644 --- a/fpga_interchange/fpga_interchange.cpp +++ b/fpga_interchange/fpga_interchange.cpp @@ -91,6 +91,25 @@ static PhysicalNetlist::PhysNetlist::RouteBranch::Builder emit_branch( pip_obj.setForward(true); pip_obj.setIsFixed(pip_place_strength.at(pip) >= STRENGTH_FIXED); + // If this is a pseudo PIP, get its name + if (pip_data.pseudo_cell_wires.size() != 0) { + for (int32_t wire_index : pip_data.pseudo_cell_wires) { + const TileWireInfoPOD &wire_data = tile_type.wire_data[wire_index]; + + if (wire_data.site == -1) { + continue; + } + + const SiteInstInfoPOD & site_data = site_inst_info(ctx->chip_info, pip.tile, wire_data.site); + std::string site_name = site_data.site_name.get(); + int site_idx = strings->get_index(site_name); + pip_obj.setSite(site_idx); + + // It is assumed that a pseudo PIP traverses one site only + break; + } + } + return branch; } else { BelId bel; |