fix wrong 'hash' being linked in + C99 compat
This fixes crash on macos due to wrong hash() being linked in. It also makes sure that proper function defs are declared and available (as required by C99) to make compile possible in newer compilers (e.g. Apple clang) and to some extend prevent similar linkage issues happening again.
This commit is contained in:
parent
20f6d76926
commit
b5c70decbd
|
|
@ -23,12 +23,14 @@ the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h> /* for strtod() */
|
#include <stdlib.h> /* for strtod() */
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
#include <ctype.h>
|
||||||
|
#include <xlocale.h>
|
||||||
|
|
||||||
#include "netgen.h"
|
#include "netgen.h"
|
||||||
#include "hash.h"
|
|
||||||
#include "objlist.h"
|
#include "objlist.h"
|
||||||
#include "netfile.h"
|
#include "netfile.h"
|
||||||
#include "print.h"
|
#include "print.h"
|
||||||
|
#include "hash.h"
|
||||||
|
|
||||||
void extCell(char *name, int filenum)
|
void extCell(char *name, int filenum)
|
||||||
{
|
{
|
||||||
|
|
@ -186,7 +188,7 @@ char *ReadExt(char *fname, int doflat, int *fnum)
|
||||||
/* Make sure all .ext file reading is case sensitive */
|
/* Make sure all .ext file reading is case sensitive */
|
||||||
matchfunc = match;
|
matchfunc = match;
|
||||||
matchintfunc = matchfile;
|
matchintfunc = matchfile;
|
||||||
hashfunc = hash;
|
hashfunc = my_hash;
|
||||||
|
|
||||||
if (LookupCellFile(fname, filenum) != NULL) {
|
if (LookupCellFile(fname, filenum) != NULL) {
|
||||||
Printf("Error: Duplicate cell name \"%s\"!\n", fname);
|
Printf("Error: Duplicate cell name \"%s\"!\n", fname);
|
||||||
|
|
@ -652,7 +654,7 @@ char *ReadSim(char *fname, int *fnum)
|
||||||
/* Make sure all .sim file reading is case sensitive */
|
/* Make sure all .sim file reading is case sensitive */
|
||||||
matchfunc = match;
|
matchfunc = match;
|
||||||
matchintfunc = matchfile;
|
matchintfunc = matchfile;
|
||||||
hashfunc = hash;
|
hashfunc = my_hash;
|
||||||
|
|
||||||
CellDef(fname, filenum);
|
CellDef(fname, filenum);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
#ifndef _FLATTEN_H
|
||||||
|
#define _FLATTEN_H
|
||||||
|
|
||||||
|
void flattenCell(char *name, int file);
|
||||||
|
|
||||||
|
#endif /* _FLATTEN_H */
|
||||||
|
|
@ -30,8 +30,8 @@ the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "netgen.h"
|
#include "netgen.h"
|
||||||
#include "hash.h"
|
|
||||||
#include "objlist.h"
|
#include "objlist.h"
|
||||||
|
#include "hash.h"
|
||||||
|
|
||||||
unsigned long (*hashfunc)(char *, int) = NULL;
|
unsigned long (*hashfunc)(char *, int) = NULL;
|
||||||
int (*matchfunc)(char *, char *) = NULL;
|
int (*matchfunc)(char *, char *) = NULL;
|
||||||
|
|
@ -148,7 +148,7 @@ unsigned long hashnocase(char *s, int hashsize)
|
||||||
return (hashsize == 0) ? hashval : (hashval % hashsize);
|
return (hashsize == 0) ? hashval : (hashval % hashsize);
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned long hash(char *s, int hashsize)
|
unsigned long my_hash(char *s, int hashsize)
|
||||||
{
|
{
|
||||||
unsigned long hashval;
|
unsigned long hashval;
|
||||||
|
|
||||||
|
|
|
||||||
40
base/hash.h
40
base/hash.h
|
|
@ -15,40 +15,40 @@ struct hashdict {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
extern void InitializeHashTable(struct hashdict *dict, int size);
|
void InitializeHashTable(struct hashdict *dict, int size);
|
||||||
extern int RecurseHashTable(struct hashdict *dict,
|
int RecurseHashTable(struct hashdict *dict,
|
||||||
int (*func)(struct hashlist *elem));
|
int (*func)(struct hashlist *elem));
|
||||||
extern int RecurseHashTableValue(struct hashdict *dict,
|
int RecurseHashTableValue(struct hashdict *dict,
|
||||||
int (*func)(struct hashlist *elem, int), int);
|
int (*func)(struct hashlist *elem, int), int);
|
||||||
extern struct nlist *RecurseHashTablePointer(struct hashdict *dict,
|
struct nlist *RecurseHashTablePointer(struct hashdict *dict,
|
||||||
struct nlist *(*func)(struct hashlist *elem, void *),
|
struct nlist *(*func)(struct hashlist *elem, void *),
|
||||||
void *pointer);
|
void *pointer);
|
||||||
extern void HashDelete(char *name, struct hashdict *dict);
|
void HashDelete(char *name, struct hashdict *dict);
|
||||||
extern void HashIntDelete(char *name, int value, struct hashdict *dict);
|
void HashIntDelete(char *name, int value, struct hashdict *dict);
|
||||||
extern void HashKill(struct hashdict *dict);
|
void HashKill(struct hashdict *dict);
|
||||||
|
|
||||||
|
|
||||||
extern int CountHashTableEntries(struct hashlist *p);
|
int CountHashTableEntries(struct hashlist *p);
|
||||||
extern int CountHashTableBinsUsed(struct hashlist *p);
|
int CountHashTableBinsUsed(struct hashlist *p);
|
||||||
|
|
||||||
/* these functions return a pointer to a hash list element */
|
/* these functions return a pointer to a hash list element */
|
||||||
extern struct hashlist *HashInstall(char *name, struct hashdict *dict);
|
struct hashlist *HashInstall(char *name, struct hashdict *dict);
|
||||||
extern struct hashlist *HashPtrInstall(char *name, void *ptr,
|
struct hashlist *HashPtrInstall(char *name, void *ptr,
|
||||||
struct hashdict *dict);
|
struct hashdict *dict);
|
||||||
extern struct hashlist *HashIntPtrInstall(char *name, int value, void *ptr,
|
struct hashlist *HashIntPtrInstall(char *name, int value, void *ptr,
|
||||||
struct hashdict *dict);
|
struct hashdict *dict);
|
||||||
extern struct hashlist *HashInt2PtrInstall(char *name, int c, void *ptr,
|
struct hashlist *HashInt2PtrInstall(char *name, int c, void *ptr,
|
||||||
struct hashdict *dict);
|
struct hashdict *dict);
|
||||||
|
|
||||||
/* these functions return the ->ptr field of a struct hashlist */
|
/* these functions return the ->ptr field of a struct hashlist */
|
||||||
extern void *HashLookup(char *s, struct hashdict *dict);
|
void *HashLookup(char *s, struct hashdict *dict);
|
||||||
extern void *HashIntLookup(char *s, int i, struct hashdict *dict);
|
void *HashIntLookup(char *s, int i, struct hashdict *dict);
|
||||||
extern void *HashInt2Lookup(char *s, int c, struct hashdict *dict);
|
void *HashInt2Lookup(char *s, int c, struct hashdict *dict);
|
||||||
extern void *HashFirst(struct hashdict *dict);
|
void *HashFirst(struct hashdict *dict);
|
||||||
extern void *HashNext(struct hashdict *dict);
|
void *HashNext(struct hashdict *dict);
|
||||||
|
|
||||||
extern unsigned long hashnocase(char *s, int hashsize);
|
unsigned long hashnocase(char *s, int hashsize);
|
||||||
extern unsigned long hash(char *s, int hashsize);
|
unsigned long my_hash(char *s, int hashsize);
|
||||||
|
|
||||||
extern int (*matchfunc)(char *, char *);
|
extern int (*matchfunc)(char *, char *);
|
||||||
/* matchintfunc() compares based on the name and the first */
|
/* matchintfunc() compares based on the name and the first */
|
||||||
|
|
|
||||||
|
|
@ -21,11 +21,13 @@ the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h> /* for rand(), abs(), etc */
|
||||||
#include <setjmp.h>
|
#include <setjmp.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <time.h> /* for time() as a seed for random number generator */
|
#include <time.h> /* for time() as a seed for random number generator */
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include <math.h> /* for fabs() */
|
#include <math.h> /* for fabs() */
|
||||||
|
#include <ctype.h> /* for toupper() */
|
||||||
|
|
||||||
#ifdef IBMPC
|
#ifdef IBMPC
|
||||||
#include <alloc.h>
|
#include <alloc.h>
|
||||||
|
|
@ -35,6 +37,7 @@ the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||||
|
|
||||||
#ifdef TCL_NETGEN
|
#ifdef TCL_NETGEN
|
||||||
#include <tcl.h>
|
#include <tcl.h>
|
||||||
|
int check_interrupt();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "netgen.h"
|
#include "netgen.h"
|
||||||
|
|
@ -45,6 +48,7 @@ the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||||
#include "netfile.h"
|
#include "netfile.h"
|
||||||
#include "print.h"
|
#include "print.h"
|
||||||
#include "dbug.h"
|
#include "dbug.h"
|
||||||
|
#include "hash.h"
|
||||||
|
|
||||||
#ifdef TCL_NETGEN
|
#ifdef TCL_NETGEN
|
||||||
int InterruptPending = 0;
|
int InterruptPending = 0;
|
||||||
|
|
@ -3757,7 +3761,7 @@ void CreateTwoLists(char *name1, int file1, char *name2, int file2, int dolist)
|
||||||
/* determine if matching will be case sensitive or case insensitive */
|
/* determine if matching will be case sensitive or case insensitive */
|
||||||
matchfunc = match;
|
matchfunc = match;
|
||||||
matchintfunc = matchfile;
|
matchintfunc = matchfile;
|
||||||
hashfunc = hash;
|
hashfunc = my_hash;
|
||||||
if (tc1 != NULL && tc2 != NULL) {
|
if (tc1 != NULL && tc2 != NULL) {
|
||||||
if ((tc1->flags & CELL_NOCASE) && (tc2->flags & CELL_NOCASE)) {
|
if ((tc1->flags & CELL_NOCASE) && (tc2->flags & CELL_NOCASE)) {
|
||||||
matchfunc = matchnocase;
|
matchfunc = matchnocase;
|
||||||
|
|
|
||||||
|
|
@ -18,50 +18,59 @@ extern int InterruptPending;
|
||||||
|
|
||||||
/* Exported procedures */
|
/* Exported procedures */
|
||||||
|
|
||||||
extern void PrintElementClasses(struct ElementClass *EC, int type, int dolist);
|
void PrintElementClasses(struct ElementClass *EC, int type, int dolist);
|
||||||
extern void PrintNodeClasses(struct NodeClass *NC, int type, int dolist);
|
void PrintNodeClasses(struct NodeClass *NC, int type, int dolist);
|
||||||
extern void SummarizeNodeClasses(struct NodeClass *NC);
|
void SummarizeNodeClasses(struct NodeClass *NC);
|
||||||
extern void PrintPropertyResults(int do_list);
|
void PrintPropertyResults(int do_list);
|
||||||
extern void PrintCoreStats(void);
|
void PrintCoreStats(void);
|
||||||
extern void ResetState(void);
|
void ResetState(void);
|
||||||
extern void CreateTwoLists(char *name1, int file1, char *name2, int file2,
|
void CreateTwoLists(char *name1, int file1, char *name2, int file2,
|
||||||
int dolist);
|
int dolist);
|
||||||
extern int Iterate(void);
|
int Iterate(void);
|
||||||
extern int VerifyMatching(void);
|
int VerifyMatching(void);
|
||||||
extern void PrintAutomorphisms(void);
|
void PrintAutomorphisms(void);
|
||||||
extern int ResolveAutomorphisms(void);
|
int ResolveAutomorphisms(void);
|
||||||
extern void PermuteAutomorphisms(void);
|
void PermuteAutomorphisms(void);
|
||||||
extern int Permute(void);
|
int Permute(void);
|
||||||
extern int PermuteSetup(char *model, int filenum, char *pin1, char *pin2);
|
int PermuteSetup(char *model, int filenum, char *pin1, char *pin2);
|
||||||
extern int PermuteForget(char *model, int filenum, char *pin1, char *pin2);
|
int PermuteForget(char *model, int filenum, char *pin1, char *pin2);
|
||||||
extern int EquivalenceElements(char *name1, int file1, char *name2, int file2);
|
int EquivalenceElements(char *name1, int file1, char *name2, int file2);
|
||||||
extern int EquivalenceNodes(char *name1, int file1, char *name2, int file2);
|
int EquivalenceNodes(char *name1, int file1, char *name2, int file2);
|
||||||
extern int EquivalenceClasses(char *name1, int file1, char *name2, int file2);
|
int EquivalenceClasses(char *name1, int file1, char *name2, int file2);
|
||||||
extern int IgnoreClass(char *name, int file, unsigned char type);
|
int IgnoreClass(char *name, int file, unsigned char type);
|
||||||
extern int MatchPins(struct nlist *tp1, struct nlist *tp2, int dolist);
|
int MatchPins(struct nlist *tp1, struct nlist *tp2, int dolist);
|
||||||
extern int PropertyOptimize(struct objlist *ob, struct nlist *tp, int run,
|
int PropertyOptimize(struct objlist *ob, struct nlist *tp, int run,
|
||||||
int series, int comb);
|
int series, int comb);
|
||||||
|
|
||||||
extern int CreateCompareQueue(char *, int, char *, int);
|
int CreateCompareQueue(char *, int, char *, int);
|
||||||
extern int GetCompareQueueTop(char **, int *, char **, int *);
|
int GetCompareQueueTop(char **, int *, char **, int *);
|
||||||
extern int PeekCompareQueueTop(char **, int *, char **, int *);
|
int PeekCompareQueueTop(char **, int *, char **, int *);
|
||||||
extern void RemoveCompareQueue();
|
void RemoveCompareQueue();
|
||||||
|
|
||||||
extern void PrintIllegalClasses();
|
void PrintIllegalClasses();
|
||||||
extern void PrintIllegalNodeClasses();
|
void PrintIllegalNodeClasses();
|
||||||
extern void PrintIllegalElementClasses();
|
void PrintIllegalElementClasses();
|
||||||
|
|
||||||
|
void DumpNetwork(struct objlist *ob, int cidx);
|
||||||
|
void DumpNetworkAll(char *name, int file);
|
||||||
|
|
||||||
|
void RegroupDataStructures();
|
||||||
|
void FormatIllegalElementClasses();
|
||||||
|
void FormatIllegalNodeClasses();
|
||||||
|
int ResolveAutomorphsByProperty();
|
||||||
|
int ResolveAutomorphsByPin();
|
||||||
|
void SummarizeElementClasses(struct ElementClass *EC);
|
||||||
|
int remove_group_tags(struct objlist *ob);
|
||||||
|
|
||||||
extern void DumpNetwork(struct objlist *ob, int cidx);
|
|
||||||
extern void DumpNetworkAll(char *name, int file);
|
|
||||||
|
|
||||||
#ifdef TCL_NETGEN
|
#ifdef TCL_NETGEN
|
||||||
extern int EquivalentNode();
|
int EquivalentNode();
|
||||||
extern int EquivalentElement();
|
int EquivalentElement();
|
||||||
|
|
||||||
extern void enable_interrupt();
|
void enable_interrupt();
|
||||||
extern void disable_interrupt();
|
void disable_interrupt();
|
||||||
|
|
||||||
extern Tcl_Obj *ListNodeClasses(int legal);
|
Tcl_Obj *ListNodeClasses(int legal);
|
||||||
extern Tcl_Obj *ListElementClasses(int legal);
|
Tcl_Obj *ListElementClasses(int legal);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,8 @@
|
||||||
#define HORIZONTAL 1
|
#define HORIZONTAL 1
|
||||||
#define VERTICAL 2
|
#define VERTICAL 2
|
||||||
|
|
||||||
|
int UniquePins(char *name, int filenum);
|
||||||
|
|
||||||
/* netgen.c */
|
/* netgen.c */
|
||||||
extern void ReopenCellDef(char *name, int file);
|
extern void ReopenCellDef(char *name, int file);
|
||||||
extern void CellDef(char *name, int file);
|
extern void CellDef(char *name, int file);
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@ the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
#include <limits.h>
|
||||||
#ifdef IBMPC
|
#ifdef IBMPC
|
||||||
#include <alloc.h>
|
#include <alloc.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -31,13 +32,13 @@ the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "netgen.h"
|
#include "netgen.h"
|
||||||
#include "hash.h"
|
|
||||||
#include "objlist.h"
|
#include "objlist.h"
|
||||||
#include "regexp.h"
|
#include "regexp.h"
|
||||||
#include "dbug.h"
|
#include "dbug.h"
|
||||||
#include "print.h"
|
#include "print.h"
|
||||||
#include "netfile.h"
|
#include "netfile.h"
|
||||||
#include "netcmp.h"
|
#include "netcmp.h"
|
||||||
|
#include "hash.h"
|
||||||
|
|
||||||
#ifdef TCL_NETGEN
|
#ifdef TCL_NETGEN
|
||||||
extern Tcl_Interp *netgeninterp;
|
extern Tcl_Interp *netgeninterp;
|
||||||
|
|
@ -178,7 +179,7 @@ char *strsave(char *s)
|
||||||
|
|
||||||
int match(char *st1, char *st2)
|
int match(char *st1, char *st2)
|
||||||
{
|
{
|
||||||
if (0==strcmp(st1,st2)) return(1);
|
if (0==strncmp(st1,st2,PATH_MAX)) return(1);
|
||||||
else return(0);
|
else return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -288,7 +289,7 @@ static struct hashdict cell_dict;
|
||||||
|
|
||||||
void InitCellHashTable(void)
|
void InitCellHashTable(void)
|
||||||
{
|
{
|
||||||
hashfunc = hash;
|
hashfunc = my_hash;
|
||||||
matchfunc = NULL;
|
matchfunc = NULL;
|
||||||
matchintfunc = matchfile;
|
matchintfunc = matchfile;
|
||||||
InitializeHashTable(&cell_dict, CELLHASHSIZE);
|
InitializeHashTable(&cell_dict, CELLHASHSIZE);
|
||||||
|
|
|
||||||
|
|
@ -312,6 +312,19 @@ extern void GarbageCollect(void);
|
||||||
extern void InitGarbageCollection(void);
|
extern void InitGarbageCollection(void);
|
||||||
extern void AddToGarbageList(struct objlist *head);
|
extern void AddToGarbageList(struct objlist *head);
|
||||||
|
|
||||||
|
void DeleteProperties(struct keyvalue **topptr);
|
||||||
|
void AddProperty(struct keyvalue **topptr, char *key, char *value);
|
||||||
|
void AddScaledProperty(struct keyvalue **topptr, char *key, char *value, double scale);
|
||||||
|
void DeleteProperties(struct keyvalue **topptr);
|
||||||
|
struct objlist *LinkProperties(char *model, struct keyvalue *topptr);
|
||||||
|
|
||||||
|
void ClassDelete(char *class, int file);
|
||||||
|
void RemoveShorted(char *class, int file);
|
||||||
|
void CellRehash(char *name, char *newname, int file);
|
||||||
|
|
||||||
|
/* defined in netgen.c */
|
||||||
|
int ConvertStringToInteger(char *string, int *ival);
|
||||||
|
|
||||||
#ifdef HAVE_MALLINFO
|
#ifdef HAVE_MALLINFO
|
||||||
void PrintMemoryStats(void);
|
void PrintMemoryStats(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -1033,7 +1033,7 @@ void Query(void)
|
||||||
break;
|
break;
|
||||||
case 'v':
|
case 'v':
|
||||||
promptstring("Write Verilog: circuit name: ", repstr);
|
promptstring("Write Verilog: circuit name: ", repstr);
|
||||||
VerilogModule(repstr, filenum, "");
|
VerilogTop(repstr, filenum, "");
|
||||||
break;
|
break;
|
||||||
case 'E':
|
case 'E':
|
||||||
promptstring("Write ESACAP: circuit name: ", repstr);
|
promptstring("Write ESACAP: circuit name: ", repstr);
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,7 @@ the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <stdlib.h> /* for calloc(), free(), getenv() */
|
#include <stdlib.h> /* for calloc(), free(), getenv() */
|
||||||
|
#include <ctype.h> /* for toupper(), isascii() */
|
||||||
#ifndef IBMPC
|
#ifndef IBMPC
|
||||||
#include <sys/types.h> /* for getpwnam() tilde expansion */
|
#include <sys/types.h> /* for getpwnam() tilde expansion */
|
||||||
#include <pwd.h>
|
#include <pwd.h>
|
||||||
|
|
@ -40,6 +41,8 @@ the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||||
#include "objlist.h"
|
#include "objlist.h"
|
||||||
#include "netfile.h"
|
#include "netfile.h"
|
||||||
#include "print.h"
|
#include "print.h"
|
||||||
|
#include "query.h"
|
||||||
|
#include "objlist.h"
|
||||||
|
|
||||||
// Global storage for parameters from .PARAM
|
// Global storage for parameters from .PARAM
|
||||||
struct hashdict spiceparams;
|
struct hashdict spiceparams;
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
#ifndef _TECH_H
|
||||||
|
#define _TECH_H
|
||||||
|
|
||||||
|
int ActelLibPresent(void);
|
||||||
|
void ActelLib(void);
|
||||||
|
void VerilogTop(char *name, int fnum, char *filename);
|
||||||
|
|
||||||
|
#endif /* _TECH_H */
|
||||||
|
|
@ -52,10 +52,10 @@ the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "netgen.h"
|
#include "netgen.h"
|
||||||
#include "hash.h"
|
|
||||||
#include "objlist.h"
|
#include "objlist.h"
|
||||||
#include "netfile.h"
|
#include "netfile.h"
|
||||||
#include "print.h"
|
#include "print.h"
|
||||||
|
#include "hash.h"
|
||||||
|
|
||||||
// See netfile.c for explanation of delimiters. 'X'
|
// See netfile.c for explanation of delimiters. 'X'
|
||||||
// separates single-character delimiters from two-character delimiters.
|
// separates single-character delimiters from two-character delimiters.
|
||||||
|
|
@ -2239,7 +2239,7 @@ char *ReadVerilogTop(char *fname, int *fnum, int blackbox)
|
||||||
else {
|
else {
|
||||||
matchfunc = match;
|
matchfunc = match;
|
||||||
matchintfunc = matchfile;
|
matchintfunc = matchfile;
|
||||||
hashfunc = hash;
|
hashfunc = my_hash;
|
||||||
}
|
}
|
||||||
|
|
||||||
InitializeHashTable(&verilogparams, OBJHASHSIZE);
|
InitializeHashTable(&verilogparams, OBJHASHSIZE);
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@ the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
#include <time.h>
|
||||||
|
|
||||||
#ifdef IBMPC
|
#ifdef IBMPC
|
||||||
#include <stdlib.h> /* for strtol on PC */
|
#include <stdlib.h> /* for strtol on PC */
|
||||||
|
|
@ -33,6 +34,8 @@ the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||||
#include "netfile.h"
|
#include "netfile.h"
|
||||||
#include "hash.h"
|
#include "hash.h"
|
||||||
#include "print.h"
|
#include "print.h"
|
||||||
|
#include "xilinx.h"
|
||||||
|
#include "flatten.h"
|
||||||
|
|
||||||
#define XILINXHASHSIZE 99
|
#define XILINXHASHSIZE 99
|
||||||
static long xilinxhashbase = 0xA00;
|
static long xilinxhashbase = 0xA00;
|
||||||
|
|
@ -132,10 +135,8 @@ char *xilinx_class(model)
|
||||||
}
|
}
|
||||||
return(model);
|
return(model);
|
||||||
}
|
}
|
||||||
void
|
|
||||||
Xilinx(cellname, filename)
|
void Xilinx(char *cellname, char *filename)
|
||||||
char *cellname;
|
|
||||||
char *filename;
|
|
||||||
{
|
{
|
||||||
char Path[500];
|
char Path[500];
|
||||||
char FileName[500];
|
char FileName[500];
|
||||||
|
|
@ -163,8 +164,7 @@ Xilinx(cellname, filename)
|
||||||
CloseFile(FileName);
|
CloseFile(FileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
xilinxCell(cell)
|
int xilinxCell(char *cell)
|
||||||
char *cell;
|
|
||||||
{
|
{
|
||||||
struct nlist *nl;
|
struct nlist *nl;
|
||||||
struct objlist *ob;
|
struct objlist *ob;
|
||||||
|
|
@ -252,9 +252,7 @@ struct objlist *xilinx_gate(ob,nl)
|
||||||
return(nob);
|
return(nob);
|
||||||
}
|
}
|
||||||
|
|
||||||
xilinx_sym(nl,gob)
|
void xilinx_sym(struct nlist *nl, struct objlist *gob)
|
||||||
struct nlist *nl;
|
|
||||||
struct objlist *gob;
|
|
||||||
{
|
{
|
||||||
struct objlist *ob;
|
struct objlist *ob;
|
||||||
char *cp,*rindex();
|
char *cp,*rindex();
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
#ifndef _XILINX_H
|
||||||
|
#define _XILINX_H
|
||||||
|
|
||||||
|
void xilinx_sym(struct nlist *nl, struct objlist *gob);
|
||||||
|
void Xilinx(char *cellname, char *filename);
|
||||||
|
int xilinxCell(char *cell);
|
||||||
|
int XilinxLibPresent(void);
|
||||||
|
void XilinxLib(void);
|
||||||
|
|
||||||
|
#endif /* _XILINX_H */
|
||||||
|
|
@ -9,7 +9,7 @@ EXTRA_LIBS = ${MAIN_EXTRA_LIBS}
|
||||||
DFLAGS += -DNETGEN_DATE="\"`date`\""
|
DFLAGS += -DNETGEN_DATE="\"`date`\""
|
||||||
LIBS += -lm
|
LIBS += -lm
|
||||||
CLEANS += netgen.sh netgen.tcl netgenexec${EXEEXT}
|
CLEANS += netgen.sh netgen.tcl netgenexec${EXEEXT}
|
||||||
CFLAGS += -I${NETGENDIR}/base
|
CFLAGS += -I${NETGENDIR}/base -I./base
|
||||||
|
|
||||||
TCL_FILES = \
|
TCL_FILES = \
|
||||||
$(DESTDIR)${INSTALL_TCLDIR}/tkcon.tcl \
|
$(DESTDIR)${INSTALL_TCLDIR}/tkcon.tcl \
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,8 @@ the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||||
#include "print.h"
|
#include "print.h"
|
||||||
#include "query.h" /* for ElementNodes() */
|
#include "query.h" /* for ElementNodes() */
|
||||||
#include "hash.h"
|
#include "hash.h"
|
||||||
|
#include "xilinx.h"
|
||||||
|
#include "tech.h"
|
||||||
|
|
||||||
#ifndef TRUE
|
#ifndef TRUE
|
||||||
#define TRUE 1
|
#define TRUE 1
|
||||||
|
|
@ -976,7 +978,7 @@ _netgen_writenet(ClientData clientData,
|
||||||
SpiceCell(repstr, filenum, "");
|
SpiceCell(repstr, filenum, "");
|
||||||
break;
|
break;
|
||||||
case VERILOG_IDX:
|
case VERILOG_IDX:
|
||||||
VerilogModule(repstr, filenum, "");
|
VerilogTop(repstr, filenum, "");
|
||||||
break;
|
break;
|
||||||
case WOMBAT_IDX:
|
case WOMBAT_IDX:
|
||||||
Wombat(repstr,NULL);
|
Wombat(repstr,NULL);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue