In Cell, separate flattenNets() and createRoutingPadRings().
* New: In Hurricane, in Cell, no longer create rings of RoutingPads when flattening the nets. Put that functionnality into a separate method ::createRoutingPadRings(). This allow to perform the Net flattening in Etesian *without* the rings, which slow it down. Then the rings are created by Knik/Kite. This also solves the double ring creation when doing P&R of a complete chip (rings where created twice: in the core block for Etesian and at chip level for Kite). * Change: In Etesian, slight beautification of the printed informations. (psychorigid me)
This commit is contained in:
parent
fcb4acadad
commit
09d4e488ba
|
@ -451,7 +451,8 @@ namespace Etesian {
|
|||
DbU::Unit pitch = getPitch();
|
||||
|
||||
cmess1 << " - Building RoutingPads (transhierarchical) ..." << endl;
|
||||
getCell()->flattenNets( Cell::Flags::BuildRings|Cell::Flags::NoClockFlatten );
|
||||
//getCell()->flattenNets( Cell::Flags::BuildRings|Cell::Flags::NoClockFlatten );
|
||||
getCell()->flattenNets( Cell::Flags::NoClockFlatten );
|
||||
|
||||
// Coloquinte circuit description data-structures.
|
||||
size_t instancesNb = getCell()->getLeafInstanceOccurrences().getSize();
|
||||
|
@ -939,8 +940,8 @@ namespace Etesian {
|
|||
<< " RMST:" << setw(11) << coloquinte::gp::get_RSMT_wirelength( _circuit, _placementUB )
|
||||
<< endl;
|
||||
cparanoid << indent
|
||||
<< " Linear Disrupt.:" << setw(11) << coloquinte::gp::get_mean_linear_disruption ( _circuit, _placementLB, _placementUB )
|
||||
<< " Quad Disrupt.:" << setw(11) << coloquinte::gp::get_mean_quadratic_disruption( _circuit, _placementLB, _placementUB )
|
||||
<< " L-Dsrpt:" << setw(8) << coloquinte::gp::get_mean_linear_disruption ( _circuit, _placementLB, _placementUB )
|
||||
<< " Q-Dsrpt:" << setw(8) << coloquinte::gp::get_mean_quadratic_disruption( _circuit, _placementLB, _placementUB )
|
||||
<< endl;
|
||||
}
|
||||
|
||||
|
|
|
@ -295,6 +295,7 @@ DeepNet* Cell::getDeepNet ( Path path, const Net* leafNet ) const
|
|||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
void Cell::flattenNets(unsigned int flags)
|
||||
// ***************************************
|
||||
{
|
||||
|
@ -307,23 +308,23 @@ void Cell::flattenNets(unsigned int flags)
|
|||
vector<HyperNet> hyperNets;
|
||||
vector<HyperNet> topHyperNets;
|
||||
|
||||
forEach ( Occurrence, ioccurrence, getHyperNetRootNetOccurrences() ) {
|
||||
Net* net = static_cast<Net*>((*ioccurrence).getEntity());
|
||||
for ( Occurrence occurrence : getHyperNetRootNetOccurrences() ) {
|
||||
Net* net = static_cast<Net*>(occurrence.getEntity());
|
||||
|
||||
if (net->isClock() and (flags & Flags::NoClockFlatten)) continue;
|
||||
|
||||
HyperNet hyperNet ( *ioccurrence );
|
||||
if ( not (*ioccurrence).getPath().isEmpty() ) {
|
||||
Net* duplicate = getNet( (*ioccurrence).getName() );
|
||||
HyperNet hyperNet ( occurrence );
|
||||
if ( not occurrence.getPath().isEmpty() ) {
|
||||
Net* duplicate = getNet( occurrence.getName() );
|
||||
if (not duplicate) {
|
||||
hyperNets.push_back( HyperNet(*ioccurrence) );
|
||||
hyperNets.push_back( HyperNet(occurrence) );
|
||||
} else {
|
||||
trace << "Found " << duplicate << " in " << duplicate->getCell() << endl;
|
||||
}
|
||||
} else {
|
||||
bool hasRoutingPads = false;
|
||||
forEach ( Component*, icomponent, net->getComponents() ) {
|
||||
RoutingPad* rp = dynamic_cast<RoutingPad*>( *icomponent );
|
||||
for ( Component* component : net->getComponents() ) {
|
||||
RoutingPad* rp = dynamic_cast<RoutingPad*>( component );
|
||||
if (rp) {
|
||||
// At least one RoutingPad is present: assumes that the net is already
|
||||
// flattened (completly).
|
||||
|
@ -334,7 +335,7 @@ void Cell::flattenNets(unsigned int flags)
|
|||
}
|
||||
if (hasRoutingPads) continue;
|
||||
|
||||
topHyperNets.push_back( HyperNet(*ioccurrence) );
|
||||
topHyperNets.push_back( HyperNet(occurrence) );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -345,8 +346,36 @@ void Cell::flattenNets(unsigned int flags)
|
|||
|
||||
for ( size_t i=0 ; i<topHyperNets.size() ; ++i ) {
|
||||
Net* net = static_cast<Net*>(topHyperNets[i].getNetOccurrence().getEntity());
|
||||
|
||||
for ( Occurrence plugOccurrence : topHyperNets[i].getLeafPlugOccurrences() ) {
|
||||
RoutingPad* rp = RoutingPad::create( net, plugOccurrence, RoutingPad::BiggestArea );
|
||||
rp->materialize();
|
||||
|
||||
if (flags & Flags::WarnOnUnplacedInstances)
|
||||
rp->isPlacedOccurrence( RoutingPad::ShowWarning );
|
||||
}
|
||||
|
||||
for ( Component* component : net->getComponents() ) {
|
||||
Pin* pin = dynamic_cast<Pin*>( component );
|
||||
if (pin) {
|
||||
RoutingPad::create( pin );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
UpdateSession::close();
|
||||
}
|
||||
|
||||
|
||||
void Cell::createRoutingPadRings(unsigned int flags)
|
||||
// *************************************************
|
||||
{
|
||||
flags &= Flags::MaskRings;
|
||||
|
||||
UpdateSession::open();
|
||||
|
||||
for ( Net* net : getNets() ) {
|
||||
RoutingPad* previousRp = NULL;
|
||||
RoutingPad* currentRp = NULL;
|
||||
bool buildRing = false;
|
||||
|
||||
if (net->isGlobal()) {
|
||||
|
@ -356,8 +385,10 @@ void Cell::flattenNets(unsigned int flags)
|
|||
buildRing = flags & Cell::Flags::BuildRings;
|
||||
}
|
||||
|
||||
forEach ( Component*, icomponent, net->getComponents() ) {
|
||||
Plug* primaryPlug = dynamic_cast<Plug*>( *icomponent );
|
||||
if (not buildRing) continue;
|
||||
|
||||
for ( Component* component : net->getComponents() ) {
|
||||
Plug* primaryPlug = dynamic_cast<Plug*>( component );
|
||||
if (primaryPlug) {
|
||||
if (not primaryPlug->getBodyHook()->getSlaveHooks().isEmpty()) {
|
||||
cerr << "[ERROR] " << primaryPlug << "\n"
|
||||
|
@ -368,39 +399,13 @@ void Cell::flattenNets(unsigned int flags)
|
|||
}
|
||||
}
|
||||
|
||||
forEach ( Occurrence, iplugOccurrence, topHyperNets[i].getLeafPlugOccurrences() ) {
|
||||
currentRp = RoutingPad::create( net, *iplugOccurrence, RoutingPad::BiggestArea );
|
||||
currentRp->materialize();
|
||||
|
||||
if (flags & Flags::WarnOnUnplacedInstances)
|
||||
currentRp->isPlacedOccurrence( RoutingPad::ShowWarning );
|
||||
|
||||
if (buildRing) {
|
||||
if (previousRp) {
|
||||
currentRp->getBodyHook()->attach( previousRp->getBodyHook() );
|
||||
}
|
||||
Plug* plug = static_cast<Plug*>( (*iplugOccurrence).getEntity() );
|
||||
if ( (*iplugOccurrence).getPath().isEmpty() ) {
|
||||
plug->getBodyHook()->attach( currentRp->getBodyHook() );
|
||||
plug->getBodyHook()->detach();
|
||||
}
|
||||
previousRp = currentRp;
|
||||
}
|
||||
}
|
||||
|
||||
forEach ( Component*, icomponent, net->getComponents() ) {
|
||||
Pin* pin = dynamic_cast<Pin*>( *icomponent );
|
||||
if (pin) {
|
||||
currentRp = RoutingPad::create( pin );
|
||||
if (buildRing) {
|
||||
if (previousRp) {
|
||||
currentRp->getBodyHook()->attach( previousRp->getBodyHook() );
|
||||
}
|
||||
pin->getBodyHook()->attach( currentRp->getBodyHook() );
|
||||
pin->getBodyHook()->detach();
|
||||
}
|
||||
previousRp = currentRp;
|
||||
for ( RoutingPad* rp : net->getRoutingPads() ) {
|
||||
if ( previousRp
|
||||
and ( not rp ->getBodyHook()->isAttached()
|
||||
or not previousRp->getBodyHook()->isAttached()) ) {
|
||||
rp->getBodyHook()->attach( previousRp->getBodyHook() );
|
||||
}
|
||||
previousRp = rp;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -83,7 +83,6 @@ namespace Hurricane {
|
|||
HyperNet hyperNet ( _netOccurrence );
|
||||
RoutingPad* previousRp = NULL;
|
||||
RoutingPad* currentRp = NULL;
|
||||
bool buildRing = false;
|
||||
|
||||
forEach ( Occurrence, ioccurrence, hyperNet.getLeafPlugOccurrences() ) {
|
||||
nbRoutingPads++;
|
||||
|
@ -93,24 +92,10 @@ namespace Hurricane {
|
|||
currentRp->isPlacedOccurrence ( RoutingPad::ShowWarning );
|
||||
|
||||
if (nbRoutingPads == 1) {
|
||||
Net* net = currentRp->getNet();
|
||||
|
||||
if (net->isGlobal()) {
|
||||
if ( (flags & Cell::Flags::BuildClockRings ) and net->isClock () ) buildRing = true;
|
||||
else if ( (flags & Cell::Flags::BuildSupplyRings) and net->isSupply() ) buildRing = true;
|
||||
} else {
|
||||
buildRing = flags & Cell::Flags::BuildRings;
|
||||
}
|
||||
|
||||
//Net* net =
|
||||
currentRp->getNet();
|
||||
//cerr << "_createRoutingPads on " << net->getName() << " buildRing:" << buildRing << endl;
|
||||
}
|
||||
|
||||
if (buildRing) {
|
||||
if (previousRp) {
|
||||
currentRp->getBodyHook()->attach( previousRp->getBodyHook() );
|
||||
}
|
||||
previousRp = currentRp;
|
||||
}
|
||||
}
|
||||
|
||||
return nbRoutingPads;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// ****************************************************************************************************
|
||||
// File: ./Net.cpp
|
||||
// Authors: R. Escassut
|
||||
// Copyright (c) BULL S.A. 2000-2009, All Rights Reserved
|
||||
// Copyright (c) BULL S.A. 2000-2015, All Rights Reserved
|
||||
//
|
||||
// This file is part of Hurricane.
|
||||
//
|
||||
|
@ -1012,5 +1012,5 @@ string Net_SlavePlugs::Locator::_getString() const
|
|||
|
||||
|
||||
// ****************************************************************************************************
|
||||
// Copyright (c) BULL S.A. 2000-2009, All Rights Reserved
|
||||
// Copyright (c) BULL S.A. 2000-2015, All Rights Reserved
|
||||
// ****************************************************************************************************
|
||||
|
|
|
@ -80,6 +80,7 @@ class Cell : public Entity {
|
|||
, BuildSupplyRings = 0x00000004
|
||||
, NoClockFlatten = 0x00000008
|
||||
, WarnOnUnplacedInstances = 0x00000010
|
||||
, MaskRings = BuildRings|BuildClockRings|BuildSupplyRings
|
||||
// Flags set for Observers.
|
||||
, CellAboutToChange = 0x00000100
|
||||
, CellChanged = 0x00000200
|
||||
|
@ -393,6 +394,7 @@ class Cell : public Entity {
|
|||
public: void setFlattenLeaf(bool isFlattenLeaf) {_flags.set(Flags::FlattenLeaf,isFlattenLeaf);};
|
||||
public: void setPad(bool isPad) {_flags.set(Flags::Pad,isPad);};
|
||||
public: void flattenNets(unsigned int flags=Flags::BuildRings);
|
||||
public: void createRoutingPadRings(unsigned int flags=Flags::BuildRings);
|
||||
public: void setFlags(unsigned int flags) { _flags |= flags; }
|
||||
public: void resetFlags(unsigned int flags) { _flags &= ~flags; }
|
||||
public: void materialize();
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// ****************************************************************************************************
|
||||
// File: ./hurricane/Rubber.h
|
||||
// Authors: R. Escassut
|
||||
// Copyright (c) BULL S.A. 2000-2009, All Rights Reserved
|
||||
// Copyright (c) BULL S.A. 2000-2015, All Rights Reserved
|
||||
//
|
||||
// This file is part of Hurricane.
|
||||
//
|
||||
|
@ -17,8 +17,8 @@
|
|||
// not, see <http://www.gnu.org/licenses/>.
|
||||
// ****************************************************************************************************
|
||||
|
||||
#ifndef HURRICANE_RUBBER
|
||||
#define HURRICANE_RUBBER
|
||||
#ifndef HURRICANE_RUBBER_H
|
||||
#define HURRICANE_RUBBER_H
|
||||
|
||||
#include "hurricane/Go.h"
|
||||
#include "hurricane/Hooks.h"
|
||||
|
@ -29,7 +29,6 @@ namespace Hurricane {
|
|||
class Net;
|
||||
|
||||
|
||||
|
||||
// ****************************************************************************************************
|
||||
// Rubber declaration
|
||||
// ****************************************************************************************************
|
||||
|
@ -112,9 +111,9 @@ class Rubber : public Go {
|
|||
INSPECTOR_P_SUPPORT(Hurricane::Rubber);
|
||||
|
||||
|
||||
#endif // HURRICANE_RUBBER
|
||||
#endif // HURRICANE_RUBBER_H
|
||||
|
||||
|
||||
// ****************************************************************************************************
|
||||
// Copyright (c) BULL S.A. 2000-2009, All Rights Reserved
|
||||
// Copyright (c) BULL S.A. 2000-2015, All Rights Reserved
|
||||
// ****************************************************************************************************
|
||||
|
|
|
@ -320,6 +320,7 @@ namespace Kite {
|
|||
flags |= (mode & KtBuildGlobalRouting) ? Cell::Flags::BuildRings : 0;
|
||||
//if (not cell->isFlattenedNets()) cell->flattenNets( flags );
|
||||
cell->flattenNets( flags );
|
||||
cell->createRoutingPadRings( Cell::Flags::BuildRings );
|
||||
|
||||
// Test signals from <snx2013>.
|
||||
//DebugSession::addToTrace( getCell(), "core.snx_inst.a2_x2_8_sig" );
|
||||
|
|
Loading…
Reference in New Issue