Code d'erreur si tous les signaux ne sont pas routés.

This commit is contained in:
Hugo Clement 2002-06-27 09:09:09 +00:00
parent e758fadda1
commit 3221faa170
4 changed files with 45 additions and 12 deletions

View File

@ -1,8 +1,11 @@
/* /*
### -------------------------------------------------- ### ### -------------------------------------------------- ###
$Author: hcl $ $Author: hcl $
$Date: 2002/06/26 13:28:52 $ $Date: 2002/06/27 09:09:01 $
$Log: findNPointsPath.c,v $ $Log: findNPointsPath.c,v $
Revision 1.5 2002/06/27 09:09:01 hcl
Code d'erreur si tous les signaux ne sont pas routés.
Revision 1.4 2002/06/26 13:28:52 hcl Revision 1.4 2002/06/26 13:28:52 hcl
bug hunter bug hunter
@ -92,7 +95,7 @@
#include "ocrAstar.h" #include "ocrAstar.h"
static char *res_id = static char *res_id =
"$Id: findNPointsPath.c,v 1.4 2002/06/26 13:28:52 hcl Exp $"; "$Id: findNPointsPath.c,v 1.5 2002/06/27 09:09:01 hcl Exp $";
#define MAX_HT 500 #define MAX_HT 500
@ -841,6 +844,7 @@ findPathNPoints(ocrRoutingParameters * i_pParam,
#endif #endif
/* routage bipoint */ /* routage bipoint */
l_uLength = biroute (i_pParam, i_pGrid, con1, con2, i_pSignal, AS_K_SEG); l_uLength = biroute (i_pParam, i_pGrid, con1, con2, i_pSignal, AS_K_SEG);
#if 0 #if 0
@ -988,7 +992,25 @@ findPathNPoints(ocrRoutingParameters * i_pParam,
return OCRNATURALINT_MAX; return OCRNATURALINT_MAX;
} }
l_uLength = biroute (i_pParam, i_pGrid, l_pCon->NEXT, &l_NewCon, i_pSignal, AS_K_EQUI); switch (g_pOption->ALGO) {
case 1: l_uLength = biroute (
i_pParam,
i_pGrid,
l_pCon->NEXT,
NULL,
i_pSignal,
AS_K_EQUI);
break;
case 0: l_uLength = biroute (
i_pParam,
i_pGrid,
l_pCon->NEXT,
&l_NewCon,
i_pSignal,
AS_K_EQUI);
break;
}
/*l_uLength = biroute (i_pParam, i_pGrid, l_pCon->NEXT, &l_NewCon, i_pSignal, AS_K_EQUI);*/
#if 0 #if 0
display(LEVEL, DEBUG, "(%ld,%ld,%d) -> (%ld,%ld,%d)\n", display(LEVEL, DEBUG, "(%ld,%ld,%d) -> (%ld,%ld,%d)\n",

View File

@ -1,8 +1,11 @@
/* /*
### -------------------------------------------------- ### ### -------------------------------------------------- ###
$Author: hcl $ $Author: hcl $
$Date: 2002/04/25 13:41:32 $ $Date: 2002/06/27 09:09:01 $
$Log: ocrRouter.c,v $ $Log: ocrRouter.c,v $
Revision 1.7 2002/06/27 09:09:01 hcl
Code d'erreur si tous les signaux ne sont pas routés.
Revision 1.6 2002/04/25 13:41:32 hcl Revision 1.6 2002/04/25 13:41:32 hcl
New ripup/reroute loop, bug-kill (CALU&TALU). New ripup/reroute loop, bug-kill (CALU&TALU).
@ -1043,7 +1046,8 @@ routingWindow(ocrRoutingDataBase * i_pDataBase, phfig_list * i_pPhFig)
if (!chk) if (!chk)
display (LEVEL, INFO, " none\n"); display (LEVEL, INFO, " none\n");
} }
return wire_len; //return wire_len;
return i_pDataBase->NB_UNROUTED;
} }
void void
@ -1117,6 +1121,7 @@ int main(int argc, char **argv)
char *out_name; char *out_name;
ocrNaturalInt start_with_vss = 0; ocrNaturalInt start_with_vss = 0;
ocrNaturalInt sym_y = 0; ocrNaturalInt sym_y = 0;
ocrNaturalInt failures = 0;
// initialisation de MBK // initialisation de MBK
@ -1288,7 +1293,7 @@ int main(int argc, char **argv)
l_pDataBase->NB_SIGNAL, ORDER_PRIORITY_CON); l_pDataBase->NB_SIGNAL, ORDER_PRIORITY_CON);
// dumpDataBase (l_pDataBase,stdout); // dumpDataBase (l_pDataBase,stdout);
routingWindow(l_pDataBase, l_pPhFig); failures = routingWindow(l_pDataBase, l_pPhFig);
//linkWindow(l_pDataBase, i); //linkWindow(l_pDataBase, i);
deleteWindowArray(l_pDataBase, i); deleteWindowArray(l_pDataBase, i);
@ -1310,5 +1315,6 @@ int main(int argc, char **argv)
} }
deleteDataBase(l_pDataBase); deleteDataBase(l_pDataBase);
return 0; //return 0;
return failures;
} }

View File

@ -1,8 +1,11 @@
/* /*
### -------------------------------------------------- ### ### -------------------------------------------------- ###
$Author: hcl $ $Author: hcl $
$Date: 2002/04/25 13:41:33 $ $Date: 2002/06/27 09:09:05 $
$Log: ocrWRoutingUtil.c,v $ $Log: ocrWRoutingUtil.c,v $
Revision 1.4 2002/06/27 09:09:05 hcl
Code d'erreur si tous les signaux ne sont pas routés.
Revision 1.3 2002/04/25 13:41:33 hcl Revision 1.3 2002/04/25 13:41:33 hcl
New ripup/reroute loop, bug-kill (CALU&TALU). New ripup/reroute loop, bug-kill (CALU&TALU).
@ -125,6 +128,7 @@ void initWGrid(ocrWRoutingGrid * i_pGrid, ocrRoutingParameters * i_pParam)
ocrNaturalInt l_uLayer, i, j; ocrNaturalInt l_uLayer, i, j;
ocrWSegment *l_pSegment; ocrWSegment *l_pSegment;
// création de segments libres de longueur MAX pour chaque noeud // création de segments libres de longueur MAX pour chaque noeud
for (l_uLayer = 0; l_uLayer < i_pGrid->NB_OF_LAYERS; l_uLayer++) for (l_uLayer = 0; l_uLayer < i_pGrid->NB_OF_LAYERS; l_uLayer++)
if (getDirection(i_pParam, l_uLayer) == ocrHorizontal) if (getDirection(i_pParam, l_uLayer) == ocrHorizontal)

View File

@ -1,8 +1,11 @@
/* /*
### -------------------------------------------------- ### ### -------------------------------------------------- ###
$Author: hcl $ $Author: hcl $
$Date: 2002/03/20 13:25:57 $ $Date: 2002/06/27 09:09:09 $
$Log: ocrWindow.c,v $ $Log: ocrWindow.c,v $
Revision 1.3 2002/06/27 09:09:09 hcl
Code d'erreur si tous les signaux ne sont pas routés.
Revision 1.2 2002/03/20 13:25:57 hcl Revision 1.2 2002/03/20 13:25:57 hcl
SymX bug. SymX bug.
@ -48,7 +51,7 @@
#include "ocrConnectorUtil.h" #include "ocrConnectorUtil.h"
static char *res_id = static char *res_id =
"$Id: ocrWindow.c,v 1.2 2002/03/20 13:25:57 hcl Exp $"; "$Id: ocrWindow.c,v 1.3 2002/06/27 09:09:09 hcl Exp $";
extern ocrOption *g_pOption; extern ocrOption *g_pOption;
@ -601,7 +604,6 @@ void initWindow(ocrRoutingDataBase * i_pDataBase)
} }
} }
#if 0
i_pDataBase->WINDOWS[0] = newWindow(0); i_pDataBase->WINDOWS[0] = newWindow(0);
i_pDataBase->WINDOWS[1] = newWindow(1); i_pDataBase->WINDOWS[1] = newWindow(1);
i_pDataBase->WINDOWS[0]->XMIN = 0; i_pDataBase->WINDOWS[0]->XMIN = 0;
@ -612,7 +614,6 @@ void initWindow(ocrRoutingDataBase * i_pDataBase)
i_pDataBase->WINDOWS[1]->YMIN = 0; i_pDataBase->WINDOWS[1]->YMIN = 0;
i_pDataBase->WINDOWS[1]->XMAX = (i_pDataBase->XAB2 - i_pDataBase->XAB1) / (PITCH * SCALE_X); i_pDataBase->WINDOWS[1]->XMAX = (i_pDataBase->XAB2 - i_pDataBase->XAB1) / (PITCH * SCALE_X);
i_pDataBase->WINDOWS[1]->YMAX = (i_pDataBase->YAB2 - i_pDataBase->YAB1) / (PITCH * SCALE_X); i_pDataBase->WINDOWS[1]->YMAX = (i_pDataBase->YAB2 - i_pDataBase->YAB1) / (PITCH * SCALE_X);
#endif
} }
/** /**