From 06ea3d6e0968f424442b6c3055c3870805994640 Mon Sep 17 00:00:00 2001 From: Gabriel Gouvine Date: Tue, 20 Jun 2023 18:30:30 +0200 Subject: [PATCH] Export polarity of multi-row cells --- etesian/src/EtesianEngine.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/etesian/src/EtesianEngine.cpp b/etesian/src/EtesianEngine.cpp index b20bb664..491ccf47 100644 --- a/etesian/src/EtesianEngine.cpp +++ b/etesian/src/EtesianEngine.cpp @@ -54,6 +54,7 @@ namespace { using namespace Hurricane; using Etesian::EtesianEngine; using coloquinte::CellOrientation; + using coloquinte::CellRowPolarity; Instance* extractInstance ( const RoutingPad* rp ) { @@ -804,7 +805,7 @@ namespace Etesian { vector cellHeight( instancesNb+1 ); vector cellIsFixed( instancesNb+1 ); vector cellIsObstruction( instancesNb+1 ); - vector cellRowPolarity( instancesNb+1, coloquinte::CellRowPolarity::SAME ); + vector cellRowPolarity( instancesNb+1, CellRowPolarity::SAME ); cmess1 << " - Building RoutingPads (transhierarchical)" << endl; //getCell()->flattenNets( Cell::Flags::BuildRings|Cell::Flags::NoClockFlatten ); @@ -888,6 +889,11 @@ namespace Etesian { cellWidth[instanceId] = xsize; cellHeight[instanceId] = ysize; + int nbRows = ysize / rowHeight; + if (nbRows % 2 != 1) { + cellRowPolarity[instanceId] = CellRowPolarity::NW; + } + if ( not instance->isFixed() and instance->isTerminalNetlist() ) { cellIsFixed[instanceId] = false; cellIsObstruction[instanceId] = false; @@ -1027,7 +1033,7 @@ namespace Etesian { , (int)(topAb.getYMin() / vpitch) , (int)(topAb.getYMax() / vpitch) ); - _circuit->setupRows(*_surface, (getSliceHeight() + vpitch - 1) / vpitch); + _circuit->setupRows(*_surface, rowHeight); _circuit->check(); _placementLB = new coloquinte::PlacementSolution (); _placementUB = new coloquinte::PlacementSolution ( *_placementLB );