Skip to content

Commit

Permalink
Fixed horizontal cells alignment in several places
Browse files Browse the repository at this point in the history
   (height was used before)
  • Loading branch information
lanserge committed Mar 1, 2024
1 parent 40eb0ff commit 707125a
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 8 deletions.
4 changes: 2 additions & 2 deletions cumulus/src/plugins/chip/chip.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ def doChipFloorplan ( self ):
x = (coronaAb.getWidth () - self.conf.coreAb.getWidth ()) // 2
y = (coronaAb.getHeight() - self.conf.coreAb.getHeight()) // 2
trace( 550, '\tCore X, {} '.format(DbU.getValueString(x)) )
x = x - (x % self.conf.sliceHeight)
trace( 550, ' adjusted on {}, {}\n'.format( DbU.getValueString(self.conf.sliceHeight)
x = x - (x % self.conf.sliceStep)
trace( 550, ' adjusted on {}, {}\n'.format( DbU.getValueString(self.conf.sliceStep)
, DbU.getValueString(x)) )
y = y - (y % self.conf.sliceHeight)
self.conf.icore.setTransformation ( Transformation(x,y,Transformation.Orientation.ID) )
Expand Down
4 changes: 2 additions & 2 deletions cumulus/src/plugins/chip/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,8 @@ def setupICore ( self ):
trace( 550, '\tCORE ab:{}\n'.format(self.coreAb) )
coreX = (self.coronaAb.getWidth () - self.coreAb.getWidth ()) // 2
trace( 550, '\tCore X, {} '.format(DbU.getValueString(coreX)) )
coreX = coreX - (coreX % self.sliceHeight)
trace( 550, ' adjusted on {}, {}\n'.format( DbU.getValueString(self.sliceHeight)
coreX = coreX - (coreX % self.sliceStep)
trace( 550, ' adjusted on {}, {}\n'.format( DbU.getValueString(self.sliceStep)
, DbU.getValueString(coreX)) )
coreY = (self.coronaAb.getHeight() - self.coreAb.getHeight()) // 2
coreY = coreY - (coreY % self.sliceHeight)
Expand Down
25 changes: 21 additions & 4 deletions etesian/src/EtesianEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -481,10 +481,11 @@ namespace Etesian {
_placeArea = topAb.getIntersection( placeArea );
}

DbU::Unit sliceStep = getSliceStep();
DbU::Unit sliceHeight = getSliceHeight();
_placeArea = Box( DbU::toCeil ( placeArea.getXMin(), sliceHeight )
_placeArea = Box( DbU::toCeil ( placeArea.getXMin(), sliceStep )
, DbU::toCeil ( placeArea.getYMin(), sliceHeight )
, DbU::toFloor( placeArea.getXMax(), sliceHeight )
, DbU::toFloor( placeArea.getXMax(), sliceStep )
, DbU::toFloor( placeArea.getYMax(), sliceHeight )
);
size_t bottomSlice = (_placeArea.getYMin() - topAb.getYMin()) / sliceHeight;
Expand Down Expand Up @@ -1228,9 +1229,16 @@ namespace Etesian {
if (iid == _instsToIds.end() ) {
cerr << Error( "Unable to lookup instance <%s>.", instanceName.c_str() ) << endl;
} else {
if (instance->getPlacementStatus() == Instance::PlacementStatus::FIXED)
if (instance->getPlacementStatus() == Instance::PlacementStatus::FIXED) {
auto ab = instance->getAbutmentBox();
if ( ab.getXMin() % hpitch ) {
cerr << Error( "Instance <%s> fixed placed out of the hpitch.", instanceName.c_str() ) << endl;
}
if ( ab.getYMin() % vpitch ) {
cerr << Error( "Instance <%s> fixed placed out of the vpitch.", instanceName.c_str() ) << endl;
}
continue;

}
//uint32_t outputSide = getOutputSide( instance->getMasterCell() );
auto place = (*placement)[(*iid).second];
Transformation cellTrans = toTransformation( place.position
Expand All @@ -1245,6 +1253,15 @@ namespace Etesian {
// of all the intermediary instances.
instance->setTransformation( cellTrans );
instance->setPlacementStatus( Instance::PlacementStatus::PLACED );
{
auto ab = instance->getAbutmentBox();
if ( ab.getXMin() % hpitch ) {
cerr << Error( "Instance <%s> placed out of the hpitch.", instanceName.c_str() ) << endl;
}
if ( ab.getYMin() % vpitch ) {
cerr << Error( "Instance <%s> placed out of the vpitch.", instanceName.c_str() ) << endl;
}
}
}
}

Expand Down

0 comments on commit 707125a

Please sign in to comment.