* sea/src/sxlib2LEF.c,

sea/src/LEF_drive_sxlib.h,
   sea/src/LEF_drive_sxlib.c,
   sea/src/a2lef.sh :
   - Nouvelle option : il devient possible de ne pas decomposer les
       segments connecteurs en rectangles poses sur la grille de
       routage, les segments ne sont pas gardes tel quels. Ils sont
       mis a la largeur minimale et leurs extremites ramenees a la
       largeur minimale.
         ATTENTION : il n'y pas de verification que des segments se
       chevauchent. Dans ce cas il y generation de segments superposes.
         Option de a2lef     : "-T".
         Option de sxlib2lef : "-t".
This commit is contained in:
Jean-Paul Chaput 2003-05-19 16:16:41 +00:00
parent 5dec674c79
commit 4ddcd40040
4 changed files with 72 additions and 43 deletions

View File

@ -1,5 +1,5 @@
/* /*
* $Id: LEF_drive_sxlib.c,v 1.3 2003/04/04 16:23:32 xtof Exp $ * $Id: LEF_drive_sxlib.c,v 1.4 2003/05/19 16:16:41 jpc Exp $
* *
* /----------------------------------------------------------------\ * /----------------------------------------------------------------\
* | | * | |
@ -7,7 +7,7 @@
* | S i l i c o n E n s e m b l e / A l l i a n c e | * | S i l i c o n E n s e m b l e / A l l i a n c e |
* | | * | |
* | Author : Jean-Paul CHAPUT | * | Author : Jean-Paul CHAPUT |
* | E-mail : alliance-users@asim.lip6.fr | * | E-mail : alliance-users@asim.lip6.fr |
* | ============================================================== | * | ============================================================== |
* | C Module : "./LEF_drive_sxlib.c" | * | C Module : "./LEF_drive_sxlib.c" |
* | ************************************************************** | * | ************************************************************** |
@ -50,8 +50,11 @@
*/ */
typedef struct eGrid_s { typedef struct eGrid_s {
long x; long x0;
long y; long y0;
long x1;
long y1;
long isPoint;
struct eGrid_s *Next; struct eGrid_s *Next;
} eGrid_t; } eGrid_t;
@ -76,9 +79,13 @@
static long getLayerExt __FP((char aLayer)); static long getLayerExt __FP((char aLayer));
static eGrid_t *getTGrid __FP((eGrid_t **aptGrid, long aX, long aY)); static eGrid_t *getTGrid __FP((eGrid_t **aptGrid, long aX, long aY));
static eGrid_t *addTGrid __FP((eGrid_t **aptGrid, long aX, long aY)); static eGrid_t *addTGrid __FP((eGrid_t **aptGrid,
static void phseg2TGrid __FP((eGrid_t **aptGrid, long aX0,
phseg_list *apPhSeg)); long aY0,
long aX1,
long aY2));
static void phseg2TGrid __FP((eGrid_t **aptGrid,
phseg_list *apPhSeg));
static void TGrid2PORT __FP((ePORT_t **aplPORT, eGrid_t *aptGrid)); static void TGrid2PORT __FP((ePORT_t **aplPORT, eGrid_t *aptGrid));
static char *refCon2Name __FP((char *asRefCon)); static char *refCon2Name __FP((char *asRefCon));
static int onGrid __FP((long aX, long aY)); static int onGrid __FP((long aX, long aY));
@ -148,8 +155,10 @@ static eGrid_t *getTGrid(aptGrid, aX, aY)
eGrid_t *pGrid; eGrid_t *pGrid;
for(pGrid = *aptGrid; pGrid != (eGrid_t*)NULL; pGrid = pGrid->Next) for(pGrid = *aptGrid; pGrid != (eGrid_t*)NULL; pGrid = pGrid->Next) {
if ((pGrid->x == aX) && (pGrid->y == aY)) return(pGrid); if (!pGrid->isPoint) continue;
if ((pGrid->x0 == aX) && (pGrid->y0 == aY)) return(pGrid);
}
return((eGrid_t*)NULL); return((eGrid_t*)NULL);
} }
@ -159,19 +168,27 @@ static eGrid_t *getTGrid(aptGrid, aX, aY)
* Function : "addTGrid()". * Function : "addTGrid()".
*/ */
static eGrid_t *addTGrid(aptGrid, aX, aY) static eGrid_t *addTGrid(aptGrid, aX0, aY0, aX1, aY1)
eGrid_t **aptGrid; eGrid_t **aptGrid;
long aX, aY; long aX0, aY0, aX1, aY1;
{ {
eGrid_t *pGrid; eGrid_t *pGrid = NULL;
long isPoint;
pGrid = getTGrid(aptGrid, aX, aY); isPoint = (aX0 == aX1) && (aY0 == aY1);
if (pGrid != (eGrid_t*)NULL) return(pGrid);
pGrid = (eGrid_t*)malloc(sizeof(eGrid_t)); if ( isPoint ) {
pGrid->x = aX; pGrid = getTGrid(aptGrid, aX0, aY0);
pGrid->y = aY; if (pGrid != (eGrid_t*)NULL) return(pGrid);
}
pGrid = (eGrid_t*)malloc(sizeof(eGrid_t));
pGrid->x0 = aX0;
pGrid->y0 = aY0;
pGrid->x1 = aX1;
pGrid->y1 = aY1;
pGrid->isPoint = isPoint;
pGrid->Next = *aptGrid; pGrid->Next = *aptGrid;
*aptGrid = pGrid; *aptGrid = pGrid;
@ -206,8 +223,11 @@ static void phseg2TGrid(aptGrid, apPhSeg)
yMin = apPhSeg->Y1; yMin = apPhSeg->Y1;
if (apPhSeg->Y1 % YGRID) yMin += YGRID - (apPhSeg->Y1 % YGRID); if (apPhSeg->Y1 % YGRID) yMin += YGRID - (apPhSeg->Y1 % YGRID);
for(y = yMin; y <= yMax; y += YGRID) { if (LV_flags & F_NO_SPLIT_TERM) {
addTGrid(aptGrid, apPhSeg->X1, y); addTGrid(aptGrid, apPhSeg->X1, yMin, apPhSeg->X1, yMax);
} else {
for(y = yMin; y <= yMax; y += YGRID)
addTGrid(aptGrid, apPhSeg->X1, y, apPhSeg->X1, y);
} }
} else { } else {
if (!(LV_flags & F_ALLOW_OFFGRID)) { if (!(LV_flags & F_ALLOW_OFFGRID)) {
@ -224,8 +244,12 @@ static void phseg2TGrid(aptGrid, apPhSeg)
yMin = apPhSeg->X1; yMin = apPhSeg->X1;
if (apPhSeg->X1 % XGRID) yMin += XGRID - (apPhSeg->X1 % XGRID); if (apPhSeg->X1 % XGRID) yMin += XGRID - (apPhSeg->X1 % XGRID);
for(y = yMin; y <= yMax; y += XGRID) { if (LV_flags & F_NO_SPLIT_TERM) {
addTGrid(aptGrid, y, apPhSeg->Y1); addTGrid(aptGrid, yMin, apPhSeg->Y1, yMax, apPhSeg->Y1);
} else {
for(y = yMin; y <= yMax; y += XGRID) {
addTGrid(aptGrid, y, apPhSeg->Y1, y, apPhSeg->Y1);
}
} }
} }
} }
@ -244,10 +268,10 @@ static void TGrid2PORT(aplPORT, aptGrid)
for(pGrid = aptGrid; pGrid != NULL; pGrid = pGrid->Next) { for(pGrid = aptGrid; pGrid != NULL; pGrid = pGrid->Next) {
m_AddPort((*aplPORT), C_PORTITEM_RECT, m_AddPort((*aplPORT), C_PORTITEM_RECT,
m_AddRect(pGrid->x - WIDTH_CALUx / 2, m_AddRect(pGrid->x0 - WIDTH_CALUx / 2,
pGrid->y - WIDTH_CALUx / 2, pGrid->y0 - WIDTH_CALUx / 2,
pGrid->x + WIDTH_CALUx / 2, pGrid->x1 + WIDTH_CALUx / 2,
pGrid->y + WIDTH_CALUx / 2)); pGrid->y1 + WIDTH_CALUx / 2));
} /* End of "pGrid" loop. */ } /* End of "pGrid" loop. */
} }
@ -610,7 +634,8 @@ static void phref2PINS()
} }
/* Add to the list of holes in the obstacle grid. */ /* Add to the list of holes in the obstacle grid. */
addTGrid(&LV_tHolesALU1, pPhRef->XREF, pPhRef->YREF); addTGrid(&LV_tHolesALU1, pPhRef->XREF, pPhRef->YREF,
pPhRef->XREF, pPhRef->YREF);
if ((pPIN = getPIN(LV_pMACRO, sIOName)) == (ePIN_t*)NULL) { if ((pPIN = getPIN(LV_pMACRO, sIOName)) == (ePIN_t*)NULL) {
@ -678,10 +703,8 @@ static void phseg2PINS()
/* Create a new pin named from "pPhSeg->NAME". */ /* Create a new pin named from "pPhSeg->NAME". */
m_AddPin(LV_pMACRO->lPIN, pPhSeg->NAME); m_AddPin(LV_pMACRO->lPIN, pPhSeg->NAME);
LV_pMACRO->lPIN->DIRECTION = MBK2DEF_locondir(pLoCon); LV_pMACRO->lPIN->DIRECTION = MBK2DEF_locondir(pLoCon);
if (isck(pPhSeg->NAME)) if (isck(pPhSeg->NAME))
{ LV_pMACRO->lPIN->USE = C_USE_CLOCK;
LV_pMACRO->lPIN->USE = C_USE_CLOCK;
}
pPIN = LV_pMACRO->lPIN; pPIN = LV_pMACRO->lPIN;
} }

