- bug fix (infinite loop)
This commit is contained in:
parent
cb2811be66
commit
1c37cbde2e
|
@ -32,7 +32,7 @@
|
|||
|
||||
|
||||
|
||||
#ident "$Id: lon_lax_param.c,v 1.2 2002/09/30 16:20:44 czo Exp $"
|
||||
#ident "$Id: lon_lax_param.c,v 1.3 2004/07/31 02:23:09 ludo Exp $"
|
||||
|
||||
/****************************************************************************/
|
||||
/* Produit : synthese logique (gestion du fichier de parametres) */
|
||||
|
@ -45,6 +45,7 @@
|
|||
#include <string.h>
|
||||
|
||||
#include <mut.h>
|
||||
#include <aut.h>
|
||||
#include <abl.h>
|
||||
#include <mlo.h>
|
||||
#include <abe.h>
|
||||
|
@ -112,7 +113,7 @@ static char* parseName (char* VHDL_name)
|
|||
char *p;
|
||||
char *Found;
|
||||
|
||||
p = (char *) mbkalloc (strlen (VHDL_name) + 1);
|
||||
p = (char *) autallocblock (strlen (VHDL_name) + 1);
|
||||
|
||||
strcpy (p, VHDL_name);
|
||||
|
||||
|
@ -139,7 +140,7 @@ static char* driveName (char* IO_name)
|
|||
/*
|
||||
fprintf(stdout,"init %s-\n", IO_name);
|
||||
*/
|
||||
Found = mbkalloc (strlen (IO_name) + 2);
|
||||
Found = (char *)autallocblock (strlen (IO_name) + 2);
|
||||
Found = strchr (IO_name, ' ');
|
||||
|
||||
if (Found != NULL)
|
||||
|
@ -147,7 +148,7 @@ static char* driveName (char* IO_name)
|
|||
/*
|
||||
fprintf(stdout,"init %s, Found =%s-\n", IO_name, Found);
|
||||
*/
|
||||
p = mbkalloc (strlen (IO_name) + 2);
|
||||
p = autallocblock (strlen (IO_name) + 2);
|
||||
sprintf (p, "%s)", IO_name);
|
||||
Found = strchr (p, ' ');
|
||||
Found[0] = '(';
|
||||
|
@ -195,7 +196,7 @@ static lax* loadlax (char* FileName)
|
|||
int i, n;
|
||||
lax* loadparam;
|
||||
|
||||
loadparam = (lax*) mbkalloc (sizeof (lax));
|
||||
loadparam = (lax*) autallocblock (sizeof (lax));
|
||||
resetlax (loadparam);
|
||||
|
||||
if ((Pfile = fopen (FileName, "rt")) != NULL)
|
||||
|
@ -1174,7 +1175,7 @@ extern void parsefilelax(char *filename)
|
|||
|
||||
/*build the real filename*/
|
||||
size=strlen(filename);
|
||||
name=(char*) mbkalloc(size+strlen(".lax")+1);
|
||||
name=(char*) autallocblock(size+strlen(".lax")+1);
|
||||
name=strcpy(name,filename);
|
||||
name[size]='.'; name[size+1]='l'; name[size+2]='a'; name[size+3]='x';
|
||||
name[size+4]='\0';
|
||||
|
@ -1189,7 +1190,7 @@ extern void parsefilelax(char *filename)
|
|||
/******************************************************************************/
|
||||
extern void defaultlax(int mode_optim)
|
||||
{
|
||||
LAX = (lax*) mbkalloc (sizeof (lax));
|
||||
LAX = (lax*) autallocblock (sizeof (lax));
|
||||
resetlax (LAX);
|
||||
LAX->mode=mode_optim;
|
||||
}
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
#include <mlo.h>
|
||||
#include <abl.h>
|
||||
#include <abe.h>
|
||||
#include <aut.h>
|
||||
#include "lon_lax_param.h"
|
||||
#include "lon_signal_name.h"
|
||||
#include "lon_lib_matching.h"
|
||||
|
@ -60,7 +61,7 @@ static port_list* newport()
|
|||
int i;
|
||||
|
||||
if (!PORT) {
|
||||
PORT=mbkalloc(BLOCK*sizeof(port_list));
|
||||
PORT=(port_list *)autallocblock(BLOCK*sizeof(port_list));
|
||||
new=PORT;
|
||||
for (i = 1; i < BLOCK; i++) {
|
||||
new->NEXT = new + 1;
|
||||
|
@ -139,7 +140,7 @@ extern cell_list* copyCell(cell_list* old)
|
|||
{
|
||||
cell_list* cell;
|
||||
|
||||
cell=(cell_list*) mbkalloc(sizeof(cell_list));
|
||||
cell=(cell_list*) autallocblock(sizeof(cell_list));
|
||||
|
||||
cell->BEFIG=old->BEFIG;
|
||||
cell->NAME=old->NAME;
|
||||
|
@ -215,7 +216,7 @@ static cell_list* properties_addCell(befig_list* befig, lofig_list *lofig)
|
|||
losig_list* losig;
|
||||
|
||||
|
||||
cell=(cell_list*) mbkalloc(sizeof(cell_list));
|
||||
cell=(cell_list*) autallocblock(sizeof(cell_list));
|
||||
|
||||
cell->NAME=lofig->NAME;
|
||||
cell->AREA=getgenericarea(befig);
|
||||
|
@ -317,7 +318,7 @@ extern cell_list* createCell(befig_list* befig)
|
|||
bepor_list* bepor;
|
||||
|
||||
|
||||
cell=(cell_list*) mbkalloc(sizeof(cell_list));
|
||||
cell=(cell_list*) autallocblock(sizeof(cell_list));
|
||||
|
||||
cell->NAME=befig->NAME;
|
||||
cell->AREA=getgenericarea(befig);
|
||||
|
@ -406,7 +407,6 @@ extern cell_list* getCellbuffer()
|
|||
chain_list* chain;
|
||||
cell_list* cell, *best;
|
||||
befig_list* befig;
|
||||
|
||||
for (chain=CELLS; chain; chain=chain->NEXT) {
|
||||
cell=(cell_list*) chain->DATA;
|
||||
befig=cell->BEFIG;
|
||||
|
@ -416,7 +416,7 @@ extern cell_list* getCellbuffer()
|
|||
&& ABL_ATOM_VALUE(befig->BEOUT->ABL)!=getablatomzero() ) {
|
||||
best=cell;
|
||||
for (cell=cell->NEXT; cell; cell=cell->NEXT) {
|
||||
if (best->AREA>cell->AREA) cell=best;
|
||||
if (best->AREA>cell->AREA) best=cell;
|
||||
}
|
||||
return best;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue