diff options
| author | Clifford Wolf <clifford@clifford.at> | 2018-05-29 20:04:29 +0200 |
|---|---|---|
| committer | Clifford Wolf <clifford@clifford.at> | 2018-05-29 20:04:29 +0200 |
| commit | 3b0d1beabbaf7bb22136bf831191469836c38d33 (patch) | |
| tree | ac0189c563b3656ad7da18ff5ca341139219a75e | |
| parent | d56e29c47e157c69bbc9fca6b615fbcb8c937d47 (diff) | |
| download | nextpnr-3b0d1beabbaf7bb22136bf831191469836c38d33.tar.gz nextpnr-3b0d1beabbaf7bb22136bf831191469836c38d33.tar.bz2 nextpnr-3b0d1beabbaf7bb22136bf831191469836c38d33.zip | |
Add DelayInfo struct
Signed-off-by: Clifford Wolf <clifford@clifford.at>
| -rw-r--r-- | common/design.h | 2 | ||||
| -rw-r--r-- | dummy/chip.h | 10 | ||||
| -rw-r--r-- | ice40/chip.h | 12 |
3 files changed, 20 insertions, 4 deletions
diff --git a/common/design.h b/common/design.h index 1b45895e..edf7dba1 100644 --- a/common/design.h +++ b/common/design.h @@ -52,7 +52,7 @@ struct NetInfo dict<IdString, std::string> attrs; // wire -> (uphill_wire, delay) - dict<WireId, std::pair<WireId, float>> wires; + dict<WireId, std::pair<WireId, DelayInfo>> wires; }; enum PortType diff --git a/dummy/chip.h b/dummy/chip.h index 2b2bc613..cc5013df 100644 --- a/dummy/chip.h +++ b/dummy/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; } +}; + typedef IdString BelType; typedef IdString PortPin; @@ -111,7 +119,7 @@ struct WireRange struct WireDelay { WireId wire; - float delay; + DelayInfo delay; }; struct WireDelayIterator 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; } }; |
