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