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

Minor doc changes for Katana #92

Merged
merged 12 commits into from
Dec 6, 2023
Merged
1 change: 1 addition & 0 deletions crlcore/python/technos/common/colors.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
, 'Tan' : '210,180,140' # Shade of Browns
, 'Yellow' : '255,255,0' # Shade of Yellows.
, 'LightYellow' : '255,255,224'
, 'Purple' : '160,32,240'
}


Expand Down
12 changes: 7 additions & 5 deletions crlcore/python/technos/common/kite.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
layout = Cfg.Configuration.get().getLayout()

# Kite Layout.
layout.addTab ( 'Router', 'kite' )
layout.addTab ( 'Router', 'katana' )
layout.addTitle ( 'Router', 'Katabatic - Routing Database' )
layout.addParameter( 'Router', 'katabatic.saturateRatio' , 'Saturate Ratio (%)' , 0, 1 )
layout.addParameter( 'Router', 'katabatic.saturateRp' , 'Saturate RoutingPad' , 0, 1 )
Expand All @@ -28,10 +28,12 @@
layout.addParameter( 'Router', 'anabatic.gcell.displayMode' , 'GCell Display Mode' , 1, 1 )
layout.addRule ( 'Router' )
layout.addTitle ( 'Router', 'Kite - Detailed Router' )
layout.addParameter( 'Router', 'kite.hTracksReservedLocal', 'Vert. Locally Reserved Tracks', 0 )
layout.addParameter( 'Router', 'kite.vTracksReservedLocal', 'Hor. Locally Reserved Tracks' , 0 )
layout.addParameter( 'Router', 'kite.eventsLimit' , 'Events Limit' , 0 )
layout.addParameter( 'Router', 'kite.ripupCost' , 'Ripup Cost' , 1, 1, Cfg.Parameter.Flags.UseSpinBox )
layout.addParameter( 'Router', 'kite.hTracksReservedMin' , 'Min Vert. Reserved Tracks', 0 )
layout.addParameter( 'Router', 'kite.vTracksReservedMin' , 'Min Hor. Reserved Tracks' , 0 )
layout.addParameter( 'Router', 'kite.hTracksReservedLocal', 'Max Vert. Reserved Tracks', 5 )
layout.addParameter( 'Router', 'kite.vTracksReservedLocal', 'Max Hor. Reserved Tracks' , 5 )
layout.addParameter( 'Router', 'kite.eventsLimit' , 'Events Limit' , 0 )
layout.addParameter( 'Router', 'kite.ripupCost' , 'Ripup Cost' , 1, 1, Cfg.Parameter.Flags.UseSpinBox )
layout.addSection ( 'Router', 'Ripup Limits', 1 )
layout.addParameter( 'Router', 'kite.strapRipupLimit' , 'Straps' , 1, 1, Cfg.Parameter.Flags.UseSpinBox )
layout.addParameter( 'Router', 'kite.localRipupLimit' , 'Locals' , 1, 1, Cfg.Parameter.Flags.UseSpinBox )
Expand Down
2 changes: 1 addition & 1 deletion crlcore/python/technos/node180/gf180mcu/mcu9t5v0.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def _routing ():
cfg.etesian.aspectRatio = 1.00
cfg.etesian.aspectRatio = [10, 1000]
cfg.etesian.spaceMargin = 0.10
cfg.etesian.uniformDensity = True
cfg.etesian.densityVariation = 0.05
cfg.etesian.routingDriven = False
cfg.etesian.latchUpDistance = u(30.0 - 1.0)
#cfg.etesian.diodeName = 'diode'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def _routing():
cfg.etesian.aspectRatio = 1.00
cfg.etesian.aspectRatio = [10, 1000]
cfg.etesian.spaceMargin = 0.10
cfg.etesian.uniformDensity = True
cfg.etesian.densityVariation = 0.05
cfg.etesian.routingDriven = False
cfg.etesian.latchUpDistance = u(30.0 - 1.0)
cfg.etesian.diodeName = 'diode_w1'
Expand Down
4 changes: 2 additions & 2 deletions documentation/content/pages/users-guide/Configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ A Comprehensive Example of :cb:`./coriolis2/setting.py`
# P&R related parameters.
Cfg.getParamString ( 'anabatic.routingGauge' ).setString ( 'msxlib4' )
Cfg.getParamString ( 'anabatic.topRoutingLayer' ).setString ( 'METAL4' )
Cfg.getParamInt ( 'katana.hTracksReservedLocal' ).setInt ( 6 )
Cfg.getParamInt ( 'katana.vTracksReservedLocal' ).setInt ( 3 )
Cfg.getParamInt ( 'katana.hTracksReservedMin' ).setInt ( 3 )
Cfg.getParamInt ( 'katana.vTracksReservedMin' ).setInt ( 2 )

