From 3b0d1beabbaf7bb22136bf831191469836c38d33 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Tue, 29 May 2018 20:04:29 +0200 Subject: Add DelayInfo struct Signed-off-by: Clifford Wolf --- ice40/chip.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'ice40') diff --git a/ice40/chip.h b/ice40/chip.h index 21f8a7dc..397e2bf3 100644 --- a/ice40/chip.h +++ b/ice40/chip.h @@ -22,6 +22,14 @@ #ifndef CHIP_H #define CHIP_H +struct DelayInfo +{ + float delay = 0; + + float raiseDelay() { return delay; } + float fallDelay() { return delay; } +}; + // ----------------------------------------------------------------------- enum BelType @@ -175,7 +183,7 @@ struct AllWiresRange struct WireDelay { WireId wire; - float delay; + DelayInfo delay; }; struct WireDelayIterator @@ -188,7 +196,7 @@ struct WireDelayIterator WireDelay operator*() const { WireDelay ret; ret.wire.index = ptr->wire_index; - ret.delay = ptr->delay; + ret.delay.delay = ptr->delay; return ret; } }; -- cgit v1.2.3