aboutsummaryrefslogtreecommitdiffstats
path: root/ice40/arch.h
diff options
context:
space:
mode:
Diffstat (limited to 'ice40/arch.h')
-rw-r--r--ice40/arch.h17
1 files changed, 15 insertions, 2 deletions
diff --git a/ice40/arch.h b/ice40/arch.h
index 51cbe725..0243e978 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;
}