From 6a0cbc5fa82e924e8f99ef155619ea654a37aa44 Mon Sep 17 00:00:00 2001 From: Stephen Williams Date: Thu, 7 Oct 2010 18:01:11 -0700 Subject: [PATCH] VPI access to atom2 types. Create the .var/2u and .var/2s variable records and give them basic implementations. Make available to VPI the proper types for the SystemVerilog types that these variables represent. --- Makefile.in | 5 ++- vpi/sys_display.c | 4 ++ vpi/sys_priv.h | 2 +- vvp/README.txt | 6 ++- vvp/array.h | 3 -- vvp/compile.cc | 4 ++ vvp/compile.h | 11 +++-- vvp/lexor.lex | 2 + vvp/parse.y | 15 +++++-- vvp/vpi_priv.cc | 16 ++++--- vvp/vpi_priv.h | 13 +++--- vvp/vpi_signal.cc | 112 ++++++++++++++++++++++++++++++++++++++++------ vvp/words.cc | 49 ++++++++++---------- 13 files changed, 177 insertions(+), 65 deletions(-) diff --git a/Makefile.in b/Makefile.in index fc291bf98..8b879a9cf 100644 --- a/Makefile.in +++ b/Makefile.in @@ -292,7 +292,7 @@ else WIN32_INSTALL = $(bindir)/iverilog-vpi$(suffix) endif -install: all installdirs $(libdir)/ivl$(suffix)/ivl@EXEEXT@ $(libdir)/ivl$(suffix)/include/constants.vams $(libdir)/ivl$(suffix)/include/disciplines.vams $(includedir)/ivl_target.h $(includedir)/_pli_types.h $(includedir)/vpi_user.h $(includedir)/acc_user.h $(includedir)/veriuser.h $(WIN32_INSTALL) $(INSTALL_DOC) +install: all installdirs $(libdir)/ivl$(suffix)/ivl@EXEEXT@ $(libdir)/ivl$(suffix)/include/constants.vams $(libdir)/ivl$(suffix)/include/disciplines.vams $(includedir)/ivl_target.h $(includedir)/_pli_types.h $(includedir)/sv_vpi_user.h $(includedir)/vpi_user.h $(includedir)/acc_user.h $(includedir)/veriuser.h $(WIN32_INSTALL) $(INSTALL_DOC) $(foreach dir,$(SUBDIRS),$(MAKE) -C $(dir) $@ && ) true $(bindir)/iverilog-vpi$(suffix): ./iverilog-vpi @@ -313,6 +313,9 @@ $(includedir)/ivl_target.h: $(srcdir)/ivl_target.h $(includedir)/_pli_types.h: _pli_types.h $(INSTALL_DATA) $< "$(DESTDIR)$(includedir)/_pli_types.h" +$(includedir)/sv_vpi_user.h: $(srcdir)/sv_vpi_user.h + $(INSTALL_DATA) $(srcdir)/sv_vpi_user.h "$(DESTDIR)$(includedir)/sv_vpi_user.h" + $(includedir)/vpi_user.h: $(srcdir)/vpi_user.h $(INSTALL_DATA) $(srcdir)/vpi_user.h "$(DESTDIR)$(includedir)/vpi_user.h" diff --git a/vpi/sys_display.c b/vpi/sys_display.c index 2ea8e830f..6069974e2 100644 --- a/vpi/sys_display.c +++ b/vpi/sys_display.c @@ -1047,6 +1047,10 @@ static int sys_check_args(vpiHandle callh, vpiHandle argv, const PLI_BYTE8*name, case vpiNet: case vpiReg: case vpiIntegerVar: + case vpiByteVar: + case vpiShortIntVar: + case vpiIntVar: + case vpiLongIntVar: case vpiTimeVar: case vpiRealVar: case vpiSysFuncCall: diff --git a/vpi/sys_priv.h b/vpi/sys_priv.h index 094416f28..f384cdef7 100644 --- a/vpi/sys_priv.h +++ b/vpi/sys_priv.h @@ -20,7 +20,7 @@ */ #include "vpi_config.h" -#include "vpi_user.h" +#include "sv_vpi_user.h" /* * Context structure for PRNG in mt19937int.c diff --git a/vvp/README.txt b/vvp/README.txt index 8e43030b5..817df5b67 100644 --- a/vvp/README.txt +++ b/vvp/README.txt @@ -278,8 +278,10 @@ A variable is a bit vector that can be written by behavioral code (so has no structural input) and propagates its output to a functor. The general syntax of a variable is: -