Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rebase analog fixes #110

Merged
merged 51 commits into from
Jan 17, 2024
Merged

Rebase analog fixes #110

merged 51 commits into from
Jan 17, 2024

Conversation

jpc-lip6
Copy link
Collaborator

A fixed version of the analog-fixes pull request. With a cleanly rebased history on main.

* Returns the set of biggest rectangles inscribed inside the Rectilinear.
  This is *not* a partition, the rectangles overlaps. This is intended for
  the router to select the biggest rectangle in the direction he sees fit
  and making it a RoutingPad.
* Instead of choosing the kind of segments in accordance to the
  rounting gauge, use the form factor of the rectangle.
* In AnabaticEngine::loadGlobalRouting(), call relaxOverConstraineds()
  only if M1 is vertical (may write another one for M1 horizontal).
* In AnabaticEngine::computeEdgeCapacities(), don't complain for
  offgrid M1 if it is allowed...
* In AutoContactTerminal::updateGeometry(), implement dragging on
  horizontal M1.
* In AutoSegment::getExtensionCap(), manage the case when neither
  source nor target is requested. Return the bottom layer cap in
  that instance (for M1 terminals).
* In AutoVertical::updatePositions(), on non-preferred segments,
  the extention must be further extendend as to include perpendiculars
  axis of tracks that we may impact.
* In AutoHorizontal::updatePositions(), idem.
* In Configuration::selectRpComponent(), detect M1 offgrid components
  and flag them. HSmall & VSmall are now forced to be flagged as
  *punctual*.
* In NetBuilderHV, support for M1 offgrid terminals. Systematically
  use doRp_Accesss() and never call directly doRp_AutoContacts().
* In NetBuilderVH, general overhaul & bug fixes.
* In RoutingPad, add a flag to tell that a component has been selected.
* In RoutingPlane::getTrackByPosition(), add failsafe when we are
  before the first track axis or after the last.
* TrackBlockage do not rely on an existing AutoSegment, or even a
  Segment, it is a portion of Track that we declare as blocked.
* Used to manage the blockages coming for the LocalOnly planes,
  typically terminal planes. As it is not related to a Segment,
  we do not need to flatten the obstacles coming from the
  standard cells (would be a lot of them).
* In PowerRails, also support blockages from Rectilinear,
  decomposed in vertical rectangles.
* In Session, add a mechanism for TrackElement that have been put
  in their track *before* closing the session (used for
  TrackBlockage).
* Renaming TrackBlockage into a more flexible TrackFixedSpan than can
  handle both blockage and terminal reservation.
    Allow to change the associated net of a TrackFixedSegment, to
  easily manage conflicts.
* Manage the segment unbreakble flag at the AutoSegment::create() flag
  level (need to be added to Constant).
* In AutoSegment::makeDogleg(AutoContact*), don't check if the break
  point is under the source/target GCell, in some case it could be
  slightly outside (SegForOffgrid case).
* In AutoSegment::create(), get the correct wire with for metal1 segments.
* In RoutingPad, add the ability to manually select what is to be
  considered as the center of the RP. See Configuration::selectRpComponent().
* In Configuration::selectRpComponent(), force the center of the
  RoutingPad so it is in the GCell that have an accessible track
  (due to offgrid).
* In Disjkstra::load(), use RoutingPad::getUserCenter() to locate the
  relevant GCell.
* In NetBuilderVH::doRp_Access(), more complex creation of wiring for
  offgrid metal1 terminals. Allow local metal2 to be one track outside
  it's owning GCell (set the SegForOffgrid flag).
* In Anabatic::propagateConstraintsFromRp(), manage the case of offgrid
  RoutingPad. Allow a one pitch margin on each side (widow of two pitchs
  which should contains at least a grid point).
* In GlobalRoute::runGlobalRouter(), protect the RoutingPad in
  Constant::LocalOnly layer gauge.
* In protectRoutingpads(), manage conflicts when a part of a track may
  be reached by multiple terminals or overlap a blockage. Use a simple
  strategy : in case of overlap, change into blockage.
    Session must be revalidated after each terminal so the tracks are
  up to date for overlap search for the next one.
* In RoutingEvent::revalidate(), expand the track axis constraint of
  one pitch in case of an offgrid flagged segment (set in
  NetBuilderVH::doRp_Access()).
* In Track::getBeginIndex(), finally manage the case where consecutive
  segments of a same net are *not* overlapping (was assumed so before).
* In Track::expandFreeInterval(), fix wrong management of the case
  BeginIsSegmentMax with a begin index of 0. This is a very corner
  case causing error only at the very beginning of a track.
