From 258bd053c43131a896a40246eada802b37db5905 Mon Sep 17 00:00:00 2001 From: Jean-Paul Chaput Date: Mon, 7 Aug 2023 22:47:48 +0200 Subject: [PATCH] Various bug fixes on blockages & H-Tree managment under Katana. * Change: In Katana::PowerRailsPlanes::Rail::doLayout(): change the delta computation. Extend of the pitch *minus* the half wire-width *minus* 1. So a wire at minimal with will reach exactly the previous and next track axis. And will not be insterted in them due to the "minus 1". TrackFixedSegments created at this stage must be flagged as TElemBlockageNet, so that any overlap between them is not seen as an error by the track overlap checker. This was a problem for the clock tree wires which partly uses pre-fixed wires, but the driver of the H-Tree is a normal signal that must abide the usual checking. * Change: In Katana::TrackFixedSegment::getNet(), no longer rely on the kind of net to choose to return the actual net or the blockage one, but uses the TElemUseBlockageNet flag. --- cumulus/src/plugins/chip/corona.py | 1 + cumulus/src/plugins/chip/power.py | 1 + katana/src/PowerRails.cpp | 6 ++++-- katana/src/TrackFixedSegment.cpp | 6 ++++-- katana/src/katana/TrackElement.h | 28 +++++++++++++-------------- katana/src/katana/TrackFixedSegment.h | 6 +----- 6 files changed, 25 insertions(+), 23 deletions(-) diff --git a/cumulus/src/plugins/chip/corona.py b/cumulus/src/plugins/chip/corona.py index 0acef1da..6f1b8d41 100644 --- a/cumulus/src/plugins/chip/corona.py +++ b/cumulus/src/plugins/chip/corona.py @@ -134,6 +134,7 @@ class HorizontalRail ( Rail ): return True def connect ( self, contact ): + trace( 550, '\tHorizontalRail.connect() {}\n'.format(contact) ) viaWidth = contact.getWidth() viaHeight = self.side.hRailWidth viaFlags = BigVia.AllowAllExpand diff --git a/cumulus/src/plugins/chip/power.py b/cumulus/src/plugins/chip/power.py index 54a2eef8..6e784ab4 100644 --- a/cumulus/src/plugins/chip/power.py +++ b/cumulus/src/plugins/chip/power.py @@ -230,6 +230,7 @@ class Builder ( object ): return with UpdateSession(): bufferRp = self.conf.rpAccessByOccurrence( Occurrence(htPlugs[0], Path()), ck, 0 ) + trace( 550, '\tClock buffer access RP @{}\n'.format(bufferRp) ) self.conf.expandMinArea( bufferRp ) layerGauge = self.conf.routingGauge.getLayerGauge(self.conf.verticalDepth) contact = Contact.create( ck diff --git a/katana/src/PowerRails.cpp b/katana/src/PowerRails.cpp index 33ab381a..32e9bd40 100644 --- a/katana/src/PowerRails.cpp +++ b/katana/src/PowerRails.cpp @@ -495,12 +495,12 @@ namespace { if (_width >= DbU::fromPhysical( 10.0, DbU::UnitPower::Micro )) { delta = 2 * plane->getLayerGauge()->getPitch(); } else { - delta = plane->getLayerGauge()->getPitch(); + delta = plane->getLayerGauge()->getPitch() - plane->getLayerGauge()->getHalfWireWidth() - 1; } } else { //if (AllianceFramework::get()->getCellGauge()->getName() == Name("StdCellLib")) { - delta = plane->getLayerGauge()->getPitch(); + delta = plane->getLayerGauge()->getPitch() - plane->getLayerGauge()->getHalfWireWidth() - 1; //} } } @@ -557,6 +557,7 @@ namespace { for ( ; track and (track->getAxis() <= axisMax) ; track = track->getNextTrack() ) { TrackElement* element = TrackFixedSegment::create ( track, segment ); cdebug_log(159,0) << " Insert in " << track << "+" << element << endl; + element->setFlags( TElemUseBlockageNet ); } } } else { @@ -592,6 +593,7 @@ namespace { << "+" << element << " " << (net->isExternal() ? "external" : "internal") << endl; + element->setFlags( TElemUseBlockageNet ); } } } diff --git a/katana/src/TrackFixedSegment.cpp b/katana/src/TrackFixedSegment.cpp index 721d4da5..d8e60a85 100644 --- a/katana/src/TrackFixedSegment.cpp +++ b/katana/src/TrackFixedSegment.cpp @@ -199,7 +199,8 @@ namespace Katana { { Net* realNet = _segment->getNet(); //if (realNet->isSupply() or realNet->isClock()) - if (realNet->isSupply()) + //if (realNet->isSupply()) + if (_flags & TElemUseBlockageNet) return Session::getBlockageNet(); return realNet; } @@ -265,7 +266,8 @@ namespace Katana { + ":" + DbU::getValueString(_targetU) + "]" + " " + DbU::getValueString(_targetU-_sourceU) + " F" - + ((isBlockage()) ? "B" : "-"); + + ((isBlockage()) ? "B" : "-") + + ((_flags & TElemUseBlockageNet) ? "N" : "-"); s1.insert ( s1.size()-1, s2 ); return s1; diff --git a/katana/src/katana/TrackElement.h b/katana/src/katana/TrackElement.h index d9f3cbd4..12fa0dc3 100644 --- a/katana/src/katana/TrackElement.h +++ b/katana/src/katana/TrackElement.h @@ -64,20 +64,20 @@ namespace Katana { // ------------------------------------------------------------------- // Class : "TrackElement". - enum TrackElementFlags { TElemCreated = (1 << 0) - , TElemBlockage = (1 << 2) - , TElemFixed = (1 << 3) - , TElemLocked = (1 << 4) - , TElemRouted = (1 << 5) - , TElemShortDogleg = (1 << 6) - , TElemSourceDogleg = (1 << 7) - , TElemTargetDogleg = (1 << 8) - , TElemAlignBottom = (1 << 9) - , TElemAlignCenter = (1 << 10) - , TElemAlignTop = (1 << 11) - , TElemRipple = (1 << 12) - , TElemInvalidated = (1 << 13) - }; + const uint32_t TElemCreated = (1 << 0); + const uint32_t TElemBlockage = (1 << 2); + const uint32_t TElemFixed = (1 << 3); + const uint32_t TElemLocked = (1 << 4); + const uint32_t TElemRouted = (1 << 5); + const uint32_t TElemUseBlockageNet = (1 << 6); + const uint32_t TElemShortDogleg = (1 << 7); + const uint32_t TElemSourceDogleg = (1 << 8); + const uint32_t TElemTargetDogleg = (1 << 9); + const uint32_t TElemAlignBottom = (1 << 10); + const uint32_t TElemAlignCenter = (1 << 11); + const uint32_t TElemAlignTop = (1 << 12); + const uint32_t TElemRipple = (1 << 13); + const uint32_t TElemInvalidated = (1 << 14); struct Compare { diff --git a/katana/src/katana/TrackFixedSegment.h b/katana/src/katana/TrackFixedSegment.h index 37622d13..72ce899c 100644 --- a/katana/src/katana/TrackFixedSegment.h +++ b/katana/src/katana/TrackFixedSegment.h @@ -14,9 +14,7 @@ // +-----------------------------------------------------------------+ -#ifndef KATANA_TRACK_FIXED_SEGMENT_H -#define KATANA_TRACK_FIXED_SEGMENT_H - +#pragma once #include "katana/TrackElement.h" @@ -88,5 +86,3 @@ namespace Katana { INSPECTOR_P_SUPPORT(Katana::TrackFixedSegment); - -#endif // KATANA_TRACK_FIXED_SEGMENT_H