aboutsummaryrefslogtreecommitdiffstats
path: root/ice40/arch.h
diff options
context:
space:
mode:
authorEddie Hung <eddieh@ece.ubc.ca>2018-07-30 18:14:40 -0700
committerEddie Hung <eddieh@ece.ubc.ca>2018-07-30 18:14:40 -0700
commit46b74696527d3b217070ff4820b537e0b989a00f (patch)
treeda95e6dc441eb8608cd77d1eea218ec9cb5f26fb /ice40/arch.h
parent9c45f762c8280b5f7948df15554e54a38a896da2 (diff)
parent7da64ee167d518641a479cad1b660c608fb3dede (diff)
downloadnextpnr-46b74696527d3b217070ff4820b537e0b989a00f.tar.gz
nextpnr-46b74696527d3b217070ff4820b537e0b989a00f.tar.bz2
nextpnr-46b74696527d3b217070ff4820b537e0b989a00f.zip
Merge remote-tracking branch 'origin/master' into redist_slack
Diffstat (limited to 'ice40/arch.h')
-rw-r--r--ice40/arch.h19
1 files changed, 16 insertions, 3 deletions
diff --git a/ice40/arch.h b/ice40/arch.h
index e2d14e3c..ab7760d4 100644
--- a/ice40/arch.h
+++ b/ice40/arch.h
@@ -66,7 +66,8 @@ NPNR_PACKED_STRUCT(struct BelPortPOD {
NPNR_PACKED_STRUCT(struct PipInfoPOD {
// RelPtr<char> name;
int32_t src, dst;
- int32_t delay;
+ int32_t fast_delay;
+ int32_t slow_delay;
int8_t x, y;
int16_t src_seg, dst_seg;
int16_t switch_mask;
@@ -89,6 +90,9 @@ NPNR_PACKED_STRUCT(struct WireInfoPOD {
int32_t num_segments;
RelPtr<WireSegmentPOD> segments;
+ int32_t fast_delay;
+ int32_t slow_delay;
+
int8_t x, y;
WireType type;
int8_t padding_0;
@@ -344,6 +348,7 @@ struct ArchArgs
struct Arch : BaseCtx
{
+ bool fast_part;
const ChipInfoPOD *chip_info;
const PackageInfoPOD *package_info;
@@ -524,6 +529,11 @@ struct Arch : BaseCtx
DelayInfo getWireDelay(WireId wire) const
{
DelayInfo delay;
+ NPNR_ASSERT(wire != WireId());
+ if (fast_part)
+ delay.delay = chip_info->wire_data[wire.index].fast_delay;
+ else
+ delay.delay = chip_info->wire_data[wire.index].slow_delay;
return delay;
}
@@ -637,7 +647,10 @@ struct Arch : BaseCtx
{
DelayInfo delay;
NPNR_ASSERT(pip != PipId());
- delay.delay = chip_info->pip_data[pip.index].delay;
+ if (fast_part)
+ delay.delay = chip_info->pip_data[pip.index].fast_delay;
+ else
+ delay.delay = chip_info->pip_data[pip.index].slow_delay;
return delay;
}
@@ -710,7 +723,7 @@ struct Arch : BaseCtx
// Get the delay through a cell from one port to another, returning false
// if no path exists
- bool getCellDelay(const CellInfo *cell, IdString fromPort, IdString toPort, delay_t &delay) const;
+ bool getCellDelay(const CellInfo *cell, IdString fromPort, IdString toPort, DelayInfo &delay) const;
// Get the associated clock to a port, or empty if the port is combinational
IdString getPortClock(const CellInfo *cell, IdString port) const;
// Return true if a port is a clock