Clean up spurious trailing white space.

This commit is contained in:
steve 2004-10-04 01:10:51 +00:00
parent b3a3428b9a
commit e4ae832153
144 changed files with 1849 additions and 1540 deletions

View File

@ -16,7 +16,7 @@
# 59 Temple Place - Suite 330 # 59 Temple Place - Suite 330
# Boston, MA 02111-1307, USA # Boston, MA 02111-1307, USA
# #
#ident "$Id: Makefile.in,v 1.167 2004/09/18 01:59:44 steve Exp $" #ident "$Id: Makefile.in,v 1.168 2004/10/04 01:10:51 steve Exp $"
# #
# #
SHELL = /bin/sh SHELL = /bin/sh
@ -93,7 +93,7 @@ clean:
for tgt in $(TARGETS); do (cd $$tgt ; $(MAKE) $@); done for tgt in $(TARGETS); do (cd $$tgt ; $(MAKE) $@); done
for dir in vpi ivlpp tgt-verilog tgt-stub driver; \ for dir in vpi ivlpp tgt-verilog tgt-stub driver; \
do (cd $$dir ; $(MAKE) $@); done do (cd $$dir ; $(MAKE) $@); done
rm -f *.o parse.cc parse.cc.output parse.h lexor.cc rm -f *.o parse.cc parse.cc.output parse.h lexor.cc
rm -f lexor_keyword.cc libivl.a libvpi.a iverilog-vpi syn-rules.cc* rm -f lexor_keyword.cc libivl.a libvpi.a iverilog-vpi syn-rules.cc*
rm -rf dep ivl@EXEEXT@ rm -rf dep ivl@EXEEXT@
@ -133,7 +133,7 @@ ifeq (@WIN32@,yes)
# export and import library, and the last link makes a, ivl.exe # export and import library, and the last link makes a, ivl.exe
# that really exports the things that the import library imports. # that really exports the things that the import library imports.
ivl@EXEEXT@: $O ivl.def ivl@EXEEXT@: $O ivl.def
$(CXX) -o ivl@EXEEXT@ $O $(dllib) @EXTRALIBS@ $(CXX) -o ivl@EXEEXT@ $O $(dllib) @EXTRALIBS@
dlltool --dllname ivl@EXEEXT@ --def ivl.def \ dlltool --dllname ivl@EXEEXT@ --def ivl.def \
--output-lib libivl.a --output-exp ivl.exp --output-lib libivl.a --output-exp ivl.exp
$(CXX) -o ivl@EXEEXT@ ivl.exp $O $(dllib) @EXTRALIBS@ $(CXX) -o ivl@EXEEXT@ ivl.exp $O $(dllib) @EXTRALIBS@

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#ifdef HAVE_CVS_IDENT #ifdef HAVE_CVS_IDENT
#ident "$Id: Module.cc,v 1.24 2004/06/13 04:56:53 steve Exp $" #ident "$Id: Module.cc,v 1.25 2004/10/04 01:10:51 steve Exp $"
#endif #endif
# include "config.h" # include "config.h"
@ -76,7 +76,7 @@ unsigned Module::port_count() const
/* /*
* Return the array of PEIdent object that are at this port of the * Return the array of PEIdent object that are at this port of the
* module. If the port is internally unconnected, return an empty * module. If the port is internally unconnected, return an empty
* array. * array.
*/ */
const svector<PEIdent*>& Module::get_port(unsigned idx) const const svector<PEIdent*>& Module::get_port(unsigned idx) const
{ {
@ -150,6 +150,9 @@ const list<PProcess*>& Module::get_behaviors() const
/* /*
* $Log: Module.cc,v $ * $Log: Module.cc,v $
* Revision 1.25 2004/10/04 01:10:51 steve
* Clean up spurious trailing white space.
*
* Revision 1.24 2004/06/13 04:56:53 steve * Revision 1.24 2004/06/13 04:56:53 steve
* Add support for the default_nettype directive. * Add support for the default_nettype directive.
* *

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#ifdef HAVE_CVS_IDENT #ifdef HAVE_CVS_IDENT
#ident "$Id: PExpr.cc,v 1.34 2004/02/20 06:22:56 steve Exp $" #ident "$Id: PExpr.cc,v 1.35 2004/10/04 01:10:51 steve Exp $"
#endif #endif
# include "config.h" # include "config.h"
@ -67,12 +67,12 @@ bool PEBinary::is_constant(Module*mod) const
return left_->is_constant(mod) && right_->is_constant(mod); return left_->is_constant(mod) && right_->is_constant(mod);
} }
PECallFunction::PECallFunction(const hname_t&n, const svector<PExpr *> &parms) PECallFunction::PECallFunction(const hname_t&n, const svector<PExpr *> &parms)
: path_(n), parms_(parms) : path_(n), parms_(parms)
{ {
} }
PECallFunction::PECallFunction(const hname_t&n) PECallFunction::PECallFunction(const hname_t&n)
: path_(n) : path_(n)
{ {
} }
@ -262,6 +262,9 @@ bool PEUnary::is_constant(Module*m) const
/* /*
* $Log: PExpr.cc,v $ * $Log: PExpr.cc,v $
* Revision 1.35 2004/10/04 01:10:51 steve
* Clean up spurious trailing white space.
*
* Revision 1.34 2004/02/20 06:22:56 steve * Revision 1.34 2004/02/20 06:22:56 steve
* parameter keys are per_strings. * parameter keys are per_strings.
* *

View File

@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#ifdef HAVE_CVS_IDENT #ifdef HAVE_CVS_IDENT
#ident "$Id: PExpr.h,v 1.65 2003/02/08 19:49:21 steve Exp $" #ident "$Id: PExpr.h,v 1.66 2004/10/04 01:10:51 steve Exp $"
#endif #endif
# include <string> # include <string>
@ -160,7 +160,7 @@ class PEEvent : public PExpr {
edge_t type() const; edge_t type() const;
PExpr* expr() const; PExpr* expr() const;
virtual void dump(ostream&) const; virtual void dump(ostream&) const;
private: private:
@ -492,6 +492,9 @@ class PECallFunction : public PExpr {
/* /*
* $Log: PExpr.h,v $ * $Log: PExpr.h,v $
* Revision 1.66 2004/10/04 01:10:51 steve
* Clean up spurious trailing white space.
*
* Revision 1.65 2003/02/08 19:49:21 steve * Revision 1.65 2003/02/08 19:49:21 steve
* Calculate delay statement delays using elaborated * Calculate delay statement delays using elaborated
* expressions instead of pre-elaborated expression * expressions instead of pre-elaborated expression

View File

@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#ifdef HAVE_CVS_IDENT #ifdef HAVE_CVS_IDENT
#ident "$Id: PGate.h,v 1.28 2004/03/08 00:47:44 steve Exp $" #ident "$Id: PGate.h,v 1.29 2004/10/04 01:10:52 steve Exp $"
#endif #endif
# include "svector.h" # include "svector.h"
@ -50,7 +50,7 @@ class Module;
* strength of the 1 drive. * strength of the 1 drive.
*/ */
class PGate : public LineInfo { class PGate : public LineInfo {
public: public:
enum strength_t { HIGHZ, WEAK, PULL, STRONG, SUPPLY }; enum strength_t { HIGHZ, WEAK, PULL, STRONG, SUPPLY };
@ -227,6 +227,9 @@ class PGModule : public PGate {
/* /*
* $Log: PGate.h,v $ * $Log: PGate.h,v $
* Revision 1.29 2004/10/04 01:10:52 steve
* Clean up spurious trailing white space.
*
* Revision 1.28 2004/03/08 00:47:44 steve * Revision 1.28 2004/03/08 00:47:44 steve
* primitive ports can bind bi name. * primitive ports can bind bi name.
* *

View File

@ -16,8 +16,8 @@ execute even the most trivial design. For the purposes of simulation,
we use as our example *the* most trivial simulation: we use as our example *the* most trivial simulation:
module main; module main;
initial initial
begin begin
$display("Hello, World"); $display("Hello, World");
$finish ; $finish ;

View File

@ -1,4 +1,4 @@
THE ICARUS VERILOG COMPILATION SYSTEM THE ICARUS VERILOG COMPILATION SYSTEM
Copyright 2000-2003 Stephen Williams Copyright 2000-2003 Stephen Williams
@ -9,7 +9,7 @@ described in the IEEE-1364 standard. Of course, it's not quite there
yet. It does currently handle a mix of structural and behavioral yet. It does currently handle a mix of structural and behavioral
constructs. For a view of the current state of Icarus Verilog, see its constructs. For a view of the current state of Icarus Verilog, see its
home page at <http://www.icarus.com/eda/verilog>. home page at <http://www.icarus.com/eda/verilog>.
Icarus Verilog is not aimed at being a simulator in the traditional Icarus Verilog is not aimed at being a simulator in the traditional
sense, but a compiler that generates code employed by back-end sense, but a compiler that generates code employed by back-end
tools. These back-end tools currently include a simulator engine tools. These back-end tools currently include a simulator engine
@ -296,8 +296,8 @@ Example: Compiling "hello.vl"
------------------------ hello.vl ---------------------------- ------------------------ hello.vl ----------------------------
module main(); module main();
initial initial
begin begin
$display("Hi there"); $display("Hi there");
$finish ; $finish ;
@ -307,7 +307,7 @@ endmodule
-------------------------------------------------------------- --------------------------------------------------------------
Ensure that "iverilog" is on your search path, and the vpi library Ensure that "iverilog" is on your search path, and the vpi library
is available. is available.
To compile the program: To compile the program:

16
aclocal.m4 vendored
View File

@ -14,7 +14,7 @@
AC_DEFUN([AX_CPP_IDENT], AC_DEFUN([AX_CPP_IDENT],
[AC_CACHE_CHECK([for ident support in C compiler], ax_cv_cpp_ident, [AC_CACHE_CHECK([for ident support in C compiler], ax_cv_cpp_ident,
[AC_TRY_COMPILE([ [AC_TRY_COMPILE([
#ident "$Id: aclocal.m4,v 1.5 2004/09/27 22:34:10 steve Exp $" #ident "$Id: aclocal.m4,v 1.6 2004/10/04 01:10:52 steve Exp $"
],[while (0) {}], ],[while (0) {}],
[AS_VAR_SET(ax_cv_cpp_ident, yes)], [AS_VAR_SET(ax_cv_cpp_ident, yes)],
[AS_VAR_SET(ax_cv_cpp_ident, no)])]) [AS_VAR_SET(ax_cv_cpp_ident, no)])])
@ -137,16 +137,16 @@ AC_DEFUN([AX_C_PICFLAG],
[AC_MSG_CHECKING([for flag to make position independent code]) [AC_MSG_CHECKING([for flag to make position independent code])
PICFLAG=-fPIC PICFLAG=-fPIC
case "${host}" in case "${host}" in
*-*-cygwin*) *-*-cygwin*)
PICFLAG= PICFLAG=
;; ;;
*-*-hpux*) *-*-hpux*)
PICFLAG=+z PICFLAG=+z
;; ;;
esac esac
AC_SUBST(PICFLAG) AC_SUBST(PICFLAG)
AC_MSG_RESULT($PICFLAG) AC_MSG_RESULT($PICFLAG)
])# AX_C_PICFLAG ])# AX_C_PICFLAG
@ -174,19 +174,19 @@ case "${host}" in
;; ;;
*-*-cygwin*) *-*-cygwin*)
rdynamic="" rdynamic=""
;; ;;
*-*-hpux*) *-*-hpux*)
rdynamic="-E" rdynamic="-E"
;; ;;
*-*-darwin*) *-*-darwin*)
rdynamic="-Wl,-all_load" rdynamic="-Wl,-all_load"
strip_dynamic="-SX" strip_dynamic="-SX"
;; ;;
esac esac
AC_SUBST(rdynamic) AC_SUBST(rdynamic)
AC_MSG_RESULT($rdynamic) AC_MSG_RESULT($rdynamic)
AC_SUBST(strip_dynamic) AC_SUBST(strip_dynamic)

View File

@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#ifdef HAVE_CVS_IDENT #ifdef HAVE_CVS_IDENT
#ident "$Id: ivl_dlfcn.h,v 1.2 2003/12/12 05:43:08 steve Exp $" #ident "$Id: ivl_dlfcn.h,v 1.3 2004/10/04 01:10:56 steve Exp $"
#endif #endif
#if defined(__MINGW32__) #if defined(__MINGW32__)
@ -48,14 +48,14 @@ inline const char *dlerror(void)
{ {
static char msg[256]; static char msg[256];
unsigned long err = GetLastError(); unsigned long err = GetLastError();
FormatMessage( FormatMessage(
FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
NULL, NULL,
err, err,
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language
(LPTSTR) &msg, (LPTSTR) &msg,
sizeof(msg) - 1, sizeof(msg) - 1,
NULL NULL
); );
return msg; return msg;
} }
@ -96,6 +96,9 @@ inline const char*dlerror(void)
/* /*
* $Log: ivl_dlfcn.h,v $ * $Log: ivl_dlfcn.h,v $
* Revision 1.3 2004/10/04 01:10:56 steve
* Clean up spurious trailing white space.
*
* Revision 1.2 2003/12/12 05:43:08 steve * Revision 1.2 2003/12/12 05:43:08 steve
* Some systems dlsym requires leading _ or not on whim. * Some systems dlsym requires leading _ or not on whim.
* *

View File

@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#ifdef HAVE_CVS_IDENT #ifdef HAVE_CVS_IDENT
#ident "$Id: compiler.h,v 1.25 2004/09/25 01:58:44 steve Exp $" #ident "$Id: compiler.h,v 1.26 2004/10/04 01:10:52 steve Exp $"
#endif #endif
# include <list> # include <list>
@ -65,7 +65,7 @@
/* /*
* These are flags to enable various sorts of warnings. By default all * These are flags to enable various sorts of warnings. By default all
* the warnings are off, the -W<list> parameter arranges for each to be * the warnings are off, the -W<list> parameter arranges for each to be
* enabled. * enabled.
*/ */
/* Implicit definitions of wires. */ /* Implicit definitions of wires. */
@ -136,6 +136,9 @@ extern int load_sys_func_table(const char*path);
/* /*
* $Log: compiler.h,v $ * $Log: compiler.h,v $
* Revision 1.26 2004/10/04 01:10:52 steve
* Clean up spurious trailing white space.
*
* Revision 1.25 2004/09/25 01:58:44 steve * Revision 1.25 2004/09/25 01:58:44 steve
* Add a debug_elaborate flag * Add a debug_elaborate flag
* *

View File

@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#ifdef HAVE_CVS_IDENT #ifdef HAVE_CVS_IDENT
#ident "$Id: config.h.in,v 1.10 2003/08/26 16:26:01 steve Exp $" #ident "$Id: config.h.in,v 1.11 2004/10/04 01:10:52 steve Exp $"
#endif #endif
#if defined(__cplusplus) #if defined(__cplusplus)
@ -31,7 +31,7 @@
#endif #endif
# undef NEED_LU # undef NEED_LU
# undef NEED_TU # undef NEED_TU
# undef WLU # undef WLU
# undef WTU # undef WTU
# undef HAVE_TIMES # undef HAVE_TIMES
@ -50,6 +50,9 @@
/* /*
* $Log: config.h.in,v $ * $Log: config.h.in,v $
* Revision 1.11 2004/10/04 01:10:52 steve
* Clean up spurious trailing white space.
*
* Revision 1.10 2003/08/26 16:26:01 steve * Revision 1.10 2003/08/26 16:26:01 steve
* ifdef idents correctly. * ifdef idents correctly.
* *

View File

@ -96,7 +96,7 @@ AX_LD_EXTRALIBS
# Compiler option for position independent code, needed whan making shared objects. # Compiler option for position independent code, needed whan making shared objects.
# CFLAGS inherited by cadpli/Makefile? # CFLAGS inherited by cadpli/Makefile?
AX_C_PICFLAG AX_C_PICFLAG
# may modify CPPFLAGS and CFLAGS # may modify CPPFLAGS and CFLAGS
AX_CPP_PRECOMP AX_CPP_PRECOMP

View File

@ -1,35 +1,35 @@
This file describes the build procedure under cygwin32 (Windows 95/98/NT/2K) This file describes the build procedure under cygwin32 (Windows 95/98/NT/2K)
---------------------------------------------------------------------------- ----------------------------------------------------------------------------
Note: Icarus Verilog also compiles to native Windows binaries if you Note: Icarus Verilog also compiles to native Windows binaries if you
use the instructions in the mingw.txt file. Some people prefer cygwin use the instructions in the mingw.txt file. Some people prefer cygwin
binaries, and these instructions apply. binaries, and these instructions apply.
To build using cygwin: To build using cygwin:
Prerequisites: Prerequisites:
o Latest net release (1.1.4) of cygwin (sources.redhat.com/cygwin) o Latest net release (1.1.4) of cygwin (sources.redhat.com/cygwin)
Procedure: Procedure:
o Get the source code - see the main Icarus Verilog page for how to o Get the source code - see the main Icarus Verilog page for how to
do this do this
o cd to the verilog directory o cd to the verilog directory
o autoconf.sh o autoconf.sh
o ./configure o ./configure
o make o make
o make install o make install
That's all that's needed. That's all that's needed.
To build your own extensions - just include vpi_user.h and link with To build your own extensions - just include vpi_user.h and link with
a command like this: a command like this:
$(CC) -shared -o <dllname> <objects> -Wl,--enable-auto-image-base -L../vvm -lvvm -lvpip $(CC) -shared -o <dllname> <objects> -Wl,--enable-auto-image-base -L../vvm -lvvm -lvpip
- Venkat Iyer <venkat@comit.com> - Venkat Iyer <venkat@comit.com>

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#ifdef HAVE_CVS_IDENT #ifdef HAVE_CVS_IDENT
#ident "$Id: design_dump.cc,v 1.148 2004/05/31 23:34:36 steve Exp $" #ident "$Id: design_dump.cc,v 1.149 2004/10/04 01:10:52 steve Exp $"
#endif #endif
# include "config.h" # include "config.h"
@ -1064,7 +1064,7 @@ void Design::dump(ostream&o) const
{ {
o << "DESIGN TIME PRECISION: 10e" << get_precision() << endl; o << "DESIGN TIME PRECISION: 10e" << get_precision() << endl;
o << "SCOPES:" << endl; o << "SCOPES:" << endl;
for (list<NetScope*>::const_iterator scope = root_scopes_.begin(); for (list<NetScope*>::const_iterator scope = root_scopes_.begin();
scope != root_scopes_.end(); scope++) scope != root_scopes_.end(); scope++)
(*scope)->dump(o); (*scope)->dump(o);
@ -1089,6 +1089,9 @@ void Design::dump(ostream&o) const
/* /*
* $Log: design_dump.cc,v $ * $Log: design_dump.cc,v $
* Revision 1.149 2004/10/04 01:10:52 steve
* Clean up spurious trailing white space.
*
* Revision 1.148 2004/05/31 23:34:36 steve * Revision 1.148 2004/05/31 23:34:36 steve
* Rewire/generalize parsing an elaboration of * Rewire/generalize parsing an elaboration of
* function return values to allow for better * function return values to allow for better

File diff suppressed because it is too large Load Diff

View File

@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#ifdef HAVE_CVS_IDENT #ifdef HAVE_CVS_IDENT
#ident "$Id: cflexor.lex,v 1.7 2003/08/26 16:26:02 steve Exp $" #ident "$Id: cflexor.lex,v 1.8 2004/10/04 01:10:56 steve Exp $"
#endif #endif
# include "cfparse.h" # include "cfparse.h"
@ -113,10 +113,10 @@ static int comment_enter;
is a little bit tricky, as we don't want to mistake a comment for is a little bit tricky, as we don't want to mistake a comment for
a string word. */ a string word. */
"/"[^\*\/].* { cflval.text = strdup(yytext); "/"[^\*\/].* { cflval.text = strdup(yytext);
return TOK_STRING; } return TOK_STRING; }
[^/\n \t\b\r+-].* { cflval.text = strdup(yytext); [^/\n \t\b\r+-].* { cflval.text = strdup(yytext);
return TOK_STRING; } return TOK_STRING; }
/* Fallback match. */ /* Fallback match. */
. { return yytext[0]; } . { return yytext[0]; }

View File

@ -1,4 +1,4 @@
.TH iverilog 1 "$Date: 2004/03/10 04:51:25 $" Version "$Date: 2004/03/10 04:51:25 $" .TH iverilog 1 "$Date: 2004/10/04 01:10:56 $" Version "$Date: 2004/10/04 01:10:56 $"
.SH NAME .SH NAME
iverilog - Icarus Verilog compiler iverilog - Icarus Verilog compiler
@ -57,7 +57,7 @@ language. This flag is most useful to restrict the language to a set
supported by tools of specific generations, for compatibility with supported by tools of specific generations, for compatibility with
other tools. other tools.
.TP 8 .TP 8
.B -I\fIincludedir\fP .B -I\fIincludedir\fP
Append directory \fIincludedir\fP to list of directories searched Append directory \fIincludedir\fP to list of directories searched
for Verilog include files. The \fB-I\fP switch may be used many times for Verilog include files. The \fB-I\fP switch may be used many times
to specify several directories to search, the directories are searched to specify several directories to search, the directories are searched
@ -316,7 +316,7 @@ and directory strings.
Variable values come from the operating system environment, and not Variable values come from the operating system environment, and not
from preprocessor defines elsewhere in the file or the command line. from preprocessor defines elsewhere in the file or the command line.
.SH EXAMPLES .SH EXAMPLES
These examples assume that you have a Verilog source file called hello.v in These examples assume that you have a Verilog source file called hello.v in
the current directory the current directory
@ -349,5 +349,5 @@ vvp(1),
.nf .nf
Copyright \(co 2002 Stephen Williams Copyright \(co 2002 Stephen Williams
This document can be freely redistributed according to the terms of the This document can be freely redistributed according to the terms of the
GNU General Public License version 2.0 GNU General Public License version 2.0

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#ifdef HAVE_CVS_IDENT #ifdef HAVE_CVS_IDENT
#ident "$Id: elab_anet.cc,v 1.9 2003/09/19 03:50:12 steve Exp $" #ident "$Id: elab_anet.cc,v 1.10 2004/10/04 01:10:52 steve Exp $"
#endif #endif
# include "config.h" # include "config.h"
@ -157,7 +157,7 @@ NetNet* PEIdent::elaborate_anet(Design*des, NetScope*scope) const
cerr << get_line() << ": error: bit/part selects not allowed " cerr << get_line() << ": error: bit/part selects not allowed "
<< "on left side of procedural continuous assignment." << "on left side of procedural continuous assignment."
<< endl; << endl;
des->errors += 1; des->errors += 1;
return 0; return 0;
} }
@ -167,6 +167,9 @@ NetNet* PEIdent::elaborate_anet(Design*des, NetScope*scope) const
/* /*
* $Log: elab_anet.cc,v $ * $Log: elab_anet.cc,v $
* Revision 1.10 2004/10/04 01:10:52 steve
* Clean up spurious trailing white space.
*
* Revision 1.9 2003/09/19 03:50:12 steve * Revision 1.9 2003/09/19 03:50:12 steve
* Remove find_memory method from Design class. * Remove find_memory method from Design class.
* *

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#ifdef HAVE_CVS_IDENT #ifdef HAVE_CVS_IDENT
#ident "$Id: elab_expr.cc,v 1.90 2004/08/28 15:42:11 steve Exp $" #ident "$Id: elab_expr.cc,v 1.91 2004/10/04 01:10:52 steve Exp $"
#endif #endif
# include "config.h" # include "config.h"
@ -41,7 +41,7 @@ NetExpr* PExpr::elaborate_expr(Design*des, NetScope*, bool) const
/* /*
* Elaborate binary expressions. This involves elaborating the left * Elaborate binary expressions. This involves elaborating the left
* and right sides, and creating one of a variety of different NetExpr * and right sides, and creating one of a variety of different NetExpr
* types. * types.
*/ */
NetEBinary* PEBinary::elaborate_expr(Design*des, NetScope*scope, bool) const NetEBinary* PEBinary::elaborate_expr(Design*des, NetScope*scope, bool) const
{ {
@ -346,7 +346,7 @@ NetExpr* PECallFunction::elaborate_expr(Design*des, NetScope*scope, bool) const
if ((parms_count == 1) && (parms_[0] == 0)) if ((parms_count == 1) && (parms_[0] == 0))
parms_count = 0; parms_count = 0;
svector<NetExpr*> parms (parms_count); svector<NetExpr*> parms (parms_count);
@ -1005,6 +1005,9 @@ NetExpr* PEUnary::elaborate_expr(Design*des, NetScope*scope, bool) const
/* /*
* $Log: elab_expr.cc,v $ * $Log: elab_expr.cc,v $
* Revision 1.91 2004/10/04 01:10:52 steve
* Clean up spurious trailing white space.
*
* Revision 1.90 2004/08/28 15:42:11 steve * Revision 1.90 2004/08/28 15:42:11 steve
* Add support for $unsigned. * Add support for $unsigned.
* *

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#ifdef HAVE_CVS_IDENT #ifdef HAVE_CVS_IDENT
#ident "$Id: elab_lval.cc,v 1.28 2004/08/28 14:59:44 steve Exp $" #ident "$Id: elab_lval.cc,v 1.29 2004/10/04 01:10:52 steve Exp $"
#endif #endif
# include "config.h" # include "config.h"
@ -40,7 +40,7 @@
* If there is a part select (i.e., foo[3:1] <= <value>) the NetAssign_ * If there is a part select (i.e., foo[3:1] <= <value>) the NetAssign_
* is made only as wide as it needs to be (3 bits in this example) and * is made only as wide as it needs to be (3 bits in this example) and
* connected to the correct bits of foo. A constant bit select is a * connected to the correct bits of foo. A constant bit select is a
* special case of the part select. * special case of the part select.
* *
* If the bit-select is non-constant (i.e., foo[<expr>] = <value>) the * If the bit-select is non-constant (i.e., foo[<expr>] = <value>) the
* NetAssign_ is made wide enough to connect to all the bits of foo, * NetAssign_ is made wide enough to connect to all the bits of foo,
@ -352,6 +352,9 @@ NetAssign_* PENumber::elaborate_lval(Design*des, NetScope*) const
/* /*
* $Log: elab_lval.cc,v $ * $Log: elab_lval.cc,v $
* Revision 1.29 2004/10/04 01:10:52 steve
* Clean up spurious trailing white space.
*
* Revision 1.28 2004/08/28 14:59:44 steve * Revision 1.28 2004/08/28 14:59:44 steve
* More detailed error message about bad variable. * More detailed error message about bad variable.
* *

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#ifdef HAVE_CVS_IDENT #ifdef HAVE_CVS_IDENT
#ident "$Id: elab_net.cc,v 1.136 2004/10/04 00:25:46 steve Exp $" #ident "$Id: elab_net.cc,v 1.137 2004/10/04 01:10:52 steve Exp $"
#endif #endif
# include "config.h" # include "config.h"
@ -1839,7 +1839,7 @@ NetNet* PEIdent::elaborate_lnet(Design*des, NetScope*scope,
if (msb_ && lsb_) { if (msb_ && lsb_) {
/* Detect a part select. Evaluate the bits and elaborate /* Detect a part select. Evaluate the bits and elaborate
the l-value by creating a sub-net that links to just the l-value by creating a sub-net that links to just
the right pins. */ the right pins. */
verinum*mval = msb_->eval_const(des, scope); verinum*mval = msb_->eval_const(des, scope);
assert(mval); assert(mval);
verinum*lval = lsb_->eval_const(des, scope); verinum*lval = lsb_->eval_const(des, scope);
@ -1949,7 +1949,7 @@ NetNet* PEIdent::elaborate_port(Design*des, NetScope*scope) const
if (msb_ && lsb_) { if (msb_ && lsb_) {
/* Detect a part select. Evaluate the bits and elaborate /* Detect a part select. Evaluate the bits and elaborate
the l-value by creating a sub-net that links to just the l-value by creating a sub-net that links to just
the right pins. */ the right pins. */
verinum*mval = msb_->eval_const(des, scope); verinum*mval = msb_->eval_const(des, scope);
assert(mval); assert(mval);
verinum*lval = lsb_->eval_const(des, scope); verinum*lval = lsb_->eval_const(des, scope);
@ -2511,6 +2511,9 @@ NetNet* PEUnary::elaborate_net(Design*des, NetScope*scope,
/* /*
* $Log: elab_net.cc,v $ * $Log: elab_net.cc,v $
* Revision 1.137 2004/10/04 01:10:52 steve
* Clean up spurious trailing white space.
*
* Revision 1.136 2004/10/04 00:25:46 steve * Revision 1.136 2004/10/04 00:25:46 steve
* Error message to match assertion. * Error message to match assertion.
* *

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#ifdef HAVE_CVS_IDENT #ifdef HAVE_CVS_IDENT
#ident "$Id: elaborate.cc,v 1.307 2004/09/05 21:07:26 steve Exp $" #ident "$Id: elaborate.cc,v 1.308 2004/10/04 01:10:52 steve Exp $"
#endif #endif
# include "config.h" # include "config.h"
@ -213,7 +213,7 @@ void PGAssign::elaborate(Design*des, NetScope*scope) const
NetConst*dev = new NetConst(scope, NetConst*dev = new NetConst(scope,
scope->local_symbol(), scope->local_symbol(),
verinum::V0); verinum::V0);
des->add_node(dev); des->add_node(dev);
dev->pin(0).drive0(drive0); dev->pin(0).drive0(drive0);
dev->pin(0).drive1(drive1); dev->pin(0).drive1(drive1);
@ -960,7 +960,7 @@ void PGModule::elaborate_udp_(Design*des, PUdp*udp, NetScope*scope) const
if (NetSubnet*tmp = dynamic_cast<NetSubnet*>(sig)) if (NetSubnet*tmp = dynamic_cast<NetSubnet*>(sig))
delete tmp; delete tmp;
} }
// All done. Add the object to the design. // All done. Add the object to the design.
des->add_node(net); des->add_node(net);
} }
@ -2689,7 +2689,7 @@ Design* elaborate(list<perm_string>roots)
map<perm_string,Module*>::const_iterator mod = pform_modules.find(*root); map<perm_string,Module*>::const_iterator mod = pform_modules.find(*root);
if (mod == pform_modules.end()) { if (mod == pform_modules.end()) {
cerr << "error: Unable to find the root module \"" cerr << "error: Unable to find the root module \""
<< (*root) << "\" in the Verilog source." << endl; << (*root) << "\" in the Verilog source." << endl;
cerr << " : Perhaps ``-s " << (*root) cerr << " : Perhaps ``-s " << (*root)
<< "'' is incorrect?" << endl; << "'' is incorrect?" << endl;
des->errors++; des->errors++;
@ -2697,9 +2697,9 @@ Design* elaborate(list<perm_string>roots)
} }
Module *rmod = (*mod).second; Module *rmod = (*mod).second;
// Make the root scope, then scan the pform looking for scopes // Make the root scope, then scan the pform looking for scopes
// and parameters. // and parameters.
NetScope*scope = des->make_root_scope(*root); NetScope*scope = des->make_root_scope(*root);
scope->time_unit(rmod->time_unit); scope->time_unit(rmod->time_unit);
scope->time_precision(rmod->time_precision); scope->time_precision(rmod->time_precision);
@ -2769,6 +2769,9 @@ Design* elaborate(list<perm_string>roots)
/* /*
* $Log: elaborate.cc,v $ * $Log: elaborate.cc,v $
* Revision 1.308 2004/10/04 01:10:52 steve
* Clean up spurious trailing white space.
*
* Revision 1.307 2004/09/05 21:07:26 steve * Revision 1.307 2004/09/05 21:07:26 steve
* Support degenerat wait statements. * Support degenerat wait statements.
* *

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#ifdef HAVE_CVS_IDENT #ifdef HAVE_CVS_IDENT
#ident "$Id: emit.cc,v 1.76 2004/05/31 23:34:37 steve Exp $" #ident "$Id: emit.cc,v 1.77 2004/10/04 01:10:53 steve Exp $"
#endif #endif
# include "config.h" # include "config.h"
@ -372,7 +372,7 @@ bool Design::emit(struct target_t*tgt) const
return false; return false;
// enumerate the scopes // enumerate the scopes
for (list<NetScope*>::const_iterator scope = root_scopes_.begin(); for (list<NetScope*>::const_iterator scope = root_scopes_.begin();
scope != root_scopes_.end(); scope++) scope != root_scopes_.end(); scope++)
(*scope)->emit_scope(tgt); (*scope)->emit_scope(tgt);
@ -388,7 +388,7 @@ bool Design::emit(struct target_t*tgt) const
// emit task and function definitions // emit task and function definitions
for (list<NetScope*>::const_iterator scope = root_scopes_.begin(); for (list<NetScope*>::const_iterator scope = root_scopes_.begin();
scope != root_scopes_.end(); scope++) scope != root_scopes_.end(); scope++)
rc &= (*scope)->emit_defs(tgt); rc &= (*scope)->emit_defs(tgt);
@ -511,6 +511,9 @@ bool emit(const Design*des, const char*type)
/* /*
* $Log: emit.cc,v $ * $Log: emit.cc,v $
* Revision 1.77 2004/10/04 01:10:53 steve
* Clean up spurious trailing white space.
*
* Revision 1.76 2004/05/31 23:34:37 steve * Revision 1.76 2004/05/31 23:34:37 steve
* Rewire/generalize parsing an elaboration of * Rewire/generalize parsing an elaboration of
* function return values to allow for better * function return values to allow for better

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#ifdef HAVE_CVS_IDENT #ifdef HAVE_CVS_IDENT
#ident "$Id: eval_tree.cc,v 1.61 2004/09/10 23:51:42 steve Exp $" #ident "$Id: eval_tree.cc,v 1.62 2004/10/04 01:10:53 steve Exp $"
#endif #endif
# include "config.h" # include "config.h"
@ -1251,7 +1251,7 @@ NetEConst* NetESelect::eval_tree()
for (unsigned long idx = 0 ; idx < expr_width() ; idx += 1) { for (unsigned long idx = 0 ; idx < expr_width() ; idx += 1) {
if ((bval >= 0) && ((unsigned long) bval < eval.len())) if ((bval >= 0) && ((unsigned long) bval < eval.len()))
oval.set(idx, eval.get(bval)); oval.set(idx, eval.get(bval));
else else
oval.set(idx, verinum::Vx); oval.set(idx, verinum::Vx);
bval += 1; bval += 1;
@ -1423,7 +1423,7 @@ NetEConst* NetEUnary::eval_tree()
case '-': { case '-': {
if (val.is_defined()) { if (val.is_defined()) {
verinum tmp (verinum::V0, val.len()); verinum tmp (verinum::V0, val.len());
tmp.has_sign(val.has_sign()); tmp.has_sign(val.has_sign());
val = tmp - val; val = tmp - val;
@ -1551,6 +1551,9 @@ NetEConst* NetEUReduce::eval_tree()
/* /*
* $Log: eval_tree.cc,v $ * $Log: eval_tree.cc,v $
* Revision 1.62 2004/10/04 01:10:53 steve
* Clean up spurious trailing white space.
*
* Revision 1.61 2004/09/10 23:51:42 steve * Revision 1.61 2004/09/10 23:51:42 steve
* Fix the evaluation of constant ternary expressions. * Fix the evaluation of constant ternary expressions.
* *

View File

@ -218,11 +218,11 @@ output [1:48] k;
wire [1:56] YY; wire [1:56] YY;
assign YY[1:28]=c; assign YY[29:56]=d; assign YY[1:28]=c; assign YY[29:56]=d;
assign k[1]=YY[14]; assign k[2]=YY[17]; assign k[3]=YY[11]; assign k[4]=YY[24]; assign k[5]=YY[1]; assign k[6]=YY[5]; assign k[1]=YY[14]; assign k[2]=YY[17]; assign k[3]=YY[11]; assign k[4]=YY[24]; assign k[5]=YY[1]; assign k[6]=YY[5];
assign k[7]=YY[3]; assign k[8]=YY[28]; assign k[9]=YY[15]; assign k[10]=YY[6]; assign k[11]=YY[21]; assign k[12]=YY[10]; assign k[7]=YY[3]; assign k[8]=YY[28]; assign k[9]=YY[15]; assign k[10]=YY[6]; assign k[11]=YY[21]; assign k[12]=YY[10];
assign k[13]=YY[23]; assign k[14]=YY[19]; assign k[15]=YY[12]; assign k[16]=YY[4]; assign k[17]=YY[26]; assign k[18]=YY[8]; assign k[13]=YY[23]; assign k[14]=YY[19]; assign k[15]=YY[12]; assign k[16]=YY[4]; assign k[17]=YY[26]; assign k[18]=YY[8];
assign k[19]=YY[16]; assign k[20]=YY[7]; assign k[21]=YY[27]; assign k[22]=YY[20]; assign k[23]=YY[13]; assign k[24]=YY[2]; assign k[19]=YY[16]; assign k[20]=YY[7]; assign k[21]=YY[27]; assign k[22]=YY[20]; assign k[23]=YY[13]; assign k[24]=YY[2];
assign k[25]=YY[41]; assign k[26]=YY[52]; assign k[27]=YY[31]; assign k[28]=YY[37]; assign k[29]=YY[47]; assign k[30]=YY[55]; assign k[25]=YY[41]; assign k[26]=YY[52]; assign k[27]=YY[31]; assign k[28]=YY[37]; assign k[29]=YY[47]; assign k[30]=YY[55];
assign k[31]=YY[30]; assign k[32]=YY[40]; assign k[33]=YY[51]; assign k[34]=YY[45]; assign k[35]=YY[33]; assign k[36]=YY[48]; assign k[31]=YY[30]; assign k[32]=YY[40]; assign k[33]=YY[51]; assign k[34]=YY[45]; assign k[35]=YY[33]; assign k[36]=YY[48];
assign k[37]=YY[44]; assign k[38]=YY[49]; assign k[39]=YY[39]; assign k[40]=YY[56]; assign k[41]=YY[34]; assign k[42]=YY[53]; assign k[37]=YY[44]; assign k[38]=YY[49]; assign k[39]=YY[39]; assign k[40]=YY[56]; assign k[41]=YY[34]; assign k[42]=YY[53];
@ -252,13 +252,13 @@ input [1:64] key;
output [1:48] k1x,k2x,k3x,k4x,k5x,k6x,k7x,k8x,k9x,k10x,k11x,k12x,k13x,k14x,k15x,k16x; output [1:48] k1x,k2x,k3x,k4x,k5x,k6x,k7x,k8x,k9x,k10x,k11x,k12x,k13x,k14x,k15x,k16x;
wire [1:28] c0x,c1x,c2x,c3x,c4x,c5x,c6x,c7x,c8x,c9x,c10x,c11x,c12x,c13x,c14x,c15x,c16x; wire [1:28] c0x,c1x,c2x,c3x,c4x,c5x,c6x,c7x,c8x,c9x,c10x,c11x,c12x,c13x,c14x,c15x,c16x;
wire [1:28] d0x,d1x,d2x,d3x,d4x,d5x,d6x,d7x,d8x,d9x,d10x,d11x,d12x,d13x,d14x,d15x,d16x; wire [1:28] d0x,d1x,d2x,d3x,d4x,d5x,d6x,d7x,d8x,d9x,d10x,d11x,d12x,d13x,d14x,d15x,d16x;
pc1 pc1(key, c0x, d0x); pc1 pc1(key, c0x, d0x);
rol1 rc1(c1x, c0x); rol1 rd1(d1x, d0x); rol1 rc1(c1x, c0x); rol1 rd1(d1x, d0x);
rol1 rc2(c2x, c1x); rol1 rd2(d2x, d1x); rol1 rc2(c2x, c1x); rol1 rd2(d2x, d1x);
rol2 rc3(c3x, c2x); rol2 rd3(d3x, d2x); rol2 rc3(c3x, c2x); rol2 rd3(d3x, d2x);
rol2 rc4(c4x, c3x); rol2 rd4(d4x, d3x); rol2 rc4(c4x, c3x); rol2 rd4(d4x, d3x);
rol2 rc5(c5x, c4x); rol2 rd5(d5x, d4x); rol2 rc5(c5x, c4x); rol2 rd5(d5x, d4x);
rol2 rc6(c6x, c5x); rol2 rd6(d6x, d5x); rol2 rc6(c6x, c5x); rol2 rd6(d6x, d5x);
rol2 rc7(c7x, c6x); rol2 rd7(d7x, d6x); rol2 rc7(c7x, c6x); rol2 rd7(d7x, d6x);
@ -272,7 +272,7 @@ rol2 rce(c14x, c13x); rol2 rde(d14x, d13x);
rol2 rcf(c15x, c14x); rol2 rdf(d15x, d14x); rol2 rcf(c15x, c14x); rol2 rdf(d15x, d14x);
rol1 rcg(c16x, c15x); rol1 rdg(d16x, d15x); rol1 rcg(c16x, c15x); rol1 rdg(d16x, d15x);
pc2 pc2x1(c1x,d1x,k1x); pc2 pc2x1(c1x,d1x,k1x);
pc2 pc2x2(c2x,d2x,k2x); pc2 pc2x2(c2x,d2x,k2x);
pc2 pc2x3(c3x,d3x,k3x); pc2 pc2x3(c3x,d3x,k3x);
@ -913,7 +913,7 @@ assign l0x[17]=pt[62]; assign l0x[18]=pt[54]; assign l0x[19]=pt[46
assign l0x[21]=pt[30]; assign l0x[22]=pt[22]; assign l0x[23]=pt[14]; assign l0x[24]=pt[6]; assign l0x[21]=pt[30]; assign l0x[22]=pt[22]; assign l0x[23]=pt[14]; assign l0x[24]=pt[6];
assign l0x[25]=pt[64]; assign l0x[26]=pt[56]; assign l0x[27]=pt[48]; assign l0x[28]=pt[40]; assign l0x[25]=pt[64]; assign l0x[26]=pt[56]; assign l0x[27]=pt[48]; assign l0x[28]=pt[40];
assign l0x[29]=pt[32]; assign l0x[30]=pt[24]; assign l0x[31]=pt[16]; assign l0x[32]=pt[8]; assign l0x[29]=pt[32]; assign l0x[30]=pt[24]; assign l0x[31]=pt[16]; assign l0x[32]=pt[8];
assign r0x[1]=pt[57]; assign r0x[2]=pt[49]; assign r0x[3]=pt[41]; assign r0x[4]=pt[33]; assign r0x[1]=pt[57]; assign r0x[2]=pt[49]; assign r0x[3]=pt[41]; assign r0x[4]=pt[33];
assign r0x[5]=pt[25]; assign r0x[6]=pt[17]; assign r0x[7]=pt[9]; assign r0x[8]=pt[1]; assign r0x[5]=pt[25]; assign r0x[6]=pt[17]; assign r0x[7]=pt[9]; assign r0x[8]=pt[1];
assign r0x[9]=pt[59]; assign r0x[10]=pt[51]; assign r0x[11]=pt[43]; assign r0x[12]=pt[35]; assign r0x[9]=pt[59]; assign r0x[10]=pt[51]; assign r0x[11]=pt[43]; assign r0x[12]=pt[35];
@ -935,7 +935,7 @@ assign e[9]=ri[6]; assign e[10]=ri[7]; assign e[11]=ri[8]; assign e[12]=r
assign e[17]=ri[12]; assign e[18]=ri[13]; assign e[19]=ri[12]; assign e[20]=ri[13]; assign e[21]=ri[14]; assign e[22]=ri[15]; assign e[23]=ri[16]; assign e[24]=ri[17]; assign e[17]=ri[12]; assign e[18]=ri[13]; assign e[19]=ri[12]; assign e[20]=ri[13]; assign e[21]=ri[14]; assign e[22]=ri[15]; assign e[23]=ri[16]; assign e[24]=ri[17];
assign e[25]=ri[16]; assign e[26]=ri[17]; assign e[27]=ri[18]; assign e[28]=ri[19]; assign e[29]=ri[20]; assign e[30]=ri[21]; assign e[31]=ri[20]; assign e[32]=ri[21]; assign e[25]=ri[16]; assign e[26]=ri[17]; assign e[27]=ri[18]; assign e[28]=ri[19]; assign e[29]=ri[20]; assign e[30]=ri[21]; assign e[31]=ri[20]; assign e[32]=ri[21];
assign e[33]=ri[22]; assign e[34]=ri[23]; assign e[35]=ri[24]; assign e[36]=ri[25]; assign e[37]=ri[24]; assign e[38]=ri[25]; assign e[39]=ri[26]; assign e[40]=ri[27]; assign e[33]=ri[22]; assign e[34]=ri[23]; assign e[35]=ri[24]; assign e[36]=ri[25]; assign e[37]=ri[24]; assign e[38]=ri[25]; assign e[39]=ri[26]; assign e[40]=ri[27];
assign e[41]=ri[28]; assign e[42]=ri[29]; assign e[43]=ri[28]; assign e[44]=ri[29]; assign e[45]=ri[30]; assign e[46]=ri[31]; assign e[47]=ri[32]; assign e[48]=ri[1]; assign e[41]=ri[28]; assign e[42]=ri[29]; assign e[43]=ri[28]; assign e[44]=ri[29]; assign e[45]=ri[30]; assign e[46]=ri[31]; assign e[47]=ri[32]; assign e[48]=ri[1];
endmodule endmodule

View File

@ -26,21 +26,21 @@
* Compile this program with the command: * Compile this program with the command:
* *
* iverilog -ohello hello.vl * iverilog -ohello hello.vl
* *
* After churning for a little while, the program will create the output * After churning for a little while, the program will create the output
* file "hello" which is compiled, linked and ready to run. Run this * file "hello" which is compiled, linked and ready to run. Run this
* program like so: * program like so:
* *
* vvp hello * vvp hello
* *
* and the program will print the message to its output. Easy! For * and the program will print the message to its output. Easy! For
* more on how to make the iverilog command work, see the iverilog * more on how to make the iverilog command work, see the iverilog
* manual page. * manual page.
*/ */
module main(); module main();
initial initial
begin begin
$display("Hello, World"); $display("Hello, World");
$finish ; $finish ;

View File

@ -26,21 +26,21 @@
* Compile this program with the command: * Compile this program with the command:
* *
* iverilog -ohello_vpi hello_vpi.vl * iverilog -ohello_vpi hello_vpi.vl
* *
* After churning for a little while, the program will create the output * After churning for a little while, the program will create the output
* file "hello" which is compiled, linked and ready to run. Run this * file "hello" which is compiled, linked and ready to run. Run this
* program like so: * program like so:
* *
* vvp -M. -mhello_vpi hello_vpi * vvp -M. -mhello_vpi hello_vpi
* *
* and the program will print the message to its output. Easy! For * and the program will print the message to its output. Easy! For
* more on how to make the iverilog command work, see the iverilog * more on how to make the iverilog command work, see the iverilog
* manual page. * manual page.
*/ */
module main(); module main();
initial initial
begin begin
$my_hello; $my_hello;
$finish ; $finish ;

View File

@ -20,36 +20,36 @@
/* /*
* This example program simulates a 16x1 ram, and is used as an * This example program simulates a 16x1 ram, and is used as an
* example for using VCD output and waveform viewers. * example for using VCD output and waveform viewers.
* *
* Like any other Verilog simulation, compile this program with the * Like any other Verilog simulation, compile this program with the
* command: * command:
* *
* iverilog show_vcd.vl * iverilog show_vcd.vl
* *
* This will generate the show_vcd command in the current directory. * This will generate the show_vcd command in the current directory.
* When you run the command, you will see the output from all the * When you run the command, you will see the output from all the
* calls to $display, but also there will be a dump file ``show_vcd.vcd''. * calls to $display, but also there will be a dump file ``show_vcd.vcd''.
* The name of this file is set by the statement: * The name of this file is set by the statement:
* *
* $dumpfile("show_vcd.vcd"); * $dumpfile("show_vcd.vcd");
* *
* in the main module. The output file uses the standard VCD file format * in the main module. The output file uses the standard VCD file format
* so can be viewed using off-the-shelf waveform viewers. The remaining * so can be viewed using off-the-shelf waveform viewers. The remaining
* steps describe how to use GTKWave to view the file. If you are using * steps describe how to use GTKWave to view the file. If you are using
* a different viewer, see the documentation for that tool. * a different viewer, see the documentation for that tool.
* *
* To view the output generated by running show_vcd, start the GTKWave * To view the output generated by running show_vcd, start the GTKWave
* viewer with the command: * viewer with the command:
* *
* gtkwave show_vcd.vcd * gtkwave show_vcd.vcd
* *
* The GTKWave program will display its main window, and show in a small * The GTKWave program will display its main window, and show in a small
* status box (upper left corner) that it succeeded in loading the dump * status box (upper left corner) that it succeeded in loading the dump
* file. However, there are no waveforms displayed yet. Select signals to * file. However, there are no waveforms displayed yet. Select signals to
* add to the waveform display using the menu selection: * add to the waveform display using the menu selection:
* *
* "Search --> Signal Search Tree" * "Search --> Signal Search Tree"
* *
* This will bring up a dialog box that shows in directory tree format * This will bring up a dialog box that shows in directory tree format
* the signals of the program. Select the signals you wish to view, and * the signals of the program. Select the signals you wish to view, and
* click one of the buttons on the bottom of the dialog box to display * click one of the buttons on the bottom of the dialog box to display
@ -60,7 +60,7 @@
* $dumpvars system tasks. The $dumpfile task tells the simulation where * $dumpvars system tasks. The $dumpfile task tells the simulation where
* to write the VCD output. This task must be called once before the * to write the VCD output. This task must be called once before the
* $dumpvars task is called. * $dumpvars task is called.
* *
* The $dumpvars task tells the simulation what variables to write to * The $dumpvars task tells the simulation what variables to write to
* the VCD output. The first parameter is how far to descend while * the VCD output. The first parameter is how far to descend while
* scanning a scope, and the remaining paramters are signals or scope * scanning a scope, and the remaining paramters are signals or scope
@ -77,7 +77,7 @@ module ram16x1 (q, d, a, we, wclk);
input wclk; input wclk;
reg mem[15:0]; reg mem[15:0];
assign q = mem[a]; assign q = mem[a];
always @(posedge wclk) if (we) mem[a] = d; always @(posedge wclk) if (we) mem[a] = d;
@ -88,7 +88,7 @@ module main;
reg d; reg d;
reg [3:0] a; reg [3:0] a;
reg we, wclk; reg we, wclk;
ram16x1 r1 (q, d, a, we, wclk); ram16x1 r1 (q, d, a, we, wclk);
initial begin initial begin

View File

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
* *
* $Id: sqrt.vl,v 1.3 2000/11/04 01:53:24 steve Exp $" * $Id: sqrt.vl,v 1.4 2004/10/04 01:10:56 steve Exp $"
*/ */
/* /*
@ -97,8 +97,8 @@ module sqrt32(clk, rdy, reset, x, .y(acc));
bitl = 15; bitl = 15;
end end
endtask endtask
initial clear; initial clear;
always @(reset or posedge clk) always @(reset or posedge clk)
if (reset) if (reset)
@ -121,14 +121,14 @@ module main;
wire rdy; wire rdy;
sqrt32 root(.clk(clk), .rdy(rdy), .reset(reset), .x(value), .y(result)); sqrt32 root(.clk(clk), .rdy(rdy), .reset(reset), .x(value), .y(result));
always #5 clk = ~clk; always #5 clk = ~clk;
always @(posedge rdy) begin always @(posedge rdy) begin
$display("sqrt(%d) --> %d", value, result); $display("sqrt(%d) --> %d", value, result);
$finish; $finish;
end end
initial begin initial begin
clk = 0; clk = 0;

View File

@ -73,7 +73,7 @@ module main;
// This can be done to wires and registers, as internally both // This can be done to wires and registers, as internally both
// are treated as named signals. It doesn't work (yet) on vectors, // are treated as named signals. It doesn't work (yet) on vectors,
// though, so break out the vectors with scalar assignments. // though, so break out the vectors with scalar assignments.
assign a[0] = a0; assign a[0] = a0;
assign a[1] = a1; assign a[1] = a1;
assign a[2] = a2; assign a[2] = a2;

View File

@ -28,7 +28,7 @@ module ram16x1 (q, d, a, we, wclk);
input wclk; input wclk;
reg mem[15:0]; reg mem[15:0];
assign q = mem[a]; assign q = mem[a];
always @(posedge wclk) if (we) mem[a] = d; always @(posedge wclk) if (we) mem[a] = d;
@ -39,7 +39,7 @@ module main;
reg d; reg d;
reg [3:0] a; reg [3:0] a;
reg we, wclk; reg we, wclk;
ram16x1 r1 (q, d, a, we, wclk); ram16x1 r1 (q, d, a, we, wclk);
initial begin initial begin

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#ifdef HAVE_CVS_IDENT #ifdef HAVE_CVS_IDENT
#ident "$Id: functor.cc,v 1.31 2002/08/16 05:18:27 steve Exp $" #ident "$Id: functor.cc,v 1.32 2004/10/04 01:10:53 steve Exp $"
#endif #endif
# include "config.h" # include "config.h"
@ -114,7 +114,7 @@ void NetScope::run_functor(Design*des, functor_t*fun)
void Design::functor(functor_t*fun) void Design::functor(functor_t*fun)
{ {
// Scan the scopes // Scan the scopes
for (list<NetScope*>::const_iterator scope = root_scopes_.begin(); for (list<NetScope*>::const_iterator scope = root_scopes_.begin();
scope != root_scopes_.end(); scope++) scope != root_scopes_.end(); scope++)
(*scope)->run_functor(this, fun); (*scope)->run_functor(this, fun);
@ -267,6 +267,9 @@ int proc_match_t::event_wait(NetEvWait*)
/* /*
* $Log: functor.cc,v $ * $Log: functor.cc,v $
* Revision 1.32 2004/10/04 01:10:53 steve
* Clean up spurious trailing white space.
*
* Revision 1.31 2002/08/16 05:18:27 steve * Revision 1.31 2002/08/16 05:18:27 steve
* Fix intermix of node functors and node delete. * Fix intermix of node functors and node delete.
* *

View File

@ -103,7 +103,7 @@ fi
if [ x"$dir_arg" != x ]; then if [ x"$dir_arg" != x ]; then
dst=$src dst=$src
src="" src=""
if [ -d $dst ]; then if [ -d $dst ]; then
instcmd=: instcmd=:
else else
@ -112,7 +112,7 @@ if [ x"$dir_arg" != x ]; then
else else
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command # Waiting for this to be detected by the "$instcmd $src $dsttmp" command
# might cause directories to be created, which would be especially bad # might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'. # if $src (and thus $dsttmp) contains '*'.
if [ -f $src -o -d $src ] if [ -f $src -o -d $src ]
@ -122,7 +122,7 @@ else
echo "install: $src does not exist" echo "install: $src does not exist"
exit 1 exit 1
fi fi
if [ x"$dst" = x ] if [ x"$dst" = x ]
then then
echo "install: no destination specified" echo "install: no destination specified"
@ -150,7 +150,7 @@ dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
# Skip lots of stat calls in the usual case. # Skip lots of stat calls in the usual case.
if [ ! -d "$dstdir" ]; then if [ ! -d "$dstdir" ]; then
defaultIFS=' defaultIFS='
' '
IFS="${IFS-${defaultIFS}}" IFS="${IFS-${defaultIFS}}"
@ -189,17 +189,17 @@ else
# If we're going to rename the final executable, determine the name now. # If we're going to rename the final executable, determine the name now.
if [ x"$transformarg" = x ] if [ x"$transformarg" = x ]
then then
dstfile=`basename $dst` dstfile=`basename $dst`
else else
dstfile=`basename $dst $transformbasename | dstfile=`basename $dst $transformbasename |
sed $transformarg`$transformbasename sed $transformarg`$transformbasename
fi fi
# don't allow the sed command to completely eliminate the filename # don't allow the sed command to completely eliminate the filename
if [ x"$dstfile" = x ] if [ x"$dstfile" = x ]
then then
dstfile=`basename $dst` dstfile=`basename $dst`
else else
@ -230,7 +230,7 @@ else
# Now rename the file to the real destination. # Now rename the file to the real destination.
$doit $rmcmd -f $dstdir/$dstfile && $doit $rmcmd -f $dstdir/$dstfile &&
$doit $mvcmd $dsttmp $dstdir/$dstfile $doit $mvcmd $dsttmp $dstdir/$dstfile
fi && fi &&

View File

@ -1,4 +1,4 @@
.TH iverilog-vpi 1 "$Date: 2003/10/14 00:40:06 $" Version "$Date: 2003/10/14 00:40:06 $" .TH iverilog-vpi 1 "$Date: 2004/10/04 01:10:53 $" Version "$Date: 2004/10/04 01:10:53 $"
.SH NAME .SH NAME
iverilog-vpi - Compile front end for VPI modules iverilog-vpi - Compile front end for VPI modules
@ -118,5 +118,5 @@ iverilog(1), vvp(1),
.nf .nf
Copyright \(co 2002 Stephen Williams Copyright \(co 2002 Stephen Williams
This document can be freely redistributed according to the terms of the This document can be freely redistributed according to the terms of the
GNU General Public License version 2.0 GNU General Public License version 2.0

View File

@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#ifdef HAVE_CVS_IDENT #ifdef HAVE_CVS_IDENT
#ident "$Id: ivl_target.h,v 1.125 2004/09/25 01:58:12 steve Exp $" #ident "$Id: ivl_target.h,v 1.126 2004/10/04 01:10:53 steve Exp $"
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus
@ -48,7 +48,7 @@ _BEGIN_DECL
*/ */
/* /*
* In order to grab onto data in the design, the core passes cookies * In order to grab onto data in the design, the core passes cookies
* to the various functions of the module. These cookies can in turn * to the various functions of the module. These cookies can in turn
* be passed to access functions in the core to get more detailed * be passed to access functions in the core to get more detailed
@ -380,7 +380,7 @@ extern const char* ivl_design_flag(ivl_design_t des, const char*key);
extern int ivl_design_process(ivl_design_t des, extern int ivl_design_process(ivl_design_t des,
ivl_process_f fun, void*cd); ivl_process_f fun, void*cd);
extern ivl_scope_t ivl_design_root(ivl_design_t des); extern ivl_scope_t ivl_design_root(ivl_design_t des);
extern void ivl_design_roots(ivl_design_t des, extern void ivl_design_roots(ivl_design_t des,
ivl_scope_t **scopes, ivl_scope_t **scopes,
unsigned int *nscopes); unsigned int *nscopes);
extern int ivl_design_time_precision(ivl_design_t des); extern int ivl_design_time_precision(ivl_design_t des);
@ -594,7 +594,7 @@ extern unsigned ivl_logic_attr_cnt(ivl_net_logic_t net);
extern ivl_attribute_t ivl_logic_attr_val(ivl_net_logic_t net, unsigned idx); extern ivl_attribute_t ivl_logic_attr_val(ivl_net_logic_t net, unsigned idx);
/* UDP /* UDP
* *
*/ */
extern unsigned ivl_udp_sequ(ivl_udp_t net); extern unsigned ivl_udp_sequ(ivl_udp_t net);
@ -647,7 +647,7 @@ extern const char* ivl_udp_name(ivl_udp_t net);
* output vector. This is most devices, it turns out. * output vector. This is most devices, it turns out.
* *
* ivl_lpm_selects * ivl_lpm_selects
* This is the size of the select input for a LPM_MUX device, or the * This is the size of the select input for a LPM_MUX device, or the
* address bus width of an LPM_RAM. * address bus width of an LPM_RAM.
* *
* ivl_lpm_signed * ivl_lpm_signed
@ -720,9 +720,9 @@ extern ivl_memory_t ivl_lpm_memory(ivl_lpm_t net);
* returns an ivl_expr_t that represents that * returns an ivl_expr_t that represents that
* expression. Otherwise, it returns 0. * expression. Otherwise, it returns 0.
* *
* ivl_lval_mem * ivl_lval_mem
* If the l-value is a memory, this method returns an * If the l-value is a memory, this method returns an
* ivl_memory_t that represents that memory. Otherwise, it * ivl_memory_t that represents that memory. Otherwise, it
* returns 0. * returns 0.
* *
* ivl_lval_sig * ivl_lval_sig
@ -739,9 +739,9 @@ extern ivl_memory_t ivl_lpm_memory(ivl_lpm_t net);
* The part select of the signal is based here. This is the * The part select of the signal is based here. This is the
* canonical index of bit-0 of the part select. * canonical index of bit-0 of the part select.
* *
* ivl_lval_idx * ivl_lval_idx
* If the l-value is a memory, this method returns an * If the l-value is a memory, this method returns an
* ivl_expr_t that represents the index expression. Otherwise, it * ivl_expr_t that represents the index expression. Otherwise, it
* returns 0. * returns 0.
* *
* ivl_lval_pin * ivl_lval_pin
@ -764,7 +764,7 @@ extern ivl_signal_t ivl_lval_sig(ivl_lval_t net);
* connections of signals and nodes is handled by single-bit * connections of signals and nodes is handled by single-bit
* nexus. These functions manage the ivl_nexus_t object. They also * nexus. These functions manage the ivl_nexus_t object. They also
* manage the ivl_nexus_ptr_t objects that are closely related to the * manage the ivl_nexus_ptr_t objects that are closely related to the
* nexus. * nexus.
* *
* ivl_nexus_name * ivl_nexus_name
* Each nexus is given a name, typically derived from the signals * Each nexus is given a name, typically derived from the signals
@ -944,7 +944,7 @@ extern ivl_expr_t ivl_parameter_expr(ivl_parameter_t net);
* Every scope has a hierarchical name. This name is also a prefix * Every scope has a hierarchical name. This name is also a prefix
* of all the names of objects contained within the scope. The * of all the names of objects contained within the scope. The
* ivl_scope_basename is the name of the scope without the included * ivl_scope_basename is the name of the scope without the included
* hierarchy. * hierarchy.
* *
* ivl_scope_param * ivl_scope_param
* ivl_scope_params * ivl_scope_params
@ -1236,6 +1236,9 @@ _END_DECL
/* /*
* $Log: ivl_target.h,v $ * $Log: ivl_target.h,v $
* Revision 1.126 2004/10/04 01:10:53 steve
* Clean up spurious trailing white space.
*
* Revision 1.125 2004/09/25 01:58:12 steve * Revision 1.125 2004/09/25 01:58:12 steve
* Some commentary on ivl_logic_pin. * Some commentary on ivl_logic_pin.
* *

View File

@ -18,7 +18,7 @@
# 59 Temple Place - Suite 330 # 59 Temple Place - Suite 330
# Boston, MA 02111-1307, USA # Boston, MA 02111-1307, USA
# #
#ident "$Id: Makefile.in,v 1.16 2004/02/10 19:25:00 steve Exp $" #ident "$Id: Makefile.in,v 1.17 2004/10/04 01:10:56 steve Exp $"
# #
# #
SHELL = /bin/sh SHELL = /bin/sh
@ -42,7 +42,7 @@ INSTALL_DATA = @INSTALL_DATA@
CPPFLAGS = @ident_support@ -I. -I.. -I$(srcdir)/.. -I$(srcdir) @CPPFLAGS@ @DEFS@ CPPFLAGS = @ident_support@ -I. -I.. -I$(srcdir)/.. -I$(srcdir) @CPPFLAGS@ @DEFS@
CFLAGS = -Wall @CFLAGS@ CFLAGS = -Wall @CFLAGS@
LDFLAGS = @LDFLAGS@ LDFLAGS = @LDFLAGS@
all: ivlpp all: ivlpp

View File

@ -1,17 +1,17 @@
Copyright (c) 1999 Stephen Williams (steve@icarus.com) Copyright (c) 1999 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
General Public License as published by the Free Software General Public License as published by the Free Software
Foundation; either version 2 of the License, or (at your option) Foundation; either version 2 of the License, or (at your option)
any later version. any later version.
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#ifdef HAVE_CVS_IDENT #ifdef HAVE_CVS_IDENT
#ident "$Id: a_fetch_tfarg.c,v 1.9 2004/02/18 02:51:59 steve Exp $" #ident "$Id: a_fetch_tfarg.c,v 1.10 2004/10/04 01:10:56 steve Exp $"
#endif #endif
#include <vpi_user.h> #include <vpi_user.h>
@ -42,7 +42,7 @@ double acc_fetch_itfarg(PLI_INT32 n, handle obj)
if (hand) { if (hand) {
value.format=vpiRealVal; value.format=vpiRealVal;
vpi_get_value(hand, &value); vpi_get_value(hand, &value);
rtn = value.value.real; rtn = value.value.real;
vpi_free_object(iter); vpi_free_object(iter);
} else { } else {
rtn = 0.0; rtn = 0.0;
@ -77,7 +77,7 @@ PLI_INT32 acc_fetch_itfarg_int(PLI_INT32 n, handle obj)
if (hand) { if (hand) {
value.format=vpiIntVal; value.format=vpiIntVal;
vpi_get_value(hand, &value); vpi_get_value(hand, &value);
rtn = value.value.integer; rtn = value.value.integer;
vpi_free_object(iter); vpi_free_object(iter);
} else { } else {
rtn = 0; rtn = 0;
@ -134,6 +134,9 @@ char *acc_fetch_tfarg_str(PLI_INT32 n)
/* /*
* $Log: a_fetch_tfarg.c,v $ * $Log: a_fetch_tfarg.c,v $
* Revision 1.10 2004/10/04 01:10:56 steve
* Clean up spurious trailing white space.
*
* Revision 1.9 2004/02/18 02:51:59 steve * Revision 1.9 2004/02/18 02:51:59 steve
* Fix type mismatches of various VPI functions. * Fix type mismatches of various VPI functions.
* *

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#ifdef HAVE_CVS_IDENT #ifdef HAVE_CVS_IDENT
#ident "$Id: a_fetch_type.c,v 1.7 2003/06/04 01:56:20 steve Exp $" #ident "$Id: a_fetch_type.c,v 1.8 2004/10/04 01:10:56 steve Exp $"
#endif #endif
# include <acc_user.h> # include <acc_user.h>
@ -78,7 +78,7 @@ PLI_INT32 acc_fetch_fulltype(handle obj)
type = vpi_get(vpiNetType, obj); type = vpi_get(vpiNetType, obj);
switch(type) { switch(type) {
case vpiWire: return accWire; case vpiWire: return accWire;
default: default:
vpi_printf("acc_fetch_fulltype: vpiNetType %d unknown?\n", vpi_printf("acc_fetch_fulltype: vpiNetType %d unknown?\n",
type); type);
return accUnknown; return accUnknown;
@ -121,6 +121,9 @@ PLI_INT32 acc_fetch_fulltype(handle obj)
/* /*
* $Log: a_fetch_type.c,v $ * $Log: a_fetch_type.c,v $
* Revision 1.8 2004/10/04 01:10:56 steve
* Clean up spurious trailing white space.
*
* Revision 1.7 2003/06/04 01:56:20 steve * Revision 1.7 2003/06/04 01:56:20 steve
* 1) Adds configure logic to clean up compiler warnings * 1) Adds configure logic to clean up compiler warnings
* 2) adds acc_compare_handle, acc_fetch_range, acc_next_scope and * 2) adds acc_compare_handle, acc_fetch_range, acc_next_scope and

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#ifdef HAVE_CVS_IDENT #ifdef HAVE_CVS_IDENT
#ident "$Id: a_handle_tfarg.c,v 1.5 2003/03/18 01:21:49 steve Exp $" #ident "$Id: a_handle_tfarg.c,v 1.6 2004/10/04 01:10:56 steve Exp $"
#endif #endif
#include <acc_user.h> #include <acc_user.h>
@ -29,7 +29,7 @@
handle acc_handle_tfarg(int n) handle acc_handle_tfarg(int n)
{ {
vpiHandle sys_h, sys_i, rtn_h = 0; vpiHandle sys_h, sys_i, rtn_h = 0;
if (n > 0) { if (n > 0) {
sys_h = vpi_handle(vpiSysTfCall, 0 /* NULL */); sys_h = vpi_handle(vpiSysTfCall, 0 /* NULL */);
sys_i = vpi_iterate(vpiArgument, sys_h); sys_i = vpi_iterate(vpiArgument, sys_h);
@ -58,6 +58,9 @@ handle acc_handle_tfinst(void)
/* /*
* $Log: a_handle_tfarg.c,v $ * $Log: a_handle_tfarg.c,v $
* Revision 1.6 2004/10/04 01:10:56 steve
* Clean up spurious trailing white space.
*
* Revision 1.5 2003/03/18 01:21:49 steve * Revision 1.5 2003/03/18 01:21:49 steve
* Fix warning about uninitialized variable. * Fix warning about uninitialized variable.
* *

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#ifdef HAVE_CVS_IDENT #ifdef HAVE_CVS_IDENT
#ident "$Id: a_vcl.c,v 1.6 2003/06/17 16:55:07 steve Exp $" #ident "$Id: a_vcl.c,v 1.7 2004/10/04 01:10:56 steve Exp $"
#endif #endif
#include <vpi_user.h> #include <vpi_user.h>
@ -154,7 +154,7 @@ static PLI_INT32 vcl_value_callback(struct t_cb_data*cb)
vcr.vc_hightime = sim_time.high; vcr.vc_hightime = sim_time.high;
vcr.vc_lowtime = sim_time.low; vcr.vc_lowtime = sim_time.low;
vcr.user_data = cur->user_data; vcr.user_data = cur->user_data;
(cur->consumer) (&vcr); (cur->consumer) (&vcr);
return 0; return 0;
} }
@ -206,6 +206,9 @@ void acc_vcl_delete(handle obj, PLI_INT32(*consumer)(p_vc_record),
/* /*
* $Log: a_vcl.c,v $ * $Log: a_vcl.c,v $
* Revision 1.7 2004/10/04 01:10:56 steve
* Clean up spurious trailing white space.
*
* Revision 1.6 2003/06/17 16:55:07 steve * Revision 1.6 2003/06/17 16:55:07 steve
* 1) setlinebuf() for vpi_trace * 1) setlinebuf() for vpi_trace
* 2) Addes error checks for trace file opens * 2) Addes error checks for trace file opens

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#ifdef HAVE_CVS_IDENT #ifdef HAVE_CVS_IDENT
#ident "$Id: getp.c,v 1.6 2003/06/17 16:55:07 steve Exp $" #ident "$Id: getp.c,v 1.7 2004/10/04 01:10:56 steve Exp $"
#endif #endif
# include <assert.h> # include <assert.h>
@ -158,7 +158,7 @@ char *tf_istrgetp(PLI_INT32 n, PLI_INT32 fmt, void *obj)
case 'd': value.format = vpiDecStrVal; break; case 'd': value.format = vpiDecStrVal; break;
case 'h': value.format = vpiHexStrVal; break; case 'h': value.format = vpiHexStrVal; break;
} }
if (value.format > 0) { if (value.format > 0) {
vpi_get_value(arg_h, &value); vpi_get_value(arg_h, &value);
rtn = value.value.str; rtn = value.value.str;
} }
@ -184,6 +184,9 @@ char *tf_strgetp(PLI_INT32 n, PLI_INT32 fmt)
/* /*
* $Log: getp.c,v $ * $Log: getp.c,v $
* Revision 1.7 2004/10/04 01:10:56 steve
* Clean up spurious trailing white space.
*
* Revision 1.6 2003/06/17 16:55:07 steve * Revision 1.6 2003/06/17 16:55:07 steve
* 1) setlinebuf() for vpi_trace * 1) setlinebuf() for vpi_trace
* 2) Addes error checks for trace file opens * 2) Addes error checks for trace file opens

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#ifdef HAVE_CVS_IDENT #ifdef HAVE_CVS_IDENT
#ident "$Id: link_const.cc,v 1.16 2003/06/21 01:21:43 steve Exp $" #ident "$Id: link_const.cc,v 1.17 2004/10/04 01:10:53 steve Exp $"
#endif #endif
# include "config.h" # include "config.h"
@ -59,7 +59,7 @@ bool Nexus::drivers_constant() const
outside world. */ outside world. */
if (cur_dir == Link::PASSIVE) { if (cur_dir == Link::PASSIVE) {
const NetObj*obj = cur->get_obj(); const NetObj*obj = cur->get_obj();
if (obj->scope()->parent() != 0) if (obj->scope()->parent() != 0)
continue; continue;
@ -164,6 +164,9 @@ verinum::V Nexus::driven_value() const
/* /*
* $Log: link_const.cc,v $ * $Log: link_const.cc,v $
* Revision 1.17 2004/10/04 01:10:53 steve
* Clean up spurious trailing white space.
*
* Revision 1.16 2003/06/21 01:21:43 steve * Revision 1.16 2003/06/21 01:21:43 steve
* Harmless fixup of warnings. * Harmless fixup of warnings.
* *

View File

@ -38,7 +38,7 @@ quite similar.
lexor_keyword.gperf, and use that. lexor_keyword.gperf, and use that.
3) If working with a CVS snapshot, you must run autoconf in several 3) If working with a CVS snapshot, you must run autoconf in several
directories. This is aided by the 'autoconf.sh' script at the directories. This is aided by the 'autoconf.sh' script at the
top of the source tree: top of the source tree:
sh ./autoconf.sh sh ./autoconf.sh

21
main.cc
View File

@ -19,7 +19,7 @@ const char COPYRIGHT[] =
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#ifdef HAVE_CVS_IDENT #ifdef HAVE_CVS_IDENT
#ident "$Id: main.cc,v 1.85 2004/09/25 01:58:44 steve Exp $" #ident "$Id: main.cc,v 1.86 2004/10/04 01:10:53 steve Exp $"
#endif #endif
# include "config.h" # include "config.h"
@ -417,14 +417,14 @@ extern Design* elaborate(list <perm_string> root);
#if defined(HAVE_TIMES) #if defined(HAVE_TIMES)
static double cycles_diff(struct tms *a, struct tms *b) static double cycles_diff(struct tms *a, struct tms *b)
{ {
clock_t aa = a->tms_utime clock_t aa = a->tms_utime
+ a->tms_stime + a->tms_stime
+ a->tms_cutime + a->tms_cutime
+ a->tms_cstime; + a->tms_cstime;
clock_t bb = b->tms_utime clock_t bb = b->tms_utime
+ b->tms_stime + b->tms_stime
+ b->tms_cutime + b->tms_cutime
+ b->tms_cstime; + b->tms_cstime;
return (aa-bb)/(double)sysconf(_SC_CLK_TCK); return (aa-bb)/(double)sysconf(_SC_CLK_TCK);
@ -526,7 +526,7 @@ int main(int argc, char*argv[])
perror(depfile_name); perror(depfile_name);
} }
} }
if (verbose_flag) { if (verbose_flag) {
if (times_flag) if (times_flag)
@ -606,7 +606,7 @@ int main(int argc, char*argv[])
if (verbose_flag) if (verbose_flag)
cout << endl; cout << endl;
} }
/* If there is *still* no guess for the root module, then give /* If there is *still* no guess for the root module, then give
up completely, and complain. */ up completely, and complain. */
@ -744,6 +744,9 @@ int main(int argc, char*argv[])
/* /*
* $Log: main.cc,v $ * $Log: main.cc,v $
* Revision 1.86 2004/10/04 01:10:53 steve
* Clean up spurious trailing white space.
*
* Revision 1.85 2004/09/25 01:58:44 steve * Revision 1.85 2004/09/25 01:58:44 steve
* Add a debug_elaborate flag * Add a debug_elaborate flag
* *

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#ifdef HAVE_CVS_IDENT #ifdef HAVE_CVS_IDENT
#ident "$Id: net_design.cc,v 1.44 2004/02/20 06:22:56 steve Exp $" #ident "$Id: net_design.cc,v 1.45 2004/10/04 01:10:54 steve Exp $"
#endif #endif
# include "config.h" # include "config.h"
@ -247,7 +247,7 @@ const NetExpr* Design::find_parameter(const NetScope*scope,
*/ */
void Design::run_defparams() void Design::run_defparams()
{ {
for (list<NetScope*>::const_iterator scope = root_scopes_.begin(); for (list<NetScope*>::const_iterator scope = root_scopes_.begin();
scope != root_scopes_.end(); scope++) scope != root_scopes_.end(); scope++)
(*scope)->run_defparams(this); (*scope)->run_defparams(this);
} }
@ -291,7 +291,7 @@ void NetScope::run_defparams(Design*des)
void Design::evaluate_parameters() void Design::evaluate_parameters()
{ {
for (list<NetScope*>::const_iterator scope = root_scopes_.begin(); for (list<NetScope*>::const_iterator scope = root_scopes_.begin();
scope != root_scopes_.end(); scope++) scope != root_scopes_.end(); scope++)
(*scope)->evaluate_parameters(this); (*scope)->evaluate_parameters(this);
} }
@ -618,6 +618,9 @@ void Design::delete_process(NetProcTop*top)
/* /*
* $Log: net_design.cc,v $ * $Log: net_design.cc,v $
* Revision 1.45 2004/10/04 01:10:54 steve
* Clean up spurious trailing white space.
*
* Revision 1.44 2004/02/20 06:22:56 steve * Revision 1.44 2004/02/20 06:22:56 steve
* parameter keys are per_strings. * parameter keys are per_strings.
* *

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#ifdef HAVE_CVS_IDENT #ifdef HAVE_CVS_IDENT
#ident "$Id: net_event.cc,v 1.25 2004/02/19 06:57:10 steve Exp $" #ident "$Id: net_event.cc,v 1.26 2004/10/04 01:10:54 steve Exp $"
#endif #endif
# include "config.h" # include "config.h"
@ -201,7 +201,7 @@ NexusSet* NetEvent::nex_async_()
if (trig_ != 0) if (trig_ != 0)
return 0; return 0;
NexusSet*tmp = new NexusSet; NexusSet*tmp = new NexusSet;
for (NetEvProbe*cur = probes_ ; cur != 0 ; cur = cur->enext_) { for (NetEvProbe*cur = probes_ ; cur != 0 ; cur = cur->enext_) {
if (cur->edge() != NetEvProbe::ANYEDGE) { if (cur->edge() != NetEvProbe::ANYEDGE) {
@ -449,6 +449,9 @@ NetProc* NetEvWait::statement()
/* /*
* $Log: net_event.cc,v $ * $Log: net_event.cc,v $
* Revision 1.26 2004/10/04 01:10:54 steve
* Clean up spurious trailing white space.
*
* Revision 1.25 2004/02/19 06:57:10 steve * Revision 1.25 2004/02/19 06:57:10 steve
* Memory and Event names use perm_string. * Memory and Event names use perm_string.
* *

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#ifdef HAVE_CVS_IDENT #ifdef HAVE_CVS_IDENT
#ident "$Id: net_expr.cc,v 1.22 2004/02/20 06:22:56 steve Exp $" #ident "$Id: net_expr.cc,v 1.23 2004/10/04 01:10:54 steve Exp $"
#endif #endif
# include "config.h" # include "config.h"
@ -32,7 +32,7 @@ NetExpr::TYPE NetExpr::expr_type() const
/* /*
* Create an add/sub node from the two operands. Make a best guess of * Create an add/sub node from the two operands. Make a best guess of
* the * the
*/ */
NetEBAdd::NetEBAdd(char op, NetExpr*l, NetExpr*r) NetEBAdd::NetEBAdd(char op, NetExpr*l, NetExpr*r)
: NetEBinary(op, l, r) : NetEBinary(op, l, r)
@ -516,6 +516,9 @@ NetExpr::TYPE NetESFunc::expr_type() const
/* /*
* $Log: net_expr.cc,v $ * $Log: net_expr.cc,v $
* Revision 1.23 2004/10/04 01:10:54 steve
* Clean up spurious trailing white space.
*
* Revision 1.22 2004/02/20 06:22:56 steve * Revision 1.22 2004/02/20 06:22:56 steve
* parameter keys are per_strings. * parameter keys are per_strings.
* *

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#ifdef HAVE_CVS_IDENT #ifdef HAVE_CVS_IDENT
#ident "$Id: net_scope.cc,v 1.32 2004/06/13 04:56:54 steve Exp $" #ident "$Id: net_scope.cc,v 1.33 2004/10/04 01:10:54 steve Exp $"
#endif #endif
# include "config.h" # include "config.h"
@ -267,7 +267,7 @@ void NetScope::rem_event(NetEvent*ev)
assert(cur->snext_); assert(cur->snext_);
cur = cur->snext_; cur = cur->snext_;
} }
cur->snext_ = ev->snext_; cur->snext_ = ev->snext_;
} }
ev->snext_ = 0; ev->snext_ = 0;
@ -323,7 +323,7 @@ void NetScope::rem_signal(NetNet*net)
/* /*
* This method looks for a signal within the current scope. The name * This method looks for a signal within the current scope. The name
* is assumed to be the base name of the signal, so no sub-scopes are * is assumed to be the base name of the signal, so no sub-scopes are
* searched. * searched.
*/ */
NetNet* NetScope::find_signal(const char*key) NetNet* NetScope::find_signal(const char*key)
{ {
@ -467,6 +467,9 @@ string NetScope::local_hsymbol()
/* /*
* $Log: net_scope.cc,v $ * $Log: net_scope.cc,v $
* Revision 1.33 2004/10/04 01:10:54 steve
* Clean up spurious trailing white space.
*
* Revision 1.32 2004/06/13 04:56:54 steve * Revision 1.32 2004/06/13 04:56:54 steve
* Add support for the default_nettype directive. * Add support for the default_nettype directive.
* *

View File

@ -18,7 +18,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#ifdef HAVE_CVS_IDENT #ifdef HAVE_CVS_IDENT
#ident "$Id: net_udp.cc,v 1.9 2004/02/18 17:11:56 steve Exp $" #ident "$Id: net_udp.cc,v 1.10 2004/10/04 01:10:54 steve Exp $"
#endif #endif
# include "config.h" # include "config.h"
@ -42,7 +42,7 @@ bool NetUDP::first(string&inp, char&out) const
table_idx = (unsigned) -1; table_idx = (unsigned) -1;
return next(inp, out); return next(inp, out);
} }
bool NetUDP::next(string&inp, char&out) const bool NetUDP::next(string&inp, char&out) const
{ {
table_idx++; table_idx++;
@ -62,9 +62,9 @@ bool NetUDP::next(string&inp, char&out) const
} }
out = udp->toutput[table_idx]; out = udp->toutput[table_idx];
assert( (out == '0') assert( (out == '0')
|| (out == '1') || (out == '1')
|| (out == 'x') || (out == 'x')
|| (is_sequential() && (out == '-'))); || (is_sequential() && (out == '-')));
return true; return true;
@ -92,6 +92,9 @@ char NetUDP::get_initial() const
/* /*
* $Log: net_udp.cc,v $ * $Log: net_udp.cc,v $
* Revision 1.10 2004/10/04 01:10:54 steve
* Clean up spurious trailing white space.
*
* Revision 1.9 2004/02/18 17:11:56 steve * Revision 1.9 2004/02/18 17:11:56 steve
* Use perm_strings for named langiage items. * Use perm_strings for named langiage items.
* *

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#ifdef HAVE_CVS_IDENT #ifdef HAVE_CVS_IDENT
#ident "$Id: netlist.cc,v 1.225 2004/06/30 02:16:26 steve Exp $" #ident "$Id: netlist.cc,v 1.226 2004/10/04 01:10:54 steve Exp $"
#endif #endif
# include "config.h" # include "config.h"
@ -365,7 +365,7 @@ void NetNet::type(NetNet::Type t)
for (unsigned idx = 0 ; idx < pin_count() ; idx += 1) { for (unsigned idx = 0 ; idx < pin_count() ; idx += 1) {
pin(idx).set_dir(dir); pin(idx).set_dir(dir);
} }
} }
@ -2281,6 +2281,9 @@ const NetProc*NetTaskDef::proc() const
/* /*
* $Log: netlist.cc,v $ * $Log: netlist.cc,v $
* Revision 1.226 2004/10/04 01:10:54 steve
* Clean up spurious trailing white space.
*
* Revision 1.225 2004/06/30 02:16:26 steve * Revision 1.225 2004/06/30 02:16:26 steve
* Implement signed divide and signed right shift in nets. * Implement signed divide and signed right shift in nets.
* *

View File

@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#ifdef HAVE_CVS_IDENT #ifdef HAVE_CVS_IDENT
#ident "$Id: netlist.h,v 1.320 2004/10/04 00:25:18 steve Exp $" #ident "$Id: netlist.h,v 1.321 2004/10/04 01:10:54 steve Exp $"
#endif #endif
/* /*
@ -1384,7 +1384,7 @@ class NetProc : public virtual LineInfo {
* The l-value of the assignment is a collection of NetAssign_ * The l-value of the assignment is a collection of NetAssign_
* objects that are connected to the structural netlist where the * objects that are connected to the structural netlist where the
* assignment has its effect. The NetAssign_ class is not to be * assignment has its effect. The NetAssign_ class is not to be
* derived from. * derived from.
* *
* The collection is arranged from lsb up to msb, and represents the * The collection is arranged from lsb up to msb, and represents the
* concatenation of l-values. The elaborator may collapse some * concatenation of l-values. The elaborator may collapse some
@ -3357,6 +3357,9 @@ extern ostream& operator << (ostream&, NetNet::Type);
/* /*
* $Log: netlist.h,v $ * $Log: netlist.h,v $
* Revision 1.321 2004/10/04 01:10:54 steve
* Clean up spurious trailing white space.
*
* Revision 1.320 2004/10/04 00:25:18 steve * Revision 1.320 2004/10/04 00:25:18 steve
* Remove inaccurate comment. * Remove inaccurate comment.
* *

View File

@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#ifdef HAVE_CVS_IDENT #ifdef HAVE_CVS_IDENT
#ident "$Id: parse.y,v 1.200 2004/09/14 18:24:56 steve Exp $" #ident "$Id: parse.y,v 1.201 2004/10/04 01:10:54 steve Exp $"
#endif #endif
# include "config.h" # include "config.h"
@ -501,7 +501,7 @@ delay_value
| expression ':' expression ':' expression | expression ':' expression ':' expression
{ $$ = pform_select_mtm_expr($1, $3, $5); } { $$ = pform_select_mtm_expr($1, $3, $5); }
; ;
delay_value_simple delay_value_simple
: DEC_NUMBER : DEC_NUMBER
@ -2455,7 +2455,7 @@ spec_notifier
{ } { }
| ',' identifier | ',' identifier
{ delete $2; } { delete $2; }
| spec_notifier ',' | spec_notifier ','
{ } { }
| spec_notifier ',' identifier | spec_notifier ',' identifier
{ delete $3; { delete $3;

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#ifdef HAVE_CVS_IDENT #ifdef HAVE_CVS_IDENT
#ident "$Id: pform.cc,v 1.128 2004/08/26 04:02:04 steve Exp $" #ident "$Id: pform.cc,v 1.129 2004/10/04 01:10:55 steve Exp $"
#endif #endif
# include "config.h" # include "config.h"
@ -278,7 +278,7 @@ void pform_endmodule(const char*name)
perm_string mod_name = pform_cur_module->mod_name(); perm_string mod_name = pform_cur_module->mod_name();
assert(strcmp(name, mod_name) == 0); assert(strcmp(name, mod_name) == 0);
map<perm_string,Module*>::const_iterator test = map<perm_string,Module*>::const_iterator test =
pform_modules.find(mod_name); pform_modules.find(mod_name);
if (test != pform_modules.end()) { if (test != pform_modules.end()) {
@ -1597,6 +1597,9 @@ int pform_parse(const char*path, FILE*file)
/* /*
* $Log: pform.cc,v $ * $Log: pform.cc,v $
* Revision 1.129 2004/10/04 01:10:55 steve
* Clean up spurious trailing white space.
*
* Revision 1.128 2004/08/26 04:02:04 steve * Revision 1.128 2004/08/26 04:02:04 steve
* Add support for localparam ranges. * Add support for localparam ranges.
* *

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#ifdef HAVE_CVS_IDENT #ifdef HAVE_CVS_IDENT
#ident "$Id: pform_dump.cc,v 1.87 2004/05/31 23:34:39 steve Exp $" #ident "$Id: pform_dump.cc,v 1.88 2004/10/04 01:10:55 steve Exp $"
#endif #endif
# include "config.h" # include "config.h"
@ -266,7 +266,7 @@ void PGate::dump_pins(ostream&out) const
{ {
if (pin_count()) { if (pin_count()) {
if (pin(0)) out << *pin(0); if (pin(0)) out << *pin(0);
for (unsigned idx = 1 ; idx < pin_count() ; idx += 1) { for (unsigned idx = 1 ; idx < pin_count() ; idx += 1) {
out << ", "; out << ", ";
if (pin(idx)) out << *pin(idx); if (pin(idx)) out << *pin(idx);
@ -495,7 +495,7 @@ void PCase::dump(ostream&out, unsigned ind) const
} else { } else {
out << setw(ind+2) << "" << *cur->expr[0]; out << setw(ind+2) << "" << *cur->expr[0];
for(unsigned e = 1 ; e < cur->expr.count() ; e += 1) for(unsigned e = 1 ; e < cur->expr.count() ; e += 1)
out << ", " << *cur->expr[e]; out << ", " << *cur->expr[e];
@ -909,6 +909,9 @@ void PUdp::dump(ostream&out) const
/* /*
* $Log: pform_dump.cc,v $ * $Log: pform_dump.cc,v $
* Revision 1.88 2004/10/04 01:10:55 steve
* Clean up spurious trailing white space.
*
* Revision 1.87 2004/05/31 23:34:39 steve * Revision 1.87 2004/05/31 23:34:39 steve
* Rewire/generalize parsing an elaboration of * Rewire/generalize parsing an elaboration of
* function return values to allow for better * function return values to allow for better

View File

@ -1,4 +1,4 @@
# $Id: README-solaris_pkg.txt,v 1.1 2000/06/16 18:58:45 steve Exp $ # $Id: README-solaris_pkg.txt,v 1.2 2004/10/04 01:10:56 steve Exp $
Notes about the solaris package. Notes about the solaris package.
@ -41,7 +41,7 @@ III. Notes on building a solaris package from sources
to the same as the argument to "--prefix=" to the same as the argument to "--prefix="
3) edit the 'prototype' file to add/removed files/directories from the list 3) edit the 'prototype' file to add/removed files/directories from the list
of installed components. of installed components.
4) run the 'mksolpkg' script to create the solaris package 4) run the 'mksolpkg' script to create the solaris package

View File

@ -28,7 +28,7 @@ fi
oslabel=`uname -s`-`uname -r`-$march oslabel=`uname -s`-`uname -r`-$march
fname=$name-$ver-$oslabel fname=$name-$ver-$oslabel
cp -f prototype $basedir cp -f prototype $basedir
cp -f pkginfo $basedir cp -f pkginfo $basedir
cd $basedir cd $basedir
@ -41,7 +41,7 @@ gzip -f $fname
echo "Your $oslabel package is left in /tmp/$fname.gz" echo "Your $oslabel package is left in /tmp/$fname.gz"
# cleanup # cleanup
rm -f $basedir/prototype $basedir/pkginfo rm -f $basedir/prototype $basedir/pkginfo
rm -fr /var/spool/pkg/$pkg rm -fr /var/spool/pkg/$pkg

View File

@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#ifdef HAVE_CVS_IDENT #ifdef HAVE_CVS_IDENT
#ident "$Id: syn-rules.y,v 1.30 2004/08/28 15:08:32 steve Exp $" #ident "$Id: syn-rules.y,v 1.31 2004/10/04 01:10:55 steve Exp $"
#endif #endif
# include "config.h" # include "config.h"
@ -301,7 +301,7 @@ struct tokenize : public proc_match_t {
int condit(NetCondit*dev) int condit(NetCondit*dev)
{ {
syn_token_t*cur; syn_token_t*cur;
cur = new syn_token_t; cur = new syn_token_t;
cur->token = S_IF; cur->token = S_IF;
cur->next_ = 0; cur->next_ = 0;
@ -338,7 +338,7 @@ struct tokenize : public proc_match_t {
int event_wait(NetEvWait*dev) int event_wait(NetEvWait*dev)
{ {
syn_token_t*cur; syn_token_t*cur;
cur = new syn_token_t; cur = new syn_token_t;
cur->token = '@'; cur->token = '@';
cur->evwait = dev; cur->evwait = dev;

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#ifdef HAVE_CVS_IDENT #ifdef HAVE_CVS_IDENT
#ident "$Id: synth2.cc,v 1.38 2004/08/28 15:08:32 steve Exp $" #ident "$Id: synth2.cc,v 1.39 2004/10/04 01:10:55 steve Exp $"
#endif #endif
# include "config.h" # include "config.h"
@ -87,7 +87,7 @@ bool NetAssignBase::synth_async(Design*des, NetScope*scope,
const NetNet*nex_map, NetNet*nex_out) const NetNet*nex_map, NetNet*nex_out)
{ {
DEBUG_SYNTH2_ENTRY("NetAssignBase") DEBUG_SYNTH2_ENTRY("NetAssignBase")
NetNet*rsig = rval_->synthesize(des); NetNet*rsig = rval_->synthesize(des);
assert(rsig); assert(rsig);
@ -306,7 +306,7 @@ bool NetCase::synth_async(Design*des, NetScope*scope,
for (unsigned idx = 0 ; idx < mux->width() ; idx += 1) for (unsigned idx = 0 ; idx < mux->width() ; idx += 1)
connect(mux->pin_Data(idx, item), sig->pin(idx)); connect(mux->pin_Data(idx, item), sig->pin(idx));
} }
delete[]statement_map; delete[]statement_map;
des->add_node(mux); des->add_node(mux);
@ -346,7 +346,7 @@ bool NetCondit::synth_async(Design*des, NetScope*scope,
DEBUG_SYNTH2_EXIT("NetCondit",false) DEBUG_SYNTH2_EXIT("NetCondit",false)
return false; return false;
} }
NetNet*bsig = new NetNet(scope, scope->local_symbol(), NetNet*bsig = new NetNet(scope, scope->local_symbol(),
NetNet::WIRE, nex_map->pin_count()); NetNet::WIRE, nex_map->pin_count());
bsig->local_flag(true); bsig->local_flag(true);
@ -985,6 +985,9 @@ void synth2(Design*des)
/* /*
* $Log: synth2.cc,v $ * $Log: synth2.cc,v $
* Revision 1.39 2004/10/04 01:10:55 steve
* Clean up spurious trailing white space.
*
* Revision 1.38 2004/08/28 15:08:32 steve * Revision 1.38 2004/08/28 15:08:32 steve
* Do not change reg to wire in NetAssign_ unless synthesizing. * Do not change reg to wire in NetAssign_ unless synthesizing.
* *

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#ifdef HAVE_CVS_IDENT #ifdef HAVE_CVS_IDENT
#ident "$Id: sys_funcs.cc,v 1.5 2004/03/17 17:07:12 steve Exp $" #ident "$Id: sys_funcs.cc,v 1.6 2004/10/04 01:10:55 steve Exp $"
#endif #endif
# include "config.h" # include "config.h"
@ -163,7 +163,7 @@ int load_sys_func_table(const char*path)
while (flag[0]) { while (flag[0]) {
cp = flag + strcspn(flag, " \t\r\n"); cp = flag + strcspn(flag, " \t\r\n");
if (cp[0]) *cp++ = 0; if (cp[0]) *cp++ = 0;
if (strcmp(flag,"signed") == 0) { if (strcmp(flag,"signed") == 0) {
signed_flag = true; signed_flag = true;
@ -193,6 +193,9 @@ int load_sys_func_table(const char*path)
/* /*
* $Log: sys_funcs.cc,v $ * $Log: sys_funcs.cc,v $
* Revision 1.6 2004/10/04 01:10:55 steve
* Clean up spurious trailing white space.
*
* Revision 1.5 2004/03/17 17:07:12 steve * Revision 1.5 2004/03/17 17:07:12 steve
* Protect ident pragma. * Protect ident pragma.
* *

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#ifdef HAVE_CVS_IDENT #ifdef HAVE_CVS_IDENT
#ident "$Id: t-dll-api.cc,v 1.107 2004/06/30 02:16:27 steve Exp $" #ident "$Id: t-dll-api.cc,v 1.108 2004/10/04 01:10:55 steve Exp $"
#endif #endif
# include "config.h" # include "config.h"
@ -1050,7 +1050,7 @@ extern "C" ivl_memory_t ivl_lpm_memory(ivl_lpm_t net)
default: default:
assert(0); assert(0);
return 0; return 0;
} }
} }
extern "C" ivl_expr_t ivl_lval_mux(ivl_lval_t net) extern "C" ivl_expr_t ivl_lval_mux(ivl_lval_t net)
@ -1935,6 +1935,9 @@ extern "C" ivl_variable_type_t ivl_variable_type(ivl_variable_t net)
/* /*
* $Log: t-dll-api.cc,v $ * $Log: t-dll-api.cc,v $
* Revision 1.108 2004/10/04 01:10:55 steve
* Clean up spurious trailing white space.
*
* Revision 1.107 2004/06/30 02:16:27 steve * Revision 1.107 2004/06/30 02:16:27 steve
* Implement signed divide and signed right shift in nets. * Implement signed divide and signed right shift in nets.
* *

View File

@ -18,7 +18,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#ifdef HAVE_CVS_IDENT #ifdef HAVE_CVS_IDENT
#ident "$Id: t-dll-proc.cc,v 1.64 2004/05/31 23:34:39 steve Exp $" #ident "$Id: t-dll-proc.cc,v 1.65 2004/10/04 01:10:55 steve Exp $"
#endif #endif
# include "config.h" # include "config.h"
@ -830,7 +830,7 @@ bool dll_target::proc_wait(const NetEvWait*net)
} }
} }
} }
} }
/* The ivl_statement_t for the wait statement is not complete /* The ivl_statement_t for the wait statement is not complete
until we calculate the sub-statement. */ until we calculate the sub-statement. */
@ -872,6 +872,9 @@ void dll_target::proc_while(const NetWhile*net)
/* /*
* $Log: t-dll-proc.cc,v $ * $Log: t-dll-proc.cc,v $
* Revision 1.65 2004/10/04 01:10:55 steve
* Clean up spurious trailing white space.
*
* Revision 1.64 2004/05/31 23:34:39 steve * Revision 1.64 2004/05/31 23:34:39 steve
* Rewire/generalize parsing an elaboration of * Rewire/generalize parsing an elaboration of
* function return values to allow for better * function return values to allow for better

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#ifdef HAVE_CVS_IDENT #ifdef HAVE_CVS_IDENT
#ident "$Id: t-dll.cc,v 1.130 2004/06/30 02:16:27 steve Exp $" #ident "$Id: t-dll.cc,v 1.131 2004/10/04 01:10:55 steve Exp $"
#endif #endif
# include "config.h" # include "config.h"
@ -57,14 +57,14 @@ const char *dlerror(void)
{ {
static char msg[256]; static char msg[256];
unsigned long err = GetLastError(); unsigned long err = GetLastError();
FormatMessage( FormatMessage(
FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
NULL, NULL,
err, err,
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language
(LPTSTR) &msg, (LPTSTR) &msg,
sizeof(msg) - 1, sizeof(msg) - 1,
NULL NULL
); );
return msg; return msg;
} }
@ -599,7 +599,7 @@ bool dll_target::start_design(const Design*des)
for (list<NetScope*>::const_iterator scope = root_scopes.begin(); for (list<NetScope*>::const_iterator scope = root_scopes.begin();
scope != root_scopes.end(); scope++) scope != root_scopes.end(); scope++)
add_root(des_, *scope); add_root(des_, *scope);
des_.consts = (ivl_net_const_t*) des_.consts = (ivl_net_const_t*)
malloc(sizeof(ivl_net_const_t)); malloc(sizeof(ivl_net_const_t));
des_.nconsts = 0; des_.nconsts = 0;
@ -1044,9 +1044,9 @@ void dll_target::udp(const NetUDP*net)
udps[net->udp_name()] = u; udps[net->udp_name()] = u;
} }
obj->udp = u; obj->udp = u;
// Some duplication of code here, see: dll_target::logic() // Some duplication of code here, see: dll_target::logic()
/* Connect all the ivl_nexus_t objects to the pins of the /* Connect all the ivl_nexus_t objects to the pins of the
@ -1617,12 +1617,12 @@ void dll_target::lpm_ram_dq(const NetRamDq*net)
obj->u_.ff.width = net->width(); obj->u_.ff.width = net->width();
obj->u_.ff.swid = net->awidth(); obj->u_.ff.swid = net->awidth();
scope_add_lpm(obj->scope, obj); scope_add_lpm(obj->scope, obj);
const Nexus*nex; const Nexus*nex;
// A write port is present only if something is connected to // A write port is present only if something is connected to
// the clock input. // the clock input.
bool has_write_port = net->pin_InClock().is_linked(); bool has_write_port = net->pin_InClock().is_linked();
@ -1649,7 +1649,7 @@ void dll_target::lpm_ram_dq(const NetRamDq*net)
obj->u_.ff.clk = 0x0; obj->u_.ff.clk = 0x0;
obj->u_.ff.we = 0x0; obj->u_.ff.we = 0x0;
} }
// Connect the address bus // Connect the address bus
if (obj->u_.ff.swid == 1) { if (obj->u_.ff.swid == 1) {
@ -1661,7 +1661,7 @@ void dll_target::lpm_ram_dq(const NetRamDq*net)
} }
else { else {
obj->u_.ff.s.pins = new ivl_nexus_t [obj->u_.ff.swid]; obj->u_.ff.s.pins = new ivl_nexus_t [obj->u_.ff.swid];
for (unsigned idx = 0 ; idx < obj->u_.ff.swid ; idx += 1) { for (unsigned idx = 0 ; idx < obj->u_.ff.swid ; idx += 1) {
nex = net->pin_Address(idx).nexus(); nex = net->pin_Address(idx).nexus();
assert(nex->t_cookie()); assert(nex->t_cookie());
@ -1670,7 +1670,7 @@ void dll_target::lpm_ram_dq(const NetRamDq*net)
IVL_DR_HiZ, IVL_DR_HiZ); IVL_DR_HiZ, IVL_DR_HiZ);
} }
} }
// Connect the data busses // Connect the data busses
if (obj->u_.ff.width == 1) { if (obj->u_.ff.width == 1) {
@ -1687,7 +1687,7 @@ void dll_target::lpm_ram_dq(const NetRamDq*net)
nexus_lpm_add(obj->u_.ff.d.pin, obj, nexus_lpm_add(obj->u_.ff.d.pin, obj,
0, IVL_DR_HiZ, IVL_DR_HiZ); 0, IVL_DR_HiZ, IVL_DR_HiZ);
} }
} }
else if (has_write_port) { else if (has_write_port) {
obj->u_.ff.q.pins = new ivl_nexus_t [obj->u_.ff.width * 2]; obj->u_.ff.q.pins = new ivl_nexus_t [obj->u_.ff.width * 2];
obj->u_.ff.d.pins = obj->u_.ff.q.pins + obj->u_.ff.width; obj->u_.ff.d.pins = obj->u_.ff.q.pins + obj->u_.ff.width;
@ -1698,17 +1698,17 @@ void dll_target::lpm_ram_dq(const NetRamDq*net)
obj->u_.ff.q.pins[idx] = (ivl_nexus_t) nex->t_cookie(); obj->u_.ff.q.pins[idx] = (ivl_nexus_t) nex->t_cookie();
nexus_lpm_add(obj->u_.ff.q.pins[idx], obj, 0, nexus_lpm_add(obj->u_.ff.q.pins[idx], obj, 0,
IVL_DR_STRONG, IVL_DR_STRONG); IVL_DR_STRONG, IVL_DR_STRONG);
nex = net->pin_Data(idx).nexus(); nex = net->pin_Data(idx).nexus();
assert(nex->t_cookie()); assert(nex->t_cookie());
obj->u_.ff.d.pins[idx] = (ivl_nexus_t) nex->t_cookie(); obj->u_.ff.d.pins[idx] = (ivl_nexus_t) nex->t_cookie();
nexus_lpm_add(obj->u_.ff.d.pins[idx], obj, 0, nexus_lpm_add(obj->u_.ff.d.pins[idx], obj, 0,
IVL_DR_HiZ, IVL_DR_HiZ); IVL_DR_HiZ, IVL_DR_HiZ);
} }
} }
else { else {
obj->u_.ff.q.pins = new ivl_nexus_t [obj->u_.ff.width]; obj->u_.ff.q.pins = new ivl_nexus_t [obj->u_.ff.width];
for (unsigned idx = 0 ; idx < obj->u_.ff.width ; idx += 1) { for (unsigned idx = 0 ; idx < obj->u_.ff.width ; idx += 1) {
nex = net->pin_Q(idx).nexus(); nex = net->pin_Q(idx).nexus();
assert(nex->t_cookie()); assert(nex->t_cookie());
@ -2180,6 +2180,9 @@ extern const struct target tgt_dll = { "dll", &dll_target_obj };
/* /*
* $Log: t-dll.cc,v $ * $Log: t-dll.cc,v $
* Revision 1.131 2004/10/04 01:10:55 steve
* Clean up spurious trailing white space.
*
* Revision 1.130 2004/06/30 02:16:27 steve * Revision 1.130 2004/06/30 02:16:27 steve
* Implement signed divide and signed right shift in nets. * Implement signed divide and signed right shift in nets.
* *

View File

@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#ifdef HAVE_CVS_IDENT #ifdef HAVE_CVS_IDENT
#ident "$Id: t-dll.h,v 1.114 2004/06/30 02:16:27 steve Exp $" #ident "$Id: t-dll.h,v 1.115 2004/10/04 01:10:56 steve Exp $"
#endif #endif
# include "target.h" # include "target.h"
@ -472,7 +472,7 @@ struct ivl_nexus_s {
}; };
/* /*
* Memory. * Memory.
*/ */
struct ivl_memory_s { struct ivl_memory_s {
@ -684,6 +684,9 @@ struct ivl_variable_s {
/* /*
* $Log: t-dll.h,v $ * $Log: t-dll.h,v $
* Revision 1.115 2004/10/04 01:10:56 steve
* Clean up spurious trailing white space.
*
* Revision 1.114 2004/06/30 02:16:27 steve * Revision 1.114 2004/06/30 02:16:27 steve
* Implement signed divide and signed right shift in nets. * Implement signed divide and signed right shift in nets.
* *

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#ifdef HAVE_CVS_IDENT #ifdef HAVE_CVS_IDENT
#ident "$Id: d-generic-edif.c,v 1.17 2003/11/12 03:20:14 steve Exp $" #ident "$Id: d-generic-edif.c,v 1.18 2004/10/04 01:10:56 steve Exp $"
#endif #endif
# include "device.h" # include "device.h"
@ -442,7 +442,7 @@ static void edif_show_generic_dff(ivl_lpm_t net)
if (aset) { if (aset) {
if (abits[idx] == '1') { if (abits[idx] == '1') {
sprintf(jbuf, "(portRef PRE (instanceRef U%u))", sprintf(jbuf, "(portRef PRE (instanceRef U%u))",
edif_uref); edif_uref);
edif_set_nexus_joint(aset, jbuf); edif_set_nexus_joint(aset, jbuf);
} else { } else {
@ -477,6 +477,9 @@ const struct device_s d_generic_edif = {
/* /*
* $Log: d-generic-edif.c,v $ * $Log: d-generic-edif.c,v $
* Revision 1.18 2004/10/04 01:10:56 steve
* Clean up spurious trailing white space.
*
* Revision 1.17 2003/11/12 03:20:14 steve * Revision 1.17 2003/11/12 03:20:14 steve
* devices need show_cmp_gt * devices need show_cmp_gt
* *

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#ifdef HAVE_CVS_IDENT #ifdef HAVE_CVS_IDENT
#ident "$Id: d-lpm.c,v 1.11 2003/11/12 03:20:14 steve Exp $" #ident "$Id: d-lpm.c,v 1.12 2004/10/04 01:10:56 steve Exp $"
#endif #endif
/* /*
@ -320,7 +320,7 @@ static void lpm_logic(ivl_net_logic_t net)
edif_cell_t cell; edif_cell_t cell;
edif_cellref_t ref; edif_cellref_t ref;
edif_joint_t jnt; edif_joint_t jnt;
switch (ivl_logic_type(net)) { switch (ivl_logic_type(net)) {
case IVL_LO_BUFZ: case IVL_LO_BUFZ:
@ -876,6 +876,9 @@ const struct device_s d_lpm_edif = {
/* /*
* $Log: d-lpm.c,v $ * $Log: d-lpm.c,v $
* Revision 1.12 2004/10/04 01:10:56 steve
* Clean up spurious trailing white space.
*
* Revision 1.11 2003/11/12 03:20:14 steve * Revision 1.11 2003/11/12 03:20:14 steve
* devices need show_cmp_gt * devices need show_cmp_gt
* *

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#ifdef HAVE_CVS_IDENT #ifdef HAVE_CVS_IDENT
#ident "$Id: d-virtex.c,v 1.34 2004/02/15 18:03:30 steve Exp $" #ident "$Id: d-virtex.c,v 1.35 2004/10/04 01:10:56 steve Exp $"
#endif #endif
# include "device.h" # include "device.h"
@ -41,7 +41,7 @@ const static struct edif_xlib_celltable virtex_celltable[] = {
{ "MULT_AND", xilinx_cell_mult_and }, { "MULT_AND", xilinx_cell_mult_and },
{ 0, 0} { 0, 0}
}; };
/* /*
* The show_header function is called before any of the devices of the * The show_header function is called before any of the devices of the
* netlist are scanned. * netlist are scanned.
@ -846,6 +846,9 @@ const struct device_s d_virtex_edif = {
/* /*
* $Log: d-virtex.c,v $ * $Log: d-virtex.c,v $
* Revision 1.35 2004/10/04 01:10:56 steve
* Clean up spurious trailing white space.
*
* Revision 1.34 2004/02/15 18:03:30 steve * Revision 1.34 2004/02/15 18:03:30 steve
* Cleanup of warnings. * Cleanup of warnings.
* *

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#ifdef HAVE_CVS_IDENT #ifdef HAVE_CVS_IDENT
#ident "$Id: d-virtex2.c,v 1.19 2003/11/12 03:20:14 steve Exp $" #ident "$Id: d-virtex2.c,v 1.20 2004/10/04 01:10:57 steve Exp $"
#endif #endif
# include "device.h" # include "device.h"
@ -42,7 +42,7 @@ const static struct edif_xlib_celltable virtex2_celltable[] = {
{ "MULT_AND", xilinx_cell_mult_and }, { "MULT_AND", xilinx_cell_mult_and },
{ 0, 0} { 0, 0}
}; };
/* /*
* The show_header function is called before any of the devices of the * The show_header function is called before any of the devices of the
* netlist are scanned. * netlist are scanned.
@ -95,6 +95,9 @@ const struct device_s d_virtex2_edif = {
/* /*
* $Log: d-virtex2.c,v $ * $Log: d-virtex2.c,v $
* Revision 1.20 2004/10/04 01:10:57 steve
* Clean up spurious trailing white space.
*
* Revision 1.19 2003/11/12 03:20:14 steve * Revision 1.19 2003/11/12 03:20:14 steve
* devices need show_cmp_gt * devices need show_cmp_gt
* *

View File

@ -1,4 +1,4 @@
.TH iverilog-fpga 1 "$Date: 2003/10/27 06:12:47 $" Version "$Date: 2003/10/27 06:12:47 $" .TH iverilog-fpga 1 "$Date: 2004/10/04 01:10:57 $" Version "$Date: 2004/10/04 01:10:57 $"
.SH NAME .SH NAME
iverilog-fpga \- FPGA code generator for Icarus Verilog iverilog-fpga \- FPGA code generator for Icarus Verilog
@ -183,5 +183,5 @@ iverilog(1),
.nf .nf
Copyright \(co 2003 Stephen Williams Copyright \(co 2003 Stephen Williams
This document can be freely redistributed according to the terms of the This document can be freely redistributed according to the terms of the
GNU General Public License version 2.0 GNU General Public License version 2.0

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#ifdef HAVE_CVS_IDENT #ifdef HAVE_CVS_IDENT
#ident "$Id: stub.c,v 1.89 2004/09/25 01:57:33 steve Exp $" #ident "$Id: stub.c,v 1.90 2004/10/04 01:10:57 steve Exp $"
#endif #endif
# include "config.h" # include "config.h"
@ -114,7 +114,7 @@ static void show_expression(ivl_expr_t net, unsigned ind)
fprintf(out, "%*s<string=\"%s\", width=%u", ind, "", fprintf(out, "%*s<string=\"%s\", width=%u", ind, "",
ivl_expr_string(net), ivl_expr_width(net)); ivl_expr_string(net), ivl_expr_width(net));
if (par != 0) if (par != 0)
fprintf(out, ", parameter=%s", fprintf(out, ", parameter=%s",
ivl_parameter_basename(par)); ivl_parameter_basename(par));
fprintf(out, ">\n"); fprintf(out, ">\n");
@ -168,7 +168,7 @@ static void show_expression(ivl_expr_t net, unsigned ind)
fprintf(out, "%02x", tmp.bv[idx-1]); fprintf(out, "%02x", tmp.bv[idx-1]);
fprintf(out, ")"); fprintf(out, ")");
if (par != 0) if (par != 0)
fprintf(out, ", parameter=%s", fprintf(out, ", parameter=%s",
ivl_parameter_basename(par)); ivl_parameter_basename(par));
fprintf(out, ">\n"); fprintf(out, ">\n");
@ -953,6 +953,9 @@ int target_design(ivl_design_t des)
/* /*
* $Log: stub.c,v $ * $Log: stub.c,v $
* Revision 1.90 2004/10/04 01:10:57 steve
* Clean up spurious trailing white space.
*
* Revision 1.89 2004/09/25 01:57:33 steve * Revision 1.89 2004/09/25 01:57:33 steve
* Dump tri0 and tri1 nets. * Dump tri0 and tri1 nets.
* *

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#ifdef HAVE_CVS_IDENT #ifdef HAVE_CVS_IDENT
#ident "$Id: draw_vpi.c,v 1.8 2003/04/23 02:22:47 steve Exp $" #ident "$Id: draw_vpi.c,v 1.9 2004/10/04 01:10:57 steve Exp $"
#endif #endif
# include "vvp_priv.h" # include "vvp_priv.h"
@ -68,7 +68,7 @@ static void draw_vpi_taskfunc_args(const char*call_string,
ivl_expr_t expr = tnet ivl_expr_t expr = tnet
? ivl_stmt_parm(tnet, idx) ? ivl_stmt_parm(tnet, idx)
: ivl_expr_parm(fnet, idx); : ivl_expr_parm(fnet, idx);
switch (ivl_expr_type(expr)) { switch (ivl_expr_type(expr)) {
/* These expression types can be handled directly, /* These expression types can be handled directly,
@ -148,7 +148,7 @@ static void draw_vpi_taskfunc_args(const char*call_string,
ivl_expr_t expr = tnet ivl_expr_t expr = tnet
? ivl_stmt_parm(tnet, idx) ? ivl_stmt_parm(tnet, idx)
: ivl_expr_parm(fnet, idx); : ivl_expr_parm(fnet, idx);
switch (ivl_expr_type(expr)) { switch (ivl_expr_type(expr)) {
case IVL_EX_NONE: case IVL_EX_NONE:
fprintf(vvp_out, ", \" \""); fprintf(vvp_out, ", \" \"");
@ -178,7 +178,7 @@ static void draw_vpi_taskfunc_args(const char*call_string,
break; break;
} else { } else {
fprintf(vvp_out, ", V_%s", fprintf(vvp_out, ", V_%s",
vvp_signal_label(ivl_expr_signal(expr))); vvp_signal_label(ivl_expr_signal(expr)));
continue; continue;
} }
@ -194,7 +194,7 @@ static void draw_vpi_taskfunc_args(const char*call_string,
fprintf(vvp_out, ", P_%p", par); fprintf(vvp_out, ", P_%p", par);
} else { } else {
fprintf(vvp_out, ", \"%s\"", fprintf(vvp_out, ", \"%s\"",
ivl_expr_string(expr)); ivl_expr_string(expr));
} }
continue; continue;
@ -213,10 +213,10 @@ static void draw_vpi_taskfunc_args(const char*call_string,
continue; continue;
} }
break; break;
case IVL_EX_MEMORY: case IVL_EX_MEMORY:
if (!ivl_expr_oper1(expr)) { if (!ivl_expr_oper1(expr)) {
fprintf(vvp_out, ", M_%s", fprintf(vvp_out, ", M_%s",
vvp_memory_label(ivl_expr_memory(expr))); vvp_memory_label(ivl_expr_memory(expr)));
continue; continue;
} }
@ -243,7 +243,7 @@ static void draw_vpi_taskfunc_args(const char*call_string,
} }
veci++; veci++;
} }
assert(veci == vecs); assert(veci == vecs);
if (vecs) { if (vecs) {
@ -296,6 +296,9 @@ int draw_vpi_rfunc_call(ivl_expr_t fnet)
/* /*
* $Log: draw_vpi.c,v $ * $Log: draw_vpi.c,v $
* Revision 1.9 2004/10/04 01:10:57 steve
* Clean up spurious trailing white space.
*
* Revision 1.8 2003/04/23 02:22:47 steve * Revision 1.8 2003/04/23 02:22:47 steve
* Fix word register leak. * Fix word register leak.
* *

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#ifdef HAVE_CVS_IDENT #ifdef HAVE_CVS_IDENT
#ident "$Id: eval_expr.c,v 1.109 2004/09/10 00:14:31 steve Exp $" #ident "$Id: eval_expr.c,v 1.110 2004/10/04 01:10:57 steve Exp $"
#endif #endif
# include "vvp_priv.h" # include "vvp_priv.h"
@ -838,7 +838,7 @@ static struct vector_info draw_binary_expr_lrs(ivl_expr_t exp, unsigned wid)
fprintf(vvp_out, " %%ix/load 0, %u;\n", shift); fprintf(vvp_out, " %%ix/load 0, %u;\n", shift);
break; break;
} }
case IVL_EX_ULONG: case IVL_EX_ULONG:
fprintf(vvp_out, " %%ix/load 0, %lu;\n", ivl_expr_uvalue(re)); fprintf(vvp_out, " %%ix/load 0, %lu;\n", ivl_expr_uvalue(re));
break; break;
@ -1527,7 +1527,7 @@ void draw_memory_index_expr(ivl_memory_t mem, ivl_expr_t ae)
unsigned long v = 0; unsigned long v = 0;
int unknown_flag = 0; int unknown_flag = 0;
unsigned idx; unsigned idx;
for (idx = 0 ; idx < nbits ; idx += 1) for (idx = 0 ; idx < nbits ; idx += 1)
switch (bits[idx]) { switch (bits[idx]) {
case '0': case '0':
break; break;
@ -1546,7 +1546,7 @@ void draw_memory_index_expr(ivl_memory_t mem, ivl_expr_t ae)
break; break;
} }
case IVL_EX_ULONG: { case IVL_EX_ULONG: {
unsigned v = ivl_expr_uvalue(ae); unsigned v = ivl_expr_uvalue(ae);
fprintf(vvp_out, " %%ix/load 3, %u;\n", (v-root)*width); fprintf(vvp_out, " %%ix/load 3, %u;\n", (v-root)*width);
fprintf(vvp_out, " %%mov 4, 0, 1;\n"); fprintf(vvp_out, " %%mov 4, 0, 1;\n");
break; break;
@ -1576,7 +1576,7 @@ static struct vector_info draw_memory_expr(ivl_expr_t exp, unsigned wid)
if (swid > wid) if (swid > wid)
swid = wid; swid = wid;
res.base = allocate_vector(wid); res.base = allocate_vector(wid);
res.wid = wid; res.wid = wid;
@ -2139,6 +2139,9 @@ struct vector_info draw_eval_expr(ivl_expr_t exp, int stuff_ok_flag)
/* /*
* $Log: eval_expr.c,v $ * $Log: eval_expr.c,v $
* Revision 1.110 2004/10/04 01:10:57 steve
* Clean up spurious trailing white space.
*
* Revision 1.109 2004/09/10 00:14:31 steve * Revision 1.109 2004/09/10 00:14:31 steve
* Relaxed width constraint on pad_expression output. * Relaxed width constraint on pad_expression output.
* *

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#ifdef HAVE_CVS_IDENT #ifdef HAVE_CVS_IDENT
#ident "$Id: eval_real.c,v 1.10 2003/12/19 01:27:10 steve Exp $" #ident "$Id: eval_real.c,v 1.11 2004/10/04 01:10:57 steve Exp $"
#endif #endif
/* /*
@ -207,7 +207,7 @@ static int draw_sfunc_real(ivl_expr_t exp)
(via an index register) for the result. */ (via an index register) for the result. */
sv = draw_eval_expr(exp, 0); sv = draw_eval_expr(exp, 0);
clr_vector(sv); clr_vector(sv);
res = allocate_word(); res = allocate_word();
fprintf(vvp_out, " %%ix/get %d, %u, %u;\n", fprintf(vvp_out, " %%ix/get %d, %u, %u;\n",
res, sv.base, sv.wid); res, sv.base, sv.wid);
@ -298,6 +298,9 @@ int draw_eval_real(ivl_expr_t exp)
/* /*
* $Log: eval_real.c,v $ * $Log: eval_real.c,v $
* Revision 1.11 2004/10/04 01:10:57 steve
* Clean up spurious trailing white space.
*
* Revision 1.10 2003/12/19 01:27:10 steve * Revision 1.10 2003/12/19 01:27:10 steve
* Fix various unsigned compare warnings. * Fix various unsigned compare warnings.
* *

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#ifdef HAVE_CVS_IDENT #ifdef HAVE_CVS_IDENT
#ident "$Id: vvp.c,v 1.16 2003/05/16 03:22:52 steve Exp $" #ident "$Id: vvp.c,v 1.17 2004/10/04 01:10:57 steve Exp $"
#endif #endif
/* /*
@ -64,7 +64,7 @@ inline static void draw_module_declarations(ivl_design_t des)
int target_design(ivl_design_t des) int target_design(ivl_design_t des)
{ {
int rc; int rc;
ivl_scope_t *roots; ivl_scope_t *roots;
@ -108,6 +108,9 @@ int target_design(ivl_design_t des)
/* /*
* $Log: vvp.c,v $ * $Log: vvp.c,v $
* Revision 1.17 2004/10/04 01:10:57 steve
* Clean up spurious trailing white space.
*
* Revision 1.16 2003/05/16 03:22:52 steve * Revision 1.16 2003/05/16 03:22:52 steve
* Use fopen64 to open output file. * Use fopen64 to open output file.
* *

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#ifdef HAVE_CVS_IDENT #ifdef HAVE_CVS_IDENT
#ident "$Id: vvp_process.c,v 1.92 2004/05/19 03:25:42 steve Exp $" #ident "$Id: vvp_process.c,v 1.93 2004/10/04 01:10:57 steve Exp $"
#endif #endif
# include "vvp_priv.h" # include "vvp_priv.h"
@ -91,7 +91,7 @@ static void set_to_lvariable(ivl_lval_t lval, unsigned idx,
fprintf(vvp_out, " %%set/x0/x V_%s, %u, 3;\n", fprintf(vvp_out, " %%set/x0/x V_%s, %u, 3;\n",
vvp_signal_label(sig), bit); vvp_signal_label(sig), bit);
} }
} else if (wid == 1) { } else if (wid == 1) {
fprintf(vvp_out, " %%set V_%s[%u], %u;\n", fprintf(vvp_out, " %%set V_%s[%u], %u;\n",
vvp_signal_label(sig), idx+part_off, bit); vvp_signal_label(sig), idx+part_off, bit);
@ -148,7 +148,7 @@ static void assign_to_lvector(ivl_lval_t lval, unsigned idx,
} }
static void assign_to_memory(ivl_memory_t mem, unsigned idx, static void assign_to_memory(ivl_memory_t mem, unsigned idx,
unsigned bit, unsigned delay) unsigned bit, unsigned delay)
{ {
if (idx) if (idx)
@ -530,7 +530,7 @@ static int show_stmt_assign_nb(ivl_statement_t net)
if (mem) { if (mem) {
for (idx = 0 ; idx < bit_limit ; idx += 1) { for (idx = 0 ; idx < bit_limit ; idx += 1) {
assign_to_memory(mem, idx, assign_to_memory(mem, idx,
bitchar_to_idx(bits[cur_rbit]), bitchar_to_idx(bits[cur_rbit]),
delay); delay);
cur_rbit += 1; cur_rbit += 1;
@ -821,7 +821,7 @@ static int show_stmt_case(ivl_statement_t net, ivl_scope_t sscope)
default: default:
assert(0); assert(0);
} }
/* Done with the case expression */ /* Done with the case expression */
clr_vector(cvec); clr_vector(cvec);
} }
@ -1121,7 +1121,7 @@ static int show_stmt_force(ivl_statement_t net)
force_functor_label, idx, force_functor_label, idx,
tmp_label, idx, tmp_label, idx,
draw_net_input(ivl_stmt_nexus(net, idx))); draw_net_input(ivl_stmt_nexus(net, idx)));
} }
free(tmp_label); free(tmp_label);
for (idx = 0 ; idx < ivl_lval_pins(lval) ; idx += 1) { for (idx = 0 ; idx < ivl_lval_pins(lval) ; idx += 1) {
@ -1389,7 +1389,7 @@ static int show_stmt_while(ivl_statement_t net, ivl_scope_t sscope)
static int show_system_task_call(ivl_statement_t net) static int show_system_task_call(ivl_statement_t net)
{ {
unsigned parm_count = ivl_stmt_parm_count(net); unsigned parm_count = ivl_stmt_parm_count(net);
if (parm_count == 0) { if (parm_count == 0) {
fprintf(vvp_out, " %%vpi_call \"%s\";\n", ivl_stmt_name(net)); fprintf(vvp_out, " %%vpi_call \"%s\";\n", ivl_stmt_name(net));
clear_expression_lookaside(); clear_expression_lookaside();
@ -1626,6 +1626,9 @@ int draw_func_definition(ivl_scope_t scope)
/* /*
* $Log: vvp_process.c,v $ * $Log: vvp_process.c,v $
* Revision 1.93 2004/10/04 01:10:57 steve
* Clean up spurious trailing white space.
*
* Revision 1.92 2004/05/19 03:25:42 steve * Revision 1.92 2004/05/19 03:25:42 steve
* Generate code for nb assign to reals. * Generate code for nb assign to reals.
* *

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#ifdef HAVE_CVS_IDENT #ifdef HAVE_CVS_IDENT
#ident "$Id: vvp_scope.c,v 1.102 2004/09/25 21:04:25 steve Exp $" #ident "$Id: vvp_scope.c,v 1.103 2004/10/04 01:10:57 steve Exp $"
#endif #endif
# include "vvp_priv.h" # include "vvp_priv.h"
@ -42,17 +42,17 @@ const char *vvp_mangle_id(const char *id)
{ {
static char *out = 0x0; static char *out = 0x0;
static size_t out_len; static size_t out_len;
int nesc = 0; int nesc = 0;
int iout = 0; int iout = 0;
const char *inp = id; const char *inp = id;
const char nosym[] = "!\"#%&'()*+,-/:;<=>?@[\\]^`{|}~"; const char nosym[] = "!\"#%&'()*+,-/:;<=>?@[\\]^`{|}~";
char *se = strpbrk(inp, nosym); char *se = strpbrk(inp, nosym);
if (!se) if (!se)
return id; return id;
do { do {
int n = se - inp; int n = se - inp;
unsigned int nlen = strlen(id) + 4*(++nesc) + 1; unsigned int nlen = strlen(id) + 4*(++nesc) + 1;
@ -83,7 +83,7 @@ const char *vvp_mangle_id(const char *id)
se = strpbrk(inp, nosym); se = strpbrk(inp, nosym);
} while (se); } while (se);
strcpy(out+iout, inp); strcpy(out+iout, inp);
return out; return out;
} }
@ -92,17 +92,17 @@ const char *vvp_mangle_name(const char *id)
{ {
static char *out = 0x0; static char *out = 0x0;
static size_t out_len; static size_t out_len;
int nesc = 0; int nesc = 0;
int iout = 0; int iout = 0;
const char *inp = id; const char *inp = id;
const char nosym[] = "\"\\"; const char nosym[] = "\"\\";
char *se = strpbrk(inp, nosym); char *se = strpbrk(inp, nosym);
if (!se) if (!se)
return id; return id;
do { do {
int n = se - inp; int n = se - inp;
unsigned int nlen = strlen(id) + 2*(++nesc) + 1; unsigned int nlen = strlen(id) + 2*(++nesc) + 1;
@ -121,7 +121,7 @@ const char *vvp_mangle_name(const char *id)
se = strpbrk(inp, nosym); se = strpbrk(inp, nosym);
} while (se); } while (se);
strcpy(out+iout, inp); strcpy(out+iout, inp);
return out; return out;
} }
@ -226,7 +226,7 @@ const char*drive_string(ivl_drive_t drive)
return ""; return "";
} }
/* /*
* The draw_scope function draws the major functional items within a * The draw_scope function draws the major functional items within a
* scope. This includes the scopes themselves, of course. All the * scope. This includes the scopes themselves, of course. All the
@ -550,12 +550,12 @@ const char* draw_net_input(ivl_nexus_t nex)
unsigned int inst; unsigned int inst;
for (inst = 0; inst < ndrivers; inst += 4) { for (inst = 0; inst < ndrivers; inst += 4) {
if (ndrivers > 4) if (ndrivers > 4)
fprintf(vvp_out, "RS_%p/%d/%d .resolv tri", fprintf(vvp_out, "RS_%p/%d/%d .resolv tri",
nex, level, inst); nex, level, inst);
else else
fprintf(vvp_out, "RS_%p .resolv %s", fprintf(vvp_out, "RS_%p .resolv %s",
nex, resolv_type); nex, resolv_type);
for (idx = inst; idx < ndrivers && idx < inst+4; idx += 1) { for (idx = inst; idx < ndrivers && idx < inst+4; idx += 1) {
if (level) { if (level) {
fprintf(vvp_out, ", RS_%p/%d/%d", fprintf(vvp_out, ", RS_%p/%d/%d",
@ -567,7 +567,7 @@ const char* draw_net_input(ivl_nexus_t nex)
} }
for ( ; idx < inst+4 ; idx += 1) for ( ; idx < inst+4 ; idx += 1)
fprintf(vvp_out, ", C<z>"); fprintf(vvp_out, ", C<z>");
fprintf(vvp_out, ";\n"); fprintf(vvp_out, ";\n");
} }
if (ndrivers > 4) if (ndrivers > 4)
@ -576,7 +576,7 @@ const char* draw_net_input(ivl_nexus_t nex)
ndrivers = 0; ndrivers = 0;
level += 1; level += 1;
} }
sprintf(result, "RS_%p", nex); sprintf(result, "RS_%p", nex);
nex_private = strdup(result); nex_private = strdup(result);
ivl_nexus_set_private(nex, nex_private); ivl_nexus_set_private(nex, nex_private);
@ -660,7 +660,7 @@ static void draw_delay(ivl_net_logic_t lptr)
unsigned d0 = ivl_logic_delay(lptr, 0); unsigned d0 = ivl_logic_delay(lptr, 0);
unsigned d1 = ivl_logic_delay(lptr, 1); unsigned d1 = ivl_logic_delay(lptr, 1);
unsigned d2 = ivl_logic_delay(lptr, 2); unsigned d2 = ivl_logic_delay(lptr, 2);
if (d0 == 0 && d1 == 0 && d2 == 0) if (d0 == 0 && d1 == 0 && d2 == 0)
return; return;
@ -689,14 +689,14 @@ static void draw_udp_def(ivl_udp_t udp)
} }
if (ivl_udp_sequ(udp)) if (ivl_udp_sequ(udp))
fprintf(vvp_out, fprintf(vvp_out,
"UDP_%s .udp/sequ \"%s\", %d, %d", "UDP_%s .udp/sequ \"%s\", %d, %d",
vvp_mangle_id(ivl_udp_name(udp)), vvp_mangle_id(ivl_udp_name(udp)),
vvp_mangle_name(ivl_udp_name(udp)), vvp_mangle_name(ivl_udp_name(udp)),
ivl_udp_nin(udp), ivl_udp_nin(udp),
init ); init );
else else
fprintf(vvp_out, fprintf(vvp_out,
"UDP_%s .udp/comb \"%s\", %d", "UDP_%s .udp/comb \"%s\", %d",
vvp_mangle_id(ivl_udp_name(udp)), vvp_mangle_id(ivl_udp_name(udp)),
vvp_mangle_name(ivl_udp_name(udp)), vvp_mangle_name(ivl_udp_name(udp)),
@ -713,7 +713,7 @@ static void draw_udp_in_scope(ivl_net_logic_t lptr)
unsigned pdx; unsigned pdx;
ivl_udp_t udp = ivl_logic_udp(lptr); ivl_udp_t udp = ivl_logic_udp(lptr);
static ivl_udp_t *udps = 0x0; static ivl_udp_t *udps = 0x0;
static int nudps = 0; static int nudps = 0;
int i; int i;
@ -721,7 +721,7 @@ static void draw_udp_in_scope(ivl_net_logic_t lptr)
for (i=0; i<nudps; i++) for (i=0; i<nudps; i++)
if (udps[i] == udp) if (udps[i] == udp)
break; break;
if (i >= nudps) if (i >= nudps)
{ {
udps = realloc(udps, (nudps+1)*sizeof(ivl_udp_t)); udps = realloc(udps, (nudps+1)*sizeof(ivl_udp_t));
@ -731,10 +731,10 @@ static void draw_udp_in_scope(ivl_net_logic_t lptr)
} }
fprintf(vvp_out, "L_%p .udp", lptr); fprintf(vvp_out, "L_%p .udp", lptr);
fprintf(vvp_out, " UDP_%s", fprintf(vvp_out, " UDP_%s",
vvp_mangle_id(ivl_udp_name(udp))); vvp_mangle_id(ivl_udp_name(udp)));
draw_delay(lptr); draw_delay(lptr);
for (pdx = 1 ; pdx < ivl_logic_pins(lptr) ; pdx += 1) { for (pdx = 1 ; pdx < ivl_logic_pins(lptr) ; pdx += 1) {
ivl_nexus_t nex = ivl_logic_pin(lptr, pdx); ivl_nexus_t nex = ivl_logic_pin(lptr, pdx);
@ -749,7 +749,7 @@ static void draw_udp_in_scope(ivl_net_logic_t lptr)
draw_input_from_net(nex); draw_input_from_net(nex);
} }
} }
fprintf(vvp_out, ";\n"); fprintf(vvp_out, ";\n");
} }
@ -777,7 +777,7 @@ static void draw_logic_in_scope(ivl_net_logic_t lptr)
input_strings[pdx] = draw_net_input(nex); input_strings[pdx] = draw_net_input(nex);
} }
} }
switch (ivl_logic_type(lptr)) { switch (ivl_logic_type(lptr)) {
case IVL_LO_UDP: case IVL_LO_UDP:
@ -911,17 +911,17 @@ static void draw_logic_in_scope(ivl_net_logic_t lptr)
input_strings = calloc(ninp, sizeof(char*)); input_strings = calloc(ninp, sizeof(char*));
for (pdx = 0 ; pdx < ninp ; pdx += 1) for (pdx = 0 ; pdx < ninp ; pdx += 1)
input_strings[pdx] = draw_net_input(ivl_logic_pin(lptr, pdx+1)); input_strings[pdx] = draw_net_input(ivl_logic_pin(lptr, pdx+1));
level = 0; level = 0;
ninp = ivl_logic_pins(lptr) - 1; ninp = ivl_logic_pins(lptr) - 1;
while (ninp) { while (ninp) {
int inst; int inst;
for (inst = 0; inst < ninp; inst += 4) { for (inst = 0; inst < ninp; inst += 4) {
if (ninp > 4) if (ninp > 4)
fprintf(vvp_out, "L_%p/%d/%d .functor %s", fprintf(vvp_out, "L_%p/%d/%d .functor %s",
lptr, level, inst, lcasc); lptr, level, inst, lcasc);
else { else {
fprintf(vvp_out, "L_%p .functor %s", fprintf(vvp_out, "L_%p .functor %s",
lptr, ltype); lptr, ltype);
draw_delay(lptr); draw_delay(lptr);
@ -941,7 +941,7 @@ static void draw_logic_in_scope(ivl_net_logic_t lptr)
for ( ; pdx < inst+4 ; pdx += 1) { for ( ; pdx < inst+4 ; pdx += 1) {
fprintf(vvp_out, ", C<%c>", identity_val); fprintf(vvp_out, ", C<%c>", identity_val);
} }
fprintf(vvp_out, ";\n"); fprintf(vvp_out, ";\n");
} }
if (ninp > 4) if (ninp > 4)
@ -990,7 +990,7 @@ static void draw_event_in_scope(ivl_event_t obj)
unsigned sub, top; unsigned sub, top;
fprintf(vvp_out, "E_%p/%u .event edge", obj, ecnt); fprintf(vvp_out, "E_%p/%u .event edge", obj, ecnt);
top = idx + 4; top = idx + 4;
if (nany < top) if (nany < top)
top = nany; top = nany;
@ -1041,9 +1041,9 @@ static void draw_event_in_scope(ivl_event_t obj)
for (idx = 1 ; idx < cnt ; idx += 1) for (idx = 1 ; idx < cnt ; idx += 1)
fprintf(vvp_out, ", E_%p/%u", obj, idx); fprintf(vvp_out, ", E_%p/%u", obj, idx);
fprintf(vvp_out, ";\n"); fprintf(vvp_out, ";\n");
} else { } else {
unsigned num_input_strings = nany + nneg + npos; unsigned num_input_strings = nany + nneg + npos;
unsigned idx; unsigned idx;
@ -1053,14 +1053,14 @@ static void draw_event_in_scope(ivl_event_t obj)
if (nany > 0) { if (nany > 0) {
assert((nneg + npos) == 0); assert((nneg + npos) == 0);
assert(nany <= 4); assert(nany <= 4);
edge = "edge"; edge = "edge";
for (idx = 0 ; idx < nany ; idx += 1) { for (idx = 0 ; idx < nany ; idx += 1) {
ivl_nexus_t nex = ivl_event_any(obj, idx); ivl_nexus_t nex = ivl_event_any(obj, idx);
input_strings[idx] = draw_net_input(nex); input_strings[idx] = draw_net_input(nex);
} }
} else if (nneg > 0) { } else if (nneg > 0) {
assert((nany + npos) == 0); assert((nany + npos) == 0);
edge = "negedge"; edge = "negedge";
@ -1069,11 +1069,11 @@ static void draw_event_in_scope(ivl_event_t obj)
ivl_nexus_t nex = ivl_event_neg(obj, idx); ivl_nexus_t nex = ivl_event_neg(obj, idx);
input_strings[idx] = draw_net_input(nex); input_strings[idx] = draw_net_input(nex);
} }
} else { } else {
assert((nany + nneg) == 0); assert((nany + nneg) == 0);
edge = "posedge"; edge = "posedge";
for (idx = 0 ; idx < npos ; idx += 1) { for (idx = 0 ; idx < npos ; idx += 1) {
ivl_nexus_t nex = ivl_event_pos(obj, idx); ivl_nexus_t nex = ivl_event_pos(obj, idx);
input_strings[idx] = draw_net_input(nex); input_strings[idx] = draw_net_input(nex);
@ -1104,8 +1104,8 @@ inline static void draw_lpm_ram(ivl_lpm_t net)
} }
fprintf(vvp_out, "L_%p .mem/port", net); fprintf(vvp_out, "L_%p .mem/port", net);
fprintf(vvp_out, fprintf(vvp_out,
" M_%s, %d,0, %d,\n ", " M_%s, %d,0, %d,\n ",
vvp_memory_label(mem), vvp_memory_label(mem),
width-1, width-1,
awidth); awidth);
@ -1115,7 +1115,7 @@ inline static void draw_lpm_ram(ivl_lpm_t net)
if (idx) fprintf(vvp_out, ", "); if (idx) fprintf(vvp_out, ", ");
draw_input_from_net(pin); draw_input_from_net(pin);
} }
if (clk) { if (clk) {
fprintf(vvp_out, ",\n CLK_%p, ", net); fprintf(vvp_out, ",\n CLK_%p, ", net);
pin = ivl_lpm_enable(net); pin = ivl_lpm_enable(net);
@ -1129,7 +1129,7 @@ inline static void draw_lpm_ram(ivl_lpm_t net)
draw_input_from_net(pin); draw_input_from_net(pin);
} }
} }
fprintf(vvp_out, ";\n"); fprintf(vvp_out, ";\n");
} }
@ -1214,7 +1214,7 @@ static void draw_lpm_cmp(ivl_lpm_t net)
assert(0); assert(0);
} }
fprintf(vvp_out, "L_%s.%s .cmp/%s%s %u", fprintf(vvp_out, "L_%s.%s .cmp/%s%s %u",
vvp_mangle_id(ivl_scope_name(ivl_lpm_scope(net))), vvp_mangle_id(ivl_scope_name(ivl_lpm_scope(net))),
vvp_mangle_id(ivl_lpm_basename(net)), type, vvp_mangle_id(ivl_lpm_basename(net)), type,
signed_string, width); signed_string, width);
@ -1245,7 +1245,7 @@ static void draw_lpm_eq(ivl_lpm_t net)
assert(0); assert(0);
} }
fprintf(vvp_out, "L_%s.%s .cmp/%s %u", fprintf(vvp_out, "L_%s.%s .cmp/%s %u",
vvp_mangle_id(ivl_scope_name(ivl_lpm_scope(net))), vvp_mangle_id(ivl_scope_name(ivl_lpm_scope(net))),
vvp_mangle_id(ivl_lpm_basename(net)), type, width); vvp_mangle_id(ivl_lpm_basename(net)), type, width);
@ -1515,7 +1515,7 @@ static void draw_mem_in_scope(ivl_memory_t net)
int msb = ivl_memory_width(net) - 1; int msb = ivl_memory_width(net) - 1;
int lsb = 0; int lsb = 0;
fprintf(vvp_out, "M_%s .mem \"%s\", %u,%u, %u,%u;\n", fprintf(vvp_out, "M_%s .mem \"%s\", %u,%u, %u,%u;\n",
vvp_memory_label(net), vvp_memory_label(net),
vvp_mangle_name(ivl_memory_basename(net)), vvp_mangle_name(ivl_memory_basename(net)),
msb, lsb, root, last); msb, lsb, root, last);
} }
@ -1624,6 +1624,9 @@ int draw_scope(ivl_scope_t net, ivl_scope_t parent)
/* /*
* $Log: vvp_scope.c,v $ * $Log: vvp_scope.c,v $
* Revision 1.103 2004/10/04 01:10:57 steve
* Clean up spurious trailing white space.
*
* Revision 1.102 2004/09/25 21:04:25 steve * Revision 1.102 2004/09/25 21:04:25 steve
* More carefull about eliding bufzs that carry strength. * More carefull about eliding bufzs that carry strength.
* *

View File

@ -25,18 +25,18 @@
static char *lxt2_wr_vcd_truncate_bitvec(char *s) static char *lxt2_wr_vcd_truncate_bitvec(char *s)
{ {
char l, r; char l, r;
r=*s; r=*s;
if(r=='1') if(r=='1')
{ {
return s; return s;
} }
else else
{ {
s++; s++;
} }
for(;;s++) for(;;s++)
{ {
l=r; r=*s; l=r; r=*s;
@ -45,7 +45,7 @@ for(;;s++)
if(l!=r) if(l!=r)
{ {
return(((l=='0')&&(r=='1'))?s:s-1); return(((l=='0')&&(r=='1'))?s:s-1);
} }
} }
} }
@ -101,7 +101,7 @@ static lxt2_wr_ds_Tree * lxt2_wr_ds_insert(granmsk_t i, lxt2_wr_ds_Tree * t, int
/* Insert i into the tree t, unless it's already there. */ /* Insert i into the tree t, unless it's already there. */
/* Return a pointer to the resulting tree. */ /* Return a pointer to the resulting tree. */
lxt2_wr_ds_Tree * n; lxt2_wr_ds_Tree * n;
n = (lxt2_wr_ds_Tree *) calloc (1, sizeof (lxt2_wr_ds_Tree)); n = (lxt2_wr_ds_Tree *) calloc (1, sizeof (lxt2_wr_ds_Tree));
if (n == NULL) { if (n == NULL) {
fprintf(stderr, "ds_insert: ran out of memory, exiting.\n"); fprintf(stderr, "ds_insert: ran out of memory, exiting.\n");
@ -191,7 +191,7 @@ static lxt2_wr_dslxt_Tree * lxt2_wr_dslxt_insert(char *i, lxt2_wr_dslxt_Tree * t
/* Return a pointer to the resulting tree. */ /* Return a pointer to the resulting tree. */
lxt2_wr_dslxt_Tree * n; lxt2_wr_dslxt_Tree * n;
int dir; int dir;
n = (lxt2_wr_dslxt_Tree *) calloc (1, sizeof (lxt2_wr_dslxt_Tree)); n = (lxt2_wr_dslxt_Tree *) calloc (1, sizeof (lxt2_wr_dslxt_Tree));
if (n == NULL) { if (n == NULL) {
fprintf(stderr, "dslxt_insert: ran out of memory, exiting.\n"); fprintf(stderr, "dslxt_insert: ran out of memory, exiting.\n");
@ -227,7 +227,7 @@ static lxt2_wr_dslxt_Tree * lxt2_wr_dslxt_insert(char *i, lxt2_wr_dslxt_Tree * t
/* /*
* functions which emit various big endian * functions which emit various big endian
* data to a file * data to a file
*/ */
static int lxt2_wr_emit_u8(struct lxt2_wr_trace *lt, int value) static int lxt2_wr_emit_u8(struct lxt2_wr_trace *lt, int value)
{ {
unsigned char buf[1]; unsigned char buf[1];
@ -286,7 +286,7 @@ return(rc);
* data to a file. (lt->position needs to be * data to a file. (lt->position needs to be
* fixed up on gzclose so the tables don't * fixed up on gzclose so the tables don't
* get out of sync!) * get out of sync!)
*/ */
static int gzwrite_buffered(struct lxt2_wr_trace *lt) static int gzwrite_buffered(struct lxt2_wr_trace *lt)
{ {
int rc = 1; int rc = 1;
@ -392,7 +392,7 @@ return(rc);
static int lxt2_wr_emit_stringz(struct lxt2_wr_trace *lt, char *value) static int lxt2_wr_emit_stringz(struct lxt2_wr_trace *lt, char *value)
{ {
int rc=1; int rc=1;
do do
{ {
rc&=lxt2_wr_emit_u8z(lt, *value); rc&=lxt2_wr_emit_u8z(lt, *value);
} while(*(value++)); } while(*(value++));
@ -419,7 +419,7 @@ for(p=s;*p;p++)
{ {
h=h^(g>>24); h=h^(g>>24);
h=h^g; h=h^g;
} }
} }
h^=h2; /* combine the two hashes */ h^=h2; /* combine the two hashes */
@ -446,17 +446,17 @@ struct lxt2_wr_symbol *temp;
hv=lxt2_wr_hash(s); hv=lxt2_wr_hash(s);
if(!(temp=lt->sym[hv])) return(NULL); /* no hash entry, add here wanted to add */ if(!(temp=lt->sym[hv])) return(NULL); /* no hash entry, add here wanted to add */
while(temp) while(temp)
{ {
if(!strcmp(temp->name,s)) if(!strcmp(temp->name,s))
{ {
return(temp); /* in table already */ return(temp); /* in table already */
} }
if(!temp->next) break; if(!temp->next) break;
temp=temp->next; temp=temp->next;
} }
return(NULL); /* not found, add here if you want to add*/ return(NULL); /* not found, add here if you want to add*/
} }
@ -481,13 +481,13 @@ if(lt->compress_fac_str)
lxt2_wr_emit_u16z(lt, i); lxt2_wr_emit_u16z(lt, i);
lxt2_wr_emit_stringz(lt, str+i); lxt2_wr_emit_stringz(lt, str+i);
free(lt->compress_fac_str); free(lt->compress_fac_str);
} }
else else
{ {
lxt2_wr_emit_u16z(lt, 0); lxt2_wr_emit_u16z(lt, 0);
lxt2_wr_emit_stringz(lt, str); lxt2_wr_emit_stringz(lt, str);
} }
lt->compress_fac_str = (char *) malloc((lt->compress_fac_len=len)+1); lt->compress_fac_str = (char *) malloc((lt->compress_fac_len=len)+1);
strcpy(lt->compress_fac_str, str); strcpy(lt->compress_fac_str, str);
} }
@ -523,10 +523,10 @@ while(lastch!=s->name)
{ {
if(*lastch=='[') if(*lastch=='[')
{ {
*lastch=0x00; *lastch=0x00;
return; return;
} }
lastch--; lastch--;
} }
return; return;
} }
@ -553,19 +553,19 @@ if((lt)&&(lt->numfacs))
strip_brack(s); strip_brack(s);
s=s->symchain; s=s->symchain;
} }
else else
for(i=0;i<lt->numfacs;i++) for(i=0;i<lt->numfacs;i++)
{ {
lt->sorted_facs[i] = s; lt->sorted_facs[i] = s;
s=s->symchain; s=s->symchain;
} }
qsort((void *)lt->sorted_facs, lt->numfacs, sizeof(struct lxt2_wr_symbol *), lxt2_wr_compare); qsort((void *)lt->sorted_facs, lt->numfacs, sizeof(struct lxt2_wr_symbol *), lxt2_wr_compare);
if(lt->partial_preference) if(lt->partial_preference)
{ {
/* move preferenced facs up */ /* move preferenced facs up */
struct lxt2_wr_symbol **prefcache = aliascache; struct lxt2_wr_symbol **prefcache = aliascache;
int prefs_encountered = 0; int prefs_encountered = 0;
facs_encountered = 0; facs_encountered = 0;
for(i=0;i<lt->numfacs;i++) for(i=0;i<lt->numfacs;i++)
@ -643,7 +643,7 @@ if((lt)&&(lt->numfacs))
free(lt->compress_fac_str); lt->compress_fac_str=NULL; free(lt->compress_fac_str); lt->compress_fac_str=NULL;
lt->compress_fac_len=0; lt->compress_fac_len=0;
lt->zfacname_predec_size = lt->zpackcount; lt->zfacname_predec_size = lt->zpackcount;
gzflush_buffered(lt, 1); gzflush_buffered(lt, 1);
fseeko(lt->handle, 0L, SEEK_END); fseeko(lt->handle, 0L, SEEK_END);
lt->position=ftello(lt->handle); lt->position=ftello(lt->handle);
@ -689,7 +689,7 @@ if((lt)&&(lt->numfacs))
} }
/* /*
* initialize the trace and get back and lt context * initialize the trace and get back and lt context
*/ */
struct lxt2_wr_trace *lxt2_wr_init(const char *name) struct lxt2_wr_trace *lxt2_wr_init(const char *name)
@ -748,15 +748,15 @@ if(lt)
{ {
lt->partial = 1; lt->partial = 1;
lt->partial_zip = (zipmode != 0); lt->partial_zip = (zipmode != 0);
lt->partial_iter = LXT2_WR_PARTIAL_SIZE; lt->partial_iter = LXT2_WR_PARTIAL_SIZE;
} }
} }
void lxt2_wr_set_partial_preference(struct lxt2_wr_trace *lt, const char *name) void lxt2_wr_set_partial_preference(struct lxt2_wr_trace *lt, const char *name)
{ {
struct lxt2_wr_symbol *s; struct lxt2_wr_symbol *s;
if((lt)&&(name)&&(!lt->sorted_facs)) if((lt)&&(name)&&(!lt->sorted_facs))
{ {
s=lxt2_wr_symfind(lt, name); s=lxt2_wr_symfind(lt, name);
if(s) if(s)
@ -795,8 +795,8 @@ if(lt)
/* /*
* set initial value of trace (0, 1, x, z) only legal vals * set initial value of trace (0, 1, x, z) only legal vals
*/ */
void lxt2_wr_set_initial_value(struct lxt2_wr_trace *lt, char value) void lxt2_wr_set_initial_value(struct lxt2_wr_trace *lt, char value)
{ {
if(lt) if(lt)
{ {
switch(value) switch(value)
@ -934,7 +934,7 @@ return(sa);
} }
/* /*
* set current time/granule updating * set current time/granule updating
*/ */
int lxt2_wr_inc_time_by_delta(struct lxt2_wr_trace *lt, unsigned int timeval) int lxt2_wr_inc_time_by_delta(struct lxt2_wr_trace *lt, unsigned int timeval)
@ -1162,7 +1162,7 @@ if(using_partial)
lxt2_wr_emit_u32(lt, partial_length+9); /* size of this section (uncompressed) */ lxt2_wr_emit_u32(lt, partial_length+9); /* size of this section (uncompressed) */
lxt2_wr_emit_u32(lt, iter); /* begin iter of section */ lxt2_wr_emit_u32(lt, iter); /* begin iter of section */
fflush(lt->handle); fflush(lt->handle);
lt->zhandle = gzdopen(dup(fileno(lt->handle)), lt->zmode); lt->zhandle = gzdopen(dup(fileno(lt->handle)), lt->zmode);
lt->zpackcount = 0; lt->zpackcount = 0;
} }
@ -1272,7 +1272,7 @@ if((lt->timegranule>=lt->maxgranule)||(do_finalize)||(early_flush))
lxt2_wr_emit_u32(lt, 0); /* size of this section (uncompressed) */ lxt2_wr_emit_u32(lt, 0); /* size of this section (uncompressed) */
lxt2_wr_emit_u32(lt, ~0); /* control section */ lxt2_wr_emit_u32(lt, ~0); /* control section */
fflush(lt->handle); fflush(lt->handle);
lt->zhandle = gzdopen(dup(fileno(lt->handle)), lt->zmode); lt->zhandle = gzdopen(dup(fileno(lt->handle)), lt->zmode);
lt->zpackcount = 0; lt->zpackcount = 0;
} }
@ -1295,9 +1295,9 @@ if((lt->timegranule>=lt->maxgranule)||(do_finalize)||(early_flush))
exit(255); exit(255);
} }
lxt2_wr_emit_stringz(lt, ds->item); lxt2_wr_emit_stringz(lt, ds->item);
ds2 = ds->next; ds2 = ds->next;
free(ds->item); free(ds->item);
free(ds); free(ds);
ds = ds2; ds = ds2;
} }
@ -1323,7 +1323,7 @@ if((lt->timegranule>=lt->maxgranule)||(do_finalize)||(early_flush))
#endif #endif
dt2 = dt->next; dt2 = dt->next;
free(dt); free(dt);
dt = dt2; dt = dt2;
} }
lt->mapdict_head = lt->mapdict_curr = lt->mapdict = NULL; lt->mapdict_head = lt->mapdict_curr = lt->mapdict = NULL;
@ -1340,11 +1340,11 @@ if((lt->timegranule>=lt->maxgranule)||(do_finalize)||(early_flush))
if(using_partial_zip) if(using_partial_zip)
{ {
off_t clen; off_t clen;
gzflush_buffered(lt, 1); gzflush_buffered(lt, 1);
fseeko(lt->handle, 0L, SEEK_END); fseeko(lt->handle, 0L, SEEK_END);
lt->position=ftello(lt->handle); lt->position=ftello(lt->handle);
clen = lt->position - current_iter_pos - 12; clen = lt->position - current_iter_pos - 12;
fseeko(lt->handle, current_iter_pos, SEEK_SET); fseeko(lt->handle, current_iter_pos, SEEK_SET);
@ -1408,7 +1408,7 @@ if(lt)
{ {
lt->bumptime = 0; lt->bumptime = 0;
if(!lt->flush_valid) if(!lt->flush_valid)
{ {
lt->timepos++; lt->timepos++;
} }
@ -1416,7 +1416,7 @@ if(lt)
{ {
lt->flush_valid = 0; lt->flush_valid = 0;
} }
if(lt->timepos == LXT2_WR_GRANULE_SIZE) if(lt->timepos == LXT2_WR_GRANULE_SIZE)
{ {
/* fprintf(stderr, "flushing granule to disk at time %d\n", (unsigned int)timeval); */ /* fprintf(stderr, "flushing granule to disk at time %d\n", (unsigned int)timeval); */
@ -1425,7 +1425,7 @@ if(lt)
} }
/* fprintf(stderr, "updating time to %d (%d dict entries/%d bytes)\n", (unsigned int)timeval, lt->num_dict_entries, lt->dict_string_mem_required); */ /* fprintf(stderr, "updating time to %d (%d dict entries/%d bytes)\n", (unsigned int)timeval, lt->num_dict_entries, lt->dict_string_mem_required); */
lt->timetable[lt->timepos] = timeval; lt->timetable[lt->timepos] = timeval;
lt->lasttime = timeval; lt->lasttime = timeval;
} }
} }
@ -1434,7 +1434,7 @@ if(lt)
lt->timeset = 1; lt->timeset = 1;
lt->mintime = lt->maxtime = timeval; lt->mintime = lt->maxtime = timeval;
lt->timetable[lt->timepos] = timeval; lt->timetable[lt->timepos] = timeval;
} }
if( (!lt->timepos) && (!lt->timegranule) ) if( (!lt->timepos) && (!lt->timegranule) )
@ -1467,7 +1467,7 @@ if(lt)
else if (s->flags&LXT2_WR_SYM_F_DOUBLE) else if (s->flags&LXT2_WR_SYM_F_DOUBLE)
{ {
double value; double value;
sscanf(s->value, "%lg", &value); sscanf(s->value, "%lg", &value);
lxt2_wr_emit_value_double(lt, s, 0, value); lxt2_wr_emit_value_double(lt, s, 0, value);
} }
@ -1567,7 +1567,7 @@ int rc=0;
if((!lt)||(lt->blackout)||(!s)||(row)) return(rc); if((!lt)||(lt->blackout)||(!s)||(row)) return(rc);
if(!lt->emitted) if(!lt->emitted)
{ {
lxt2_wr_emitfacs(lt); lxt2_wr_emitfacs(lt);
lt->emitted = 1; lt->emitted = 1;
@ -1608,7 +1608,7 @@ if(s->flags&LXT2_WR_SYM_F_DOUBLE)
if(lt->dict_curr) if(lt->dict_curr)
{ {
lt->dict_curr->next = lt->dict; lt->dict_curr->next = lt->dict;
lt->dict_curr = lt->dict; lt->dict_curr = lt->dict;
} }
else else
@ -1649,7 +1649,7 @@ int rc=0;
if((!lt)||(lt->blackout)||(!s)||(!value)||(row)) return(rc); if((!lt)||(lt->blackout)||(!s)||(!value)||(row)) return(rc);
if(!lt->emitted) if(!lt->emitted)
{ {
lxt2_wr_emitfacs(lt); lxt2_wr_emitfacs(lt);
lt->emitted = 1; lt->emitted = 1;
@ -1688,7 +1688,7 @@ if(s->flags&LXT2_WR_SYM_F_STRING)
if(lt->dict_curr) if(lt->dict_curr)
{ {
lt->dict_curr->next = lt->dict; lt->dict_curr->next = lt->dict;
lt->dict_curr = lt->dict; lt->dict_curr = lt->dict;
} }
else else
@ -1733,7 +1733,7 @@ int i;
if((!lt)||(lt->blackout)||(!s)||(!value)||(!*value)||(row)) return(rc); if((!lt)||(lt->blackout)||(!s)||(!value)||(!*value)||(row)) return(rc);
if(!lt->emitted) if(!lt->emitted)
{ {
lxt2_wr_emitfacs(lt); lxt2_wr_emitfacs(lt);
lt->emitted = 1; lt->emitted = 1;
@ -1798,12 +1798,12 @@ if(!(s->flags&(LXT2_WR_SYM_F_DOUBLE|LXT2_WR_SYM_F_STRING)))
prevch = *vpnt; prevch = *vpnt;
while(*vpnt) while(*vpnt)
{ {
if(prevch == *vpnt) if(prevch == *vpnt)
{ {
vpnt++; vpnt++;
} }
else else
{ {
prevch = 0; prevch = 0;
break; break;
} }
@ -1910,7 +1910,7 @@ idxchk: if(idx<0)
if(lt->dict_curr) if(lt->dict_curr)
{ {
lt->dict_curr->next = lt->dict; lt->dict_curr->next = lt->dict;
lt->dict_curr = lt->dict; lt->dict_curr = lt->dict;
} }
else else
@ -1958,15 +1958,15 @@ struct lxt2_wr_symbol *s;
if((lt)&&(!lt->blackout)) if((lt)&&(!lt->blackout))
{ {
if(!lt->emitted) if(!lt->emitted)
{ {
lxt2_wr_emitfacs(lt); lxt2_wr_emitfacs(lt);
lt->emitted = 1; lt->emitted = 1;
if(!lt->timeset) if(!lt->timeset)
{ {
lxt2_wr_set_time(lt, 0); lxt2_wr_set_time(lt, 0);
} }
} }
s = lt->symchain; s = lt->symchain;
@ -1976,7 +1976,7 @@ if((lt)&&(!lt->blackout))
{ {
s->msk |= (LXT2_WR_GRAN_1VAL<<lt->timepos); s->msk |= (LXT2_WR_GRAN_1VAL<<lt->timepos);
s->chg[s->chgpos] = LXT2_WR_ENC_BLACKOUT; s->chg[s->chgpos] = LXT2_WR_ENC_BLACKOUT;
s->chgpos++; s->chgpos++;
} }
else else
@ -2094,7 +2094,7 @@ if(lt)
{ {
struct lxt2_wr_symbol *s = lt->symchain; struct lxt2_wr_symbol *s = lt->symchain;
struct lxt2_wr_symbol *s2; struct lxt2_wr_symbol *s2;
while(s) while(s)
{ {
if(s->name) { free(s->name); } if(s->name) { free(s->name); }
@ -2106,7 +2106,7 @@ if(lt)
lt->symchain=NULL; lt->symchain=NULL;
} }
free(lt->sorted_facs); free(lt->sorted_facs);
fclose(lt->handle); fclose(lt->handle);
free(lt); free(lt);

View File

@ -3,19 +3,19 @@
* *
* Permission is hereby granted, free of charge, to any person obtaining a * Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"), * copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation * to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense, * the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the * and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions: * Software is furnished to do so, subject to the following conditions:
* *
* The above copyright notice and this permission notice shall be included in * The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software. * all copies or substantial portions of the Software.
* *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE. * DEALINGS IN THE SOFTWARE.
*/ */
@ -75,12 +75,12 @@ typedef unsigned long long granmsk_t;
#define LXT2_WR_GRAN_1VAL (LXT2_WR_ULLDESC(1)) #define LXT2_WR_GRAN_1VAL (LXT2_WR_ULLDESC(1))
#else #else
typedef unsigned int granmsk_t; typedef unsigned int granmsk_t;
#define LXT2_WR_GRAN_0VAL (0) #define LXT2_WR_GRAN_0VAL (0)
#define LXT2_WR_GRAN_1VAL (1) #define LXT2_WR_GRAN_1VAL (1)
#endif #endif
enum LXT2_WR_Encodings { enum LXT2_WR_Encodings {
LXT2_WR_ENC_0, LXT2_WR_ENC_0,
LXT2_WR_ENC_1, LXT2_WR_ENC_1,
LXT2_WR_ENC_INV, LXT2_WR_ENC_INV,
@ -124,12 +124,12 @@ struct lxt2_wr_ds_tree_node {
*/ */
typedef struct lxt2_wr_dslxt_tree_node lxt2_wr_dslxt_Tree; typedef struct lxt2_wr_dslxt_tree_node lxt2_wr_dslxt_Tree;
struct lxt2_wr_dslxt_tree_node { struct lxt2_wr_dslxt_tree_node {
lxt2_wr_dslxt_Tree * left, * right; lxt2_wr_dslxt_Tree * left, * right;
char *item; char *item;
unsigned int val; unsigned int val;
lxt2_wr_dslxt_Tree * next; lxt2_wr_dslxt_Tree * next;
}; };
struct lxt2_wr_trace struct lxt2_wr_trace
{ {

View File

@ -82,7 +82,7 @@ static dslxt_Tree * dslxt_insert(char *i, dslxt_Tree * t, unsigned int val) {
/* Return a pointer to the resulting tree. */ /* Return a pointer to the resulting tree. */
dslxt_Tree * n; dslxt_Tree * n;
int dir; int dir;
n = (dslxt_Tree *) calloc (1, sizeof (dslxt_Tree)); n = (dslxt_Tree *) calloc (1, sizeof (dslxt_Tree));
if (n == NULL) { if (n == NULL) {
fprintf(stderr, "dslxt_insert: ran out of memory, exiting.\n"); fprintf(stderr, "dslxt_insert: ran out of memory, exiting.\n");
@ -140,7 +140,7 @@ static dslxt_Tree * dslxt_delete(char *i, dslxt_Tree * t) {
/* /*
* functions which emit various big endian * functions which emit various big endian
* data to a file * data to a file
*/ */
static int lt_emit_u8(struct lt_trace *lt, int value) static int lt_emit_u8(struct lt_trace *lt, int value)
{ {
unsigned char buf[1]; unsigned char buf[1];
@ -221,7 +221,7 @@ return(nmemb);
static int lt_emit_string(struct lt_trace *lt, char *value) static int lt_emit_string(struct lt_trace *lt, char *value)
{ {
int rc=1; int rc=1;
do do
{ {
rc&=lt_emit_u8(lt, *value); rc&=lt_emit_u8(lt, *value);
} while(*(value++)); } while(*(value++));
@ -234,7 +234,7 @@ return(rc);
* data to a file. (lt->position needs to be * data to a file. (lt->position needs to be
* fixed up on gzclose so the tables don't * fixed up on gzclose so the tables don't
* get out of sync!) * get out of sync!)
*/ */
static int lt_emit_u8z(struct lt_trace *lt, int value) static int lt_emit_u8z(struct lt_trace *lt, int value)
{ {
unsigned char buf[1]; unsigned char buf[1];
@ -321,7 +321,7 @@ return(nmemb);
static int lt_emit_stringz(struct lt_trace *lt, char *value) static int lt_emit_stringz(struct lt_trace *lt, char *value)
{ {
int rc=1; int rc=1;
do do
{ {
rc&=lt_emit_u8z(lt, *value); rc&=lt_emit_u8z(lt, *value);
} while(*(value++)); } while(*(value++));
@ -333,7 +333,7 @@ return(rc);
* data to a file. (lt->position needs to be * data to a file. (lt->position needs to be
* fixed up on BZ2_bzclose so the tables don't * fixed up on BZ2_bzclose so the tables don't
* get out of sync!) * get out of sync!)
*/ */
static int lt_emit_u8bz(struct lt_trace *lt, int value) static int lt_emit_u8bz(struct lt_trace *lt, int value)
{ {
unsigned char buf[1]; unsigned char buf[1];
@ -420,7 +420,7 @@ return(nmemb);
static int lt_emit_stringbz(struct lt_trace *lt, char *value) static int lt_emit_stringbz(struct lt_trace *lt, char *value)
{ {
int rc=1; int rc=1;
do do
{ {
rc&=lt_emit_u8bz(lt, *value); rc&=lt_emit_u8bz(lt, *value);
} while(*(value++)); } while(*(value++));
@ -487,7 +487,7 @@ for(p=s;*p;p++)
{ {
h=h^(g>>24); h=h^(g>>24);
h=h^g; h=h^g;
} }
} }
h^=h2; /* combine the two hashes */ h^=h2; /* combine the two hashes */
@ -514,17 +514,17 @@ struct lt_symbol *temp;
hv=lt_hash(s); hv=lt_hash(s);
if(!(temp=lt->sym[hv])) return(NULL); /* no hash entry, add here wanted to add */ if(!(temp=lt->sym[hv])) return(NULL); /* no hash entry, add here wanted to add */
while(temp) while(temp)
{ {
if(!strcmp(temp->name,s)) if(!strcmp(temp->name,s))
{ {
return(temp); /* in table already */ return(temp); /* in table already */
} }
if(!temp->next) break; if(!temp->next) break;
temp=temp->next; temp=temp->next;
} }
return(NULL); /* not found, add here if you want to add*/ return(NULL); /* not found, add here if you want to add*/
} }
@ -549,13 +549,13 @@ if(lt->compress_fac_str)
lt_emit_u16z(lt, i); lt_emit_u16z(lt, i);
lt_emit_stringz(lt, str+i); lt_emit_stringz(lt, str+i);
free(lt->compress_fac_str); free(lt->compress_fac_str);
} }
else else
{ {
lt_emit_u16z(lt, 0); lt_emit_u16z(lt, 0);
lt_emit_stringz(lt, str); lt_emit_stringz(lt, str);
} }
lt->compress_fac_str = (char *) malloc((lt->compress_fac_len=len)+1); lt->compress_fac_str = (char *) malloc((lt->compress_fac_len=len)+1);
strcpy(lt->compress_fac_str, str); strcpy(lt->compress_fac_str, str);
} }
@ -591,10 +591,10 @@ while(lastch!=s->name)
{ {
if(*lastch=='[') if(*lastch=='[')
{ {
*lastch=0x00; *lastch=0x00;
return; return;
} }
lastch--; lastch--;
} }
return; return;
} }
@ -620,12 +620,12 @@ if((lt)&&(lt->numfacs))
strip_brack(s); strip_brack(s);
s=s->symchain; s=s->symchain;
} }
else else
for(i=0;i<lt->numfacs;i++) for(i=0;i<lt->numfacs;i++)
{ {
lt->sorted_facs[i] = s; lt->sorted_facs[i] = s;
s=s->symchain; s=s->symchain;
} }
qsort((void *)lt->sorted_facs, lt->numfacs, sizeof(struct lt_symbol *), lt_compare); qsort((void *)lt->sorted_facs, lt->numfacs, sizeof(struct lt_symbol *), lt_compare);
for(i=0;i<lt->numfacs;i++) for(i=0;i<lt->numfacs;i++)
@ -653,7 +653,7 @@ if((lt)&&(lt->numfacs))
free(lt->compress_fac_str); lt->compress_fac_str=NULL; free(lt->compress_fac_str); lt->compress_fac_str=NULL;
lt->compress_fac_len=0; lt->compress_fac_len=0;
lt->zfacname_predec_size = lt->zpackcount; lt->zfacname_predec_size = lt->zpackcount;
gzclose(lt->zhandle); gzclose(lt->zhandle);
fseek(lt->handle, 0L, SEEK_END); fseek(lt->handle, 0L, SEEK_END);
lt->position=ftell(lt->handle); lt->position=ftell(lt->handle);
@ -688,13 +688,13 @@ if((lt)&&(lt->numfacs))
if(is_interlaced_trace) if(is_interlaced_trace)
{ {
lt->zhandle = gzdopen(dup(fileno(lt->handle)), "wb9"); lt->zhandle = gzdopen(dup(fileno(lt->handle)), "wb9");
lt->sync_table_offset = lt->position; lt->sync_table_offset = lt->position;
for(i=0;i<lt->numfacs;i++) for(i=0;i<lt->numfacs;i++)
{ {
lt_emit_u32z(lt, lt->sorted_facs[i]->last_change); lt_emit_u32z(lt, lt->sorted_facs[i]->last_change);
} }
gzclose(lt->zhandle); lt->zhandle = NULL; gzclose(lt->zhandle); lt->zhandle = NULL;
fseek(lt->handle, 0L, SEEK_END); fseek(lt->handle, 0L, SEEK_END);
lt->position=ftell(lt->handle); lt->position=ftell(lt->handle);
@ -705,7 +705,7 @@ if((lt)&&(lt->numfacs))
} }
/* /*
* initialize the trace and get back and lt context * initialize the trace and get back and lt context
*/ */
struct lt_trace *lt_init(const char *name) struct lt_trace *lt_init(const char *name)
@ -831,7 +831,7 @@ switch(numbytes_trans&3)
case 3: lt->lt_emit_u32(lt, numtrans); break; case 3: lt->lt_emit_u32(lt, numtrans); break;
} }
/* printf("Clock finish for '%s' at %Ld ending with '%c' for %d repeats over a switch delta of %d\n", /* printf("Clock finish for '%s' at %Ld ending with '%c' for %d repeats over a switch delta of %d\n",
s->name, lt->timeval, s->clk_prevval, s->clk_numtrans - LT_CLKPACK, s->clk_delta); */ s->name, lt->timeval, s->clk_prevval, s->clk_numtrans - LT_CLKPACK, s->clk_delta); */
s->clk_prevtrans = ULLDescriptor(~0); s->clk_prevtrans = ULLDescriptor(~0);
s->clk_numtrans = 0; s->clk_numtrans = 0;
@ -932,7 +932,7 @@ switch(numbytes_trans&3)
case 3: lt->lt_emit_u32(lt, numtrans); break; case 3: lt->lt_emit_u32(lt, numtrans); break;
} }
/* printf("Clock finish for '%s' at %Ld ending with '%08x' for %d repeats over a switch delta of %Ld\n", /* printf("Clock finish for '%s' at %Ld ending with '%08x' for %d repeats over a switch delta of %Ld\n",
s->name, lt->timeval, s->clk_prevval, s->clk_numtrans - LT_CLKPACK_M, s->clk_delta); */ s->name, lt->timeval, s->clk_prevval, s->clk_numtrans - LT_CLKPACK_M, s->clk_delta); */
s->clk_prevtrans = ULLDescriptor(~0); s->clk_prevtrans = ULLDescriptor(~0);
s->clk_numtrans = 0; s->clk_numtrans = 0;
@ -1000,7 +1000,7 @@ for(i=0;i<lt->num_dict_entries;i++)
/* fprintf(stderr, "%8d) '%s'\n", ds->val, ds->item); */ /* fprintf(stderr, "%8d) '%s'\n", ds->val, ds->item); */
lt_emit_stringz(lt, ds->item+1); lt_emit_stringz(lt, ds->item+1);
} }
gzclose(lt->zhandle); gzclose(lt->zhandle);
fseek(lt->handle, 0L, SEEK_END); fseek(lt->handle, 0L, SEEK_END);
lt->position=ftell(lt->handle); lt->position=ftell(lt->handle);
@ -1037,13 +1037,13 @@ if(lt)
if(s->clk_numtrans > LT_CLKPACK_M) lt_flushclock_m(lt, s); if(s->clk_numtrans > LT_CLKPACK_M) lt_flushclock_m(lt, s);
} }
else else
{ {
if(s->clk_numtrans > LT_CLKPACK) lt_flushclock(lt, s); if(s->clk_numtrans > LT_CLKPACK) lt_flushclock(lt, s);
} }
} }
s=s->symchain; s=s->symchain;
} }
lt_set_dumpon(lt); /* in case it was turned off */ lt_set_dumpon(lt); /* in case it was turned off */
@ -1101,7 +1101,7 @@ if(lt)
while(t) while(t)
{ {
lt_emit_u32z(lt, t->position - lastposition); lastposition = t->position; lt_emit_u32z(lt, t->position - lastposition); lastposition = t->position;
t=t->next; t=t->next;
} }
t=lt->timehead; t=lt->timehead;
@ -1111,9 +1111,9 @@ if(lt)
{ {
lxttime_t delta = t->timeval - lasttime; lxttime_t delta = t->timeval - lasttime;
lt_emit_u64z(lt, (int)(delta>>32), (int)delta); lasttime = t->timeval; lt_emit_u64z(lt, (int)(delta>>32), (int)delta); lasttime = t->timeval;
t2=t->next; t2=t->next;
free(t); free(t);
t=t2; t=t2;
} }
} }
@ -1122,12 +1122,12 @@ if(lt)
while(t) while(t)
{ {
lt_emit_u32z(lt, (int)(t->timeval - lasttime)); lasttime = t->timeval; lt_emit_u32z(lt, (int)(t->timeval - lasttime)); lasttime = t->timeval;
t2=t->next; t2=t->next;
free(t); free(t);
t=t2; t=t2;
} }
lt->timehead = lt->timecurr = NULL; lt->timehead = lt->timecurr = NULL;
} }
@ -1137,7 +1137,7 @@ if(lt)
lt->ztime_table_size = lt->position - lt->ztime_table_size; lt->ztime_table_size = lt->position - lt->ztime_table_size;
} }
if(lt->initial_value>=0) if(lt->initial_value>=0)
{ {
lt->initial_value_offset = lt->position; lt->initial_value_offset = lt->position;
lt_emit_u8(lt, lt->initial_value); lt_emit_u8(lt, lt->initial_value);
@ -1152,7 +1152,7 @@ if(lt)
if(lt->double_used) if(lt->double_used)
{ {
lt->double_test_offset = lt->position; lt->double_test_offset = lt->position;
lt_emit_double(lt, 3.14159); lt_emit_double(lt, 3.14159);
} }
if(lt->dumpoffcount) if(lt->dumpoffcount)
@ -1168,7 +1168,7 @@ if(lt)
lt_emit_u64(lt, (int)((ltt->timeval)>>32), (int)ltt->timeval); lt_emit_u64(lt, (int)((ltt->timeval)>>32), (int)ltt->timeval);
ltt2 = ltt; ltt2 = ltt;
ltt=ltt->next; ltt=ltt->next;
free(ltt2); free(ltt2);
} }
lt->dumpoffhead = lt->dumpoffcurr = NULL; lt->dumpoffhead = lt->dumpoffcurr = NULL;
@ -1211,7 +1211,7 @@ if(lt)
{ {
struct lt_symbol *s = lt->symchain; struct lt_symbol *s = lt->symchain;
struct lt_symbol *s2; struct lt_symbol *s2;
while(s) while(s)
{ {
free(s->name); free(s->name);
@ -1326,7 +1326,7 @@ return(sa);
} }
/* /*
* set current time * set current time
*/ */
int lt_inc_time_by_delta(struct lt_trace *lt, unsigned int timeval) int lt_inc_time_by_delta(struct lt_trace *lt, unsigned int timeval)
@ -1365,7 +1365,7 @@ if(lt)
else else
{ {
free(trl); free(trl);
goto bail; goto bail;
} }
} }
else else
@ -1446,7 +1446,7 @@ if((lt)&&(!lt->emitted))
} }
/* /*
* sets change interlace * sets change interlace
*/ */
void lt_set_no_interlace(struct lt_trace *lt) void lt_set_no_interlace(struct lt_trace *lt)
{ {
@ -1471,12 +1471,12 @@ if((lt)&&(!lt->emitted)&&(!lt->sorted_facs))
strip_brack(s); strip_brack(s);
s=s->symchain; s=s->symchain;
} }
else else
for(i=0;i<lt->numfacs;i++) for(i=0;i<lt->numfacs;i++)
{ {
lt->sorted_facs[i] = s; lt->sorted_facs[i] = s;
s=s->symchain; s=s->symchain;
} }
qsort((void *)lt->sorted_facs, lt->numfacs, sizeof(struct lt_symbol *), lt_compare); qsort((void *)lt->sorted_facs, lt->numfacs, sizeof(struct lt_symbol *), lt_compare);
for(i=0;i<lt->numfacs;i++) for(i=0;i<lt->numfacs;i++)
@ -1516,12 +1516,12 @@ if(lt)
{ {
int tag; int tag;
switch(value) switch(value)
{ {
case '0': tag = 0; break; case '0': tag = 0; break;
case '1': tag = 1; break; case '1': tag = 1; break;
case 'Z': case 'Z':
case 'z': tag = 2; break; case 'z': tag = 2; break;
case 'X': case 'X':
case 'x': tag = 3; break; case 'x': tag = 3; break;
case 'H': case 'H':
case 'h': tag = 4; break; case 'h': tag = 4; break;
@ -1817,7 +1817,7 @@ if(!(s->flags&(LT_SYM_F_DOUBLE|LT_SYM_F_STRING)))
{ {
tag = (numbytes<<4); tag = (numbytes<<4);
} }
lt->lt_emit_u8(lt, tag); lt->lt_emit_u8(lt, tag);
switch(numbytes&3) switch(numbytes&3)
{ {
@ -1838,7 +1838,7 @@ if(!(s->flags&(LT_SYM_F_DOUBLE|LT_SYM_F_STRING)))
} }
lt->lt_emit_u8(lt, optimized ? (3+optimized1) : 0); lt->lt_emit_u8(lt, optimized ? (3+optimized1) : 0);
} }
s->last_change = start_position; s->last_change = start_position;
if(s->rows>0) if(s->rows>0)
@ -1904,7 +1904,7 @@ if(!(s->flags&(LT_SYM_F_DOUBLE|LT_SYM_F_STRING)))
{ {
if(lt->num_dict_entries==(256*65536)) lt->dict32_offset = lt->position; if(lt->num_dict_entries==(256*65536)) lt->dict32_offset = lt->position;
} }
lt->num_dict_entries++; lt->num_dict_entries++;
} }
@ -1949,14 +1949,14 @@ if(!(s->flags&(LT_SYM_F_DOUBLE|LT_SYM_F_STRING)))
value <<= (24-len); value <<= (24-len);
rc=lt->lt_emit_u24(lt, value); rc=lt->lt_emit_u24(lt, value);
} }
else else
{ {
value <<= (32-len); value <<= (32-len);
rc=lt->lt_emit_u32(lt, value); rc=lt->lt_emit_u32(lt, value);
} }
} }
} }
if(lt->timebuff) if(lt->timebuff)
{ {
lt->timechangecount++; lt->timechangecount++;
@ -2018,7 +2018,7 @@ if((s->flags)&LT_SYM_F_DOUBLE)
{ {
numbytes = 0; numbytes = 0;
} }
start_position = lt->position; start_position = lt->position;
s->last_change = start_position; s->last_change = start_position;
@ -2074,7 +2074,7 @@ if((s->flags)&LT_SYM_F_DOUBLE)
} }
rc=lt->lt_emit_double(lt, value); rc=lt->lt_emit_double(lt, value);
if(lt->timebuff) if(lt->timebuff)
{ {
lt->timechangecount++; lt->timechangecount++;
@ -2136,7 +2136,7 @@ if((s->flags)&LT_SYM_F_STRING)
{ {
numbytes = 0; numbytes = 0;
} }
start_position = lt->position; start_position = lt->position;
s->last_change = start_position; s->last_change = start_position;
@ -2192,7 +2192,7 @@ if((s->flags)&LT_SYM_F_STRING)
} }
rc=lt->lt_emit_string(lt, value); rc=lt->lt_emit_string(lt, value);
if(lt->timebuff) if(lt->timebuff)
{ {
lt->timechangecount++; lt->timechangecount++;
@ -2300,7 +2300,7 @@ if(!(s->flags&(LT_SYM_F_DOUBLE|LT_SYM_F_STRING)))
s->clk_prevval1 = s->clk_prevval; s->clk_prevval1 = s->clk_prevval;
s->clk_prevval = ivalue; s->clk_prevval = ivalue;
/* printf("Clock value '%08x' for '%s' [len=%d] at %Ld (#%d)\n", /* printf("Clock value '%08x' for '%s' [len=%d] at %Ld (#%d)\n",
ivalue, s->name, len, lt->timeval, s->clk_numtrans); */ ivalue, s->name, len, lt->timeval, s->clk_numtrans); */
return(1); return(1);
} }
@ -2429,12 +2429,12 @@ if(!(s->flags&(LT_SYM_F_DOUBLE|LT_SYM_F_STRING)))
while((ch=*(pnt++))) while((ch=*(pnt++)))
{ {
switch(ch) switch(ch)
{ {
case '0': case '0':
case '1': mvl|=LT_MVL_2; break; case '1': mvl|=LT_MVL_2; break;
case 'Z': case 'Z':
case 'z': case 'z':
case 'X': case 'X':
case 'x': mvl|=LT_MVL_4; break; case 'x': mvl|=LT_MVL_4; break;
default: mvl|=LT_MVL_9; break; default: mvl|=LT_MVL_9; break;
} }
@ -2443,13 +2443,13 @@ if(!(s->flags&(LT_SYM_F_DOUBLE|LT_SYM_F_STRING)))
} }
switch(prevch) switch(prevch)
{ {
case 0x00: tagadd = 0; break; case 0x00: tagadd = 0; break;
case '0': tagadd = 3; break; case '0': tagadd = 3; break;
case '1': tagadd = 4; break; case '1': tagadd = 4; break;
case 'Z': case 'Z':
case 'z': tagadd = 5; break; case 'z': tagadd = 5; break;
case 'X': case 'X':
case 'x': tagadd = 6; break; case 'x': tagadd = 6; break;
case 'H': case 'H':
case 'h': tagadd = 7; break; case 'h': tagadd = 7; break;
@ -2546,7 +2546,7 @@ if(!(s->flags&(LT_SYM_F_DOUBLE|LT_SYM_F_STRING)))
int outval = 0; int outval = 0;
int thisval= 0; int thisval= 0;
pnt = value; pnt = value;
if((lt->dictmode)&&(len>lt->mindictwidth)) if((lt->dictmode)&&(len>lt->mindictwidth))
{ {
@ -2577,7 +2577,7 @@ if(!(s->flags&(LT_SYM_F_DOUBLE|LT_SYM_F_STRING)))
{ {
if(lt->num_dict_entries==(256*65536)) lt->dict32_offset = lt->position; if(lt->num_dict_entries==(256*65536)) lt->dict32_offset = lt->position;
} }
lt->num_dict_entries++; lt->num_dict_entries++;
} }
@ -2615,8 +2615,8 @@ if(!(s->flags&(LT_SYM_F_DOUBLE|LT_SYM_F_STRING)))
outval |= (thisval<<bitpos); outval |= (thisval<<bitpos);
bitpos--; bitpos--;
if((bitpos==-1)||(i==len-1)) if((bitpos==-1)||(i==len-1))
{ {
lt->lt_emit_u8(lt, outval); lt->lt_emit_u8(lt, outval);
outval = 0; outval = 0;
bitpos = 7; bitpos = 7;
} }
@ -2630,7 +2630,7 @@ if(!(s->flags&(LT_SYM_F_DOUBLE|LT_SYM_F_STRING)))
int outval = 0; int outval = 0;
int thisval= 0; int thisval= 0;
pnt = value; pnt = value;
for(i=0;i<len;i++) for(i=0;i<len;i++)
{ {
@ -2649,8 +2649,8 @@ if(!(s->flags&(LT_SYM_F_DOUBLE|LT_SYM_F_STRING)))
outval |= (thisval<<bitpos); outval |= (thisval<<bitpos);
bitpos-=2; bitpos-=2;
if((bitpos==-2)||(i==len-1)) if((bitpos==-2)||(i==len-1))
{ {
lt->lt_emit_u8(lt, outval); lt->lt_emit_u8(lt, outval);
outval = 0; outval = 0;
bitpos = 6; bitpos = 6;
} }
@ -2664,7 +2664,7 @@ if(!(s->flags&(LT_SYM_F_DOUBLE|LT_SYM_F_STRING)))
int outval = 0; int outval = 0;
int thisval= 0; int thisval= 0;
pnt = value; pnt = value;
for(i=0;i<len;i++) for(i=0;i<len;i++)
{ {
@ -2693,8 +2693,8 @@ if(!(s->flags&(LT_SYM_F_DOUBLE|LT_SYM_F_STRING)))
outval |= (thisval<<bitpos); outval |= (thisval<<bitpos);
bitpos-=4; bitpos-=4;
if((bitpos==-4)||(i==len-1)) if((bitpos==-4)||(i==len-1))
{ {
lt->lt_emit_u8(lt, outval); lt->lt_emit_u8(lt, outval);
outval = 0; outval = 0;
bitpos = 4; bitpos = 4;
} }
@ -2704,7 +2704,7 @@ if(!(s->flags&(LT_SYM_F_DOUBLE|LT_SYM_F_STRING)))
rc=1; rc=1;
} }
if(lt->timebuff) if(lt->timebuff)
{ {
lt->timechangecount++; lt->timechangecount++;

View File

@ -3,19 +3,19 @@
* *
* Permission is hereby granted, free of charge, to any person obtaining a * Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"), * copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation * to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense, * the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the * and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions: * Software is furnished to do so, subject to the following conditions:
* *
* The above copyright notice and this permission notice shall be included in * The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software. * all copies or substantial portions of the Software.
* *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE. * DEALINGS IN THE SOFTWARE.
*/ */
@ -35,11 +35,11 @@
typedef struct dslxt_tree_node dslxt_Tree; typedef struct dslxt_tree_node dslxt_Tree;
struct dslxt_tree_node { struct dslxt_tree_node {
dslxt_Tree * left, * right; dslxt_Tree * left, * right;
char *item; char *item;
unsigned int val; unsigned int val;
}; };
#define LT_HDRID (0x0138) #define LT_HDRID (0x0138)
#define LT_VERSION (0x0004) #define LT_VERSION (0x0004)
@ -157,7 +157,7 @@ unsigned double_used : 1;
unsigned do_strip_brackets : 1; unsigned do_strip_brackets : 1;
unsigned clock_compress : 1; unsigned clock_compress : 1;
unsigned dictmode : 1; /* dictionary compression enabled */ unsigned dictmode : 1; /* dictionary compression enabled */
unsigned zmode : 2; /* for value changes */ unsigned zmode : 2; /* for value changes */
unsigned emitted : 1; /* gate off change field zmode changes when set */ unsigned emitted : 1; /* gate off change field zmode changes when set */
}; };
@ -228,9 +228,9 @@ void lt_set_dumpoff(struct lt_trace *lt);
void lt_set_dumpon(struct lt_trace *lt); void lt_set_dumpon(struct lt_trace *lt);
/* /*
* value change functions..note that if the value string len for * value change functions..note that if the value string len for
* lt_emit_value_bit_string() is shorter than the symbol length * lt_emit_value_bit_string() is shorter than the symbol length
* it will be left justified with the rightmost character used as * it will be left justified with the rightmost character used as
* a repeat value that will be propagated to pad the value string out: * a repeat value that will be propagated to pad the value string out:
* *
* "10x" for 8 bits becomes "10xxxxxx" * "10x" for 8 bits becomes "10xxxxxx"

View File

@ -11,7 +11,7 @@
* Change the function prototypes to use ANSI/ISO C syntax. * Change the function prototypes to use ANSI/ISO C syntax.
*/ */
#ifdef HAVE_CVS_IDENT #ifdef HAVE_CVS_IDENT
#ident "$Id: mt19937int.c,v 1.4 2003/05/14 04:18:16 steve Exp $" #ident "$Id: mt19937int.c,v 1.5 2004/10/04 01:10:58 steve Exp $"
#endif #endif
/* A C-program for MT19937: Integer version (1998/4/6) */ /* A C-program for MT19937: Integer version (1998/4/6) */
@ -34,7 +34,7 @@
/* See the GNU Library General Public License for more details. */ /* See the GNU Library General Public License for more details. */
/* You should have received a copy of the GNU Library General */ /* You should have received a copy of the GNU Library General */
/* Public License along with this library; if not, write to the */ /* Public License along with this library; if not, write to the */
/* Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA */ /* Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA */
/* 02111-1307 USA */ /* 02111-1307 USA */
/* Copyright (C) 1997 Makoto Matsumoto and Takuji Nishimura. */ /* Copyright (C) 1997 Makoto Matsumoto and Takuji Nishimura. */
@ -50,14 +50,14 @@
#include "sys_priv.h" #include "sys_priv.h"
/* Period parameters */ /* Period parameters */
#define N 624 #define N 624
#define M 397 #define M 397
#define MATRIX_A 0x9908b0df /* constant vector a */ #define MATRIX_A 0x9908b0df /* constant vector a */
#define UPPER_MASK 0x80000000 /* most significant w-r bits */ #define UPPER_MASK 0x80000000 /* most significant w-r bits */
#define LOWER_MASK 0x7fffffff /* least significant r bits */ #define LOWER_MASK 0x7fffffff /* least significant r bits */
/* Tempering parameters */ /* Tempering parameters */
#define TEMPERING_MASK_B 0x9d2c5680 #define TEMPERING_MASK_B 0x9d2c5680
#define TEMPERING_MASK_C 0xefc60000 #define TEMPERING_MASK_C 0xefc60000
#define TEMPERING_SHIFT_U(y) (y >> 11) #define TEMPERING_SHIFT_U(y) (y >> 11)
@ -83,7 +83,7 @@ sgenrand(struct context_s *context, unsigned long seed)
context->mti = mti; context->mti = mti;
} }
unsigned long unsigned long
genrand(struct context_s *context) genrand(struct context_s *context)
{ {
unsigned long y; unsigned long y;
@ -112,7 +112,7 @@ genrand(struct context_s *context)
mti = 0; mti = 0;
} }
y = mt[mti++]; y = mt[mti++];
y ^= TEMPERING_SHIFT_U(y); y ^= TEMPERING_SHIFT_U(y);
y ^= TEMPERING_SHIFT_S(y) & TEMPERING_MASK_B; y ^= TEMPERING_SHIFT_S(y) & TEMPERING_MASK_B;
@ -121,11 +121,14 @@ genrand(struct context_s *context)
context->mti = mti; context->mti = mti;
return y; return y;
} }
/* /*
* $Log: mt19937int.c,v $ * $Log: mt19937int.c,v $
* Revision 1.5 2004/10/04 01:10:58 steve
* Clean up spurious trailing white space.
*
* Revision 1.4 2003/05/14 04:18:16 steve * Revision 1.4 2003/05/14 04:18:16 steve
* Use seed to store random number context. * Use seed to store random number context.
* *

View File

@ -18,7 +18,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#ifdef HAVE_CVS_IDENT #ifdef HAVE_CVS_IDENT
#ident "$Id: sys_deposit.c,v 1.4 2004/01/21 01:22:53 steve Exp $" #ident "$Id: sys_deposit.c,v 1.5 2004/10/04 01:10:58 steve Exp $"
#endif #endif
# include "vpi_config.h" # include "vpi_config.h"
@ -45,11 +45,11 @@ static int sys_deposit_calltf(char *name)
value = vpi_scan(argv); value = vpi_scan(argv);
assert(value); assert(value);
vpi_free_object(argv); vpi_free_object(argv);
val.format = vpiIntVal; val.format = vpiIntVal;
vpi_get_value(value, &val); vpi_get_value(value, &val);
switch (vpi_get(vpiType, target)) switch (vpi_get(vpiType, target))
{ {
default: default:
vpi_printf("ERROR: %s invalid target parameter\n", name); vpi_printf("ERROR: %s invalid target parameter\n", name);
@ -66,7 +66,7 @@ static int sys_deposit_calltf(char *name)
void sys_deposit_register() void sys_deposit_register()
{ {
s_vpi_systf_data tf_data; s_vpi_systf_data tf_data;
tf_data.type = vpiSysTask; tf_data.type = vpiSysTask;
tf_data.tfname = "$deposit"; tf_data.tfname = "$deposit";
tf_data.calltf = sys_deposit_calltf; tf_data.calltf = sys_deposit_calltf;
@ -79,6 +79,9 @@ void sys_deposit_register()
/* /*
* $Log: sys_deposit.c,v $ * $Log: sys_deposit.c,v $
* Revision 1.5 2004/10/04 01:10:58 steve
* Clean up spurious trailing white space.
*
* Revision 1.4 2004/01/21 01:22:53 steve * Revision 1.4 2004/01/21 01:22:53 steve
* Give the vip directory its own configure and vpi_config.h * Give the vip directory its own configure and vpi_config.h
* *

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#ifdef HAVE_CVS_IDENT #ifdef HAVE_CVS_IDENT
#ident "$Id: sys_display.c,v 1.70 2004/02/20 01:53:02 steve Exp $" #ident "$Id: sys_display.c,v 1.71 2004/10/04 01:10:58 steve Exp $"
#endif #endif
# include "vpi_config.h" # include "vpi_config.h"
@ -297,7 +297,7 @@ static void format_time(unsigned mcd, int fsize,
if (*bp == '.') if (*bp == '.')
*--bp = '0'; *--bp = '0';
} }
my_mcd_printf(mcd, "%s", bp); my_mcd_printf(mcd, "%s", bp);
} }
@ -492,7 +492,7 @@ static int format_str_char(vpiHandle scope, unsigned int mcd,
use_count = 1; use_count = 1;
break; break;
/* Print numeric value is decimal integer format. */ /* Print numeric value is decimal integer format. */
case 'd': case 'd':
case 'D': case 'D':
@ -776,7 +776,7 @@ static int format_str(vpiHandle scope, unsigned int mcd,
my_mcd_printf(mcd, "\""); my_mcd_printf(mcd, "\"");
cp += 1; cp += 1;
break; break;
case '0': case '0':
case '1': case '1':
case '2': case '2':
@ -1024,7 +1024,7 @@ static int sys_strobe_calltf(char*name)
return 0; return 0;
} }
break; break;
default: default:
vpi_printf("ERROR: %s mcd parameter must be integral", name); vpi_printf("ERROR: %s mcd parameter must be integral", name);
vpi_printf(", got vpiType=%d\n", type); vpi_printf(", got vpiType=%d\n", type);
@ -1190,7 +1190,7 @@ static int sys_monitoroff_calltf(char*name)
return 0; return 0;
} }
/* Implement $fdisplay and $fwrite. /* Implement $fdisplay and $fwrite.
* Perhaps this could be merged into sys_display_calltf. * Perhaps this could be merged into sys_display_calltf.
*/ */
static int sys_fdisplay_calltf(char *name) static int sys_fdisplay_calltf(char *name)
@ -1566,6 +1566,9 @@ void sys_display_register()
/* /*
* $Log: sys_display.c,v $ * $Log: sys_display.c,v $
* Revision 1.71 2004/10/04 01:10:58 steve
* Clean up spurious trailing white space.
*
* Revision 1.70 2004/02/20 01:53:02 steve * Revision 1.70 2004/02/20 01:53:02 steve
* Do not strip leading spaces, or expect them either. * Do not strip leading spaces, or expect them either.
* *

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#ifdef HAVE_CVS_IDENT #ifdef HAVE_CVS_IDENT
#ident "$Id: sys_lxt.c,v 1.25 2004/02/15 20:46:01 steve Exp $" #ident "$Id: sys_lxt.c,v 1.26 2004/10/04 01:10:58 steve Exp $"
#endif #endif
# include "sys_priv.h" # include "sys_priv.h"
@ -224,8 +224,8 @@ static int variable_cb_2(p_cb_data cause)
{ {
struct vcd_info* info = vcd_dmp_list; struct vcd_info* info = vcd_dmp_list;
PLI_UINT64 now = timerec_to_time64(cause->time); PLI_UINT64 now = timerec_to_time64(cause->time);
if (now != vcd_cur_time) { if (now != vcd_cur_time) {
lt_set_time64(dump_file, now); lt_set_time64(dump_file, now);
vcd_cur_time = now; vcd_cur_time = now;
} }
@ -254,7 +254,7 @@ static int variable_cb_1(p_cb_data cause)
cb.reason = cbReadOnlySynch; cb.reason = cbReadOnlySynch;
cb.cb_rtn = variable_cb_2; cb.cb_rtn = variable_cb_2;
vpi_register_cb(&cb); vpi_register_cb(&cb);
} }
info->scheduled = 1; info->scheduled = 1;
info->dmp_next = vcd_dmp_list; info->dmp_next = vcd_dmp_list;
@ -405,17 +405,17 @@ static void open_dumpfile(const char*path)
dump_file = lt_init(path); dump_file = lt_init(path);
if (dump_file == 0) { if (dump_file == 0) {
vpi_mcd_printf(1, vpi_mcd_printf(1,
"LXT Error: Unable to open %s for output.\n", "LXT Error: Unable to open %s for output.\n",
path); path);
return; return;
} else { } else {
int prec = vpi_get(vpiTimePrecision, 0); int prec = vpi_get(vpiTimePrecision, 0);
vpi_mcd_printf(1, vpi_mcd_printf(1,
"LXT info: dumpfile %s opened for output.\n", "LXT info: dumpfile %s opened for output.\n",
path); path);
assert(prec >= -15); assert(prec >= -15);
lt_set_timescale(dump_file, prec); lt_set_timescale(dump_file, prec);
@ -439,9 +439,9 @@ static int sys_dumpfile_calltf(char*name)
if (vpi_get(vpiType, item) != vpiConstant if (vpi_get(vpiType, item) != vpiConstant
|| vpi_get(vpiConstType, item) != vpiStringConst) { || vpi_get(vpiConstType, item) != vpiStringConst) {
vpi_mcd_printf(1, vpi_mcd_printf(1,
"LXT Error:" "LXT Error:"
" %s parameter must be a string constant\n", " %s parameter must be a string constant\n",
name); name);
return 0; return 0;
} }
@ -518,7 +518,7 @@ static void scan_item(unsigned depth, vpiHandle item, int skip)
if (skip) if (skip)
break; break;
name = vpi_get_str(vpiName, item); name = vpi_get_str(vpiName, item);
nexus_id = vpi_get(_vpiNexusId, item); nexus_id = vpi_get(_vpiNexusId, item);
if (nexus_id) { if (nexus_id) {
@ -526,12 +526,12 @@ static void scan_item(unsigned depth, vpiHandle item, int skip)
} else { } else {
ident = 0; ident = 0;
} }
if (!ident) { if (!ident) {
char*tmp = create_full_name(name); char*tmp = create_full_name(name);
ident = strdup_sh(&name_heap, tmp); ident = strdup_sh(&name_heap, tmp);
free(tmp); free(tmp);
if (nexus_id) if (nexus_id)
set_nexus_ident(nexus_id, ident); set_nexus_ident(nexus_id, ident);
@ -560,7 +560,7 @@ static void scan_item(unsigned depth, vpiHandle item, int skip)
vpi_get(vpiSize, item)-1, 0); vpi_get(vpiSize, item)-1, 0);
free(n); free(n);
} }
break; break;
case vpiRealVar: case vpiRealVar:
@ -608,16 +608,16 @@ static void scan_item(unsigned depth, vpiHandle item, int skip)
vpi_get_str(vpiFullName, item); vpi_get_str(vpiFullName, item);
#if 0 #if 0
vpi_mcd_printf(1, vpi_mcd_printf(1,
"LXT info:" "LXT info:"
" scanning scope %s, %u levels\n", " scanning scope %s, %u levels\n",
fullname, depth); fullname, depth);
#endif #endif
nskip = 0 != vcd_names_search(&lxt_tab, fullname); nskip = 0 != vcd_names_search(&lxt_tab, fullname);
if (!nskip) if (!nskip)
vcd_names_add(&lxt_tab, fullname); vcd_names_add(&lxt_tab, fullname);
else else
vpi_mcd_printf(1, vpi_mcd_printf(1,
"LXT warning:" "LXT warning:"
" ignoring signals" " ignoring signals"
@ -627,7 +627,7 @@ static void scan_item(unsigned depth, vpiHandle item, int skip)
name = vpi_get_str(vpiName, item); name = vpi_get_str(vpiName, item);
push_scope(name); /* keep in type info determination for possible future usage */ push_scope(name); /* keep in type info determination for possible future usage */
for (i=0; types[i]>0; i++) { for (i=0; types[i]>0; i++) {
vpiHandle hand; vpiHandle hand;
argv = vpi_iterate(types[i], item); argv = vpi_iterate(types[i], item);
@ -635,11 +635,11 @@ static void scan_item(unsigned depth, vpiHandle item, int skip)
scan_item(depth-1, hand, nskip); scan_item(depth-1, hand, nskip);
} }
} }
pop_scope(); pop_scope();
} }
break; break;
default: default:
vpi_mcd_printf(1, vpi_mcd_printf(1,
"LXT Error: $lxtdumpvars: Unsupported parameter " "LXT Error: $lxtdumpvars: Unsupported parameter "
@ -657,7 +657,7 @@ static int draw_scope(vpiHandle item)
vpiHandle scope = vpi_handle(vpiScope, item); vpiHandle scope = vpi_handle(vpiScope, item);
if (!scope) if (!scope)
return 0; return 0;
depth = 1 + draw_scope(scope); depth = 1 + draw_scope(scope);
name = vpi_get_str(vpiName, scope); name = vpi_get_str(vpiName, scope);
@ -668,7 +668,7 @@ static int draw_scope(vpiHandle item)
case vpiNamedFork: type = "fork"; break; case vpiNamedFork: type = "fork"; break;
default: type = "module"; break; default: type = "module"; break;
} }
push_scope(name); /* keep in type info determination for possible future usage */ push_scope(name); /* keep in type info determination for possible future usage */
return depth; return depth;
@ -734,7 +734,7 @@ static int sys_dumpvars_calltf(char*name)
vcd_names_sort(&lxt_tab); vcd_names_sort(&lxt_tab);
scan_item(depth, item, 0); scan_item(depth, item, 0);
while (dep--) { while (dep--) {
pop_scope(); pop_scope();
} }
@ -819,6 +819,9 @@ void sys_lxt_register()
/* /*
* $Log: sys_lxt.c,v $ * $Log: sys_lxt.c,v $
* Revision 1.26 2004/10/04 01:10:58 steve
* Clean up spurious trailing white space.
*
* Revision 1.25 2004/02/15 20:46:01 steve * Revision 1.25 2004/02/15 20:46:01 steve
* Add the $dumpflush function * Add the $dumpflush function
* *

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#ifdef HAVE_CVS_IDENT #ifdef HAVE_CVS_IDENT
#ident "$Id: sys_lxt2.c,v 1.7 2004/02/15 20:46:01 steve Exp $" #ident "$Id: sys_lxt2.c,v 1.8 2004/10/04 01:10:58 steve Exp $"
#endif #endif
# include "sys_priv.h" # include "sys_priv.h"
@ -226,8 +226,8 @@ static int variable_cb_2(p_cb_data cause)
{ {
struct vcd_info* info = vcd_dmp_list; struct vcd_info* info = vcd_dmp_list;
PLI_UINT64 now = timerec_to_time64(cause->time); PLI_UINT64 now = timerec_to_time64(cause->time);
if (now != vcd_cur_time) { if (now != vcd_cur_time) {
lxt2_wr_set_time64(dump_file, now); lxt2_wr_set_time64(dump_file, now);
vcd_cur_time = now; vcd_cur_time = now;
} }
@ -256,7 +256,7 @@ static int variable_cb_1(p_cb_data cause)
cb.reason = cbReadOnlySynch; cb.reason = cbReadOnlySynch;
cb.cb_rtn = variable_cb_2; cb.cb_rtn = variable_cb_2;
vpi_register_cb(&cb); vpi_register_cb(&cb);
} }
info->scheduled = 1; info->scheduled = 1;
info->dmp_next = vcd_dmp_list; info->dmp_next = vcd_dmp_list;
@ -408,17 +408,17 @@ static void open_dumpfile(const char*path)
dump_file = lxt2_wr_init(path); dump_file = lxt2_wr_init(path);
if (dump_file == 0) { if (dump_file == 0) {
vpi_mcd_printf(1, vpi_mcd_printf(1,
"LXT Error: Unable to open %s for output.\n", "LXT Error: Unable to open %s for output.\n",
path); path);
return; return;
} else { } else {
int prec = vpi_get(vpiTimePrecision, 0); int prec = vpi_get(vpiTimePrecision, 0);
vpi_mcd_printf(1, vpi_mcd_printf(1,
"LXT info: dumpfile %s opened for output.\n", "LXT info: dumpfile %s opened for output.\n",
path); path);
assert(prec >= -15); assert(prec >= -15);
lxt2_wr_set_timescale(dump_file, prec); lxt2_wr_set_timescale(dump_file, prec);
@ -444,9 +444,9 @@ static int sys_dumpfile_calltf(char*name)
if (vpi_get(vpiType, item) != vpiConstant if (vpi_get(vpiType, item) != vpiConstant
|| vpi_get(vpiConstType, item) != vpiStringConst) { || vpi_get(vpiConstType, item) != vpiStringConst) {
vpi_mcd_printf(1, vpi_mcd_printf(1,
"LXT Error:" "LXT Error:"
" %s parameter must be a string constant\n", " %s parameter must be a string constant\n",
name); name);
return 0; return 0;
} }
@ -529,7 +529,7 @@ static void scan_item(unsigned depth, vpiHandle item, int skip)
if (skip) if (skip)
break; break;
name = vpi_get_str(vpiName, item); name = vpi_get_str(vpiName, item);
nexus_id = vpi_get(_vpiNexusId, item); nexus_id = vpi_get(_vpiNexusId, item);
if (nexus_id) { if (nexus_id) {
@ -537,12 +537,12 @@ static void scan_item(unsigned depth, vpiHandle item, int skip)
} else { } else {
ident = 0; ident = 0;
} }
if (!ident) { if (!ident) {
char*tmp = create_full_name(name); char*tmp = create_full_name(name);
ident = strdup_sh(&name_heap, tmp); ident = strdup_sh(&name_heap, tmp);
free(tmp); free(tmp);
if (nexus_id) if (nexus_id)
set_nexus_ident(nexus_id, ident); set_nexus_ident(nexus_id, ident);
@ -575,7 +575,7 @@ static void scan_item(unsigned depth, vpiHandle item, int skip)
vpi_get(vpiSize, item)-1, 0); vpi_get(vpiSize, item)-1, 0);
free(n); free(n);
} }
break; break;
case vpiRealVar: case vpiRealVar:
@ -626,16 +626,16 @@ static void scan_item(unsigned depth, vpiHandle item, int skip)
vpi_get_str(vpiFullName, item); vpi_get_str(vpiFullName, item);
#if 0 #if 0
vpi_mcd_printf(1, vpi_mcd_printf(1,
"LXT info:" "LXT info:"
" scanning scope %s, %u levels\n", " scanning scope %s, %u levels\n",
fullname, depth); fullname, depth);
#endif #endif
nskip = 0 != vcd_names_search(&lxt_tab, fullname); nskip = 0 != vcd_names_search(&lxt_tab, fullname);
if (!nskip) if (!nskip)
vcd_names_add(&lxt_tab, fullname); vcd_names_add(&lxt_tab, fullname);
else else
vpi_mcd_printf(1, vpi_mcd_printf(1,
"LXT warning:" "LXT warning:"
" ignoring signals" " ignoring signals"
@ -645,7 +645,7 @@ static void scan_item(unsigned depth, vpiHandle item, int skip)
name = vpi_get_str(vpiName, item); name = vpi_get_str(vpiName, item);
push_scope(name); /* keep in type info determination for possible future usage */ push_scope(name); /* keep in type info determination for possible future usage */
for (i=0; types[i]>0; i++) { for (i=0; types[i]>0; i++) {
vpiHandle hand; vpiHandle hand;
argv = vpi_iterate(types[i], item); argv = vpi_iterate(types[i], item);
@ -653,11 +653,11 @@ static void scan_item(unsigned depth, vpiHandle item, int skip)
scan_item(depth-1, hand, nskip); scan_item(depth-1, hand, nskip);
} }
} }
pop_scope(); pop_scope();
} }
break; break;
default: default:
vpi_mcd_printf(1, vpi_mcd_printf(1,
"LXT Error: $lxtdumpvars: Unsupported parameter " "LXT Error: $lxtdumpvars: Unsupported parameter "
@ -675,7 +675,7 @@ static int draw_scope(vpiHandle item)
vpiHandle scope = vpi_handle(vpiScope, item); vpiHandle scope = vpi_handle(vpiScope, item);
if (!scope) if (!scope)
return 0; return 0;
depth = 1 + draw_scope(scope); depth = 1 + draw_scope(scope);
name = vpi_get_str(vpiName, scope); name = vpi_get_str(vpiName, scope);
@ -686,7 +686,7 @@ static int draw_scope(vpiHandle item)
case vpiNamedFork: type = "fork"; break; case vpiNamedFork: type = "fork"; break;
default: type = "module"; break; default: type = "module"; break;
} }
push_scope(name); /* keep in type info determination for possible future usage */ push_scope(name); /* keep in type info determination for possible future usage */
return depth; return depth;
@ -752,7 +752,7 @@ static int sys_dumpvars_calltf(char*name)
vcd_names_sort(&lxt_tab); vcd_names_sort(&lxt_tab);
scan_item(depth, item, 0); scan_item(depth, item, 0);
while (dep--) { while (dep--) {
pop_scope(); pop_scope();
} }
@ -839,6 +839,9 @@ void sys_lxt2_register()
/* /*
* $Log: sys_lxt2.c,v $ * $Log: sys_lxt2.c,v $
* Revision 1.8 2004/10/04 01:10:58 steve
* Clean up spurious trailing white space.
*
* Revision 1.7 2004/02/15 20:46:01 steve * Revision 1.7 2004/02/15 20:46:01 steve
* Add the $dumpflush function * Add the $dumpflush function
* *

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#ifdef HAVE_CVS_IDENT #ifdef HAVE_CVS_IDENT
#ident "$Id: sys_plusargs.c,v 1.4 2002/08/12 01:35:05 steve Exp $" #ident "$Id: sys_plusargs.c,v 1.5 2004/10/04 01:10:58 steve Exp $"
#endif #endif
# include <vpi_user.h> # include <vpi_user.h>
@ -198,7 +198,7 @@ static int sys_value_plusargs_compiletf(char*xx)
return 0; return 0;
} }
} }
arg = vpi_scan(argv); arg = vpi_scan(argv);
if (argv == 0) { if (argv == 0) {
vpi_printf("ERROR: $value$plusargs requires two arguments\n"); vpi_printf("ERROR: $value$plusargs requires two arguments\n");
@ -329,6 +329,9 @@ void sys_plusargs_register()
/* /*
* $Log: sys_plusargs.c,v $ * $Log: sys_plusargs.c,v $
* Revision 1.5 2004/10/04 01:10:58 steve
* Clean up spurious trailing white space.
*
* Revision 1.4 2002/08/12 01:35:05 steve * Revision 1.4 2002/08/12 01:35:05 steve
* conditional ident string using autoconfig. * conditional ident string using autoconfig.
* *

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#ifdef HAVE_CVS_IDENT #ifdef HAVE_CVS_IDENT
#ident "$Id: sys_random.c,v 1.13 2004/06/17 14:44:01 steve Exp $" #ident "$Id: sys_random.c,v 1.14 2004/10/04 01:10:58 steve Exp $"
#endif #endif
# include "sys_priv.h" # include "sys_priv.h"
@ -320,7 +320,7 @@ static int sys_random_calltf(char*name)
/* Send updated seed back to seed parameter. */ /* Send updated seed back to seed parameter. */
if (seed) { if (seed) {
val.format = vpiIntVal; val.format = vpiIntVal;
val.value.integer = i_seed; val.value.integer = i_seed;
vpi_put_value(seed, &val, 0, vpiNoDelay); vpi_put_value(seed, &val, 0, vpiNoDelay);
} }
@ -362,6 +362,9 @@ void sys_random_register()
/* /*
* $Log: sys_random.c,v $ * $Log: sys_random.c,v $
* Revision 1.14 2004/10/04 01:10:58 steve
* Clean up spurious trailing white space.
*
* Revision 1.13 2004/06/17 14:44:01 steve * Revision 1.13 2004/06/17 14:44:01 steve
* Save seed in static variable, in case user doesnt pass it. * Save seed in static variable, in case user doesnt pass it.
* *

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#ifdef HAVE_CVS_IDENT #ifdef HAVE_CVS_IDENT
#ident "$Id: sys_random_mti.c,v 1.2 2004/10/04 00:14:08 steve Exp $" #ident "$Id: sys_random_mti.c,v 1.3 2004/10/04 01:10:58 steve Exp $"
#endif #endif
# include "sys_priv.h" # include "sys_priv.h"
@ -138,7 +138,7 @@ static int sys_mti_random_calltf(char*name)
vpi_get_value(seed, &val); vpi_get_value(seed, &val);
i_seed = val.value.integer; i_seed = val.value.integer;
/* Since there is a seed use the current /* Since there is a seed use the current
context or create a new one */ context or create a new one */
context = (struct context_s *)vpi_get_userdata(call_handle); context = (struct context_s *)vpi_get_userdata(call_handle);
if (!context) { if (!context) {
@ -167,7 +167,7 @@ static int sys_mti_random_calltf(char*name)
/* mark seed with cookie */ /* mark seed with cookie */
if (seed && i_seed != COOKIE) { if (seed && i_seed != COOKIE) {
val.format = vpiIntVal; val.format = vpiIntVal;
val.value.integer = COOKIE; val.value.integer = COOKIE;
vpi_put_value(seed, &val, 0, vpiNoDelay); vpi_put_value(seed, &val, 0, vpiNoDelay);
} }
@ -202,6 +202,9 @@ void sys_random_mti_register()
/* /*
* $Log: sys_random_mti.c,v $ * $Log: sys_random_mti.c,v $
* Revision 1.3 2004/10/04 01:10:58 steve
* Clean up spurious trailing white space.
*
* Revision 1.2 2004/10/04 00:14:08 steve * Revision 1.2 2004/10/04 00:14:08 steve
* MTI functions only user Mersene Twister * MTI functions only user Mersene Twister
* *

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#ifdef HAVE_CVS_IDENT #ifdef HAVE_CVS_IDENT
#ident "$Id: sys_readmem.c,v 1.15 2004/01/21 01:22:53 steve Exp $" #ident "$Id: sys_readmem.c,v 1.16 2004/10/04 01:10:58 steve Exp $"
#endif #endif
# include "vpi_config.h" # include "vpi_config.h"
@ -120,12 +120,12 @@ static int sys_readmem_calltf(char*name)
vpiHandle right_range; vpiHandle right_range;
vpiHandle word_index; vpiHandle word_index;
/* These are left and right hand side parameters in the /* These are left and right hand side parameters in the
declaration of the memory. */ declaration of the memory. */
int left_addr, right_addr; int left_addr, right_addr;
/* start_addr and stop_addr are the parameters given to $readmem in the /* start_addr and stop_addr are the parameters given to $readmem in the
verilog code. When not specified, start_addr is equal to the lower of verilog code. When not specified, start_addr is equal to the lower of
the [left,right]_addr and stop_addr is equal to the higher of the the [left,right]_addr and stop_addr is equal to the higher of the
[left,right]_addr. */ [left,right]_addr. */
int start_addr, stop_addr, addr_incr; int start_addr, stop_addr, addr_incr;
@ -284,7 +284,7 @@ static int sys_readmem_calltf(char*name)
item = vpi_scan(words); item = vpi_scan(words);
wwid = vpi_get(vpiSize, item); wwid = vpi_get(vpiSize, item);
/* variable that will be uses by the lexer to pass values /* variable that will be uses by the lexer to pass values
back to this code */ back to this code */
value.format = vpiVectorVal; value.format = vpiVectorVal;
value.value.vector = calloc((wwid+31)/32, sizeof(s_vpi_vecval)); value.value.vector = calloc((wwid+31)/32, sizeof(s_vpi_vecval));
@ -308,7 +308,7 @@ static int sys_readmem_calltf(char*name)
case MEM_WORD: case MEM_WORD:
if (addr >= min_addr && addr <= max_addr){ if (addr >= min_addr && addr <= max_addr){
word_index = vpi_handle_by_index(mitem, addr); word_index = vpi_handle_by_index(mitem, addr);
assert(word_index); assert(word_index);
vpi_put_value(word_index, &value, 0, vpiNoDelay); vpi_put_value(word_index, &value, 0, vpiNoDelay);
} }
@ -330,7 +330,7 @@ static int sys_readmem_calltf(char*name)
bailout: bailout:
free(value.value.vector); free(value.value.vector);
if (item) if (item)
vpi_free_object(words); vpi_free_object(words);
free(path); free(path);
fclose(file); fclose(file);
@ -527,12 +527,12 @@ static int sys_writemem_calltf(char*name)
if (cnt%16 == 0) if (cnt%16 == 0)
fprintf(file, "// 0x%08x\n", cnt); fprintf(file, "// 0x%08x\n", cnt);
word_index = vpi_handle_by_index(mitem, addr); word_index = vpi_handle_by_index(mitem, addr);
assert(word_index); assert(word_index);
vpi_get_value(word_index, &value); vpi_get_value(word_index, &value);
fprintf(file, "%s\n", value.value.str); fprintf(file, "%s\n", value.value.str);
} }
fclose(file); fclose(file);
return 0; return 0;
} }
@ -576,6 +576,9 @@ void sys_readmem_register()
/* /*
* $Log: sys_readmem.c,v $ * $Log: sys_readmem.c,v $
* Revision 1.16 2004/10/04 01:10:58 steve
* Clean up spurious trailing white space.
*
* Revision 1.15 2004/01/21 01:22:53 steve * Revision 1.15 2004/01/21 01:22:53 steve
* Give the vip directory its own configure and vpi_config.h * Give the vip directory its own configure and vpi_config.h
* *

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#ifdef HAVE_CVS_IDENT #ifdef HAVE_CVS_IDENT
#ident "$Id: sys_vcd.c,v 1.55 2004/02/15 20:46:01 steve Exp $" #ident "$Id: sys_vcd.c,v 1.56 2004/10/04 01:10:58 steve Exp $"
#endif #endif
# include "sys_priv.h" # include "sys_priv.h"
@ -73,7 +73,7 @@ static void gen_new_vcd_id(void)
vcdid[i] = (char)((v%94)+33); /* for range 33..126 */ vcdid[i] = (char)((v%94)+33); /* for range 33..126 */
v /= 94; v /= 94;
if(!v) { if(!v) {
vcdid[i+1] = '\0'; vcdid[i+1] = '\0';
break; break;
} }
} }
@ -93,11 +93,11 @@ static char *truncate_bitvec(char *s)
return s; return s;
else else
s += 1; s += 1;
for(;;s++) { for(;;s++) {
l=r; r=*s; l=r; r=*s;
if(!r) return (s-1); if(!r) return (s-1);
if(l!=r) if(l!=r)
return(((l=='0')&&(r=='1'))?s:s-1); return(((l=='0')&&(r=='1'))?s:s-1);
@ -208,7 +208,7 @@ static int variable_cb_1(p_cb_data cause)
cb.reason = cbReadOnlySynch; cb.reason = cbReadOnlySynch;
cb.cb_rtn = variable_cb_2; cb.cb_rtn = variable_cb_2;
vpi_register_cb(&cb); vpi_register_cb(&cb);
} }
info->scheduled = 1; info->scheduled = 1;
info->dmp_next = vcd_dmp_list; info->dmp_next = vcd_dmp_list;
@ -365,8 +365,8 @@ static void open_dumpfile(void)
dump_file = fopen(dump_path, "w"); dump_file = fopen(dump_path, "w");
if (dump_file == 0) { if (dump_file == 0) {
vpi_mcd_printf(1, vpi_mcd_printf(1,
"VCD Error: Unable to open %s for output.\n", "VCD Error: Unable to open %s for output.\n",
dump_path); dump_path);
return; return;
} else { } else {
@ -375,10 +375,10 @@ static void open_dumpfile(void)
unsigned udx = 0; unsigned udx = 0;
time_t walltime; time_t walltime;
vpi_mcd_printf(1, vpi_mcd_printf(1,
"VCD info: dumpfile %s opened for output.\n", "VCD info: dumpfile %s opened for output.\n",
dump_path); dump_path);
time(&walltime); time(&walltime);
assert(prec >= -15); assert(prec >= -15);
@ -416,9 +416,9 @@ static int sys_dumpfile_compiletf(char*name)
if (vpi_get(vpiType, item) != vpiConstant if (vpi_get(vpiType, item) != vpiConstant
|| vpi_get(vpiConstType, item) != vpiStringConst) { || vpi_get(vpiConstType, item) != vpiStringConst) {
vpi_mcd_printf(1, vpi_mcd_printf(1,
"VCD Error:" "VCD Error:"
" %s parameter must be a string constant\n", " %s parameter must be a string constant\n",
name); name);
return 0; return 0;
} }
@ -501,9 +501,9 @@ static void scan_item(unsigned depth, vpiHandle item, int skip)
if (skip) if (skip)
break; break;
name = vpi_get_str(vpiName, item); name = vpi_get_str(vpiName, item);
nexus_id = vpi_get(_vpiNexusId, item); nexus_id = vpi_get(_vpiNexusId, item);
if (nexus_id) { if (nexus_id) {
@ -511,14 +511,14 @@ static void scan_item(unsigned depth, vpiHandle item, int skip)
} else { } else {
ident = 0; ident = 0;
} }
if (!ident) { if (!ident) {
ident = strdup(vcdid); ident = strdup(vcdid);
gen_new_vcd_id(); gen_new_vcd_id();
if (nexus_id) if (nexus_id)
set_nexus_ident(nexus_id, ident); set_nexus_ident(nexus_id, ident);
info = malloc(sizeof(*info)); info = malloc(sizeof(*info));
info->time.type = vpiSimTime; info->time.type = vpiSimTime;
@ -540,7 +540,7 @@ static void scan_item(unsigned depth, vpiHandle item, int skip)
info->cb = vpi_register_cb(&cb); info->cb = vpi_register_cb(&cb);
} }
fprintf(dump_file, "$var %s %u %s %s", fprintf(dump_file, "$var %s %u %s %s",
type, vpi_get(vpiSize, item), ident, type, vpi_get(vpiSize, item), ident,
name); name);
@ -604,16 +604,16 @@ static void scan_item(unsigned depth, vpiHandle item, int skip)
vpi_get_str(vpiFullName, item); vpi_get_str(vpiFullName, item);
#if 0 #if 0
vpi_mcd_printf(1, vpi_mcd_printf(1,
"VCD info:" "VCD info:"
" scanning scope %s, %u levels\n", " scanning scope %s, %u levels\n",
fullname, depth); fullname, depth);
#endif #endif
nskip = 0 != vcd_names_search(&vcd_tab, fullname); nskip = 0 != vcd_names_search(&vcd_tab, fullname);
if (!nskip) if (!nskip)
vcd_names_add(&vcd_tab, fullname); vcd_names_add(&vcd_tab, fullname);
else else
vpi_mcd_printf(1, vpi_mcd_printf(1,
"VCD warning:" "VCD warning:"
" ignoring signals" " ignoring signals"
@ -631,11 +631,11 @@ static void scan_item(unsigned depth, vpiHandle item, int skip)
scan_item(depth-1, hand, nskip); scan_item(depth-1, hand, nskip);
} }
} }
fprintf(dump_file, "$upscope $end\n"); fprintf(dump_file, "$upscope $end\n");
} }
break; break;
default: default:
vpi_mcd_printf(1, vpi_mcd_printf(1,
"VCD Error: $dumpvars: Unsupported parameter " "VCD Error: $dumpvars: Unsupported parameter "
@ -652,7 +652,7 @@ static int draw_scope(vpiHandle item)
vpiHandle scope = vpi_handle(vpiScope, item); vpiHandle scope = vpi_handle(vpiScope, item);
if (!scope) if (!scope)
return 0; return 0;
depth = 1 + draw_scope(scope); depth = 1 + draw_scope(scope);
name = vpi_get_str(vpiName, scope); name = vpi_get_str(vpiName, scope);
@ -663,7 +663,7 @@ static int draw_scope(vpiHandle item)
case vpiNamedFork: type = "fork"; break; case vpiNamedFork: type = "fork"; break;
default: type = "module"; break; default: type = "module"; break;
} }
fprintf(dump_file, "$scope %s %s $end\n", type, name); fprintf(dump_file, "$scope %s %s $end\n", type, name);
return depth; return depth;
@ -771,7 +771,7 @@ static int sys_dumpvars_calltf(char*name)
vcd_names_sort(&vcd_tab); vcd_names_sort(&vcd_tab);
scan_item(depth, item, 0); scan_item(depth, item, 0);
while (dep--) { while (dep--) {
fprintf(dump_file, "$upscope $end\n"); fprintf(dump_file, "$upscope $end\n");
} }
@ -835,6 +835,9 @@ void sys_vcd_register()
/* /*
* $Log: sys_vcd.c,v $ * $Log: sys_vcd.c,v $
* Revision 1.56 2004/10/04 01:10:58 steve
* Clean up spurious trailing white space.
*
* Revision 1.55 2004/02/15 20:46:01 steve * Revision 1.55 2004/02/15 20:46:01 steve
* Add the $dumpflush function * Add the $dumpflush function
* *

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#ifdef HAVE_CVS_IDENT #ifdef HAVE_CVS_IDENT
#ident "$Id: sys_vcdoff.c,v 1.2 2004/01/21 01:22:53 steve Exp $" #ident "$Id: sys_vcdoff.c,v 1.3 2004/10/04 01:10:58 steve Exp $"
#endif #endif
# include "sys_priv.h" # include "sys_priv.h"
@ -61,8 +61,8 @@ static void open_dumpfile(const char*path)
dump_file = fopen(path, "w"); dump_file = fopen(path, "w");
if (dump_file == 0) { if (dump_file == 0) {
vpi_mcd_printf(6, vpi_mcd_printf(6,
"VCD Error: Unable to open %s for output.\n", "VCD Error: Unable to open %s for output.\n",
path); path);
return; return;
} else { } else {
@ -83,9 +83,9 @@ static int sys_dumpfile_calltf(char*name)
if (vpi_get(vpiType, item) != vpiConstant if (vpi_get(vpiType, item) != vpiConstant
|| vpi_get(vpiConstType, item) != vpiStringConst) { || vpi_get(vpiConstType, item) != vpiStringConst) {
vpi_mcd_printf(6, vpi_mcd_printf(6,
"VCD Error:" "VCD Error:"
" %s parameter must be a string constant\n", " %s parameter must be a string constant\n",
name); name);
return 0; return 0;
} }
@ -171,6 +171,9 @@ void sys_vcdoff_register()
/* /*
* $Log: sys_vcdoff.c,v $ * $Log: sys_vcdoff.c,v $
* Revision 1.3 2004/10/04 01:10:58 steve
* Clean up spurious trailing white space.
*
* Revision 1.2 2004/01/21 01:22:53 steve * Revision 1.2 2004/01/21 01:22:53 steve
* Give the vip directory its own configure and vpi_config.h * Give the vip directory its own configure and vpi_config.h
* *

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#ifdef HAVE_CVS_IDENT #ifdef HAVE_CVS_IDENT
#ident "$Id: vcd_priv.c,v 1.5 2004/01/21 01:22:53 steve Exp $" #ident "$Id: vcd_priv.c,v 1.6 2004/10/04 01:10:58 steve Exp $"
#endif #endif
# include "vpi_config.h" # include "vpi_config.h"
@ -64,7 +64,7 @@ const char *vcd_names_search(struct vcd_names_list_s*tab, const char *key)
if (tab->vcd_names_sorted == 0) if (tab->vcd_names_sorted == 0)
return 0; return 0;
v = (const char **) bsearch(&key, v = (const char **) bsearch(&key,
tab->vcd_names_sorted, tab->sorted_names, tab->vcd_names_sorted, tab->sorted_names,
sizeof(const char *), vcd_names_compare ); sizeof(const char *), vcd_names_compare );
@ -74,15 +74,15 @@ const char *vcd_names_search(struct vcd_names_list_s*tab, const char *key)
void vcd_names_sort(struct vcd_names_list_s*tab) void vcd_names_sort(struct vcd_names_list_s*tab)
{ {
if (tab->listed_names) { if (tab->listed_names) {
struct vcd_names_s *r; struct vcd_names_s *r;
const char **l; const char **l;
tab->sorted_names += tab->listed_names; tab->sorted_names += tab->listed_names;
tab->vcd_names_sorted = (const char **) tab->vcd_names_sorted = (const char **)
realloc(tab->vcd_names_sorted, realloc(tab->vcd_names_sorted,
tab->sorted_names*(sizeof(const char *))); tab->sorted_names*(sizeof(const char *)));
assert(tab->vcd_names_sorted); assert(tab->vcd_names_sorted);
l = tab->vcd_names_sorted + tab->sorted_names - tab->listed_names; l = tab->vcd_names_sorted + tab->sorted_names - tab->listed_names;
tab->listed_names = 0; tab->listed_names = 0;
@ -95,29 +95,29 @@ void vcd_names_sort(struct vcd_names_list_s*tab)
*(l++) = rr->name; *(l++) = rr->name;
free(rr); free(rr);
} }
qsort(tab->vcd_names_sorted, tab->sorted_names, qsort(tab->vcd_names_sorted, tab->sorted_names,
sizeof(const char **), vcd_names_compare); sizeof(const char **), vcd_names_compare);
} }
} }
/* /*
Nexus Id cache Nexus Id cache
In structural models, many signals refer to the same nexus. In structural models, many signals refer to the same nexus.
Some structural models also have very many signals. This cache Some structural models also have very many signals. This cache
saves nexus_id - vcd_id pairs, and reuses the vcd_id when a signal saves nexus_id - vcd_id pairs, and reuses the vcd_id when a signal
refers to a nexus that is already dumped. refers to a nexus that is already dumped.
The new signal will be listed as a $var, but no callback The new signal will be listed as a $var, but no callback
will be installed. This saves considerable CPU time and leads will be installed. This saves considerable CPU time and leads
to smalle VCD files. to smalle VCD files.
The _vpiNexusId is a private (int) property of IVL simulators. The _vpiNexusId is a private (int) property of IVL simulators.
*/ */
struct vcd_id_s struct vcd_id_s
{ {
const char *id; const char *id;
struct vcd_id_s *next; struct vcd_id_s *next;
@ -137,7 +137,7 @@ static struct vcd_id_s **vcd_ids = 0;
const char *find_nexus_ident(int nex) const char *find_nexus_ident(int nex)
{ {
struct vcd_id_s *bucket; struct vcd_id_s *bucket;
if (!vcd_ids) { if (!vcd_ids) {
vcd_ids = (struct vcd_id_s **) vcd_ids = (struct vcd_id_s **)
calloc(256, sizeof(struct vcd_id_s*)); calloc(256, sizeof(struct vcd_id_s*));
@ -170,6 +170,9 @@ void set_nexus_ident(int nex, const char *id)
/* /*
* $Log: vcd_priv.c,v $ * $Log: vcd_priv.c,v $
* Revision 1.6 2004/10/04 01:10:58 steve
* Clean up spurious trailing white space.
*
* Revision 1.5 2004/01/21 01:22:53 steve * Revision 1.5 2004/01/21 01:22:53 steve
* Give the vip directory its own configure and vpi_config.h * Give the vip directory its own configure and vpi_config.h
* *

View File

@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#ifdef HAVE_CVS_IDENT #ifdef HAVE_CVS_IDENT
#ident "$Id: vpi_user.h,v 1.35 2004/09/05 21:30:16 steve Exp $" #ident "$Id: vpi_user.h,v 1.36 2004/10/04 01:10:56 steve Exp $"
#endif #endif
@ -177,7 +177,7 @@ typedef struct t_vpi_value {
#define vpiSysTfCall 85 #define vpiSysTfCall 85
#define vpiArgument 89 #define vpiArgument 89
#define vpiInternalScope 92 #define vpiInternalScope 92
#define vpiVariables 100 #define vpiVariables 100
#define vpiCallback 1000 #define vpiCallback 1000
@ -419,6 +419,9 @@ EXTERN_C_END
/* /*
* $Log: vpi_user.h,v $ * $Log: vpi_user.h,v $
* Revision 1.36 2004/10/04 01:10:56 steve
* Clean up spurious trailing white space.
*
* Revision 1.35 2004/09/05 21:30:16 steve * Revision 1.35 2004/09/05 21:30:16 steve
* Better type safety. * Better type safety.
* *

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#ifdef HAVE_CVS_IDENT #ifdef HAVE_CVS_IDENT
#ident "$Id: vpi_mcd.c,v 1.6 2002/08/12 01:35:05 steve Exp $" #ident "$Id: vpi_mcd.c,v 1.7 2004/10/04 01:10:58 steve Exp $"
#endif #endif
# include "vpi_priv.h" # include "vpi_priv.h"
@ -58,7 +58,7 @@ unsigned int vpi_mcd_close(unsigned int mcd)
for(i = 3; i < 31; i++) { for(i = 3; i < 31; i++) {
if( ((mcd>>i) & 1) && mcd_table[i].filename) { if( ((mcd>>i) & 1) && mcd_table[i].filename) {
if(fclose(mcd_table[i].fp) != 0) if(fclose(mcd_table[i].fp) != 0)
rc |= 1<<i; rc |= 1<<i;
free(mcd_table[i].filename); free(mcd_table[i].filename);
mcd_table[i].fp = NULL; mcd_table[i].fp = NULL;
mcd_table[i].filename = NULL; mcd_table[i].filename = NULL;
@ -148,6 +148,9 @@ int vpi_mcd_fgetc(unsigned int mcd)
/* /*
* $Log: vpi_mcd.c,v $ * $Log: vpi_mcd.c,v $
* Revision 1.7 2004/10/04 01:10:58 steve
* Clean up spurious trailing white space.
*
* Revision 1.6 2002/08/12 01:35:05 steve * Revision 1.6 2002/08/12 01:35:05 steve
* conditional ident string using autoconfig. * conditional ident string using autoconfig.
* *

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#ifdef HAVE_CVS_IDENT #ifdef HAVE_CVS_IDENT
#ident "$Id: vpi_null.c,v 1.2 2002/08/12 01:35:05 steve Exp $" #ident "$Id: vpi_null.c,v 1.3 2004/10/04 01:10:58 steve Exp $"
#endif #endif
# include "vpi_priv.h" # include "vpi_priv.h"
@ -36,13 +36,16 @@ static struct __vpiNull vpip_null = {
{ &vpip_null_rt } { &vpip_null_rt }
}; };
extern struct __vpiNull *vpip_get_null(void) extern struct __vpiNull *vpip_get_null(void)
{ {
return &vpip_null; return &vpip_null;
} }
/* /*
* $Log: vpi_null.c,v $ * $Log: vpi_null.c,v $
* Revision 1.3 2004/10/04 01:10:58 steve
* Clean up spurious trailing white space.
*
* Revision 1.2 2002/08/12 01:35:05 steve * Revision 1.2 2002/08/12 01:35:05 steve
* conditional ident string using autoconfig. * conditional ident string using autoconfig.
* *

View File

@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#ifdef HAVE_CVS_IDENT #ifdef HAVE_CVS_IDENT
#ident "$Id: vpi_priv.h,v 1.3 2002/08/12 01:35:06 steve Exp $" #ident "$Id: vpi_priv.h,v 1.4 2004/10/04 01:10:58 steve Exp $"
#endif #endif
/* /*
@ -224,7 +224,7 @@ extern struct __vpiNull *vpip_get_null(void);
* This type represents the handle to a Verilog scope. These include * This type represents the handle to a Verilog scope. These include
* module instantiations and name begin-end blocks. The attach * module instantiations and name begin-end blocks. The attach
* function is used to attach handles to the scope by the runtime * function is used to attach handles to the scope by the runtime
* initializaiton. * initializaiton.
*/ */
struct __vpiScope { struct __vpiScope {
struct __vpiHandle base; struct __vpiHandle base;
@ -412,6 +412,9 @@ extern int vpip_finished();
/* /*
* $Log: vpi_priv.h,v $ * $Log: vpi_priv.h,v $
* Revision 1.4 2004/10/04 01:10:58 steve
* Clean up spurious trailing white space.
*
* Revision 1.3 2002/08/12 01:35:06 steve * Revision 1.3 2002/08/12 01:35:06 steve
* conditional ident string using autoconfig. * conditional ident string using autoconfig.
* *

View File

@ -1,55 +1,55 @@
EXPORTS EXPORTS
vpi_free_object vpi_free_object
vpi_get vpi_get
vpi_get_str vpi_get_str
vpi_get_time vpi_get_time
vpi_get_value vpi_get_value
vpi_get_vlog_info vpi_get_vlog_info
vpi_handle vpi_handle
vpi_handle_by_index vpi_handle_by_index
vpi_iterate vpi_iterate
vpi_mcd_close vpi_mcd_close
vpi_mcd_fgetc vpi_mcd_fgetc
vpi_mcd_fputc vpi_mcd_fputc
vpi_mcd_init vpi_mcd_init
vpi_mcd_name vpi_mcd_name
vpi_mcd_open vpi_mcd_open
vpi_mcd_open_x vpi_mcd_open_x
vpi_mcd_printf vpi_mcd_printf
vpi_printf vpi_printf
vpi_put_value vpi_put_value
vpi_register_cb vpi_register_cb
vpi_register_systf vpi_register_systf
vpi_remove_cb vpi_remove_cb
vpi_scan vpi_scan
vpi_sim_control vpi_sim_control
vpip_attach_to_scope vpip_attach_to_scope
vpip_bits_get_value vpip_bits_get_value
vpip_bits_resolve vpip_bits_resolve
vpip_bits_set_value vpip_bits_set_value
vpip_callfunc vpip_callfunc
vpip_calltask vpip_calltask
vpip_finished vpip_finished
vpip_init_simulation vpip_init_simulation
vpip_make_iterator vpip_make_iterator
vpip_make_memory vpip_make_memory
vpip_make_net vpip_make_net
vpip_make_number_const vpip_make_number_const
vpip_make_reg vpip_make_reg
vpip_make_scope vpip_make_scope
vpip_make_string_const vpip_make_string_const
vpip_make_time_var vpip_make_time_var
vpip_get_null vpip_get_null
vpip_pair_resolve vpip_pair_resolve
vpip_run_value_changes vpip_run_value_changes
vpip_set_vlog_info vpip_set_vlog_info
vpip_sim_cancel_event vpip_sim_cancel_event
vpip_sim_insert_event vpip_sim_insert_event
vpip_sim_time vpip_sim_time
vpip_get_simulation_obj vpip_get_simulation_obj
vpip_simulation_run vpip_simulation_run
vpip_get_sysfunc_rt vpip_get_sysfunc_rt
vpip_get_systask_rt vpip_get_systask_rt
vpip_time_scale vpip_time_scale

View File

@ -1,7 +1,7 @@
/* /*
* Copyright (c) 2001 Stephen Williams (steve@icarus.com) * Copyright (c) 2001 Stephen Williams (steve@icarus.com)
* *
* $Id: README.txt,v 1.46 2004/06/16 16:33:25 steve Exp $ * $Id: README.txt,v 1.47 2004/10/04 01:10:58 steve Exp $
*/ */
VVP SIMULATION ENGINE VVP SIMULATION ENGINE
@ -167,7 +167,7 @@ are strings which describe input states or edges, and the new output
state. Combinatorial UDPs require one character for each input, and state. Combinatorial UDPs require one character for each input, and
one character at the end for the output state. Sequential UDPs need one character at the end for the output state. Sequential UDPs need
an additional char for the current state, which is the first char of an additional char for the current state, which is the first char of
the row. the row.
Any input transition or the new state must match at most one row (or Any input transition or the new state must match at most one row (or
all matches must provide the same output state). If no row matches, all matches must provide the same output state). If no row matches,
@ -176,7 +176,7 @@ the output becomes 1'bx.
The output state can be specified as "0", "1", or "x". Sequential The output state can be specified as "0", "1", or "x". Sequential
UDPs may also have "-": no change. UDPs may also have "-": no change.
An input or current output state can be An input or current output state can be
"1": 1 "1": 1
"0": 0 "0": 0
@ -192,20 +192,20 @@ replaced by an edge specification. Valid edges are:
"*": (??) "_": (?0) "+": (?1) "%": (?x) "*": (??) "_": (?0) "+": (?1) "%": (?x)
"P": (0?) "r": (01) "Q": (0x) "P": (0?) "r": (01) "Q": (0x)
"N": (1?) "f": (10) "M": (1x) "N": (1?) "f": (10) "M": (1x)
"B": (x?) "F": (x0) "R": (x1) "B": (x?) "F": (x0) "R": (x1)
"n": (1?) | (?0) "n": (1?) | (?0)
"p": (0?) | (?1) "p": (0?) | (?1)
A combinatorial UDP is defined like this: A combinatorial UDP is defined like this:
<type> .udp/comb "<name>", <number>, "<row0>", "<row1>", ... ; <type> .udp/comb "<name>", <number>, "<row0>", "<row1>", ... ;
<type> is a label that identifies the UDP. <number> is the number of <type> is a label that identifies the UDP. <number> is the number of
inputs. "<name>" is there for public identification. Sequential UDPs inputs. "<name>" is there for public identification. Sequential UDPs
need an additional initialization value: need an additional initialization value:
<type> .udp/sequ "<name>", <number>, <init>, "<row0>", "<row1>", ... ; <type> .udp/sequ "<name>", <number>, <init>, "<row0>", "<row1>", ... ;
<init> is the initial value for all instances of the UDP. We do not <init> is the initial value for all instances of the UDP. We do not
provide initial values for individual instances. <init> must be a provide initial values for individual instances. <init> must be a
@ -218,7 +218,7 @@ A UDP functor instance is created so:
Where <label> identifies the functor, <type> is the label of a UDP Where <label> identifies the functor, <type> is the label of a UDP
defined earlier, and <symbol_list> is a list of symbols, one for each defined earlier, and <symbol_list> is a list of symbols, one for each
input of the UDP. input of the UDP.
VARIABLE STATEMENTS: VARIABLE STATEMENTS:
@ -302,7 +302,7 @@ memory's contents.
The pair of numbers <msb>,<lsb> defines the data port width. The pair The pair of numbers <msb>,<lsb> defines the data port width. The pair
<last>,<first> defines the address range. Multiple address ranges are <last>,<first> defines the address range. Multiple address ranges are
allowed for multidimensional indexing. allowed for multidimensional indexing.
Procedural access to the memory references the memory as single array Procedural access to the memory references the memory as single array
of bits. For this purpose, the number of bits in a memory word is of bits. For this purpose, the number of bits in a memory word is
@ -337,7 +337,7 @@ A write port is a superset of a read port. It is a vector of functors
that is wide enough to accept the address bits, an event input, a that is wide enough to accept the address bits, an event input, a
write enable input, and the data inputs. write enable input, and the data inputs.
<label> .mem/port <memid>, <msb>,<lsb>, <aw>, <addr_bits>, <label> .mem/port <memid>, <msb>,<lsb>, <aw>, <addr_bits>,
<event>, <we>, <data> ; <event>, <we>, <data> ;
<event> is an event functor that triggers a write, if the <we> input <event> is an event functor that triggers a write, if the <we> input

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#ifdef HAVE_CVS_IDENT #ifdef HAVE_CVS_IDENT
#ident "$Id: arith.cc,v 1.29 2004/09/22 16:44:07 steve Exp $" #ident "$Id: arith.cc,v 1.30 2004/10/04 01:10:58 steve Exp $"
#endif #endif
# include "arith.h" # include "arith.h"
@ -35,7 +35,7 @@ void vvp_arith_::output_x_(vvp_ipoint_t base, bool push, unsigned val)
for (unsigned idx = 0 ; idx < wid_ ; idx += 1) { for (unsigned idx = 0 ; idx < wid_ ; idx += 1) {
vvp_ipoint_t ptr = ipoint_index(base,idx); vvp_ipoint_t ptr = ipoint_index(base,idx);
functor_t obj = functor_index(ptr); functor_t obj = functor_index(ptr);
obj->put_oval(val, push); obj->put_oval(val, push);
} }
} }
@ -45,10 +45,10 @@ void vvp_arith_::output_val_(vvp_ipoint_t base, bool push, unsigned long sum)
for (unsigned idx = 0 ; idx < wid_ ; idx += 1) { for (unsigned idx = 0 ; idx < wid_ ; idx += 1) {
vvp_ipoint_t ptr = ipoint_index(base,idx); vvp_ipoint_t ptr = ipoint_index(base,idx);
functor_t obj = functor_index(ptr); functor_t obj = functor_index(ptr);
unsigned val = sum & 1; unsigned val = sum & 1;
sum >>= 1; sum >>= 1;
obj->put_oval(val, push); obj->put_oval(val, push);
} }
} }
@ -107,13 +107,13 @@ void vvp_arith_div::set(vvp_ipoint_t i, bool push, unsigned val, unsigned)
for (unsigned idx = 0 ; idx < wid_ ; idx += 1) { for (unsigned idx = 0 ; idx < wid_ ; idx += 1) {
vvp_ipoint_t ptr = ipoint_index(base,idx); vvp_ipoint_t ptr = ipoint_index(base,idx);
functor_t obj = functor_index(ptr); functor_t obj = functor_index(ptr);
unsigned val = obj->ival; unsigned val = obj->ival;
if (val & 0xaa) { if (val & 0xaa) {
output_x_(base, push); output_x_(base, push);
return; return;
} }
if (val & 0x01) if (val & 0x01)
a += 1UL << idx; a += 1UL << idx;
if (val & 0x04) if (val & 0x04)
@ -164,17 +164,17 @@ void vvp_arith_mod::set(vvp_ipoint_t i, bool push, unsigned val, unsigned)
} }
unsigned long a = 0, b = 0; unsigned long a = 0, b = 0;
for (unsigned idx = 0 ; idx < wid_ ; idx += 1) { for (unsigned idx = 0 ; idx < wid_ ; idx += 1) {
vvp_ipoint_t ptr = ipoint_index(base,idx); vvp_ipoint_t ptr = ipoint_index(base,idx);
functor_t obj = functor_index(ptr); functor_t obj = functor_index(ptr);
unsigned val = obj->ival; unsigned val = obj->ival;
if (val & 0xaa) { if (val & 0xaa) {
output_x_(base, push); output_x_(base, push);
return; return;
} }
if (val & 0x01) if (val & 0x01)
a += 1UL << idx; a += 1UL << idx;
if (val & 0x04) if (val & 0x04)
@ -245,9 +245,9 @@ void vvp_arith_mult::wide(vvp_ipoint_t base, bool push)
return; return;
} }
if((a[idx] = ((ival & 0x01) != 0))) mxa=idx+1; if((a[idx] = ((ival & 0x01) != 0))) mxa=idx+1;
if((b[idx] = ((ival & 0x04) != 0))) mxb=idx; if((b[idx] = ((ival & 0x04) != 0))) mxb=idx;
sum[idx] = 0; sum[idx] = 0;
} }
/* do the a*b multiply using the long method we learned in /* do the a*b multiply using the long method we learned in
@ -687,6 +687,9 @@ void vvp_shiftr::set(vvp_ipoint_t i, bool push, unsigned val, unsigned)
/* /*
* $Log: arith.cc,v $ * $Log: arith.cc,v $
* Revision 1.30 2004/10/04 01:10:58 steve
* Clean up spurious trailing white space.
*
* Revision 1.29 2004/09/22 16:44:07 steve * Revision 1.29 2004/09/22 16:44:07 steve
* Fix LPM GE to match LPM GT behavior. * Fix LPM GE to match LPM GT behavior.
* *

View File

@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#ifdef HAVE_CVS_IDENT #ifdef HAVE_CVS_IDENT
#ident "$Id: arith.h,v 1.18 2004/09/22 16:44:07 steve Exp $" #ident "$Id: arith.h,v 1.19 2004/10/04 01:10:58 steve Exp $"
#endif #endif
# include "functor.h" # include "functor.h"
@ -43,7 +43,7 @@ class vvp_arith_ : public functor_s {
class vvp_wide_arith_ : public vvp_arith_ { class vvp_wide_arith_ : public vvp_arith_ {
public: public:
explicit vvp_wide_arith_(unsigned wid); explicit vvp_wide_arith_(unsigned wid);
protected: protected:
static const unsigned pagesize = 8*sizeof(unsigned long); static const unsigned pagesize = 8*sizeof(unsigned long);
@ -169,6 +169,9 @@ class vvp_shiftr : public vvp_arith_ {
/* /*
* $Log: arith.h,v $ * $Log: arith.h,v $
* Revision 1.19 2004/10/04 01:10:58 steve
* Clean up spurious trailing white space.
*
* Revision 1.18 2004/09/22 16:44:07 steve * Revision 1.18 2004/09/22 16:44:07 steve
* Fix LPM GE to match LPM GT behavior. * Fix LPM GE to match LPM GT behavior.
* *

Some files were not shown because too many files have changed in this diff Show More