Merge branch 'master' of ssh://steve-icarus@icarus.com/home/u/icarus/steve/git/verilog
This commit is contained in:
commit
1a8be6d28c
38
Makefile.in
38
Makefile.in
|
|
@ -223,40 +223,40 @@ install: all installdirs $(libdir)/ivl/ivl@EXEEXT@ $(libdir)/ivl/include/consta
|
||||||
do (cd $$dir ; $(MAKE) $@); done
|
do (cd $$dir ; $(MAKE) $@); done
|
||||||
|
|
||||||
$(bindir)/iverilog-vpi: ./iverilog-vpi
|
$(bindir)/iverilog-vpi: ./iverilog-vpi
|
||||||
$(INSTALL_SCRIPT) ./iverilog-vpi $(bindir)/iverilog-vpi
|
$(INSTALL_SCRIPT) ./iverilog-vpi $(DESTDIR)$(bindir)/iverilog-vpi
|
||||||
|
|
||||||
$(libdir)/ivl/ivl@EXEEXT@: ./ivl@EXEEXT@
|
$(libdir)/ivl/ivl@EXEEXT@: ./ivl@EXEEXT@
|
||||||
$(INSTALL_PROGRAM) ./ivl@EXEEXT@ $(libdir)/ivl/ivl@EXEEXT@
|
$(INSTALL_PROGRAM) ./ivl@EXEEXT@ $(DESTDIR)$(libdir)/ivl/ivl@EXEEXT@
|
||||||
|
|
||||||
$(libdir)/ivl/include/constants.vams: $(srcdir)/constants.vams
|
$(libdir)/ivl/include/constants.vams: $(srcdir)/constants.vams
|
||||||
$(INSTALL_DATA) $(srcdir)/constants.vams $@
|
$(INSTALL_DATA) $(srcdir)/constants.vams $@
|
||||||
|
|
||||||
$(libdir)/ivl/xnf-s.conf: $(srcdir)/xnf-s.conf
|
$(libdir)/ivl/xnf-s.conf: $(srcdir)/xnf-s.conf
|
||||||
$(INSTALL_DATA) $(srcdir)/xnf-s.conf $(libdir)/ivl/xnf-s.conf
|
$(INSTALL_DATA) $(srcdir)/xnf-s.conf $(DESTDIR)$(libdir)/ivl/xnf-s.conf
|
||||||
|
|
||||||
$(libdir)/ivl/xnf.conf: $(srcdir)/xnf.conf
|
$(libdir)/ivl/xnf.conf: $(srcdir)/xnf.conf
|
||||||
$(INSTALL_DATA) $(srcdir)/xnf.conf $(libdir)/ivl/xnf.conf
|
$(INSTALL_DATA) $(srcdir)/xnf.conf $(DESTDIR)$(libdir)/ivl/xnf.conf
|
||||||
|
|
||||||
$(includedir)/ivl_target.h: $(srcdir)/ivl_target.h
|
$(includedir)/ivl_target.h: $(srcdir)/ivl_target.h
|
||||||
$(INSTALL_DATA) $(srcdir)/ivl_target.h $(includedir)/ivl_target.h
|
$(INSTALL_DATA) $(srcdir)/ivl_target.h $(DESTDIR)$(includedir)/ivl_target.h
|
||||||
|
|
||||||
$(includedir)/_pli_types.h: _pli_types.h
|
$(includedir)/_pli_types.h: _pli_types.h
|
||||||
$(INSTALL_DATA) $< $(includedir)/_pli_types.h
|
$(INSTALL_DATA) $< $(DESTDIR)$(includedir)/_pli_types.h
|
||||||
|
|
||||||
$(includedir)/vpi_user.h: $(srcdir)/vpi_user.h
|
$(includedir)/vpi_user.h: $(srcdir)/vpi_user.h
|
||||||
$(INSTALL_DATA) $(srcdir)/vpi_user.h $(includedir)/vpi_user.h
|
$(INSTALL_DATA) $(srcdir)/vpi_user.h $(DESTDIR)$(includedir)/vpi_user.h
|
||||||
|
|
||||||
$(includedir)/acc_user.h: $(srcdir)/acc_user.h
|
$(includedir)/acc_user.h: $(srcdir)/acc_user.h
|
||||||
$(INSTALL_DATA) $(srcdir)/acc_user.h $(includedir)/acc_user.h
|
$(INSTALL_DATA) $(srcdir)/acc_user.h $(DESTDIR)$(includedir)/acc_user.h
|
||||||
|
|
||||||
$(includedir)/veriuser.h: $(srcdir)/veriuser.h
|
$(includedir)/veriuser.h: $(srcdir)/veriuser.h
|
||||||
$(INSTALL_DATA) $(srcdir)/veriuser.h $(includedir)/veriuser.h
|
$(INSTALL_DATA) $(srcdir)/veriuser.h $(DESTDIR)$(includedir)/veriuser.h
|
||||||
|
|
||||||
$(mandir)/man1/iverilog-vpi.1: $(srcdir)/iverilog-vpi.man
|
$(mandir)/man1/iverilog-vpi.1: $(srcdir)/iverilog-vpi.man
|
||||||
$(INSTALL_DATA) $(srcdir)/iverilog-vpi.man $(mandir)/man1/iverilog-vpi.1
|
$(INSTALL_DATA) $(srcdir)/iverilog-vpi.man $(DESTDIR)$(mandir)/man1/iverilog-vpi.1
|
||||||
|
|
||||||
$(prefix)/iverilog-vpi.pdf: iverilog-vpi.pdf
|
$(prefix)/iverilog-vpi.pdf: iverilog-vpi.pdf
|
||||||
$(INSTALL_DATA) iverilog-vpi.pdf $(prefix)/iverilog-vpi.pdf
|
$(INSTALL_DATA) iverilog-vpi.pdf $(DESTDIR)$(prefix)/iverilog-vpi.pdf
|
||||||
|
|
||||||
# In windows installations, put a few examples and the quick_start
|
# In windows installations, put a few examples and the quick_start
|
||||||
# into the destination directory.
|
# into the destination directory.
|
||||||
|
|
@ -279,22 +279,22 @@ $(prefix)/QUICK_START.txt: $(srcdir)/QUICK_START.txt
|
||||||
endif
|
endif
|
||||||
|
|
||||||
installdirs: mkinstalldirs
|
installdirs: mkinstalldirs
|
||||||
$(srcdir)/mkinstalldirs $(bindir) $(includedir) $(libdir)/ivl \
|
$(srcdir)/mkinstalldirs $(DESTDIR)$(bindir) $(DESTDIR)$(includedir) $(DESTDIR)$(libdir)/ivl \
|
||||||
$(libdir)/ivl/include $(mandir) $(mandir)/man1
|
$(DESTDIR)$(libdir)/ivl/include $(DESTDIR)$(mandir) $(DESTDIR)$(mandir)/man1
|
||||||
|
|
||||||
uninstall:
|
uninstall:
|
||||||
for dir in $(SUBDIRS); do (cd $$dir ; $(MAKE) $@); done
|
for dir in $(SUBDIRS); do (cd $$dir ; $(MAKE) $@); done
|
||||||
for dir in vpi ivlpp driver; \
|
for dir in vpi ivlpp driver; \
|
||||||
do (cd $$dir ; $(MAKE) $@); done
|
do (cd $$dir ; $(MAKE) $@); done
|
||||||
for f in xnf.conf xnf-s.conf ivl@EXEEXT@ include/constants.vams; \
|
for f in xnf.conf xnf-s.conf ivl@EXEEXT@ include/constants.vams; \
|
||||||
do rm -f $(libdir)/ivl/$$f; done
|
do rm -f $(DESTDIR)$(libdir)/ivl/$$f; done
|
||||||
-rmdir $(libdir)/ivl/include
|
-rmdir $(DESTDIR)$(libdir)/ivl/include
|
||||||
-rmdir $(libdir)/ivl
|
-rmdir $(DESTDIR)$(libdir)/ivl
|
||||||
for f in verilog iverilog-vpi gverilog@EXEEXT@; \
|
for f in verilog iverilog-vpi gverilog@EXEEXT@; \
|
||||||
do rm -f $(bindir)/$$f; done
|
do rm -f $(DESTDIR)$(bindir)/$$f; done
|
||||||
for f in ivl_target.h vpi_user.h _pli_types.h acc_user.h veriuser.h; \
|
for f in ivl_target.h vpi_user.h _pli_types.h acc_user.h veriuser.h; \
|
||||||
do rm -f $(includedir)/$$f; done
|
do rm -f $(DESTDIR)$(includedir)/$$f; done
|
||||||
rm -f $(mandir)/man1/iverilog-vpi.1 $(prefix)/iverilog-vpi.pdf
|
rm -f $(DESTDIR)$(mandir)/man1/iverilog-vpi.1 $(DESTDIR)$(prefix)/iverilog-vpi.pdf
|
||||||
|
|
||||||
|
|
||||||
-include $(patsubst %.o, dep/%.d, $O)
|
-include $(patsubst %.o, dep/%.d, $O)
|
||||||
|
|
|
||||||
|
|
@ -112,9 +112,10 @@ void NetDelaySrc::dump(ostream&o, unsigned ind) const
|
||||||
o << setw(ind) << "" << "specify delay";
|
o << setw(ind) << "" << "specify delay";
|
||||||
if (posedge_) o << " posedge";
|
if (posedge_) o << " posedge";
|
||||||
if (negedge_) o << " negedge";
|
if (negedge_) o << " negedge";
|
||||||
if (is_condit())
|
if (is_condit()) {
|
||||||
if (has_condit()) o << " if";
|
if (has_condit()) o << " if";
|
||||||
else o << " ifnone";
|
else o << " ifnone";
|
||||||
|
}
|
||||||
o << " src "
|
o << " src "
|
||||||
<< "(" << transition_delays_[IVL_PE_01]
|
<< "(" << transition_delays_[IVL_PE_01]
|
||||||
<< "," << transition_delays_[IVL_PE_10]
|
<< "," << transition_delays_[IVL_PE_10]
|
||||||
|
|
|
||||||
21
elab_expr.cc
21
elab_expr.cc
|
|
@ -680,10 +680,13 @@ NetExpr* PECallFunction::elaborate_expr(Design*des, NetScope*scope,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Keep track of the concatenation/repeat depth.
|
||||||
|
static int concat_depth = 0;
|
||||||
|
|
||||||
NetExpr* PEConcat::elaborate_expr(Design*des, NetScope*scope,
|
NetExpr* PEConcat::elaborate_expr(Design*des, NetScope*scope,
|
||||||
int expr_wid, bool) const
|
int expr_wid, bool) const
|
||||||
{
|
{
|
||||||
|
concat_depth += 1;
|
||||||
NetExpr* repeat = 0;
|
NetExpr* repeat = 0;
|
||||||
|
|
||||||
if (debug_elaborate) {
|
if (debug_elaborate) {
|
||||||
|
|
@ -712,6 +715,15 @@ NetExpr* PEConcat::elaborate_expr(Design*des, NetScope*scope,
|
||||||
<< "may not be negative (" << rep->value().as_long()
|
<< "may not be negative (" << rep->value().as_long()
|
||||||
<< ")." << endl;
|
<< ")." << endl;
|
||||||
des->errors += 1;
|
des->errors += 1;
|
||||||
|
concat_depth -= 1;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (rep->value().is_zero() && concat_depth < 2) {
|
||||||
|
cerr << get_fileline() << ": error: Concatenation repeat "
|
||||||
|
<< "may not be zero in this context." << endl;
|
||||||
|
des->errors += 1;
|
||||||
|
concat_depth -= 1;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -752,6 +764,15 @@ NetExpr* PEConcat::elaborate_expr(Design*des, NetScope*scope,
|
||||||
|
|
||||||
tmp->set_width(wid_sum * tmp->repeat());
|
tmp->set_width(wid_sum * tmp->repeat());
|
||||||
|
|
||||||
|
if (wid_sum == 0 && concat_depth < 2) {
|
||||||
|
cerr << get_fileline() << ": error: Concatenation may not "
|
||||||
|
<< "have zero width in this context." << endl;
|
||||||
|
des->errors += 1;
|
||||||
|
concat_depth -= 1;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
concat_depth -= 1;
|
||||||
return tmp;
|
return tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1591,7 +1591,7 @@ NetNet* PEConcat::elaborate_net(Design*des, NetScope*scope,
|
||||||
|
|
||||||
if (repeat == 0) {
|
if (repeat == 0) {
|
||||||
cerr << get_fileline() << ": error: Concatenation repeat "
|
cerr << get_fileline() << ": error: Concatenation repeat "
|
||||||
"may not be 0."
|
"may not be zero."
|
||||||
<< endl;
|
<< endl;
|
||||||
des->errors += 1;
|
des->errors += 1;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
@ -1689,7 +1689,6 @@ NetNet* PEConcat::elaborate_net(Design*des, NetScope*scope,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
osig->local_flag(true);
|
osig->local_flag(true);
|
||||||
return osig;
|
return osig;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -45,17 +45,17 @@ if [ -e $destdir/$prefix ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Exporting $tag to $destdir/$prefix..."
|
echo "Exporting $tag to $destdir/$prefix..."
|
||||||
git-archive --prefix="$prefix/" $tag | ( cd "$destdir" ; tar xf - )
|
git-archive --prefix="$prefix/" $tag | ( cd "$destdir" && tar xf - )
|
||||||
|
|
||||||
versionh="$destdir/verilog-$id/version.h"
|
versionh="$destdir/$prefix/version.h"
|
||||||
echo "Create $versionh ..."
|
echo "Create $versionh ..."
|
||||||
echo "#define VERSION_TAG \"$tag\"" > $versionh
|
echo "#define VERSION_TAG \"$tag\"" > $versionh
|
||||||
|
|
||||||
echo "Running autoconf.sh..."
|
echo "Running autoconf.sh..."
|
||||||
( cd $destdir/$prefix ; sh autoconf.sh )
|
( cd $destdir/$prefix && sh autoconf.sh )
|
||||||
|
|
||||||
echo "Making bundle $prefix.tar.gz..."
|
echo "Making bundle $prefix.tar.gz..."
|
||||||
tar czf $prefix.tar.gz -C "$destdir" $prefix
|
tar czf $prefix.tar.gz --exclude=autom4te.cache -C "$destdir" $prefix
|
||||||
|
|
||||||
echo "Removing temporary $destdir/$prefix..."
|
echo "Removing temporary $destdir/$prefix..."
|
||||||
rm -rf "$destdir/$prefix"
|
rm -rf "$destdir/$prefix"
|
||||||
|
|
|
||||||
69
verilog.spec
69
verilog.spec
|
|
@ -1,10 +1,15 @@
|
||||||
|
#norootforbuild
|
||||||
|
#
|
||||||
|
%define rev_date 20080429
|
||||||
|
#
|
||||||
|
#
|
||||||
Summary: Icarus Verilog
|
Summary: Icarus Verilog
|
||||||
Name: verilog
|
Name: verilog
|
||||||
Version: 0.9.0.20080429
|
Version: 0.9.0.%{rev_date}
|
||||||
Release: 0
|
Release: 0
|
||||||
License: GPL
|
License: GPL
|
||||||
Group: Productivity/Scientific/Electronics
|
Group: Productivity/Scientific/Electronics
|
||||||
Source: verilog-20080429.tar.gz
|
Source: verilog-%{rev_date}.tar.gz
|
||||||
URL: http://www.icarus.com/eda/verilog/index.html
|
URL: http://www.icarus.com/eda/verilog/index.html
|
||||||
Packager: Stephen Williams <steve@icarus.com>
|
Packager: Stephen Williams <steve@icarus.com>
|
||||||
|
|
||||||
|
|
@ -22,14 +27,14 @@ engineering formats, including simulation. It strives to be true
|
||||||
to the IEEE-1364 standard.
|
to the IEEE-1364 standard.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -n verilog-20080429
|
%setup -n verilog-%{rev_date}
|
||||||
|
|
||||||
%build
|
%build
|
||||||
./configure --prefix=/usr --mandir='$(prefix)/share/man'
|
%{configure}
|
||||||
make CXXFLAGS=-O
|
make CXXFLAGS=-O
|
||||||
|
|
||||||
%install
|
%install
|
||||||
make prefix=$RPM_BUILD_ROOT/usr install
|
%{makeinstall}
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
rm -rf $RPM_BUILD_ROOT
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
|
@ -39,35 +44,35 @@ rm -rf $RPM_BUILD_ROOT
|
||||||
%attr(-,root,root) %doc COPYING README.txt BUGS.txt QUICK_START.txt ieee1364-notes.txt mingw.txt swift.txt netlist.txt t-dll.txt vpi.txt xnf.txt tgt-fpga/fpga.txt cadpli/cadpli.txt xilinx-hint.txt
|
%attr(-,root,root) %doc COPYING README.txt BUGS.txt QUICK_START.txt ieee1364-notes.txt mingw.txt swift.txt netlist.txt t-dll.txt vpi.txt xnf.txt tgt-fpga/fpga.txt cadpli/cadpli.txt xilinx-hint.txt
|
||||||
%attr(-,root,root) %doc examples/*
|
%attr(-,root,root) %doc examples/*
|
||||||
|
|
||||||
%attr(-,root,root) /usr/share/man/man1/iverilog.1.gz
|
%attr(-,root,root) %{_mandir}/man1/iverilog.1.gz
|
||||||
#%attr(-,root,root) /usr/man/man1/iverilog-fpga.1.gz
|
#%attr(-,root,root) /usr/man/man1/iverilog-fpga.1.gz
|
||||||
%attr(-,root,root) /usr/share/man/man1/iverilog-vpi.1.gz
|
%attr(-,root,root) %{_mandir}/man1/iverilog-vpi.1.gz
|
||||||
%attr(-,root,root) /usr/share/man/man1/vvp.1.gz
|
%attr(-,root,root) %{_mandir}/man1/vvp.1.gz
|
||||||
|
|
||||||
%attr(-,root,root) /usr/bin/iverilog
|
%attr(-,root,root) %{_bindir}/iverilog
|
||||||
%attr(-,root,root) /usr/bin/iverilog-vpi
|
%attr(-,root,root) %{_bindir}/iverilog-vpi
|
||||||
%attr(-,root,root) /usr/bin/vvp
|
%attr(-,root,root) %{_bindir}/vvp
|
||||||
%attr(-,root,root) /usr/lib/ivl/ivl
|
%attr(-,root,root) %{_libdir}/ivl/ivl
|
||||||
%attr(-,root,root) /usr/lib/ivl/ivlpp
|
%attr(-,root,root) %{_libdir}/ivl/ivlpp
|
||||||
%attr(-,root,root) /usr/lib/ivl/null.tgt
|
%attr(-,root,root) %{_libdir}/ivl/null.tgt
|
||||||
%attr(-,root,root) /usr/lib/ivl/null.conf
|
%attr(-,root,root) %{_libdir}/ivl/null.conf
|
||||||
%attr(-,root,root) /usr/lib/ivl/null-s.conf
|
%attr(-,root,root) %{_libdir}/ivl/null-s.conf
|
||||||
%attr(-,root,root) /usr/lib/ivl/stub.tgt
|
%attr(-,root,root) %{_libdir}/ivl/stub.tgt
|
||||||
%attr(-,root,root) /usr/lib/ivl/stub.conf
|
%attr(-,root,root) %{_libdir}/ivl/stub.conf
|
||||||
%attr(-,root,root) /usr/lib/ivl/stub-s.conf
|
%attr(-,root,root) %{_libdir}/ivl/stub-s.conf
|
||||||
%attr(-,root,root) /usr/lib/ivl/vvp.tgt
|
%attr(-,root,root) %{_libdir}/ivl/vvp.tgt
|
||||||
%attr(-,root,root) /usr/lib/ivl/vvp.conf
|
%attr(-,root,root) %{_libdir}/ivl/vvp.conf
|
||||||
%attr(-,root,root) /usr/lib/ivl/vvp-s.conf
|
%attr(-,root,root) %{_libdir}/ivl/vvp-s.conf
|
||||||
#%attr(-,root,root) /usr/lib/ivl/fpga.tgt
|
#%attr(-,root,root) %{_libdir}/ivl/fpga.tgt
|
||||||
#%attr(-,root,root) /usr/lib/ivl/fpga.conf
|
#%attr(-,root,root) %{_libdir}/ivl/fpga.conf
|
||||||
#%attr(-,root,root) /usr/lib/ivl/fpga-s.conf
|
#%attr(-,root,root) %{_libdir}/ivl/fpga-s.conf
|
||||||
#%attr(-,root,root) /usr/lib/ivl/xnf.conf
|
#%attr(-,root,root) %{_libdir}/ivl/xnf.conf
|
||||||
#%attr(-,root,root) /usr/lib/ivl/xnf-s.conf
|
#%attr(-,root,root) %{_libdir}/ivl/xnf-s.conf
|
||||||
%attr(-,root,root) /usr/lib/ivl/system.sft
|
%attr(-,root,root) %{_libdir}/ivl/system.sft
|
||||||
%attr(-,root,root) /usr/lib/ivl/system.vpi
|
%attr(-,root,root) %{_libdir}/ivl/system.vpi
|
||||||
%attr(-,root,root) /usr/lib/ivl/cadpli.vpl
|
%attr(-,root,root) %{_libdir}/ivl/cadpli.vpl
|
||||||
%attr(-,root,root) /usr/lib/libvpi.a
|
%attr(-,root,root) %{_libdir}/libvpi.a
|
||||||
%attr(-,root,root) /usr/lib/libveriuser.a
|
%attr(-,root,root) %{_libdir}/libveriuser.a
|
||||||
%attr(-,root,root) /usr/include/ivl_target.h
|
%attr(-,root,root) /usr/include/ivl_target.h
|
||||||
%attr(-,root,root) /usr/include/vpi_user.h
|
%attr(-,root,root) /usr/include/vpi_user.h
|
||||||
%attr(-,root,root) /usr/include/acc_user.h
|
%attr(-,root,root) /usr/include/acc_user.h
|
||||||
|
|
|
||||||
|
|
@ -130,6 +130,9 @@ static int vpi_array_get(int code, vpiHandle ref)
|
||||||
struct __vpiArray*obj = ARRAY_HANDLE(ref);
|
struct __vpiArray*obj = ARRAY_HANDLE(ref);
|
||||||
|
|
||||||
switch (code) {
|
switch (code) {
|
||||||
|
case vpiLineNo:
|
||||||
|
return 0; // Not implemented for now!
|
||||||
|
|
||||||
case vpiSize:
|
case vpiSize:
|
||||||
return (int) obj->array_count;
|
return (int) obj->array_count;
|
||||||
|
|
||||||
|
|
@ -142,6 +145,10 @@ static char*vpi_array_get_str(int code, vpiHandle ref)
|
||||||
{
|
{
|
||||||
struct __vpiArray*obj = ARRAY_HANDLE(ref);
|
struct __vpiArray*obj = ARRAY_HANDLE(ref);
|
||||||
|
|
||||||
|
if (code == vpiFile) { // Not implemented for now!
|
||||||
|
return simple_set_rbuf_str(file_names[0]);
|
||||||
|
}
|
||||||
|
|
||||||
return generic_get_str(code, &obj->scope->base, obj->name, NULL);
|
return generic_get_str(code, &obj->scope->base, obj->name, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ static s_vpi_error_info vpip_last_error = { 0, 0, 0, 0, 0, 0, 0 };
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The vpip_string function creates a constant string from the pass
|
* The vpip_string function creates a constant string from the pass
|
||||||
* input. This constant string is permanently allocate from an
|
* input. This constant string is permanently allocated from an
|
||||||
* efficient string buffer store.
|
* efficient string buffer store.
|
||||||
*/
|
*/
|
||||||
struct vpip_string_chunk {
|
struct vpip_string_chunk {
|
||||||
|
|
@ -115,7 +115,7 @@ PLI_INT32 vpi_chk_error(p_vpi_error_info info)
|
||||||
info->level = vpip_last_error.level;
|
info->level = vpip_last_error.level;
|
||||||
info->message = vpip_last_error.message;
|
info->message = vpip_last_error.message;
|
||||||
info->product = vpi_vlog_info.product;
|
info->product = vpi_vlog_info.product;
|
||||||
info->code = "";
|
info->code = (char *) "";
|
||||||
info->file = 0;
|
info->file = 0;
|
||||||
info->line = 0;
|
info->line = 0;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2003-2007 Stephen Williams (steve@icarus.com)
|
* Copyright (c) 2003-2008 Stephen Williams (steve@icarus.com)
|
||||||
*
|
*
|
||||||
* This source code is free software; you can redistribute it
|
* This source code is free software; you can redistribute it
|
||||||
* and/or modify it in source code form under the terms of the GNU
|
* and/or modify it in source code form under the terms of the GNU
|
||||||
|
|
@ -34,8 +34,15 @@ static int real_var_get(int code, vpiHandle ref)
|
||||||
|
|
||||||
struct __vpiRealVar*rfp = (struct __vpiRealVar*)ref;
|
struct __vpiRealVar*rfp = (struct __vpiRealVar*)ref;
|
||||||
|
|
||||||
if (code == vpiArray) {
|
switch (code) {
|
||||||
|
case vpiArray:
|
||||||
return rfp->parent != 0;
|
return rfp->parent != 0;
|
||||||
|
|
||||||
|
case vpiSize:
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
case vpiLineNo:
|
||||||
|
return 0; // Not implemented for now!
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
@ -186,4 +193,3 @@ vpiHandle vpip_make_real_var(const char*name, vvp_net_t*net)
|
||||||
|
|
||||||
return &obj->base;
|
return &obj->base;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -136,6 +136,15 @@ static int signal_get(int code, vpiHandle ref)
|
||||||
case vpiArray:
|
case vpiArray:
|
||||||
return rfp->parent != 0;
|
return rfp->parent != 0;
|
||||||
|
|
||||||
|
case vpiIndex: // This only works while we have a single index.
|
||||||
|
if (rfp->parent) {
|
||||||
|
s_vpi_value vp;
|
||||||
|
vp.format = vpiIntVal;
|
||||||
|
vpi_get_value(rfp->id.index, &vp);
|
||||||
|
return vp.value.integer;
|
||||||
|
} else
|
||||||
|
return 0;
|
||||||
|
|
||||||
case vpiSize:
|
case vpiSize:
|
||||||
if (rfp->msb >= rfp->lsb)
|
if (rfp->msb >= rfp->lsb)
|
||||||
return rfp->msb - rfp->lsb + 1;
|
return rfp->msb - rfp->lsb + 1;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue