bug with a verification: instances out of the abox ....

This commit is contained in:
Christophe Alexandre 2002-05-03 13:21:46 +00:00
parent 30cb8a1a90
commit edab22ebfe
1 changed files with 28 additions and 20 deletions

View File

@ -355,7 +355,13 @@ PPlacement::Init(lofig* fig, int NbRows)
{
InitPlaceWithPrePlace();
if (_nInsToPlace > 0)
assert (_rows.begin() != _rows.end());
{
if (_rows.begin() == _rows.end())
{
cout << " o ERROR: No SPACE to place instances ....." << endl;
exit(1);
}
}
}
else
if (_nInsToPlace > 0)
@ -1255,13 +1261,15 @@ PPlacement::InitPlaceWithPrePlace()
// VERIFICATION OF THE PREPLACEMENT
// abutment box
if (Width % PITCH != 0) {
if (Width % PITCH != 0)
{
cerr << " o ERROR : abutment box's width must be a multiple of 5 lambdas"
<< endl;
exit(1);
}
if (Height % (PITCH * ROWHEIGHT) != 0) {
if (Height % (PITCH * ROWHEIGHT) != 0)
{
cerr << " o ERROR : abutment box's height must be a multiple of 50 lambdas"
<< endl;
exit(1);
@ -1306,7 +1314,7 @@ PPlacement::InitPlaceWithPrePlace()
int pinsheightrow = (int)(pinsheight / ROWHEIGHT); // hauteur ramene a l'unite
// (taille des lignes)
int ypos = (int)((pins->YINS - _dy) / PITCH); // position en y ramene au pitch
int xpos = (int)((pins->XINS - _dx) /PITCH); // position en x ramene au pitch
int xpos = (int)((pins->XINS - _dx) / PITCH); // position en x ramene au pitch
int ycoord = (int)(ypos / ROWHEIGHT); // position en y ramene a l'unite
if ((pins->YINS - _dy) % 50 != 0)
@ -1349,7 +1357,7 @@ PPlacement::InitPlaceWithPrePlace()
{
for (int xit = xpos; xit < xpos + pinswidth; xit++)
{
if ( (xit > Width) || (yit > Height)
if ( (xit > Width - 1) || (yit > Height - 1)
|| (xit < 0 ) || (yit < 0 ) )
{
cerr << " o ERROR : " << pins->INSNAME