View File

@ -1,5 +1,5 @@
/* /*
* $Id: LEF_drive_sxlib.h,v 1.2 2002/09/30 16:21:17 czo Exp $ * $Id: LEF_drive_sxlib.h,v 1.3 2003/05/19 16:16:41 jpc Exp $
* *
* /----------------------------------------------------------------\ * /----------------------------------------------------------------\
* | | * | |
@ -25,6 +25,7 @@
# define F_NO_POWER_GEOM 0x00000002 # define F_NO_POWER_GEOM 0x00000002
# define F_POWER_ABUTMENT 0x00000004 # define F_POWER_ABUTMENT 0x00000004
# define F_POWER_FEEDTHRU 0x00000008 # define F_POWER_FEEDTHRU 0x00000008
# define F_NO_SPLIT_TERM 0x00000010
extern void lefsavesxlophfig (struct lofig *apLofig, extern void lefsavesxlophfig (struct lofig *apLofig,

View File

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
# #
# $Id: a2lef.sh,v 1.4 2003/04/02 14:13:13 jpc Exp $ # $Id: a2lef.sh,v 1.5 2003/05/19 16:16:41 jpc Exp $
# #
# /------------------------------------------------------------------\ # /------------------------------------------------------------------\
# | | # | |
@ -8,7 +8,7 @@
# | S i l i c o n E n s e m b l e / A l l i a n c e | # | S i l i c o n E n s e m b l e / A l l i a n c e |
# | | # | |
# | Author : Jean-Paul CHAPUT | # | Author : Jean-Paul CHAPUT |
# | E-mail : alliance-users@asim.lip6.fr | # | E-mail : alliance-users@asim.lip6.fr |
# | ================================================================ | # | ================================================================ |
# | Script : "./a2LEF.sh" | # | Script : "./a2LEF.sh" |
# | **************************************************************** | # | **************************************************************** |
@ -70,15 +70,15 @@
{ {
echo "" echo ""
echo "" echo ""
echo "Usage: a2LEF.sh [--verbose] [--very-verbose] [--help] \\" echo "Usage: a2LEF.sh [--verbose] [--very-verbose] [--help] \\"
echo " [--allow-offgrid] [--fake-power] \\" echo " [--allow-offgrid] [--fake-power] [--no-split-term] \\"
echo " <--techno <tech_file> > \\" echo " <--techno <tech_file> > \\"
echo " <--library <lib_dir> [--library <lib_dir>]> \\" echo " <--library <lib_dir> [--library <lib_dir>]> \\"
echo " <--lef <lef_file> > \\" echo " <--lef <lef_file> > \\"
echo " <--cell <cell_name> >" echo " <--cell <cell_name> >"
echo " a2LEF.sh [-vVhop] <-t <tech_file> > \\" echo " a2LEF.sh [-vVhop] <-t <tech_file> > \\"
echo " <-l <lib_dir> [-l <lib_dir>]> \\" echo " <-l <lib_dir> [-l <lib_dir>]> \\"
echo " <-L <lef_file> > \\" echo " <-L <lef_file> > \\"
echo " <-c <cell_name> > " echo " <-c <cell_name> > "
echo "" echo ""
echo "Options:" echo "Options:"
@ -86,6 +86,7 @@
echo " o [--verbose|-v] : be verbose." echo " o [--verbose|-v] : be verbose."
echo " o [--very-verbose|-V] : be very verbose :-)." echo " o [--very-verbose|-V] : be very verbose :-)."
echo " o [--allow-offgrid|-o] : allow terminals to be offgrid." echo " o [--allow-offgrid|-o] : allow terminals to be offgrid."
echo " o [--no-split-term|-T] : do not split terminals segments."
echo " o [--fake-power|-p] : do not attempt to generate" echo " o [--fake-power|-p] : do not attempt to generate"
echo " PORT geometries for power pins." echo " PORT geometries for power pins."
echo " o <--techno|-t <tech_file> > : location of the LEF techno header." echo " o <--techno|-t <tech_file> > : location of the LEF techno header."
@ -241,6 +242,7 @@
--very-verbose) VL=2;; --very-verbose) VL=2;;
--allow-offgrid) sx2lef_args="$sx2lef_args -o";; --allow-offgrid) sx2lef_args="$sx2lef_args -o";;
--fake-power) sx2lef_args="$sx2lef_args -p";; --fake-power) sx2lef_args="$sx2lef_args -p";;
--no-split-term) sx2lef_args="$sx2lef_args -t";;
--techno) --techno)
if [ $# -ge 2 ]; then if [ $# -ge 2 ]; then
@ -302,6 +304,7 @@
V) VL=2;; V) VL=2;;
o) sx2lef_args="$sx2lef_args -o";; o) sx2lef_args="$sx2lef_args -o";;
p) sx2lef_args="$sx2lef_args -p";; p) sx2lef_args="$sx2lef_args -p";;
T) sx2lef_args="$sx2lef_args -t";;
t) if [ $# -ge 2 ]; then t) if [ $# -ge 2 ]; then
techFile="$2" techFile="$2"

View File

@ -1,5 +1,5 @@
/* /*
* $Id: sxlib2LEF.c,v 1.2 2002/09/30 16:21:18 czo Exp $ * $Id: sxlib2LEF.c,v 1.3 2003/05/19 16:16:41 jpc Exp $
* *
* /----------------------------------------------------------------\ * /----------------------------------------------------------------\
* | | * | |
@ -47,6 +47,7 @@ static void printHelp()
printf(" -h := Print this message.\n"); printf(" -h := Print this message.\n");
printf(" -o := Allow offgrid terminals.\n"); printf(" -o := Allow offgrid terminals.\n");
printf(" -p := Do not generate power PORT geometries.\n"); printf(" -p := Do not generate power PORT geometries.\n");
printf(" -t := Do not split terminals in grid points.\n");
printf("\n" ); printf("\n" );
} }
@ -85,6 +86,7 @@ extern int main(argc, argv)
if (!strcmp(argv[i], "-V")) { VL = C_VerboseLevel2; continue; } if (!strcmp(argv[i], "-V")) { VL = C_VerboseLevel2; continue; }
if (!strcmp(argv[i], "-o")) { sxFlags |= F_ALLOW_OFFGRID; continue; } if (!strcmp(argv[i], "-o")) { sxFlags |= F_ALLOW_OFFGRID; continue; }
if (!strcmp(argv[i], "-p")) { sxFlags |= F_NO_POWER_GEOM; continue; } if (!strcmp(argv[i], "-p")) { sxFlags |= F_NO_POWER_GEOM; continue; }
if (!strcmp(argv[i], "-t")) { sxFlags |= F_NO_SPLIT_TERM; continue; }
break; break;
} }