aboutsummaryrefslogtreecommitdiffstats
path: root/dummy/chip.cc
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2018-06-13 12:37:23 +0200
committerClifford Wolf <clifford@clifford.at>2018-06-13 12:37:23 +0200
commit4d7f18dd98a7ef9540a279a8e27cb9dbef355af7 (patch)
tree28a147e3435cec7ff9cd22950b6b349260d1ec11 /dummy/chip.cc
parent301136db033e6696b7d606f9833474fdd5e77aac (diff)
downloadnextpnr-4d7f18dd98a7ef9540a279a8e27cb9dbef355af7.tar.gz
nextpnr-4d7f18dd98a7ef9540a279a8e27cb9dbef355af7.tar.bz2
nextpnr-4d7f18dd98a7ef9540a279a8e27cb9dbef355af7.zip
Redesign PosInfo API
Signed-off-by: Clifford Wolf <clifford@clifford.at>
Diffstat (limited to 'dummy/chip.cc')
-rw-r--r--dummy/chip.cc37
1 files changed, 37 insertions, 0 deletions
diff --git a/dummy/chip.cc b/dummy/chip.cc
index ae962508..bab65ae4 100644
--- a/dummy/chip.cc
+++ b/dummy/chip.cc
@@ -17,6 +17,7 @@
*
*/
+#include <math.h>
#include "nextpnr.h"
NEXTPNR_NAMESPACE_BEGIN
@@ -138,6 +139,42 @@ const std::vector<PipId> &Chip::getWireAliases(WireId wire) const
return ret;
}
+// ---------------------------------------------------------------
+
+PosInfo Chip::getBelPosition(BelId bel) const
+{
+ PosInfo pos;
+ assert(bel != BelId());
+ // pos.x = ...;
+ // pos.y = ...;
+ return pos;
+}
+
+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);
+}
+
+// ---------------------------------------------------------------
+
std::vector<GraphicElement> Chip::getBelGraphics(BelId bel) const
{
static std::vector<GraphicElement> ret;