* nero/src/ :
- Bug : the global qualification of a net was independent of the RBox choice. The bug occurs for designs about the size of the local/ global choice : when the routing is still local but some nets have a size that made them global. In that cases terminals are extented (for global routing) outside of the routing box : in z=3 where z <= 2, which leads to immediate memory corruption.
This commit is contained in:
parent
30ad528b25
commit
d6561da230
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//
|
//
|
||||||
// $Id: AAstar.cpp,v 1.8 2002/11/17 16:40:13 jpc Exp $
|
// $Id: AAstar.cpp,v 1.9 2004/12/14 19:02:07 jpc Exp $
|
||||||
//
|
//
|
||||||
// /----------------------------------------------------------------\
|
// /----------------------------------------------------------------\
|
||||||
// | |
|
// | |
|
||||||
|
@ -554,7 +554,7 @@ void CAStar::load (CNet *pNet, int delta, int expand)
|
||||||
_skip = false;
|
_skip = false;
|
||||||
if (net->size < 2) { _skip = true; return; }
|
if (net->size < 2) { _skip = true; return; }
|
||||||
|
|
||||||
_drgrid->pri->load (*pNet, _netsched->rglobal && pNet->global(), expand);
|
_drgrid->pri->load (*pNet, pNet->global(_netsched->rglobal), expand);
|
||||||
_drgrid->pri->delta = delta;
|
_drgrid->pri->delta = delta;
|
||||||
|
|
||||||
net->unroute ();
|
net->unroute ();
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//
|
//
|
||||||
// $Id: ASimple.cpp,v 1.2 2002/10/13 14:22:47 jpc Exp $
|
// $Id: ASimple.cpp,v 1.3 2004/12/14 19:02:07 jpc Exp $
|
||||||
//
|
//
|
||||||
// /----------------------------------------------------------------\
|
// /----------------------------------------------------------------\
|
||||||
// | |
|
// | |
|
||||||
|
@ -41,11 +41,11 @@ void CASimple::CQueue::load (MNet *nets, bool rglobal, bool global)
|
||||||
endNet = nets->end();
|
endNet = nets->end();
|
||||||
for (itNet = nets->begin(); itNet != endNet; itNet++) {
|
for (itNet = nets->begin(); itNet != endNet; itNet++) {
|
||||||
// Global routing stage.
|
// Global routing stage.
|
||||||
if ( rglobal && global && (itNet->second->global()) )
|
if ( global && (itNet->second->global(rglobal)) )
|
||||||
push (itNet->second);
|
push (itNet->second);
|
||||||
|
|
||||||
// Local routing stage.
|
// Local routing stage.
|
||||||
if ( !rglobal || ( !global && !(itNet->second->global()) ) )
|
if ( !rglobal || ( !global && !(itNet->second->global(true)) ) )
|
||||||
push (itNet->second);
|
push (itNet->second);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -113,7 +113,7 @@ void CASimple::global (void)
|
||||||
// Locking global signals.
|
// Locking global signals.
|
||||||
endNet = nets->end();
|
endNet = nets->end();
|
||||||
for (itNet = nets->begin(); itNet != endNet; itNet++) {
|
for (itNet = nets->begin(); itNet != endNet; itNet++) {
|
||||||
if ( itNet->second->global() ) itNet->second->locktree();
|
if ( itNet->second->global(rglobal) ) itNet->second->locktree();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//
|
//
|
||||||
// $Id: MDefs.h,v 1.6 2004/07/23 08:50:05 jpc Exp $
|
// $Id: MDefs.h,v 1.7 2004/12/14 19:02:07 jpc Exp $
|
||||||
//
|
//
|
||||||
// /-----------------------------------------------------------------\
|
// /-----------------------------------------------------------------\
|
||||||
// | |
|
// | |
|
||||||
|
@ -540,14 +540,32 @@
|
||||||
class merge_term : public except_done {
|
class merge_term : public except_done {
|
||||||
|
|
||||||
// Attributes.
|
// Attributes.
|
||||||
public: int id;
|
string message;
|
||||||
|
public: int id;
|
||||||
|
|
||||||
// Constructor.
|
// Constructor.
|
||||||
public: merge_term (int mergeid) { id = mergeid; }
|
public: merge_term ( int ident
|
||||||
|
, string& tn1
|
||||||
|
, string& tn2
|
||||||
|
, string& nn
|
||||||
|
, long x
|
||||||
|
, long y
|
||||||
|
, long z
|
||||||
|
)
|
||||||
|
: id(ident)
|
||||||
|
{
|
||||||
|
ostringstream m;
|
||||||
|
m << "Terminals \"" << tn1 << "\" and \"" << tn2 << "\" of net \"" << nn
|
||||||
|
<< "\" overlaps at " << "(" << x << "," << y << "," << z << ")";
|
||||||
|
message = m.str();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Destructor.
|
||||||
|
public: ~merge_term (void) throw () { };
|
||||||
|
|
||||||
// Overridables.
|
// Overridables.
|
||||||
public: const char* what () const throw () {
|
public: const char* what () const throw () {
|
||||||
return ((char*)"Terminal must be merged.");
|
return (message.c_str());
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -667,13 +685,13 @@
|
||||||
public: bool operator< (CNet &other);
|
public: bool operator< (CNet &other);
|
||||||
|
|
||||||
// Accessor.
|
// Accessor.
|
||||||
public: bool global (void) { return (bb.hp >= D::GLOBAL_HP); }
|
public: bool global (bool rglobal);
|
||||||
|
|
||||||
// Modifiers.
|
// Modifiers.
|
||||||
public: void newaccess (string termName, int x, int y, int z);
|
public: void newaccess (string termName, int x, int y, int z);
|
||||||
public: void newaccess (string termName, CRect &rect, int z);
|
public: void newaccess (string termName, CRect &rect, int z);
|
||||||
public: void order (void);
|
public: void order (void);
|
||||||
public: void lockalone (void);
|
public: void lockalone (bool rglobal);
|
||||||
public: void locktree (void);
|
public: void locktree (void);
|
||||||
public: void unroute (void);
|
public: void unroute (void);
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//
|
//
|
||||||
// $Id: MNet.cpp,v 1.6 2002/11/04 14:43:08 jpc Exp $
|
// $Id: MNet.cpp,v 1.7 2004/12/14 19:02:07 jpc Exp $
|
||||||
//
|
//
|
||||||
// /----------------------------------------------------------------\
|
// /----------------------------------------------------------------\
|
||||||
// | |
|
// | |
|
||||||
|
@ -146,7 +146,6 @@ CNode *CTerm::newaccess (int x, int y, int z, int ident, CNet *net)
|
||||||
|
|
||||||
CNode *pNode;
|
CNode *pNode;
|
||||||
|
|
||||||
|
|
||||||
coord = net->_drgrid->origin;
|
coord = net->_drgrid->origin;
|
||||||
coord.set (x, y, z);
|
coord.set (x, y, z);
|
||||||
|
|
||||||
|
@ -171,7 +170,14 @@ CNode *CTerm::newaccess (int x, int y, int z, int ident, CNet *net)
|
||||||
|
|
||||||
// Check if the node belongs to another terminal of this net.
|
// Check if the node belongs to another terminal of this net.
|
||||||
// If so, send a merging exception to CNet::newaccess ().
|
// If so, send a merging exception to CNet::newaccess ().
|
||||||
if (pNode->getid () != ident) throw merge_term ( pNode->getid () );
|
if (pNode->getid () != ident) throw merge_term ( pNode->getid()
|
||||||
|
, pNode->data.owner->terms[pNode->getid()]->name
|
||||||
|
, pNode->data.owner->terms[ident]->name
|
||||||
|
, net->name
|
||||||
|
, coord.x()
|
||||||
|
, coord.y()
|
||||||
|
, coord.z()
|
||||||
|
);
|
||||||
|
|
||||||
return (NULL);
|
return (NULL);
|
||||||
}
|
}
|
||||||
|
@ -246,7 +252,6 @@ void CTerm::lockalone (bool global)
|
||||||
int z, i;
|
int z, i;
|
||||||
bool adjust;
|
bool adjust;
|
||||||
|
|
||||||
|
|
||||||
if (nodes.size() != 1) return;
|
if (nodes.size() != 1) return;
|
||||||
|
|
||||||
coord = nodes.back ();
|
coord = nodes.back ();
|
||||||
|
@ -255,14 +260,14 @@ void CTerm::lockalone (bool global)
|
||||||
if ( (coord.z() > 0) && !global ) return;
|
if ( (coord.z() > 0) && !global ) return;
|
||||||
if ( coord.onAB()) return;
|
if ( coord.onAB()) return;
|
||||||
|
|
||||||
//cerr << "+ locking lone terminal : " << coord.node().data.owner->name
|
cerr << "+ locking lone terminal : " << coord.node().data.owner->name
|
||||||
// << " at " << coord
|
<< " at " << coord
|
||||||
// << endl;
|
<< endl;
|
||||||
|
|
||||||
// All terminal case, eat up z=1 (ALU2) if not already took.
|
// All terminal case, eat up z=1 (ALU2) if not already took.
|
||||||
if (coord.z() == 0) {
|
if (coord.z() == 0) {
|
||||||
// Go to z=1 (ALU2).
|
// Go to z=1 (ALU2).
|
||||||
//cerr << "+ locking z=1 " << coord << endl;
|
cerr << "+ locking z=1 " << coord << endl;
|
||||||
newaccess ( coord.x()
|
newaccess ( coord.x()
|
||||||
, coord.y()
|
, coord.y()
|
||||||
, 1
|
, 1
|
||||||
|
@ -278,7 +283,7 @@ void CTerm::lockalone (bool global)
|
||||||
|
|
||||||
if (coord.z() < 2) {
|
if (coord.z() < 2) {
|
||||||
// Go to z=2 (ALU3).
|
// Go to z=2 (ALU3).
|
||||||
//cerr << "+ locking z=2 " << coord2 << endl;
|
cerr << "+ locking z=2 " << coord2 << endl;
|
||||||
newaccess ( coord2.x()
|
newaccess ( coord2.x()
|
||||||
, coord2.y()
|
, coord2.y()
|
||||||
, 2
|
, 2
|
||||||
|
@ -317,7 +322,7 @@ void CTerm::lockalone (bool global)
|
||||||
|
|
||||||
if (adjust) {
|
if (adjust) {
|
||||||
// Adjust to the double grid pitch to z=2 (ALU3).
|
// Adjust to the double grid pitch to z=2 (ALU3).
|
||||||
//cerr << "+ locking z=2 (ADJUST) " << coord2 << endl;
|
cerr << "+ locking z=2 (ADJUST) " << coord2 << endl;
|
||||||
newaccess ( coord2.x()
|
newaccess ( coord2.x()
|
||||||
, coord2.y()
|
, coord2.y()
|
||||||
, 2
|
, 2
|
||||||
|
@ -330,7 +335,7 @@ void CTerm::lockalone (bool global)
|
||||||
|
|
||||||
if (coord.z() < 4) {
|
if (coord.z() < 4) {
|
||||||
// Go to z=3 (ALU3).
|
// Go to z=3 (ALU3).
|
||||||
//cerr << "+ locking z=3 " << coord2 << endl;
|
cerr << "+ locking z=3 " << coord2 << endl;
|
||||||
newaccess ( coord2.x()
|
newaccess ( coord2.x()
|
||||||
, coord2.y()
|
, coord2.y()
|
||||||
, 3
|
, 3
|
||||||
|
@ -425,6 +430,17 @@ bool CNet::operator< (CNet &other)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// -------------------------------------------------------------------
|
||||||
|
// Method : "CNet::global()".
|
||||||
|
|
||||||
|
bool CNet::global (bool rglobal)
|
||||||
|
{
|
||||||
|
return ((bb.hp >= D::GLOBAL_HP) && rglobal);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// -------------------------------------------------------------------
|
// -------------------------------------------------------------------
|
||||||
// Method : "CNet::newaccess()".
|
// Method : "CNet::newaccess()".
|
||||||
|
|
||||||
|
@ -504,12 +520,12 @@ void CNet::newaccess (string termName, CRect &rect, int z)
|
||||||
// -------------------------------------------------------------------
|
// -------------------------------------------------------------------
|
||||||
// Method : "CNet::lockalone()".
|
// Method : "CNet::lockalone()".
|
||||||
|
|
||||||
void CNet::lockalone (void)
|
void CNet::lockalone (bool rglobal)
|
||||||
{
|
{
|
||||||
int id;
|
int id;
|
||||||
|
|
||||||
|
|
||||||
for (id = 0; id < size; id++) terms[id]->lockalone (global());
|
for (id = 0; id < size; id++) terms[id]->lockalone (global(rglobal));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//
|
//
|
||||||
// $Id: RMBK.cpp,v 1.6 2002/11/04 14:43:08 jpc Exp $
|
// $Id: RMBK.cpp,v 1.7 2004/12/14 19:02:07 jpc Exp $
|
||||||
//
|
//
|
||||||
// /----------------------------------------------------------------\
|
// /----------------------------------------------------------------\
|
||||||
// | |
|
// | |
|
||||||
|
@ -327,7 +327,7 @@ void CRBox::mbkload (MBK::CFig *mbkfig, int z, int zup, int rtype)
|
||||||
|
|
||||||
// Reorder terminals (nearest).
|
// Reorder terminals (nearest).
|
||||||
pNet->order ();
|
pNet->order ();
|
||||||
pNet->lockalone ();
|
pNet->lockalone (rglobal);
|
||||||
|
|
||||||
cdebug << "+ " << pNet->bb << ".\n";
|
cdebug << "+ " << pNet->bb << ".\n";
|
||||||
} // End of "pSig" (signal) loop.
|
} // End of "pSig" (signal) loop.
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//
|
//
|
||||||
// $Id: nero.cpp,v 1.5 2002/11/17 16:40:14 jpc Exp $
|
// $Id: nero.cpp,v 1.6 2004/12/14 19:02:07 jpc Exp $
|
||||||
//
|
//
|
||||||
// /----------------------------------------------------------------\
|
// /----------------------------------------------------------------\
|
||||||
// | |
|
// | |
|
||||||
|
@ -273,7 +273,7 @@ int main (int argc, char *argv[])
|
||||||
exit (1);
|
exit (1);
|
||||||
}
|
}
|
||||||
catch (except_done &e) {
|
catch (except_done &e) {
|
||||||
//cerr << e.what () << endl;
|
cerr << e.what () << endl;
|
||||||
|
|
||||||
emergency ();
|
emergency ();
|
||||||
exit (1);
|
exit (1);
|
||||||
|
|
Loading…
Reference in New Issue