Changing the behavior of Ocp when the -ring -ioc options are given.
In that case, the pins are placed as given in the ioc file, but with metal2 of witdh 2 on all faces. Also the left and right connectors are not anymore placed on the power supplies, but between them.
This commit is contained in:
parent
69e6cfe9ec
commit
5f3681b3c5
|
@ -17,7 +17,8 @@ Usage()
|
||||||
<< "o -v : verbose mode" << endl
|
<< "o -v : verbose mode" << endl
|
||||||
<< "o -gnuplot : create statistics files to use with gnuplot" << endl
|
<< "o -gnuplot : create statistics files to use with gnuplot" << endl
|
||||||
<< "o -c : create connectors (placement randomly generated)" << endl
|
<< "o -c : create connectors (placement randomly generated)" << endl
|
||||||
<< "o -ring : create connectors (placement randomly generated) suitable for ring pad placement tool" << endl
|
<< "o -ring : create connectors suitable for ring pad placement tool" << endl
|
||||||
|
<< " placement randomly generated unless -ioc is given" << endl
|
||||||
<< "o -ioc : create connectors and place it using .ioc file" << endl
|
<< "o -ioc : create connectors and place it using .ioc file" << endl
|
||||||
<< "o -margin <MARGIN> : The amount of free area added " << endl
|
<< "o -margin <MARGIN> : The amount of free area added " << endl
|
||||||
<< " in percentage of the cells area. " << endl
|
<< " in percentage of the cells area. " << endl
|
||||||
|
@ -365,11 +366,11 @@ main(int argc, char **argv)
|
||||||
<< endl;
|
<< endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((IocFlg && ConFlg) || (IocFlg && RingFlg))
|
if (IocFlg && ConFlg)
|
||||||
{
|
{
|
||||||
cerr << " o You cannot have a connectors placement file and ask "
|
cerr << " o You cannot have a connectors placement file and ask "
|
||||||
<< "for a automatic connectors placement at the same time ...." << endl
|
<< "for a automatic connectors placement at the same time ...." << endl
|
||||||
<< " o Use -ioc or -c or -ring" << endl;
|
<< " o Use either -ioc or -c" << endl;
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,13 +14,26 @@ PCon::PCon(const locon* con, PPos pos, char orient):
|
||||||
void
|
void
|
||||||
PCon::Save(struct phfig *physicalfig, const double dx, const double dy) const
|
PCon::Save(struct phfig *physicalfig, const double dx, const double dy) const
|
||||||
{
|
{
|
||||||
|
|
||||||
addphcon(physicalfig,
|
addphcon(physicalfig,
|
||||||
_orient,
|
_orient,
|
||||||
_con->NAME,
|
_con->NAME,
|
||||||
(int)(GetPosX() * PITCH + dx),
|
(int)(GetPosX() * PITCH + dx),
|
||||||
(int)(GetPosY() * PITCH + dy),
|
(int)(GetPosY() * PITCH + dy),
|
||||||
((_orient==NORTH) || (_orient == SOUTH))?ALU2:ALU3,
|
_orient==NORTH || _orient == SOUTH ? ALU2 : ALU3,
|
||||||
((_orient==NORTH) || (_orient == SOUTH))?2 * (int)(PITCH/5):(int)(PITCH/5));
|
(_orient==NORTH || _orient == SOUTH ? 2 : 1) * (PITCH/5));
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
PCon::RingSave(struct phfig *physicalfig, const double dx, const double dy) const
|
||||||
|
{
|
||||||
|
addphcon(physicalfig,
|
||||||
|
_orient,
|
||||||
|
_con->NAME,
|
||||||
|
(int)(GetPosX() * PITCH + dx),
|
||||||
|
(int)(GetPosY() * PITCH + dy),
|
||||||
|
ALU2,
|
||||||
|
2 * (PITCH/5));
|
||||||
}
|
}
|
||||||
|
|
||||||
ostream&
|
ostream&
|
||||||
|
|
|
@ -19,6 +19,7 @@ class PCon: public PElem {
|
||||||
void SetPos(const PPos pos) {_pos = pos;}
|
void SetPos(const PPos pos) {_pos = pos;}
|
||||||
void SetOrient(const char orient) {_orient = orient;}
|
void SetOrient(const char orient) {_orient = orient;}
|
||||||
void Save(struct phfig *physicalfig, const double dx, const double dy) const;
|
void Save(struct phfig *physicalfig, const double dx, const double dy) const;
|
||||||
|
void RingSave(struct phfig *physicalfig, const double dx, const double dy) const;
|
||||||
|
|
||||||
ostream& Print(ostream& os) const;
|
ostream& Print(ostream& os) const;
|
||||||
};
|
};
|
||||||
|
|
|
@ -142,7 +142,7 @@ PPlacement::Init(lofig* fig, int NbRows)
|
||||||
_nInsToPlace = _toPlaceInss.size();
|
_nInsToPlace = _toPlaceInss.size();
|
||||||
|
|
||||||
// Traitement des connecteurs ....
|
// Traitement des connecteurs ....
|
||||||
if (_placeCons || _ringPlaceCons)
|
if (_placeCons || (_ringPlaceCons && !_iocFile))
|
||||||
{
|
{
|
||||||
for (locon* con = fig->LOCON; con; con = con->NEXT)
|
for (locon* con = fig->LOCON; con; con = con->NEXT)
|
||||||
{
|
{
|
||||||
|
@ -383,7 +383,7 @@ PPlacement::Init(lofig* fig, int NbRows)
|
||||||
// set positions of connectors in case of no ioc file
|
// set positions of connectors in case of no ioc file
|
||||||
if (_placeCons && !_ringPlaceCons) GenerateConsPlacement();
|
if (_placeCons && !_ringPlaceCons) GenerateConsPlacement();
|
||||||
|
|
||||||
if (_ringPlaceCons) GenerateRingConsPlacement();
|
if (_ringPlaceCons && !_iocFile) GenerateRingConsPlacement();
|
||||||
|
|
||||||
// set positions of connectors when ioc file is given
|
// set positions of connectors when ioc file is given
|
||||||
if (_iocFile) SetPosIocFile(pconmap);
|
if (_iocFile) SetPosIocFile(pconmap);
|
||||||
|
@ -649,7 +649,7 @@ PPlacement::SetPosIocFile(PConMap& pconmap)
|
||||||
|
|
||||||
if (leftcount != 0)
|
if (leftcount != 0)
|
||||||
{
|
{
|
||||||
double pos = 0.0;
|
double pos = 0.0, ppos = pos;
|
||||||
if (leftspace >= Width-topcount)
|
if (leftspace >= Width-topcount)
|
||||||
{
|
{
|
||||||
cerr << " o ERROR : in ioc file : space too important" << endl;
|
cerr << " o ERROR : in ioc file : space too important" << endl;
|
||||||
|
@ -657,6 +657,7 @@ PPlacement::SetPosIocFile(PConMap& pconmap)
|
||||||
}
|
}
|
||||||
double conspace = ((double)(Height-leftspace)/
|
double conspace = ((double)(Height-leftspace)/
|
||||||
(double)(leftcount-nbspaceleft));
|
(double)(leftcount-nbspaceleft));
|
||||||
|
if (_ringPlaceCons) ppos = pos;
|
||||||
pos += conspace / 2.0;
|
pos += conspace / 2.0;
|
||||||
|
|
||||||
for(con_list* tmpcon = ptleft ; tmpcon; tmpcon = tmpcon->NEXT)
|
for(con_list* tmpcon = ptleft ; tmpcon; tmpcon = tmpcon->NEXT)
|
||||||
|
@ -668,12 +669,23 @@ PPlacement::SetPosIocFile(PConMap& pconmap)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
if (_ringPlaceCons)
|
||||||
|
{
|
||||||
|
int delta = (int)pos % ROWHEIGHT;
|
||||||
|
if (delta == 0) pos -= 2.0;
|
||||||
|
else if (delta == 1) pos += 1.0;
|
||||||
|
else if (delta == 9) pos -= 1.0;
|
||||||
|
// Just in case there are so many connectors
|
||||||
|
if (pos < ppos) pos = ppos + 1;
|
||||||
|
}
|
||||||
|
|
||||||
if (_verbose) cout << " o adding connector : " << tmpcon->NAME
|
if (_verbose) cout << " o adding connector : " << tmpcon->NAME
|
||||||
<< " x : " << 0 << " y : " << (int)pos << endl;
|
<< " x : " << 0 << " y : " << (int)pos << endl;
|
||||||
position.SetX(0.0);
|
position.SetX(0.0);
|
||||||
position.SetY((double)(int)pos);
|
position.SetY((double)(int)pos);
|
||||||
// test a rajouter pour verifier si locon present ou pas!!!
|
// test a rajouter pour verifier si locon present ou pas!!!
|
||||||
pconmap[tmpcon->NAME]->SetPos(position);
|
pconmap[tmpcon->NAME]->SetPos(position);
|
||||||
|
if (_ringPlaceCons) ppos = pos;
|
||||||
pos += conspace;
|
pos += conspace;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -681,7 +693,7 @@ PPlacement::SetPosIocFile(PConMap& pconmap)
|
||||||
|
|
||||||
if (rightcount != 0)
|
if (rightcount != 0)
|
||||||
{
|
{
|
||||||
double pos = 0.0;
|
double pos = 0.0, ppos = pos;
|
||||||
if (rightspace >= Width-topcount)
|
if (rightspace >= Width-topcount)
|
||||||
{
|
{
|
||||||
cerr << " o ERROR : in ioc file : space too important" << endl;
|
cerr << " o ERROR : in ioc file : space too important" << endl;
|
||||||
|
@ -689,6 +701,7 @@ PPlacement::SetPosIocFile(PConMap& pconmap)
|
||||||
}
|
}
|
||||||
double conspace = ((double)(Height-rightspace)/
|
double conspace = ((double)(Height-rightspace)/
|
||||||
(double)(rightcount-nbspaceright));
|
(double)(rightcount-nbspaceright));
|
||||||
|
if (_ringPlaceCons) ppos = pos;
|
||||||
pos += conspace / 2.0;
|
pos += conspace / 2.0;
|
||||||
|
|
||||||
for(con_list* tmpcon = ptright ; tmpcon; tmpcon = tmpcon->NEXT)
|
for(con_list* tmpcon = ptright ; tmpcon; tmpcon = tmpcon->NEXT)
|
||||||
|
@ -700,12 +713,23 @@ PPlacement::SetPosIocFile(PConMap& pconmap)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
if (_ringPlaceCons)
|
||||||
|
{
|
||||||
|
int delta = (int)pos % ROWHEIGHT;
|
||||||
|
if (delta == 0) pos -= 2.0;
|
||||||
|
else if (delta == 1) pos += 1.0;
|
||||||
|
else if (delta == 9) pos -= 1.0;
|
||||||
|
// Just in case there are so many connectors
|
||||||
|
if (pos < ppos) pos = ppos + 1;
|
||||||
|
}
|
||||||
|
|
||||||
if (_verbose) cout << " o adding connector: " << tmpcon->NAME
|
if (_verbose) cout << " o adding connector: " << tmpcon->NAME
|
||||||
<< " x : " << Width << " y : " << (int)pos << endl;
|
<< " x : " << Width << " y : " << (int)pos << endl;
|
||||||
position.SetX(Width);
|
position.SetX(Width);
|
||||||
position.SetY((double)(int)pos);
|
position.SetY((double)(int)pos);
|
||||||
// test a rajouter pour verifier si locon present ou pas!!!
|
// test a rajouter pour verifier si locon present ou pas!!!
|
||||||
pconmap[tmpcon->NAME]->SetPos(position);
|
pconmap[tmpcon->NAME]->SetPos(position);
|
||||||
|
if (_ringPlaceCons) ppos = pos;
|
||||||
pos += conspace;
|
pos += conspace;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -248,6 +248,9 @@ PPlacement::Save()
|
||||||
|
|
||||||
for (PCons::const_iterator cit = _cons.begin(); cit != _cons.end(); cit++)
|
for (PCons::const_iterator cit = _cons.begin(); cit != _cons.end(); cit++)
|
||||||
{
|
{
|
||||||
|
if (_ringPlaceCons)
|
||||||
|
(*cit)->RingSave(physicalfig, _dx, _dy);
|
||||||
|
else
|
||||||
(*cit)->Save(physicalfig, _dx, _dy);
|
(*cit)->Save(physicalfig, _dx, _dy);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -360,6 +360,9 @@ PPlacement::PlaceGlobal()
|
||||||
|
|
||||||
} while (Temperature != 0.0 && StdDev > 0.0001 / Cost);
|
} while (Temperature != 0.0 && StdDev > 0.0001 / Cost);
|
||||||
|
|
||||||
|
if (!_boolPlot)
|
||||||
|
unlink("alldata.dat");
|
||||||
|
|
||||||
if (!stucked)
|
if (!stucked)
|
||||||
{
|
{
|
||||||
// Freeze out
|
// Freeze out
|
||||||
|
|
Loading…
Reference in New Issue