aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergiusz Bazanski <q3k@q3k.org>2018-07-14 18:50:18 +0100
committerSergiusz Bazanski <q3k@q3k.org>2018-07-14 18:50:18 +0100
commitcb1a5974f4ca087df3729dc3d8576db9029a7874 (patch)
treeb8746b46f4d5f0e28ed86d0963647f6664a93d90
parent22330402018a212efd4ef2e337e34af2e79eb875 (diff)
downloadnextpnr-cb1a5974f4ca087df3729dc3d8576db9029a7874.tar.gz
nextpnr-cb1a5974f4ca087df3729dc3d8576db9029a7874.tar.bz2
nextpnr-cb1a5974f4ca087df3729dc3d8576db9029a7874.zip
Revert "Make ECP5 proxy context compatible"
This reverts commit df5d7923ec00d18aa832ae5f8859a1120365cb27.
-rw-r--r--ecp5/arch.cc79
-rw-r--r--ecp5/arch.h76
2 files changed, 76 insertions, 79 deletions
diff --git a/ecp5/arch.cc b/ecp5/arch.cc
index 1938c297..5c5689f0 100644
--- a/ecp5/arch.cc
+++ b/ecp5/arch.cc
@@ -402,84 +402,5 @@ IdString ArchReadMethods::getBoundBelCell(BelId bel) const
return bel_to_cell.at(bel);
}
-void ArchMutateMethods::unbindWire(WireId wire)
-{
- NPNR_ASSERT(wire != WireId());
- NPNR_ASSERT(wire_to_net[wire] != IdString());
-
- auto &net_wires = parent_->nets[wire_to_net[wire]]->wires;
- auto it = net_wires.find(wire);
- NPNR_ASSERT(it != net_wires.end());
-
- auto pip = it->second.pip;
- if (pip != PipId()) {
- pip_to_net[pip] = IdString();
- }
-
- net_wires.erase(it);
- wire_to_net[wire] = IdString();
-}
-
-void ArchMutateMethods::unbindPip(PipId pip)
-{
- NPNR_ASSERT(pip != PipId());
- NPNR_ASSERT(pip_to_net[pip] != IdString());
-
- WireId dst;
- dst.index = parent_->locInfo(pip)->pip_data[pip.index].dst_idx;
- dst.location = pip.location + parent_->locInfo(pip)->pip_data[pip.index].rel_dst_loc;
- NPNR_ASSERT(wire_to_net[dst] != IdString());
- wire_to_net[dst] = IdString();
- parent_->nets[pip_to_net[pip]]->wires.erase(dst);
-
- pip_to_net[pip] = IdString();
-}
-
-void ArchMutateMethods::unbindBel(BelId bel)
-{
- NPNR_ASSERT(bel != BelId());
- NPNR_ASSERT(bel_to_cell[bel] != IdString());
- parent_->cells[bel_to_cell[bel]]->bel = BelId();
- parent_->cells[bel_to_cell[bel]]->belStrength = STRENGTH_NONE;
- bel_to_cell[bel] = IdString();
-}
-
-void ArchMutateMethods::bindWire(WireId wire, IdString net, PlaceStrength strength)
-{
- NPNR_ASSERT(wire != WireId());
- NPNR_ASSERT(wire_to_net[wire] == IdString());
- wire_to_net[wire] = net;
- parent_->nets[net]->wires[wire].pip = PipId();
- parent_->nets[net]->wires[wire].strength = strength;
-}
-
-void ArchMutateMethods::bindPip(PipId pip, IdString net, PlaceStrength strength)
-{
- NPNR_ASSERT(pip != PipId());
- NPNR_ASSERT(pip_to_net[pip] == IdString());
-
- pip_to_net[pip] = net;
-
- WireId dst;
- dst.index = parent_->locInfo(pip)->pip_data[pip.index].dst_idx;
- dst.location = pip.location + parent_->locInfo(pip)->pip_data[pip.index].rel_dst_loc;
- NPNR_ASSERT(wire_to_net[dst] == IdString());
- wire_to_net[dst] = net;
- parent_->nets[net]->wires[dst].pip = pip;
- parent_->nets[net]->wires[dst].strength = strength;
-}
-
-void ArchMutateMethods::bindBel(BelId bel, IdString cell, PlaceStrength strength)
-{
- NPNR_ASSERT(bel != BelId());
- NPNR_ASSERT(bel_to_cell[bel] == IdString());
- bel_to_cell[bel] = cell;
- parent_->cells[cell]->bel = bel;
- parent_->cells[cell]->belStrength = strength;
-}
-
-CellInfo *ArchMutateMethods::getCell(IdString cell) { return parent_->cells.at(cell).get(); }
-
-
NEXTPNR_NAMESPACE_END
diff --git a/ecp5/arch.h b/ecp5/arch.h
index 06cf6488..50897b86 100644
--- a/ecp5/arch.h
+++ b/ecp5/arch.h
@@ -386,6 +386,24 @@ public:
uint32_t getBelChecksum(BelId bel) const { return bel.index; }
+ void bindBel(BelId bel, IdString cell, PlaceStrength strength)
+ {
+ NPNR_ASSERT(bel != BelId());
+ NPNR_ASSERT(bel_to_cell[bel] == IdString());
+ bel_to_cell[bel] = cell;
+ cells[cell]->bel = bel;
+ cells[cell]->belStrength = strength;
+ }
+
+ void unbindBel(BelId bel)
+ {
+ NPNR_ASSERT(bel != BelId());
+ NPNR_ASSERT(bel_to_cell[bel] != IdString());
+ cells[bel_to_cell[bel]]->bel = BelId();
+ cells[bel_to_cell[bel]]->belStrength = STRENGTH_NONE;
+ bel_to_cell[bel] = IdString();
+ }
+
BelRange getBels() const
{
BelRange range;
@@ -460,6 +478,33 @@ public:
uint32_t getWireChecksum(WireId wire) const { return wire.index; }
+ void bindWire(WireId wire, IdString net, PlaceStrength strength)
+ {
+ NPNR_ASSERT(wire != WireId());
+ NPNR_ASSERT(wire_to_net[wire] == IdString());
+ wire_to_net[wire] = net;
+ nets[net]->wires[wire].pip = PipId();
+ nets[net]->wires[wire].strength = strength;
+ }
+
+ void unbindWire(WireId wire)
+ {
+ NPNR_ASSERT(wire != WireId());
+ NPNR_ASSERT(wire_to_net[wire] != IdString());
+
+ auto &net_wires = nets[wire_to_net[wire]]->wires;
+ auto it = net_wires.find(wire);
+ NPNR_ASSERT(it != net_wires.end());
+
+ auto pip = it->second.pip;
+ if (pip != PipId()) {
+ pip_to_net[pip] = IdString();
+ }
+
+ net_wires.erase(it);
+ wire_to_net[wire] = IdString();
+ }
+
WireRange getWires() const
{
WireRange range;
@@ -479,6 +524,37 @@ public:
uint32_t getPipChecksum(PipId pip) const { return pip.index; }
+ void bindPip(PipId pip, IdString net, PlaceStrength strength)
+ {
+ NPNR_ASSERT(pip != PipId());
+ NPNR_ASSERT(pip_to_net[pip] == IdString());
+
+ pip_to_net[pip] = net;
+
+ WireId dst;
+ dst.index = locInfo(pip)->pip_data[pip.index].dst_idx;
+ dst.location = pip.location + locInfo(pip)->pip_data[pip.index].rel_dst_loc;
+ NPNR_ASSERT(wire_to_net[dst] == IdString());
+ wire_to_net[dst] = net;
+ nets[net]->wires[dst].pip = pip;
+ nets[net]->wires[dst].strength = strength;
+ }
+
+ void unbindPip(PipId pip)
+ {
+ NPNR_ASSERT(pip != PipId());
+ NPNR_ASSERT(pip_to_net[pip] != IdString());
+
+ WireId dst;
+ dst.index = locInfo(pip)->pip_data[pip.index].dst_idx;
+ dst.location = pip.location + locInfo(pip)->pip_data[pip.index].rel_dst_loc;
+ NPNR_ASSERT(wire_to_net[dst] != IdString());
+ wire_to_net[dst] = IdString();
+ nets[pip_to_net[pip]]->wires.erase(dst);
+
+ pip_to_net[pip] = IdString();
+ }
+
AllPipRange getPips() const
{
AllPipRange range;