aboutsummaryrefslogtreecommitdiffstats
path: root/fpga_interchange/arch.h
diff options
context:
space:
mode:
authorKeith Rothman <537074+litghost@users.noreply.github.com>2021-02-19 16:18:59 -0800
committerKeith Rothman <537074+litghost@users.noreply.github.com>2021-02-23 14:09:28 -0800
commit2fc353d5592b0bf9ed8428545bbd6a64312cc16e (patch)
tree772f1cd9dae2e4fd240d2ad32045acff0dcadc7b /fpga_interchange/arch.h
parentcd8297f54d71a5c9f47efab45b3cc93aea86d4e5 (diff)
downloadnextpnr-2fc353d5592b0bf9ed8428545bbd6a64312cc16e.tar.gz
nextpnr-2fc353d5592b0bf9ed8428545bbd6a64312cc16e.tar.bz2
nextpnr-2fc353d5592b0bf9ed8428545bbd6a64312cc16e.zip
Add initial logic for handling dedicated interconnect situations.
Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
Diffstat (limited to 'fpga_interchange/arch.h')
-rw-r--r--fpga_interchange/arch.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/fpga_interchange/arch.h b/fpga_interchange/arch.h
index a5352b60..780382ec 100644
--- a/fpga_interchange/arch.h
+++ b/fpga_interchange/arch.h
@@ -29,6 +29,7 @@
#include <iostream>
#include "constraints.h"
+#include "dedicated_interconnect.h"
NEXTPNR_NAMESPACE_BEGIN
@@ -772,6 +773,8 @@ struct ArchRanges
using BucketBelRangeT = FilteredBelRange;
};
+struct DedicatedInterconnect;
+
struct Arch : ArchAPI<ArchRanges>
{
boost::iostreams::mapped_file_source blob_file;
@@ -783,8 +786,6 @@ struct Arch : ArchAPI<ArchRanges>
std::unordered_map<WireId, NetInfo *> wire_to_net;
std::unordered_map<PipId, NetInfo *> pip_to_net;
- std::unordered_map<WireId, std::pair<int, int>> driving_pip_loc;
- std::unordered_map<WireId, NetInfo *> reserved_wires;
static constexpr size_t kMaxState = 8;
@@ -811,10 +812,12 @@ struct Arch : ArchAPI<ArchRanges>
std::vector<SiteRouter> sites;
};
+ DedicatedInterconnect dedicated_interconnect;
std::unordered_map<int32_t, TileStatus> tileStatus;
ArchArgs args;
Arch(ArchArgs args);
+ void init();
std::string getChipName() const override;
@@ -1236,9 +1239,6 @@ struct Arch : ArchAPI<ArchRanges>
NPNR_ASSERT(wire_to_net[dst] == nullptr || wire_to_net[dst] == net);
pip_to_net[pip] = net;
- std::pair<int, int> loc;
- get_tile_x_y(pip.tile, &loc.first, &loc.second);
- driving_pip_loc[dst] = loc;
wire_to_net[dst] = net;
net->wires[dst].pip = pip;
@@ -1509,6 +1509,10 @@ struct Arch : ArchAPI<ArchRanges>
if (cell == nullptr) {
return true;
} else {
+ if(!dedicated_interconnect.isBelLocationValid(bel, cell)) {
+ return false;
+ }
+
if (io_port_types.count(cell->type)) {
// FIXME: Probably need to actually constraint io port cell/bel,
// but the current BBA emission doesn't support that. This only