Permalink
Browse files

Merge branch 'master' into work2

Conflicts:
	elab_scope.cc
	net_nex_input.cc
	t-dll-api.cc
	vvp/parse.y
  • Loading branch information...
2 parents 8aa2ba8 + 13b8dcc commit 16e1570737c68947c9c31790888ffc9650f30ade @steveicarus steveicarus committed Nov 28, 2010
Showing with 1,479 additions and 1,028 deletions.
  1. +3 −3 HName.h
  2. +7 −4 Makefile.in
  3. +1 −2 Module.cc
  4. +9 −8 PExpr.cc
  5. +3 −0 PGate.h
  6. +1 −1 StringHeap.cc
  7. +1 −1 cadpli/cadpli.c
  8. +10 −1 configure.in
  9. +3 −0 cppcheck.sup
  10. +7 −7 cprop.cc
  11. +16 −7 design_dump.cc
  12. +5 −6 driver/main.c
  13. +1 −1 driver/substit.c
  14. +46 −33 elab_expr.cc
  15. +1 −3 elab_lval.cc
  16. +2 −1 elab_pexpr.cc
  17. +25 −27 elab_scope.cc
  18. +35 −20 elab_sig.cc
  19. +24 −22 elaborate.cc
  20. +10 −10 emit.cc
  21. +1 −1 eval_attrib.cc
  22. +590 −403 eval_tree.cc
  23. +7 −8 expr_synth.cc
  24. +4 −4 functor.cc
  25. +2 −1 iverilog-vpi.sh
  26. +8 −13 ivl_assert.h
  27. +1 −1 ivlpp/lexor.lex
  28. +1 −1 ivlpp/main.c
  29. +6 −0 lexor_keyword.gperf
  30. +1 −1 libveriuser/a_vcl.c
  31. +1 −1 libveriuser/veriusertfs.c
  32. +1 −1 libveriuser/workarea.c
  33. +2 −3 load_module.cc
  34. +16 −20 main.cc
  35. +8 −8 net_design.cc
  36. +4 −5 net_event.cc
  37. +1 −1 net_link.cc
  38. +35 −21 net_nex_input.cc
  39. +4 −4 net_nex_output.cc
  40. +1 −1 net_tran.cc
  41. +6 −3 netlist.h
  42. +7 −7 netmisc.cc
  43. +4 −0 netmisc.h
  44. +3 −3 nodangle.cc
  45. +4 −4 parse.y
  46. +13 −21 pform.cc
  47. +2 −2 pform_disciplines.cc
  48. +25 −29 pform_dump.cc
  49. +12 −25 set_width.cc
  50. +7 −8 syn-rules.y
  51. +24 −29 synth2.cc
  52. +1 −1 t-dll-analog.cc
  53. +2 −2 t-dll-api.cc
  54. +1 −1 t-dll-expr.cc
  55. +1 −1 t-dll-proc.cc
  56. +7 −7 t-dll.cc
  57. +7 −7 target.cc
  58. +1 −1 tgt-fpga/d-generic-edif.c
  59. +1 −1 tgt-fpga/edif.c
  60. +1 −1 tgt-fpga/mangle.c
  61. +1 −1 tgt-fpga/xilinx.c
  62. +1 −1 tgt-pal/emit_jed.c
  63. +1 −1 tgt-pal/fit_log.c
  64. +1 −1 tgt-pal/imain.c
  65. +1 −1 tgt-stub/stub.c
  66. +87 −19 tgt-vvp/draw_net_input.c
  67. +1 −1 tgt-vvp/draw_vpi.c
  68. +1 −1 tgt-vvp/eval_expr.c
  69. +1 −2 tgt-vvp/eval_real.c
  70. +1 −1 tgt-vvp/modpath.c
  71. +2 −2 tgt-vvp/vvp_scope.c
  72. +1 −1 verinum.cc
  73. +2 −2 verinum.h
  74. +2 −1 vpi/Makefile.in
  75. +41 −0 vpi/cppcheck.sup
  76. +120 −97 vpi/fstapi.c
  77. +2 −2 vpi/fstapi.h
  78. +2 −2 vpi/lxt_write.c
  79. +38 −12 vpi/sdf_lexor.lex
  80. +47 −6 vpi/sdf_parse.y
  81. +2 −2 vpi/sdf_parse_priv.h
  82. +1 −1 vpi/stringheap.c
  83. +1 −1 vpi/sys_display.c
  84. +1 −1 vpi/sys_fileio.c
  85. +1 −1 vpi/sys_fst.c
  86. +1 −1 vpi/sys_lxt.c
  87. +1 −1 vpi/sys_lxt2.c
  88. +1 −1 vpi/sys_priv.c
  89. +1 −1 vpi/sys_random_mti.c
  90. +1 −1 vpi/sys_readmem.c
  91. +1 −1 vpi/sys_scanf.c
  92. +4 −2 vpi/sys_vcd.c
  93. +1 −1 vpi/v2005_math.c
  94. +1 −1 vpi/va_math.c
  95. +1 −1 vpi_user.h
  96. +1 −1 vvp/array.cc
  97. +3 −2 vvp/compile.cc
  98. +3 −3 vvp/delay.cc
  99. +6 −6 vvp/island_tran.cc
  100. +1 −1 vvp/lexor.lex
  101. +1 −1 vvp/main.cc
  102. +1 −1 vvp/parse.y
  103. +1 −1 vvp/parse_misc.cc
  104. +1 −1 vvp/stop.cc
  105. +4 −4 vvp/udp.cc
  106. +1 −1 vvp/ufunc.cc
  107. +1 −1 vvp/vpi_const.cc
  108. +1 −1 vvp/vpi_event.cc
  109. +1 −1 vvp/vpi_iter.cc
  110. +1 −1 vvp/vpi_mcd.cc
  111. +1 −1 vvp/vpi_modules.cc
  112. +0 −2 vvp/vpi_priv.cc
  113. +1 −1 vvp/vpi_real.cc
  114. +6 −3 vvp/vpi_scope.cc
  115. +18 −1 vvp/vpi_signal.cc
  116. +1 −1 vvp/vpi_tasks.cc
  117. +2 −2 vvp/vpi_vthr_vector.cc
  118. +1 −1 vvp/vpip_to_dec.cc
  119. +1 −1 vvp/vthread.cc
  120. +1 −1 vvp/vvp_island.cc
  121. +2 −5 vvp/vvp_net.cc
  122. +12 −3 vvp/vvp_net.h
  123. +1 −1 vvp/vvp_net_sig.cc
