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