From 7787ce5fd934b2d794e1fa15b6e8007ed07080e6 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Thu, 14 Jun 2018 12:43:00 +0200 Subject: Refactor position/delay estimation API Signed-off-by: Clifford Wolf --- dummy/chip.cc | 33 +++++---------------------------- dummy/chip.h | 11 ++--------- 2 files changed, 7 insertions(+), 37 deletions(-) (limited to 'dummy') 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 &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 &getPipsUphill(WireId wire) const; const std::vector &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 getFrameGraphics() const; std::vector getBelGraphics(BelId bel) const; -- cgit v1.2.3