Cfg.Configuration.popDefaultPriority()

Expand Down
12 changes: 8 additions & 4 deletions documentation/content/pages/users-guide/ViewerTools.rst
Original file line number Diff line number Diff line change
Expand Up @@ -238,12 +238,16 @@ be equal to `100%` or (``NNNN+0``) if the detailed routing has been successfull.
In the event of a failure, on a saturated design, you may tweak the three
following configuration parameters:

#. ``katana.hTrackReservedLocal``, the number of track reserved for local routing,
that quantity is substracted from the edge capacities (global routing) to
give a sense of the cluttering inside the GCells.
#. ``katana.vTrackReservedLocal``, same as above.
#. ``katana.hTrackReservedMin``, minimum number of track reserved for horizontal
routing; that quantity is always substracted from the edge capacities during
global routing, to give more freedom to the detailed router.
#. ``katana.vTrackReservedMin``, same as above for vertical routing.
#. ``etesian.spaceMargin``, increases the free area of the overall design so the
routing density decrease.
..
#. ``katana.hTrackReservedLocal``, maximum number of track reserved for horizontal
local routing (access to the cell pins).
#. ``katana.vTrackReservedLocal``, same as above for vertical routing.

The idea is to increase the horizontal and vertical local track reservation until
the detailed router succeeds. But in doing so we make the task of the global router
Expand Down
56 changes: 33 additions & 23 deletions etesian/src/EtesianEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -783,6 +783,8 @@ namespace Etesian {
return 0;
}

cmess1 << ::Dots::asPercentage( " - Effective density"
, (float)usedLength/(float)totalLength ) << endl;
cmess1 << ::Dots::asPercentage( " - Effective space margin"
, (float)(totalLength-usedLength)/(float)totalLength ) << endl;