* New proxy method TrackElement::isForOffgrid().
* In AutoContact, add a flag to tag metal-only contact (for offgrid
  segments on metal1 mostly.
* In DataNegociate::update(), when computing perpandicular constraints,
  when processing a non-pref, if S/T is metal-only, add a one pitch slack.
* In PowerPlanes, when decomposing Rectilinear, do it *perpandicular*
  to the preferred routing direction. If it's horizontal, then slice
  vertically.
* In protectRoutingpads(), full rework on how the track fixed span
  intervals are computeds. Must give a set of non-overlaping ones.
  So if they are changed into blockages they won't generate overlaps
  in tracks.
* In Track, beginning of support for partial reorder (may give some
  speed-up in the end).
* Restrict the RoutingPad boxes to the cell abutment box.
* Check that there are overlaping bounds returned by Tracks::getOverlapBounds().
* Pass the current net to Track::getFreeInterval(), so it is not considered
  a blockage...
* Returns the set of biggest rectangles inscribed inside the Rectilinear.
  This is *not* a partition, the rectangles overlaps. This is intended for
  the router to select the biggest rectangle in the direction he sees fit
  and making it a RoutingPad.
* In AnabaticEngine::loadGlobalRouting(), call relaxOverConstraineds()
  only if M1 is vertical (may write another one for M1 horizontal).
* In AnabaticEngine::computeEdgeCapacities(), don't complain for
  offgrid M1 if it is allowed...
* In AutoContactTerminal::updateGeometry(), implement dragging on
  horizontal M1.
* In AutoSegment::getExtensionCap(), manage the case when neither
  source nor target is requested. Return the bottom layer cap in
  that instance (for M1 terminals).
* In AutoVertical::updatePositions(), on non-preferred segments,
  the extention must be further extendend as to include perpendiculars
  axis of tracks that we may impact.
* In AutoHorizontal::updatePositions(), idem.
* In Configuration::selectRpComponent(), detect M1 offgrid components
  and flag them. HSmall & VSmall are now forced to be flagged as
  *punctual*.
* In NetBuilderHV, support for M1 offgrid terminals. Systematically
  use doRp_Accesss() and never call directly doRp_AutoContacts().
* In NetBuilderVH, general overhaul & bug fixes.
* In RoutingPad, add a flag to tell that a component has been selected.
* In RoutingPlane::getTrackByPosition(), add failsafe when we are
  before the first track axis or after the last.
@@ -2822,7 +2829,7 @@ namespace Anabatic {
DbU::Unit verticalWidth = Session::getDVerticalWidth();
if (not Session::getAnabatic()->getConfiguration()->isGMetal(hurricaneSegment->getLayer())) {
size_t depth = Session::getAnabatic()->getConfiguration()->getLayerDepth( hurricaneSegment->getLayer() );
if (depth > 2) {
if ((depth == 0) or (depth > 2)) {
Copy link
Collaborator

@Coloquinte Coloquinte Jan 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's unclear to me what's going on here. Why is depth 1 special?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mmm. It means that if either we are at depth 0 (M1) or above depth 3 (M3), we use the specific wire width and perpandicular pitch of those layers. Otherwise (M2 or M3) we use the default defined wire width and perpandicular. Re-reading that code make me thinks I could do it in a more clear way.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe at least commenting it, as it's difficult to understand for someone that doesn't know the codebase

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. But, this is typically something I should rewrite and cleanup.

VIA5T = createVia( tech, 'VIA5T', 'Metal5', 'Via5', 'MetalTop', u(0.26) )
setEnclosures( VIA5T, Metal5 , (u(0.01), u(0.06)) )
setEnclosures( VIA5T, MetalTop, (u(0.06), u(0.01)) )
VIAS( useHV ).setup( tech )
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe remove the commented code?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I will. But let this one be commited !

sliceHeight = spares.conf.sliceHeight
centerArea.inflate( 4*sliceHeight, sliceHeight )
trace( 540, '\tQuadTree.isUnderArea(): {} {} of {}\n'.format(rtag,centerArea,spares.conf.cell) )
if rtag[-2:] == 'bl':
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems slightly fishy to me, as XCenter is present 12x but YCenter only 4x

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was because, usually, the buffer cells are much wider than tall, but it was an educated guess with no warranty it would work in all the cases.

We would in touble if the edge of the blocked zone is too close of the footprint area anyway. Let's see when the problem arise...

@@ -0,0 +1,197 @@
.. -*- Mode: rst -*-
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice doc!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Will try to keep it updated. Schematic are exported from my Boox e-ink tablet. My dream would be to port XFig on it...

@jpc-lip6 jpc-lip6 merged commit bf9ce73 into main Jan 17, 2024
13 checks passed
@jpc-lip6 jpc-lip6 deleted the rebase-analog-fixes branch January 17, 2024 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants