aboutsummaryrefslogtreecommitdiffstats
path: root/dummy
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2018-06-16 15:23:04 +0200
committerClifford Wolf <clifford@clifford.at>2018-06-16 15:23:04 +0200
commit6acf23cf37285e16050b44370be6cbe7dd3e0dc5 (patch)
tree352eaa3249ff2941bf6523d0b587b02b535137dc /dummy
parent5d343a168b98826c80482c11376b1a95b9b0bbca (diff)
downloadnextpnr-6acf23cf37285e16050b44370be6cbe7dd3e0dc5.tar.gz
nextpnr-6acf23cf37285e16050b44370be6cbe7dd3e0dc5.tar.bz2
nextpnr-6acf23cf37285e16050b44370be6cbe7dd3e0dc5.zip
Some refactoring of Chip API (prep for chipdb refactoring)
Signed-off-by: Clifford Wolf <clifford@clifford.at>
Diffstat (limited to 'dummy')
-rw-r--r--dummy/chip.cc4
-rw-r--r--dummy/chip.h14
2 files changed, 10 insertions, 8 deletions
diff --git a/dummy/chip.cc b/dummy/chip.cc
index d9543643..965517fe 100644
--- a/dummy/chip.cc
+++ b/dummy/chip.cc
@@ -141,14 +141,14 @@ const std::vector<PipId> &Chip::getWireAliases(WireId wire) const
// ---------------------------------------------------------------
-bool Chip::estimatePosition(BelId bel, float &x, float &y) const
+bool Chip::estimatePosition(BelId bel, int &x, int &y) const
{
x = 0.0;
y = 0.0;
return false;
}
-float Chip::estimateDelay(WireId src, WireId dst) const { return 0.0; }
+delay_t Chip::estimateDelay(WireId src, WireId dst) const { return 0.0; }
// ---------------------------------------------------------------
diff --git a/dummy/chip.h b/dummy/chip.h
index 4fd86bdb..03e16e64 100644
--- a/dummy/chip.h
+++ b/dummy/chip.h
@@ -26,13 +26,15 @@
NEXTPNR_NAMESPACE_BEGIN
+typedef float delay_t;
+
struct DelayInfo
{
- float delay = 0;
+ delay_t delay = 0;
- float raiseDelay() const { return delay; }
- float fallDelay() const { return delay; }
- float avgDelay() const { return delay; }
+ delay_t raiseDelay() const { return delay; }
+ delay_t fallDelay() const { return delay; }
+ delay_t avgDelay() const { return delay; }
DelayInfo operator+(const DelayInfo &other) const
{
@@ -108,8 +110,8 @@ struct Chip
const std::vector<PipId> &getPipsUphill(WireId wire) const;
const std::vector<PipId> &getWireAliases(WireId wire) const;
- bool estimatePosition(BelId bel, float &x, float &y) const;
- float estimateDelay(WireId src, WireId dst) const;
+ bool estimatePosition(BelId bel, int &x, int &y) const;
+ delay_t estimateDelay(WireId src, WireId dst) const;
std::vector<GraphicElement> getFrameGraphics() const;
std::vector<GraphicElement> getBelGraphics(BelId bel) const;