Initial logicexp parser and gate generator.

This commit is contained in:
Brian Taylor 2022-10-21 15:21:18 -07:00 committed by Holger Vogt
parent db81d7ca28
commit 67369f1c67
4 changed files with 1378 additions and 1 deletions

View File

@ -136,6 +136,8 @@ libfte_la_SOURCES = \
inventory.c \
linear.c \
linear.h \
logicexp.c \
logicexp.h \
measure.c \
misccoms.c \
misccoms.h \
@ -185,6 +187,7 @@ libfte_la_SOURCES = \
typesdef.c \
typesdef.h \
udevices.c \
udevices.h \
vectors.c \
vectors.h \
where.c \

1358
src/frontend/logicexp.c Normal file

File diff suppressed because it is too large Load Diff

View File

@ -54,6 +54,7 @@
#include "ngspice/cpextern.h"
#include "ngspice/macros.h"
#include "ngspice/udevices.h"
#include "ngspice/logicexp.h"
extern struct card* insert_new_line(
struct card* card, char* line, int linenum, int linenum_orig);
@ -3433,7 +3434,13 @@ BOOL u_check_instance(char *line)
printf("WARNING ");
printf("Instance %s type %s is not supported\n",
hdr->instance_name, itype);
if (ps_udevice_msgs >= 2) {
if (eq(itype, "logicexp")) {
if (ps_udevice_msgs == 3)
(void) f_logicexp(line);
} else if (eq(itype, "pindly")) {
if (ps_udevice_msgs == 3)
(void) f_pindly(line);
} else if (ps_udevice_msgs == 3) {
printf("%s\n", line);
}
}

View File

@ -0,0 +1,9 @@
/* logicexp.h */
#ifndef INCLUDED_LOGICEXP_H
#define INCLUDED_LOGICEXP_H
BOOL f_logicexp(char *line);
BOOL f_pindly(char *line);
#endif