* Bug : when merging terminals, now uses the lowest index instead of
the latest. This avoid to be out of bound.
This commit is contained in:
parent
80f6732cea
commit
ca05a0811f
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//
|
//
|
||||||
// $Id: MNet.cpp,v 1.10 2005/10/13 12:44:39 jpc Exp $
|
// $Id: MNet.cpp,v 1.11 2006/04/12 16:33:00 jpc Exp $
|
||||||
//
|
//
|
||||||
// /----------------------------------------------------------------\
|
// /----------------------------------------------------------------\
|
||||||
// | |
|
// | |
|
||||||
|
@ -488,6 +488,7 @@ void CNet::newaccess (string termName, CRect &rect, int z)
|
||||||
|
|
||||||
// Terminal not found : add a new one.
|
// Terminal not found : add a new one.
|
||||||
if (id == size) {
|
if (id == size) {
|
||||||
|
cerr << "Adding new terminal" << endl;
|
||||||
terms.push_back (new CTerm (termName, size));
|
terms.push_back (new CTerm (termName, size));
|
||||||
size += 1;
|
size += 1;
|
||||||
}
|
}
|
||||||
|
@ -501,7 +502,13 @@ void CNet::newaccess (string termName, CRect &rect, int z)
|
||||||
}
|
}
|
||||||
|
|
||||||
catch (merge_term &e) {
|
catch (merge_term &e) {
|
||||||
mergeid = e.id;
|
if ( e.id > id ) {
|
||||||
|
mergeid = id;
|
||||||
|
id = e.id;
|
||||||
|
} else {
|
||||||
|
mergeid = e.id;
|
||||||
|
}
|
||||||
|
cerr << "Merging terminals : [" << id << "] absorbed by [" << mergeid << "]" << endl;
|
||||||
|
|
||||||
// Merge terminals ...
|
// Merge terminals ...
|
||||||
terms[mergeid]->merge (terms[id], mergeid, this);
|
terms[mergeid]->merge (terms[id], mergeid, this);
|
||||||
|
@ -514,6 +521,7 @@ void CNet::newaccess (string termName, CRect &rect, int z)
|
||||||
|
|
||||||
// Re-computes the terminal's ids.
|
// Re-computes the terminal's ids.
|
||||||
for (id = 0; id < size; id++) terms[id]->setid (id);
|
for (id = 0; id < size; id++) terms[id]->setid (id);
|
||||||
|
cerr << "New terminal max id " << id-1 << endl;
|
||||||
|
|
||||||
id = mergeid;
|
id = mergeid;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//
|
//
|
||||||
// $Id: RMBK.cpp,v 1.15 2006/01/05 16:45:27 d2 Exp $
|
// $Id: RMBK.cpp,v 1.16 2006/04/12 16:33:00 jpc Exp $
|
||||||
//
|
//
|
||||||
// /----------------------------------------------------------------\
|
// /----------------------------------------------------------------\
|
||||||
// | |
|
// | |
|
||||||
|
@ -484,6 +484,7 @@ void CRBox::mbkload (MBK::CFig *mbkfig
|
||||||
pIns = fig->instances[ins_name];
|
pIns = fig->instances[ins_name];
|
||||||
|
|
||||||
term_name = ins_name + "." + pLocon->NAME;
|
term_name = ins_name + "." + pLocon->NAME;
|
||||||
|
cdebug << "+ I.T : " << term_name << " " << pIns->model->NAME << ".\n";
|
||||||
|
|
||||||
// Find physical segments / CA of the terminal.
|
// Find physical segments / CA of the terminal.
|
||||||
for (pSeg = pIns->model->PHSEG; pSeg != NULL; pSeg = pSeg->NEXT) {
|
for (pSeg = pIns->model->PHSEG; pSeg != NULL; pSeg = pSeg->NEXT) {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//
|
//
|
||||||
// $Id: nero.cpp,v 1.10 2005/10/17 23:11:06 jpc Exp $
|
// $Id: nero.cpp,v 1.11 2006/04/12 16:33:00 jpc Exp $
|
||||||
//
|
//
|
||||||
// /----------------------------------------------------------------\
|
// /----------------------------------------------------------------\
|
||||||
// | |
|
// | |
|
||||||
|
@ -227,8 +227,8 @@ int main (int argc, char *argv[])
|
||||||
, global
|
, global
|
||||||
, options["H"]->parsed
|
, options["H"]->parsed
|
||||||
, options["R"]->parsed );
|
, options["R"]->parsed );
|
||||||
crbox->route ();
|
|
||||||
//cdebug.off ();
|
//cdebug.off ();
|
||||||
|
crbox->route ();
|
||||||
crbox->mbksave (name_routed);
|
crbox->mbksave (name_routed);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue