aboutsummaryrefslogtreecommitdiffstats
path: root/dummy
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2018-06-14 12:43:00 +0200
committerClifford Wolf <clifford@clifford.at>2018-06-14 12:43:00 +0200
commit7787ce5fd934b2d794e1fa15b6e8007ed07080e6 (patch)
tree4e913bc1c70148029316d282d37a8d509f3d8c03 /dummy
parentb1cbae1293fecf3ba14a7ce073d26dcfb07177f0 (diff)
downloadnextpnr-7787ce5fd934b2d794e1fa15b6e8007ed07080e6.tar.gz
nextpnr-7787ce5fd934b2d794e1fa15b6e8007ed07080e6.tar.bz2
nextpnr-7787ce5fd934b2d794e1fa15b6e8007ed07080e6.zip
Refactor position/delay estimation API
Signed-off-by: Clifford Wolf <clifford@clifford.at>
Diffstat (limited to 'dummy')
-rw-r--r--dummy/chip.cc33
-rw-r--r--dummy/chip.h11
2 files changed, 7 insertions, 37 deletions
diff --git a/dummy/chip.cc b/dummy/chip.cc
index b8a23709..d9543643 100644
--- a/dummy/chip.cc
+++ b/dummy/chip.cc
@@ -141,37 +141,14 @@ const std::vector<PipId> &Chip::getWireAliases(WireId wire) const
// ---------------------------------------------------------------
-PosInfo Chip::getBelPosition(BelId bel) const
+bool Chip::estimatePosition(BelId bel, float &x, float &y) const
{
- PosInfo pos;
- assert(bel != BelId());
- // pos.x = ...;
- // pos.y = ...;
- return pos;
+ x = 0.0;
+ y = 0.0;
+ return false;
}
-PosInfo Chip::getWirePosition(WireId wire) const
-{
- PosInfo pos;
- assert(wire != WireId());
- // pos.x = ...;
- // pos.y = ...;
- return pos;
-}
-
-PosInfo Chip::getPipPosition(PipId pip) const
-{
- PosInfo pos;
- assert(pip != PipId());
- // pos.x = ...;
- // pos.y = ...;
- return pos;
-}
-
-float Chip::estimateDelay(PosInfo src, PosInfo dst) const
-{
- return fabsf(src.x - dst.x) + fabsf(src.x - dst.x);
-}
+float Chip::estimateDelay(WireId src, WireId dst) const { return 0.0; }
// ---------------------------------------------------------------
diff --git a/dummy/chip.h b/dummy/chip.h
index 197e84f1..4fd86bdb 100644
--- a/dummy/chip.h
+++ b/dummy/chip.h
@@ -42,11 +42,6 @@ struct DelayInfo
}
};
-struct PosInfo
-{
- float x = 0, y = 0;
-};
-
typedef IdString BelType;
typedef IdString PortPin;
@@ -113,10 +108,8 @@ struct Chip
const std::vector<PipId> &getPipsUphill(WireId wire) const;
const std::vector<PipId> &getWireAliases(WireId wire) const;
- PosInfo getBelPosition(BelId bel) const;
- PosInfo getWirePosition(WireId wire) const;
- PosInfo getPipPosition(PipId pip) const;
- float estimateDelay(PosInfo src, PosInfo dst) const;
+ bool estimatePosition(BelId bel, float &x, float &y) const;
+ float estimateDelay(WireId src, WireId dst) const;
std::vector<GraphicElement> getFrameGraphics() const;
std::vector<GraphicElement> getBelGraphics(BelId bel) const;