Expand All @@ -792,12 +794,16 @@ namespace Etesian {
ostringstream os1;
os1 << registerNb << " (" << fixed << setprecision(2) << ratio << "%)";
cmess1 << ::Dots::asString ( " - Registers (DFF) ", os1.str() ) << endl;
cmess1 << ::Dots::asPercentage( " - Registers (DFF) area "
cmess1 << ::Dots::asPercentage( " - Registers (DFF) density "
, (float)(registerLength)/(float)totalLength ) << endl;
ratio = ((float)_bufferCount / (float)instancesNb) * 100.0;
ostringstream os2;
os2 << _bufferCount << " (" << fixed << setprecision(2) << ratio << "%)";
cmess1 << ::Dots::asString( " - Buffers ", os2.str() ) << endl;
if (_bufferCount != 0) {
// Seems unused
// Related to (now unused) code in HFNS.cpp for clock tree insertion
ratio = ((float)_bufferCount / (float)instancesNb) * 100.0;
ostringstream os2;
os2 << _bufferCount << " (" << fixed << setprecision(2) << ratio << "%)";
cmess1 << ::Dots::asString( " - Buffers ", os2.str() ) << endl;
}
}
cout.flush();

Expand All @@ -814,13 +820,23 @@ namespace Etesian {
vector<bool> cellIsObstruction( instancesNb+1 );
vector<CellRowPolarity> cellRowPolarity( instancesNb+1, CellRowPolarity::SAME );

// Compute a bloat factor to reach (1 - densityVariation) density
double bloatFactor = std::max(1.0, (1.0 - getDensityVariation()) * totalLength / usedLength);
if (bloatFactor != 1.0) {
ostringstream bf;
bf << fixed << setprecision(2) << "x " << bloatFactor;
cmess1 << ::Dots::asString( " - Coloquinte cell bloat factor ", bf.str() ) << endl;
}
int rowHeight = (getSliceHeight() + vpitch - 1) / vpitch;

cmess1 << " - Building RoutingPads (transhierarchical)" << endl;
//getCell()->flattenNets( Cell::Flags::BuildRings|Cell::Flags::NoClockFlatten );
//getCell()->flattenNets( getBlockInstance(), Cell::Flags::NoClockFlatten );
getCell()->flattenNets( NULL, _excludedNets, Cell::Flags::NoClockFlatten );

int instanceId = 0;
if (getBlockInstance()) {
// Translate the fixed instances
for ( Instance* instance : getCell()->getInstances() ) {
if (instance == getBlockInstance()) continue;
if (instance->getPlacementStatus() == Instance::PlacementStatus::FIXED) {
Expand Down Expand Up @@ -849,20 +865,10 @@ namespace Etesian {
}
}

// Compute a bloat factor to be reach 1 - densityVariation density
double bloatFactor = std::max(1.0, (1.0 - getDensityVariation()) * totalLength / usedLength);
// Limit the maximum size of cells after bloat to avoid placement issues
int maxBloatSize = _surface->width() / 8;
if (bloatFactor != 1.0) {
ostringstream bf;
bf << fixed << setprecision(2) << bloatFactor << "%";
cmess1 << ::Dots::asString( " - Coloquinte cell bloat factor ", bf.str() ) << endl;
}
int rowHeight = (getSliceHeight() + vpitch - 1) / vpitch;

// Translate the placeable instances
for ( Occurrence occurrence : getCell()->getTerminalNetlistInstanceOccurrences(getBlockInstance()) )
{
if (instanceId >= instancesNb) {
if (instanceId >= (int) instancesNb) {
// This will be an error
++instanceId;
continue;
Expand All @@ -887,13 +893,11 @@ namespace Etesian {
int xpos = instanceAb.getXMin() / hpitch;
int ypos = instanceAb.getYMin() / vpitch;

// Huge hack to solve a specific DRC issue in Flexlib
string masterName = getString( instance->getMasterCell()->getName() );
if (isFlexLib and not instance->isFixed() and (masterName == "buf_x8"))
++xsize;

// Take bloat into account to compute the size
xsize = std::max(xsize, std::min(maxBloatSize, (int) (xsize * bloatFactor)));

cellX[instanceId] = xpos;
cellY[instanceId] = ypos;
cellWidth[instanceId] = xsize;
Expand All @@ -918,7 +922,7 @@ namespace Etesian {
dots.dot();
}

if (instanceId != instancesNb) {
if (instanceId != (int) instancesNb) {
throw Error( "EtesianEngine::toColoquinte(): %d leaf instances, but expected %d\n"
" maybe a virtual flattening problem."
, instanceId, instancesNb
Expand Down Expand Up @@ -1039,6 +1043,12 @@ namespace Etesian {
cmess2 << stdCellSizes.toString(1) << endl;

_circuit->setupRows(*_surface, rowHeight);

// Apply changes to match target density variation; we add a small margin to be safer
float rowSideMarginInCellHeight = 0.3;
float maxExpansionInRowWidth = 1.0 / 8.0;
_circuit->expandCellsToDensity(1.0 - getDensityVariation(), rowSideMarginInCellHeight, maxExpansionInRowWidth);

_circuit->check();
_placementLB = new coloquinte::PlacementSolution ();
_placementUB = new coloquinte::PlacementSolution ( *_placementLB );
Expand Down Expand Up @@ -1162,10 +1172,10 @@ namespace Etesian {

cmess1 << _circuit->report() << std::endl;

cmess1 << " o Global placement." << endl;
cmess1 << " o Global placement (effort " << getPlaceEffort() << ")" << endl;
globalPlace();

cmess1 << " o Detailed Placement." << endl;
cmess1 << " o Detailed Placement (effort " << getPlaceEffort() << ")" << endl;
detailedPlace();

//toHurricane();
Expand Down
6 changes: 3 additions & 3 deletions flute/src/3.1/flute.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1471,9 +1471,9 @@ void plottree(Tree t)
int i;

for (i=0; i<2*t.deg-2; i++) {
printf("%d %d\n", t.branch[i].x, t.branch[i].y);
printf("%d %d\n\n", t.branch[t.branch[i].n].x,
t.branch[t.branch[i].n].y);
printf("%lld %lld\n", (long long) t.branch[i].x, (long long) t.branch[i].y);
printf("%lld %lld\n\n", (long long) t.branch[t.branch[i].n].x,
(long long) t.branch[t.branch[i].n].y);
}
}

Expand Down
Loading