View
@@ -1,7 +1,7 @@
#ifndef __HName_H
#define __HName_H
/*
- * Copyright (c) 2001-2008 Stephen Williams (steve@icarus.com)
+ * Copyright (c) 2001-2010 Stephen Williams (steve@icarus.com)
*
* This source code is free software; you can redistribute it
* and/or modify it in source code form under the terms of the GNU
@@ -94,10 +94,10 @@ inline ostream& operator<< (ostream&out, const list<hname_t>&ll)
{
list<hname_t>::const_iterator cur = ll.begin();
out << *cur;
- cur ++;
+ ++ cur;
while (cur != ll.end()) {
out << "." << *cur;
- cur ++;
+ ++ cur;
}
return out;
}
View
@@ -83,7 +83,8 @@ INCLUDE_PATH = -I. -I$(srcdir)
endif
CPPFLAGS = @DEFS@ $(INCLUDE_PATH) @CPPFLAGS@
-CXXFLAGS = @WARNING_FLAGS@ @CXXFLAGS@
+CFLAGS = @WARNING_FLAGS@ @CFLAGS@
+CXXFLAGS = @WARNING_FLAGS@ @WARNING_FLAGS_CXX@ @CXXFLAGS@
PICFLAGS = @PICFLAG@
LDFLAGS = @rdynamic@ @LDFLAGS@
@@ -157,12 +158,13 @@ endif
rm -rf autom4te.cache
cppcheck: $(O:.o=.cc) $(srcdir)/dosify.c $(srcdir)/version.c
- cppcheck --enable=all -f $(INCLUDE_PATH) $^
+ cppcheck --enable=all -f --suppressions $(srcdir)/cppcheck.sup \
+ $(INCLUDE_PATH) $^
cppcheck-all:
$(foreach dir,$(SUBDIRS),$(MAKE) -C $(dir) cppcheck && ) true
$(foreach dir,$(NOTUSED),$(MAKE) -C $(dir) cppcheck && ) true
- cppcheck
+ $(MAKE) cppcheck
Makefile: $(srcdir)/Makefile.in config.status
./config.status --file=$@
@@ -210,7 +212,8 @@ iverilog-vpi: $(srcdir)/iverilog-vpi.sh Makefile
-e 's;@SUFFIX@;$(suffix);' \
-e 's;@IVCC@;$(CC);' \
-e 's;@IVCXX@;$(CXX);' \
- -e 's;@IVCFLAGS@;$(CXXFLAGS);' \
+ -e 's;@IVCFLAGS@;$(CFLAGS);' \
+ -e 's;@IVCXXFLAGS@;$(CXXFLAGS);' \
-e 's;@INCLUDEDIR@;$(includedir);' \
-e 's;@LIBDIR@;@libdir@;' $< > $@
chmod +x $@
View
@@ -93,8 +93,7 @@ unsigned Module::find_port(const char*name) const
PGate* Module::get_gate(perm_string name)
{
for (list<PGate*>::iterator cur = gates_.begin()
- ; cur != gates_.end()
- ; cur ++ ) {
+ ; cur != gates_.end() ; ++ cur ) {
if ((*cur)->get_name() == name)
return *cur;
View
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998-2008,2010 Stephen Williams <steve@icarus.com>
+ * Copyright (c) 1998-2010 Stephen Williams <steve@icarus.com>
*
* This source code is free software; you can redistribute it
* and/or modify it in source code form under the terms of the GNU
@@ -39,7 +39,7 @@ PExpr::~PExpr()
{
}
-void PExpr::declare_implicit_nets(LexicalScope*scope, NetNet::Type type)
+void PExpr::declare_implicit_nets(LexicalScope*, NetNet::Type)
{
}
@@ -53,18 +53,19 @@ bool PExpr::is_the_same(const PExpr*that) const
return typeid(this) == typeid(that);
}
-NetNet* PExpr::elaborate_lnet(Design*des, NetScope*) const
+NetNet* PExpr::elaborate_lnet(Design*, NetScope*) const
{
- cerr << get_fileline() << ": error: expression not valid in assign l-value: "
- << *this << endl;
+ cerr << get_fileline() << ": error: "
+ << "expression not valid in assign l-value: "
+ << *this << endl;
return 0;
}
-NetNet* PExpr::elaborate_bi_net(Design*des, NetScope*) const
+NetNet* PExpr::elaborate_bi_net(Design*, NetScope*) const
{
cerr << get_fileline() << ": error: "
- << "expression not valid as argument to inout port: "
- << *this << endl;
+ << "expression not valid as argument to inout port: "
+ << *this << endl;
return 0;
}
View
@@ -241,7 +241,10 @@ class PGModule : public PGate {
void elaborate_scope_mod_(Design*des, Module*mod, NetScope*sc) const;
void elaborate_scope_mod_instances_(Design*des, Module*mod, NetScope*sc) const;
bool elaborate_sig_mod_(Design*des, NetScope*scope, Module*mod) const;
+ // Not currently used.
+#if 0
bool elaborate_sig_udp_(Design*des, NetScope*scope, PUdp*udp) const;
+#endif
NetNet*resize_net_to_port_(Design*des, NetScope*scope,
NetNet*sig, unsigned port_wid,
View
@@ -18,10 +18,10 @@
*/
# include "StringHeap.h"
-# include "ivl_alloc.h"
# include <cstdlib>
# include <cstring>
# include <cassert>
+# include "ivl_alloc.h"
#ifdef CHECK_WITH_VALGRIND
static char **string_pool = NULL;
View
@@ -17,14 +17,14 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
-# include "ivl_alloc.h"
# include <vpi_user.h>
# include <veriuser.h>
# include <stdlib.h>
# include <string.h>
# include <assert.h>
# include "config.h"
# include "ivl_dlfcn.h"
+# include "ivl_alloc.h"
typedef void* (*funcvp)(void);
View
@@ -69,9 +69,18 @@ AC_SUBST(DEPENDENCY_FLAG, [-xMMD])
AC_SUBST(WARNING_FLAGS, [""])
AC_SUBST(WARNING_FLAGS_CXX, [""])
else
+# Check to see if -Wextra is supported.
+iverilog_temp_cflags="$CFLAGS"
+CFLAGS="-Wextra $CFLAGS"
+AC_MSG_CHECKING(if gcc supports -Wextra)
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
+ [[iverilog_wextra_flag="-Wextra";] AC_MSG_RESULT(yes)],
+ [[iverilog_wextra_flag="-W";] AC_MSG_RESULT(no)])
+CFLAGS="$iverilog_temp_cflags"
+
AC_SUBST(DEPENDENCY_FLAG, [-MD])
AC_SUBST(WARNING_FLAGS, ["-Wall -Wshadow"])
-AC_SUBST(WARNING_FLAGS_CXX, ["-Wextra"])
+AC_SUBST(WARNING_FLAGS_CXX, ["$iverilog_wextra_flag"])
fi
AC_LANG(C++)
View
@@ -0,0 +1,3 @@
+// These are correct and are used to find the base (zero) pin.
+thisSubtraction:netlist.h:4119
+thisSubtraction:netlist.h:4128
View
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998-2009 Stephen Williams (steve@icarus.com)
+ * Copyright (c) 1998-2010 Stephen Williams (steve@icarus.com)
*
* This source code is free software; you can redistribute it
* and/or modify it in source code form under the terms of the GNU
@@ -48,11 +48,11 @@ struct cprop_functor : public functor_t {
virtual void lpm_mux(Design*des, NetMux*obj);
};
-void cprop_functor::signal(Design*des, NetNet*obj)
+void cprop_functor::signal(Design*, NetNet*)
{
}
-void cprop_functor::lpm_add_sub(Design*des, NetAddSub*obj)
+void cprop_functor::lpm_add_sub(Design*, NetAddSub*)
{
}
@@ -70,11 +70,11 @@ void cprop_functor::lpm_compare(Design*des, NetCompare*obj)
}
}
-void cprop_functor::lpm_compare_eq_(Design*des, NetCompare*obj)
+void cprop_functor::lpm_compare_eq_(Design*, NetCompare*)
{
}
-void cprop_functor::lpm_ff(Design*des, NetFF*obj)
+void cprop_functor::lpm_ff(Design*, NetFF*obj)
{
// Look for and count unlinked FF outputs. Note that if the
// Data and Q pins are connected together, they can be removed
@@ -91,7 +91,7 @@ void cprop_functor::lpm_ff(Design*des, NetFF*obj)
}
}
-void cprop_functor::lpm_logic(Design*des, NetLogic*obj)
+void cprop_functor::lpm_logic(Design*, NetLogic*)
{
}
@@ -167,7 +167,7 @@ struct nexus_info_s {
unsigned out;
};
-void cprop_dc_functor::lpm_const(Design*des, NetConst*obj)
+void cprop_dc_functor::lpm_const(Design*, NetConst*obj)
{
// 'bz constant values drive high impedance to whatever is
// connected to it. In other words, it is a noop. But that is
View
@@ -1115,7 +1115,7 @@ void NetScope::dump(ostream&o) const
{
map<perm_string,param_expr_t>::const_iterator pp;
for (pp = parameters.begin()
- ; pp != parameters.end() ; pp ++) {
+ ; pp != parameters.end() ; ++ pp ) {
o << " parameter ";
o << pp->second.type << " ";
@@ -1165,7 +1165,7 @@ void NetScope::dump(ostream&o) const
}
for (pp = localparams.begin()
- ; pp != localparams.end() ; pp ++) {
+ ; pp != localparams.end() ; ++ pp ) {
o << " localparam " << (*pp).first << " = " <<
*(*pp).second.expr << ";" << endl;
}
@@ -1175,7 +1175,7 @@ void NetScope::dump(ostream&o) const
{
list<pair<pform_name_t,NetExpr*> >::const_iterator pp;
for (pp = defparams.begin()
- ; pp != defparams.end() ; pp ++ ) {
+ ; pp != defparams.end() ; ++ pp ) {
o << " defparam " << (*pp).first << " = " <<
*(*pp).second << ";" << endl;
}
@@ -1184,7 +1184,7 @@ void NetScope::dump(ostream&o) const
{
list<pair<list<hname_t>,NetExpr*> >::const_iterator pp;
for (pp = defparams_later.begin()
- ; pp != defparams_later.end() ; pp ++ ) {
+ ; pp != defparams_later.end() ; ++ pp ) {
o << " defparam(later) " << pp->first << " = " <<
*(pp->second) << ";" << endl;
}
@@ -1223,7 +1223,7 @@ void NetScope::dump(ostream&o) const
// Dump specparams
typedef map<perm_string,spec_val_t>::const_iterator specparam_it_t;
for (specparam_it_t cur = specparams.begin()
- ; cur != specparams.end() ; cur ++ ) {
+ ; cur != specparams.end() ; ++ cur ) {
o << " specparam " << (*cur).first
<< " = ";
spec_val_t value = (*cur).second;
@@ -1260,7 +1260,7 @@ void NetScope::dump(ostream&o) const
/* Dump any sub-scopes. */
for (map<hname_t,NetScope*>::const_iterator cur = children_.begin()
- ; cur != children_.end() ; cur ++)
+ ; cur != children_.end() ; ++ cur )
cur->second->dump(o);
}
@@ -1345,6 +1345,9 @@ void NetEBinary::dump(ostream&o) const
case 'a':
o << "&&";
break;
+ case 'A':
+ o << "~&";
+ break;
case 'E':
o << "===";
break;
@@ -1530,12 +1533,18 @@ void NetEUFunc::dump(ostream&o) const
void NetEUnary::dump(ostream&o) const
{
switch (op_) {
+ case 'A':
+ o << "~&";
+ break;
case 'm':
o << "abs";
break;
case 'N':
o << "~|";
break;
+ case 'X':
+ o << "~^";
+ break;
default:
o << op_;
break;
@@ -1550,7 +1559,7 @@ void Design::dump(ostream&o) const
o << "DESIGN TIME PRECISION: 10e" << get_precision() << endl;
o << "SCOPES:" << endl;
for (list<NetScope*>::const_iterator scope = root_scopes_.begin();
- scope != root_scopes_.end(); scope++)
+ scope != root_scopes_.end(); ++ scope )
(*scope)->dump(o);
o << "ELABORATED NODES:" << endl;
View
@@ -50,7 +50,6 @@ const char HELP[] =
#define MAXSIZE 4096
-#include "ivl_alloc.h"
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
@@ -64,11 +63,13 @@ const char HELP[] =
#endif
#ifdef __MINGW32__
-#include <windows.h>
+# include <windows.h>
+# include <io.h>
#ifdef HAVE_LIBIBERTY_H
-#include <libiberty.h>
+# include <libiberty.h>
#endif
#endif
+#include <fcntl.h>
#if HAVE_GETOPT_H
#include <getopt.h>
@@ -94,6 +95,7 @@ extern const char*optarg;
# include "globals.h"
#include "cfparse_misc.h" /* cfparse() */
+#include "ivl_alloc.h"
#ifdef __MINGW32__
const char sep = '\\';
@@ -211,8 +213,6 @@ char *get_cmd_file()
}
#ifdef __MINGW32__
-# include <io.h>
-# include <fcntl.h>
static FILE*fopen_safe(const char*path)
{
FILE*file = 0;
@@ -225,7 +225,6 @@ static FILE*fopen_safe(const char*path)
return file;
}
#else
-# include <fcntl.h>
static FILE*fopen_safe(const char*path)
{
FILE*file = 0;
View
@@ -17,10 +17,10 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
-# include "ivl_alloc.h"
# include <string.h>
# include <stdlib.h>
# include <stdio.h>
+# include "ivl_alloc.h"
char* substitutions(const char*str)
Oops, something went wrong.

0 comments on commit 16e1570

Please sign in to comment.