new margin administration ...
we now try to insert the maximum amount of 2-pitch tie cells to have the maximum amount of bodie-ties
This commit is contained in:
parent
7d4585f51f
commit
315ab8b408
|
@ -25,6 +25,8 @@ Usage()
|
|||
<< " in percentage of the cells area. " << endl
|
||||
<< " The resulting area will be equal to " << endl
|
||||
<< " CELL_AREA * (1 + <MARGIN>). Default value : 0.2" << endl
|
||||
<< "o -eqmargin : The margin is equitably distributed between all cells" << endl
|
||||
<< " By default, we try to insert the maximum amount of 2-pitch tie cells" << endl
|
||||
<< "o -partial <PARTIAL> : " << endl
|
||||
<< " The design is already partially placed (there must be a" << endl
|
||||
<< " physical view describing this partial placement)." << endl
|
||||
|
@ -52,6 +54,8 @@ main(int argc, char **argv)
|
|||
bool RingFlg = false; // Connectors
|
||||
bool IocFlg = false; // file for Connectors
|
||||
bool VerboseFlg = false; // verbose mode
|
||||
bool EqMarginFlg = false; // don't try to maximise
|
||||
// 2-pitch cells
|
||||
double NetMult = 0.8 ;
|
||||
double BinMult = 0.1 ;
|
||||
double RowMult = 0.1 ;
|
||||
|
@ -70,50 +74,53 @@ main(int argc, char **argv)
|
|||
Usage();
|
||||
exit(0);
|
||||
}
|
||||
|
||||
for (int i=1; i<argc; i++) {
|
||||
if (!strcmp (argv[i], "-help")) {
|
||||
HelpFlg = true;
|
||||
}
|
||||
|
||||
else
|
||||
|
||||
if (!strcmp (argv[i], "-v")) {
|
||||
if (i+2 < argc) VerboseFlg = true;
|
||||
else UsageFlg = true;
|
||||
}
|
||||
|
||||
else
|
||||
|
||||
|
||||
if (!strcmp (argv[i], "-gnuplot")) {
|
||||
if (i+2 < argc) PlotFlg = true;
|
||||
else UsageFlg = true;
|
||||
for (int i=1; i<argc; i++)
|
||||
{
|
||||
if (!strcmp (argv[i], "-help"))
|
||||
{
|
||||
HelpFlg = true;
|
||||
}
|
||||
else
|
||||
if (!strcmp (argv[i], "-v"))
|
||||
{
|
||||
if (i+2 < argc) VerboseFlg = true;
|
||||
else UsageFlg = true;
|
||||
}
|
||||
|
||||
else
|
||||
|
||||
if (!strcmp (argv[i], "-c")) {
|
||||
if (i+2 < argc) ConFlg = true;
|
||||
else UsageFlg = true;
|
||||
}
|
||||
|
||||
else
|
||||
if (!strcmp (argv[i], "-ring")) {
|
||||
if (i+2 < argc) RingFlg = true;
|
||||
else UsageFlg = true;
|
||||
}
|
||||
|
||||
else
|
||||
|
||||
if (!strcmp (argv[i], "-r")) {
|
||||
if (i+3 < argc)
|
||||
{
|
||||
if (!sscanf(argv[i+1], "%lg", &BBoxOccCostRatio))
|
||||
if (!strcmp (argv[i], "-eqmargin"))
|
||||
{
|
||||
cout << "WARNING : invalid argument for -r" << endl;
|
||||
UsageFlg = true;
|
||||
if (i+2 < argc) EqMarginFlg = true;
|
||||
else UsageFlg = true;
|
||||
}
|
||||
else
|
||||
if (!strcmp (argv[i], "-gnuplot"))
|
||||
{
|
||||
if (i+2 < argc) PlotFlg = true;
|
||||
else UsageFlg = true;
|
||||
}
|
||||
else
|
||||
if (!strcmp (argv[i], "-c"))
|
||||
{
|
||||
if (i+2 < argc) ConFlg = true;
|
||||
else UsageFlg = true;
|
||||
}
|
||||
else
|
||||
if (!strcmp (argv[i], "-ring"))
|
||||
{
|
||||
if (i+2 < argc) RingFlg = true;
|
||||
else UsageFlg = true;
|
||||
}
|
||||
else
|
||||
if (!strcmp (argv[i], "-r"))
|
||||
{
|
||||
if (i+3 < argc)
|
||||
{
|
||||
if (!sscanf(argv[i+1], "%lg", &BBoxOccCostRatio))
|
||||
{
|
||||
cout << "WARNING : invalid argument for -r" << endl;
|
||||
UsageFlg = true;
|
||||
}
|
||||
} else {
|
||||
cout << "WARNING : no file or argument given" << endl;
|
||||
UsageFlg = true;
|
||||
|
@ -318,7 +325,8 @@ main(int argc, char **argv)
|
|||
// On fait le placement
|
||||
// ********************
|
||||
PPlacement Placement(ConFlg, RingFlg, RowMult, BinMult, NetMult,
|
||||
IocFlg, IocFile,PlotFlg, VerboseFlg,PartialFlg,physicalfig, namefile);
|
||||
IocFlg, IocFile, PlotFlg, VerboseFlg, PartialFlg, EqMarginFlg,
|
||||
physicalfig, namefile);
|
||||
Placement.SetMargin(Margin);
|
||||
Placement.SetMaxDetLoop(MaxDetLoop);
|
||||
if (!RowFlg)
|
||||
|
|
|
@ -33,7 +33,7 @@ PDetSubRow::PDetSubRow(PSubRow& subrow):
|
|||
}
|
||||
|
||||
void
|
||||
PDetSubRow::ExpandInstances()
|
||||
PDetSubRow::ExpandInstances(const bool eqmargin)
|
||||
{
|
||||
unsigned nins = _detInsVector.size();
|
||||
double totalinssize = 0;
|
||||
|
@ -43,10 +43,26 @@ PDetSubRow::ExpandInstances()
|
|||
{
|
||||
totalinssize += iit->GetWidth();
|
||||
}
|
||||
//xtof: 06 05 2002
|
||||
//changing the white space repartition
|
||||
//We want the maximum 2-pitch spaces for bodie-tie insertion
|
||||
|
||||
double whitespace = GetWidth() - totalinssize;
|
||||
double inswhitespace = (double)(int)(whitespace / nins);
|
||||
double whitespaceremain = (double)(int)(whitespace
|
||||
- nins * inswhitespace + 0.5);
|
||||
double inswhitespace = 0.0;
|
||||
double whitespaceremain = 0.0;
|
||||
if (eqmargin)
|
||||
{
|
||||
inswhitespace = (double)(int)(whitespace / nins);
|
||||
whitespaceremain = (double)(int)(whitespace
|
||||
- nins * inswhitespace + 0.5);
|
||||
}
|
||||
else
|
||||
{
|
||||
inswhitespace = (double)(int)(whitespace / (2 * nins));
|
||||
inswhitespace *= 2;
|
||||
whitespaceremain = (double)(int)(whitespace
|
||||
- nins * inswhitespace + 0.5);
|
||||
}
|
||||
for (PDetInsVector::iterator iit = _detInsVector.begin();
|
||||
iit != _detInsVector.end();
|
||||
iit++)
|
||||
|
@ -54,9 +70,24 @@ PDetSubRow::ExpandInstances()
|
|||
iit->SetMarginWidth(iit->GetWidth() + inswhitespace);
|
||||
}
|
||||
PDetInsVector::iterator iit = _detInsVector.begin();
|
||||
while (whitespaceremain-- > 0)
|
||||
if (eqmargin)
|
||||
{
|
||||
(iit++)->AddWhiteSpace();
|
||||
while (whitespaceremain-- > 0.0)
|
||||
{
|
||||
(iit++)->AddWhiteSpace();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
while (whitespaceremain >= 2.0)
|
||||
{
|
||||
(iit++)->AddDoubleWhiteSpace();
|
||||
whitespaceremain -= 2.0;
|
||||
}
|
||||
if (whitespaceremain > 0.0)
|
||||
{
|
||||
(iit)->AddWhiteSpace();
|
||||
}
|
||||
}
|
||||
|
||||
double XPos = GetMinX();
|
||||
|
|
|
@ -25,7 +25,7 @@ class PDetSubRow : public PContainer {
|
|||
bool GetOrientation() const { return _orientation; }
|
||||
PDetInsVector& GetInssVector() { return _detInsVector; }
|
||||
const PDetInsVector& GetConstInssVector() const { return _detInsVector; }
|
||||
void ExpandInstances();
|
||||
void ExpandInstances(const bool eqmargin);
|
||||
bool FinalOptimize();
|
||||
ostream& Print(ostream& os) const;
|
||||
ofstream& Plot(ofstream& out) const;
|
||||
|
|
|
@ -28,6 +28,7 @@ class PDetToPlaceIns : public PIns {
|
|||
double GetLeftCornerX() const { return _leftCorner.GetX(); }
|
||||
void SetSubRow(PDetSubRow* subrow) { _subRow = subrow; }
|
||||
void AddWhiteSpace() { ++_marginWidth; }
|
||||
void AddDoubleWhiteSpace() { _marginWidth += 2; }
|
||||
void UnPlace() { _placed = false; }
|
||||
void Place() { _placed = true; }
|
||||
bool IsPlaced() const { return _placed; }
|
||||
|
|
|
@ -85,6 +85,7 @@ class PPlacement {
|
|||
bool _boolPlot;
|
||||
bool _verbose;
|
||||
bool _prePlace;
|
||||
bool _eqMargin;
|
||||
unsigned _totalMoves;
|
||||
|
||||
// Placement caracteristics
|
||||
|
@ -110,12 +111,13 @@ class PPlacement {
|
|||
public:
|
||||
PPlacement(bool conflg, bool ringflg, double rowmult, double binmult, double netmult,
|
||||
bool iocfile, char *iocfilename, bool plotflg,
|
||||
bool verbose, bool preflg, struct phfig* physfig,
|
||||
bool verbose, bool preflg, bool eqmargin,
|
||||
struct phfig* physfig,
|
||||
char* filename):
|
||||
_prePlaceFig(physfig),
|
||||
RowMult(rowmult), BinMult(binmult), NetMult(netmult),
|
||||
_placeCons(conflg), _ringPlaceCons(ringflg), _iocFile(iocfile), _iocFileName(iocfilename),
|
||||
_boolPlot(plotflg), _verbose(verbose), _prePlace(preflg),
|
||||
_boolPlot(plotflg), _verbose(verbose), _prePlace(preflg), _eqMargin(eqmargin),
|
||||
_totalMoves(0),_fileName(filename)
|
||||
{}
|
||||
|
||||
|
|
|
@ -63,9 +63,6 @@ PPlacement::PlaceFinal()
|
|||
}
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
// double FinalInitialize()
|
||||
// ======================================================================
|
||||
void
|
||||
PPlacement::FinalInitialize()
|
||||
{
|
||||
|
@ -149,7 +146,7 @@ PPlacement::FinalInitialize()
|
|||
for (PDetSubRows::iterator dsrit = _detSubRows.begin();
|
||||
dsrit != _detSubRows.end(); dsrit++)
|
||||
{
|
||||
dsrit->ExpandInstances();
|
||||
dsrit->ExpandInstances(_eqMargin);
|
||||
}
|
||||
|
||||
// Updating All _nets BBoxs
|
||||
|
@ -305,7 +302,7 @@ int PPlacement::AddRowend(struct phfig* physicalfig)
|
|||
long width = (long) ((insfig->XAB2 - insfig->XAB1) / PITCH);
|
||||
long height = (long) ((insfig->YAB2 - insfig->YAB1) / (PITCH * ROWHEIGHT));
|
||||
long posx = (long) ((It->XINS - _dx) / PITCH);
|
||||
long posy = (long)((It->YINS - _dy)/ (PITCH * ROWHEIGHT));
|
||||
long posy = (long)((It->YINS - _dy) / (PITCH * ROWHEIGHT));
|
||||
|
||||
for (long ydecal=0 ; ydecal < height ; ydecal++)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue