From 7922b3bfc4ef93b8f67194c05e1a236b4c83c3da Mon Sep 17 00:00:00 2001 From: gatecat Date: Fri, 19 Feb 2021 10:39:57 +0000 Subject: Replace DelayInfo with DelayPair/DelayQuad This replaces the arch-specific DelayInfo structure with new DelayPair (min/max only) and DelayQuad (min/max for both rise and fall) structures that form part of common code. This further reduces the amount of arch-specific code; and also provides useful data structures for timing analysis which will need to delay with pairs/quads of delays as it is improved. While there may be a small performance cost to arches that didn't separate the rise/fall cases (arches that aren't currently separating the min/max cases just need to be fixed...) in DelayInfo, my expectation is that inlining will mean this doesn't make much difference. Signed-off-by: gatecat --- gui/designwidget.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'gui') diff --git a/gui/designwidget.cc b/gui/designwidget.cc index 5e6098a5..53958c3a 100644 --- a/gui/designwidget.cc +++ b/gui/designwidget.cc @@ -652,11 +652,11 @@ void DesignWidget::onSelectionChanged(int num, const QItemSelection &, const QIt addProperty(attrsItem, QVariant::String, item.first.c_str(ctx), item.second.c_str()); } - DelayInfo delay = ctx->getWireDelay(wire); + DelayQuad delay = ctx->getWireDelay(wire); QtProperty *delayItem = addSubGroup(topItem, "Delay"); - addProperty(delayItem, QVariant::Double, "Min Raise", delay.minRaiseDelay()); - addProperty(delayItem, QVariant::Double, "Max Raise", delay.maxRaiseDelay()); + addProperty(delayItem, QVariant::Double, "Min Raise", delay.minRiseDelay()); + addProperty(delayItem, QVariant::Double, "Max Raise", delay.maxRiseDelay()); addProperty(delayItem, QVariant::Double, "Min Fall", delay.minFallDelay()); addProperty(delayItem, QVariant::Double, "Max Fall", delay.maxFallDelay()); @@ -721,11 +721,11 @@ void DesignWidget::onSelectionChanged(int num, const QItemSelection &, const QIt addProperty(attrsItem, QVariant::String, item.first.c_str(ctx), item.second.c_str()); } - DelayInfo delay = ctx->getPipDelay(pip); + DelayQuad delay = ctx->getPipDelay(pip); QtProperty *delayItem = addSubGroup(topItem, "Delay"); - addProperty(delayItem, QVariant::Double, "Min Raise", delay.minRaiseDelay()); - addProperty(delayItem, QVariant::Double, "Max Raise", delay.maxRaiseDelay()); + addProperty(delayItem, QVariant::Double, "Min Raise", delay.minRiseDelay()); + addProperty(delayItem, QVariant::Double, "Max Raise", delay.maxRiseDelay()); addProperty(delayItem, QVariant::Double, "Min Fall", delay.minFallDelay()); addProperty(delayItem, QVariant::Double, "Max Fall", delay.maxFallDelay()); } else if (type == ElementType::NET) { -- cgit v1.2.3