From 4d7f18dd98a7ef9540a279a8e27cb9dbef355af7 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Wed, 13 Jun 2018 12:37:23 +0200 Subject: Redesign PosInfo API Signed-off-by: Clifford Wolf --- ice40/chip.h | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'ice40/chip.h') diff --git a/ice40/chip.h b/ice40/chip.h index f8946610..2c95bf4e 100644 --- a/ice40/chip.h +++ b/ice40/chip.h @@ -42,6 +42,11 @@ struct DelayInfo } }; +struct PosInfo +{ + float x = 0, y = 0; +}; + // ----------------------------------------------------------------------- enum BelType @@ -679,9 +684,12 @@ struct Chip // ------------------------------------------------- - void getBelPosition(BelId bel, float &x, float &y) const; - void getWirePosition(WireId wire, float &x, float &y) const; - void getPipPosition(PipId pip, float &x, float &y) const; + PosInfo getBelPosition(BelId bel) const; + PosInfo getWirePosition(WireId wire) const; + PosInfo getPipPosition(PipId pip) const; + float estimateDelay(PosInfo src, PosInfo dst) const; + + // ------------------------------------------------- std::vector getBelGraphics(BelId bel) const; std::vector getWireGraphics(WireId wire) const; -- cgit v1.2.3