Big bug in HyperNet_ComponentOccurrences::Locator::progress().
* Bug: In HyperNet_ComponentOccurrences::Locator::progress(), (Collection locator), the _netOccurrenceLocator (which progess along the various Net occurrences of the HyperNet) was not in synch with the _componentOccurrence locator of the current net. It was pointing to the *next* net occurrence. The result was the generation of a path for the net commponents that was incorrect (it was the path of the *next* net occurrence), and making Occurrence constructor throw an exception. * Change: In Cell::flattenNets(), DeepNet::_createRoutingPads(), Occurrence::Occurrence() and UpdateSession, added even more trace informations.
This commit is contained in:
parent
cfcd4b7115
commit
9230d52b64
|
@ -818,7 +818,7 @@ void Cell::flattenNets (uint64_t flags )
|
|||
void Cell::flattenNets ( const Instance* instance, uint64_t flags )
|
||||
// ****************************************************************
|
||||
{
|
||||
cdebug_log(18,0) << "Cell::flattenNets() flags:0x" << hex << flags << endl;
|
||||
cdebug_log(18,1) << "Cell::flattenNets() flags:0x" << hex << flags << endl;
|
||||
|
||||
UpdateSession::open();
|
||||
|
||||
|
@ -868,8 +868,12 @@ void Cell::flattenNets ( const Instance* instance, uint64_t flags )
|
|||
|
||||
for ( size_t i=0 ; i<hyperNets.size() ; ++i ) {
|
||||
DeepNet* deepNet = DeepNet::create( hyperNets[i] );
|
||||
cdebug_log(18,1) << "Flattening hyper net: " << deepNet << endl;
|
||||
if (deepNet) deepNet->_createRoutingPads( flags );
|
||||
cdebug_log(18,0) << "Done: " << deepNet << endl;
|
||||
cdebug_tabw(18,-1);
|
||||
}
|
||||
cdebug_log(18,0) << "Non-root HyperNet (DeepNet) done" << endl;
|
||||
|
||||
unsigned int rpFlags = (flags & Flags::StayOnPlugs) ? 0 : RoutingPad::BiggestArea;
|
||||
|
||||
|
@ -903,7 +907,9 @@ void Cell::flattenNets ( const Instance* instance, uint64_t flags )
|
|||
DebugSession::close();
|
||||
}
|
||||
|
||||
cdebug_log(18,0) << "Before closing UpdateSession" << endl;
|
||||
UpdateSession::close();
|
||||
cdebug_log(18,-1) << "Cell::flattenNets() Done" << endl;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -85,6 +85,8 @@ namespace Hurricane {
|
|||
|
||||
size_t DeepNet::_createRoutingPads ( unsigned int flags )
|
||||
{
|
||||
cdebug_log(18,1) << "DeepNet::_createRoutingPads(): " << this << endl;
|
||||
|
||||
size_t nbRoutingPads = 0;
|
||||
HyperNet hyperNet ( _netOccurrence );
|
||||
RoutingPad* currentRp = NULL;
|
||||
|
@ -92,24 +94,33 @@ namespace Hurricane {
|
|||
//unsigned int rpFlags = (flags & Cell::Flags::StayOnPlugs) ? 0 : RoutingPad::BiggestArea;
|
||||
|
||||
for ( Occurrence occurrence : hyperNet.getComponentOccurrences() ) {
|
||||
RoutingPad* rp = dynamic_cast<RoutingPad*>(occurrence.getEntity());
|
||||
if ( rp and (rp->getCell() == getCell()) ) { createRp = false; break; }
|
||||
if ( dynamic_cast<Segment*>(occurrence.getEntity()) ) { createRp = false; break; }
|
||||
cdebug_log(18,0) << "| occurrence=" << occurrence << endl;
|
||||
RoutingPad* rp = dynamic_cast<RoutingPad*>( occurrence.getEntity() );
|
||||
cdebug_log(18,0) << "| rp=" << rp << endl;
|
||||
if (rp and (rp->getCell() == getCell())) { createRp = false; break; }
|
||||
if (dynamic_cast<Segment*>(occurrence.getEntity())) { createRp = false; break; }
|
||||
cdebug_log(18,0) << "| dynamic_cast OK createRp=" << createRp << endl;
|
||||
}
|
||||
if (not createRp) {
|
||||
cdebug_log(18,0) << "DeepNet::_createRoutingPads(): No RoutingPad created" << endl;
|
||||
cdebug_tabw(18,-1);
|
||||
return 0;
|
||||
}
|
||||
if (not createRp) return 0;
|
||||
|
||||
for ( Occurrence occurrence : hyperNet.getTerminalNetlistPlugOccurrences() ) {
|
||||
nbRoutingPads++;
|
||||
|
||||
currentRp = RoutingPad::create( this, occurrence, RoutingPad::BiggestArea );
|
||||
if (flags & Cell::Flags::WarnOnUnplacedInstances)
|
||||
currentRp->isPlacedOccurrence ( RoutingPad::ShowWarning );
|
||||
currentRp->isPlacedOccurrence( RoutingPad::ShowWarning );
|
||||
|
||||
if (nbRoutingPads == 1) {
|
||||
currentRp->getNet();
|
||||
}
|
||||
}
|
||||
|
||||
cdebug_log(18,0) << "DeepNet::_createRoutingPads(): done on " << this << endl;
|
||||
cdebug_tabw(18,-1);
|
||||
return nbRoutingPads;
|
||||
}
|
||||
|
||||
|
|
|
@ -1224,23 +1224,32 @@ void HyperNet_ComponentOccurrences::Locator::progress()
|
|||
if (_componentLocator.isValid()) {
|
||||
Path path = _netOccurrenceLocator.getElement().getPath();
|
||||
Component* component = _componentLocator.getElement();
|
||||
cdebug_log(18,0) << "| progress component: " << component << endl;
|
||||
//_componentOccurrence = Occurrence( component, path.getHeadPath() );
|
||||
_componentOccurrence = Occurrence( component, path );
|
||||
cdebug_log(18,0) << "| component occ OK" << endl;
|
||||
_componentLocator.progress();
|
||||
|
||||
_componentOccurrence = Occurrence( component, path.getHeadPath() );
|
||||
} else {
|
||||
_netOccurrenceLocator.progress();
|
||||
if (_netOccurrenceLocator.isValid()) {
|
||||
Occurrence netOccurrence = _netOccurrenceLocator.getElement();
|
||||
_netOccurrenceLocator.progress();
|
||||
cdebug_log(18,0) << "| progress net occ: " << _netOccurrenceLocator.getElement() << endl;
|
||||
|
||||
Net* net = static_cast<Net*>( netOccurrence.getEntity() );
|
||||
//if (_withTerminalNetlistCells or not net->getCell()->isTerminal()) {
|
||||
if (not net->getCell()->isTerminalNetlist()) {
|
||||
cdebug_log(18,0) << "| Non Terminal netlist: " << net->getCell() << endl;
|
||||
cdebug_log(18,0) << "| set component loc on: " << net << endl;
|
||||
_componentLocator = net->getComponents().getLocator();
|
||||
} else {
|
||||
cdebug_log(18,0) << "| Terminal netlist: " << net->getCell() << endl;
|
||||
}
|
||||
} else
|
||||
break;
|
||||
}
|
||||
}
|
||||
cdebug_log(18,0) << "| progress done: " << endl;
|
||||
}
|
||||
|
||||
string HyperNet_ComponentOccurrences::Locator::_getString() const
|
||||
|
|
|
@ -51,9 +51,11 @@ Occurrence::Occurrence(const Entity* entity, const Path& path)
|
|||
if (_sharedPath) {
|
||||
if (_entity->getCell() != _sharedPath->getMasterCell())
|
||||
throw Error( "Occurrence::Occurrence(): Entity incompatible with the path.\n"
|
||||
" * Entity master cell: %s\n"
|
||||
" * Path master cell: %s"
|
||||
" * Entity %s, master cell %s\n"
|
||||
" * Path %s, master cell %s"
|
||||
, getString(entity).c_str()
|
||||
, getString(entity->getCell()).c_str()
|
||||
, getString(path).c_str()
|
||||
, getString(_sharedPath->getMasterCell()).c_str()
|
||||
);
|
||||
}
|
||||
|
|
|
@ -190,7 +190,7 @@ void Go::invalidate(bool propagateFlag)
|
|||
void UpdateSession::open()
|
||||
// ***********************
|
||||
{
|
||||
cdebug_log(18,1) << "UpdateSession::open()" << endl;
|
||||
cdebug_log(18,1) << "UpdateSession::open() [stack=" << (UPDATOR_STACK->size()+1) << "]" << endl;
|
||||
UpdateSession::_create();
|
||||
}
|
||||
|
||||
|
@ -198,7 +198,7 @@ void UpdateSession::close()
|
|||
// ************************
|
||||
{
|
||||
cdebug_tabw(18,-1);
|
||||
cdebug_log(18,1) << "UpdateSession::close() - Start materialization." << endl;
|
||||
cdebug_log(18,1) << "UpdateSession::close() [stack:" << UPDATOR_STACK->size() << "] Start materialization." << endl;
|
||||
|
||||
if (!UPDATOR_STACK || UPDATOR_STACK->empty())
|
||||
throw Error("Can't end update : empty update session stack");
|
||||
|
@ -206,7 +206,7 @@ void UpdateSession::close()
|
|||
UPDATOR_STACK->top()->_destroy();
|
||||
|
||||
cdebug_tabw(18,-1);
|
||||
cdebug_log(18,0) << "UpdateSession::close() - Materialization completed." << endl;
|
||||
cdebug_log(18,0) << "UpdateSession::close() [stack:" << UPDATOR_STACK->size() << "] Materialization completed." << endl;
|
||||
}
|
||||
|
||||
void UpdateSession::reset()
|
||||
|
|
|
@ -74,6 +74,7 @@ namespace Hurricane {
|
|||
|
||||
bool ExceptionWidget::catchAllWrapper ( std::function< void() > method )
|
||||
{
|
||||
cdebug_log(18,0) << "ExceptionWidget::catchAllWrapper()" << endl;
|
||||
bool failure = true;
|
||||
try {
|
||||
method();
|
||||
|
|
Loading…
Reference in New Issue