From 65020bc6de0137f78baede143948b29b9e9495ad Mon Sep 17 00:00:00 2001 From: steve Date: Tue, 16 Jan 2001 02:44:17 +0000 Subject: [PATCH] Use the iosfwd header if available. --- PDelays.h | 13 +++++++++++-- PEvent.h | 7 +++++-- PWire.h | 13 +++++++++++-- configure.in | 9 +++++++-- netlist.h | 12 ++++++++++-- verinum.h | 12 ++++++++++-- verireal.h | 9 ++++++++- vvm/vvm.h | 8 ++++---- vvm/vvm_bit.cc | 30 ++++-------------------------- vvm/vvm_signal.cc | 13 ++++--------- vvm/vvm_signal.h | 7 ++++--- 11 files changed, 78 insertions(+), 55 deletions(-) diff --git a/PDelays.h b/PDelays.h index 6234b55e4..afd7cdcb4 100644 --- a/PDelays.h +++ b/PDelays.h @@ -19,14 +19,20 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) && !defined(macintosh) -#ident "$Id: PDelays.h,v 1.2 2000/02/23 02:56:53 steve Exp $" +#ident "$Id: PDelays.h,v 1.3 2001/01/16 02:44:17 steve Exp $" #endif # include "svector.h" # include + +#ifdef HAVE_IOSFWD +# include +#else +class ostream; +#endif + class Design; class PExpr; -class ostream; /* * Various PForm objects can carry delays. These delays include rise, @@ -60,6 +66,9 @@ ostream& operator << (ostream&o, const PDelays&); /* * $Log: PDelays.h,v $ + * Revision 1.3 2001/01/16 02:44:17 steve + * Use the iosfwd header if available. + * * Revision 1.2 2000/02/23 02:56:53 steve * Macintosh compilers do not support ident. * diff --git a/PEvent.h b/PEvent.h index 800de59f5..9dee9e55a 100644 --- a/PEvent.h +++ b/PEvent.h @@ -19,12 +19,12 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) && !defined(macintosh) -#ident "$Id: PEvent.h,v 1.3 2000/04/09 17:44:30 steve Exp $" +#ident "$Id: PEvent.h,v 1.4 2001/01/16 02:44:18 steve Exp $" #endif # include "LineInfo.h" # include -class ostream; + class Design; class NetScope; @@ -52,6 +52,9 @@ class PEvent : public LineInfo { /* * $Log: PEvent.h,v $ + * Revision 1.4 2001/01/16 02:44:18 steve + * Use the iosfwd header if available. + * * Revision 1.3 2000/04/09 17:44:30 steve * Catch event declarations during scope elaborate. * diff --git a/PWire.h b/PWire.h index d307a66a7..fc995f22e 100644 --- a/PWire.h +++ b/PWire.h @@ -19,14 +19,20 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) && !defined(macintosh) -#ident "$Id: PWire.h,v 1.9 2000/12/11 00:31:43 steve Exp $" +#ident "$Id: PWire.h,v 1.10 2001/01/16 02:44:18 steve Exp $" #endif # include "netlist.h" # include "LineInfo.h" -# include +# include # include "svector.h" + +#ifdef HAVE_IOSFWD +# include +#else class ostream; +#endif + class PExpr; class Design; @@ -86,6 +92,9 @@ class PWire : public LineInfo { /* * $Log: PWire.h,v $ + * Revision 1.10 2001/01/16 02:44:18 steve + * Use the iosfwd header if available. + * * Revision 1.9 2000/12/11 00:31:43 steve * Add support for signed reg variables, * simulate in t-vvm signed comparisons. diff --git a/configure.in b/configure.in index a80bb3dd2..6fb246187 100644 --- a/configure.in +++ b/configure.in @@ -5,10 +5,13 @@ dnl Checks for programs. AC_PROG_CC AC_PROG_CXX AC_CHECK_TOOL(STRIP, strip, true) -AC_CHECK_HEADERS(getopt.h) + +AC_LANG_CPLUSPLUS + +AC_CHECK_HEADERS(getopt.h iosfwd) + AC_CHECK_HEADER(ipal.h, HAVE_IPAL=yes, HAVE_IPAL=) AC_SUBST(HAVE_IPAL) -AC_PROG_INSTALL # -- # Look for a dl library to use. First look for the standard dlopen @@ -23,6 +26,8 @@ AC_CHECK_LIB(dld,shl_load,[DLLIB=-ldld]) fi AC_SUBST(DLLIB) +AC_PROG_INSTALL + AC_CANONICAL_HOST # $host diff --git a/netlist.h b/netlist.h index 77d63df69..2af65bc41 100644 --- a/netlist.h +++ b/netlist.h @@ -19,7 +19,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) && !defined(macintosh) -#ident "$Id: netlist.h,v 1.193 2001/01/06 06:31:58 steve Exp $" +#ident "$Id: netlist.h,v 1.194 2001/01/16 02:44:18 steve Exp $" #endif /* @@ -35,6 +35,12 @@ # include "svector.h" # include "Attrib.h" +#ifdef HAVE_IOSFWD +# include +#else +class ostream; +#endif + class Design; class Link; class Nexus; @@ -44,7 +50,6 @@ class NetProcTop; class NetScope; class NetExpr; class NetESignal; -class ostream; struct target; @@ -2846,6 +2851,9 @@ extern ostream& operator << (ostream&, NetNet::Type); /* * $Log: netlist.h,v $ + * Revision 1.194 2001/01/16 02:44:18 steve + * Use the iosfwd header if available. + * * Revision 1.193 2001/01/06 06:31:58 steve * declaration initialization for time variables. * diff --git a/verinum.h b/verinum.h index e5b683573..c89ea15f5 100644 --- a/verinum.h +++ b/verinum.h @@ -19,11 +19,17 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) && !defined(macintosh) -#ident "$Id: verinum.h,v 1.14 2001/01/02 03:23:40 steve Exp $" +#ident "$Id: verinum.h,v 1.15 2001/01/16 02:44:18 steve Exp $" #endif # include +#ifdef HAVE_IOSFWD +# include +#else +class ostream; +#endif + /* * Numbers in verlog are multibit strings, where each bit has 4 * possible values: 0, 1, x or z. The verinum number is store in @@ -96,7 +102,6 @@ class verinum { }; -class ostream; extern ostream& operator<< (ostream&, const verinum&); extern ostream& operator<< (ostream&, verinum::V); @@ -114,6 +119,9 @@ extern verinum v_not(const verinum&left); /* * $Log: verinum.h,v $ + * Revision 1.15 2001/01/16 02:44:18 steve + * Use the iosfwd header if available. + * * Revision 1.14 2001/01/02 03:23:40 steve * Evaluate constant &, | and unary ~. * diff --git a/verireal.h b/verireal.h index 6668a6c17..c4a3ec14d 100644 --- a/verireal.h +++ b/verireal.h @@ -19,10 +19,14 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) && !defined(macintosh) -#ident "$Id: verireal.h,v 1.3 2000/12/10 22:01:36 steve Exp $" +#ident "$Id: verireal.h,v 1.4 2001/01/16 02:44:18 steve Exp $" #endif +#ifdef HAVE_IOSFWD +# include +#else class ostream; +#endif /* * This class holds a floating point decimal number. The number is @@ -58,6 +62,9 @@ extern ostream& operator<< (ostream&, const verireal&); /* * $Log: verireal.h,v $ + * Revision 1.4 2001/01/16 02:44:18 steve + * Use the iosfwd header if available. + * * Revision 1.3 2000/12/10 22:01:36 steve * Support decimal constants in behavioral delays. * diff --git a/vvm/vvm.h b/vvm/vvm.h index af5a699fb..fc415e793 100644 --- a/vvm/vvm.h +++ b/vvm/vvm.h @@ -19,7 +19,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) && !defined(macintosh) -#ident "$Id: vvm.h,v 1.36 2000/04/10 05:26:06 steve Exp $" +#ident "$Id: vvm.h,v 1.37 2001/01/16 02:44:18 steve Exp $" #endif # include @@ -34,7 +34,6 @@ typedef unsigned vvm_u32; class vvm_event; class vvm_thread; -class ostream; inline vpip_bit_t B_AND(vpip_bit_t l, vpip_bit_t r) @@ -97,8 +96,6 @@ inline vpip_bit_t B_NOT(vpip_bit_t l) extern bool negedge(vpip_bit_t from, vpip_bit_t to); extern bool posedge(vpip_bit_t from, vpip_bit_t to); -extern ostream& b_output (ostream&os, vpip_bit_t); - /* * Verilog events (update events and nonblocking assign) are derived * from this abstract class so that the simulation engine can treat @@ -126,6 +123,9 @@ class vvm_event { /* * $Log: vvm.h,v $ + * Revision 1.37 2001/01/16 02:44:18 steve + * Use the iosfwd header if available. + * * Revision 1.36 2000/04/10 05:26:06 steve * All events now use the NetEvent class. * diff --git a/vvm/vvm_bit.cc b/vvm/vvm_bit.cc index 4707ea5cd..101a9f8c6 100644 --- a/vvm/vvm_bit.cc +++ b/vvm/vvm_bit.cc @@ -17,36 +17,11 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) && !defined(macintosh) -#ident "$Id: vvm_bit.cc,v 1.12 2000/04/10 05:26:07 steve Exp $" +#ident "$Id: vvm_bit.cc,v 1.13 2001/01/16 02:44:18 steve Exp $" #endif # include "vvm.h" -# include -ostream& b_output (ostream&os, vpip_bit_t bit) -{ - if (B_IS0(bit)) { - os << "0"; - return os; - } - - if (B_IS1(bit)) { - os << "1"; - return os; - } - - if (B_ISX(bit)) { - os << "x"; - return os; - } - - if (B_ISZ(bit)) { - os << "z"; - return os; - } - - return os; -} bool negedge(vpip_bit_t from, vpip_bit_t to) { @@ -114,6 +89,9 @@ vpip_bit_t add_with_carry(vpip_bit_t l, vpip_bit_t r, vpip_bit_t&carry) /* * $Log: vvm_bit.cc,v $ + * Revision 1.13 2001/01/16 02:44:18 steve + * Use the iosfwd header if available. + * * Revision 1.12 2000/04/10 05:26:07 steve * All events now use the NetEvent class. * diff --git a/vvm/vvm_signal.cc b/vvm/vvm_signal.cc index f929514a2..6e2c2a30e 100644 --- a/vvm/vvm_signal.cc +++ b/vvm/vvm_signal.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) && !defined(macintosh) -#ident "$Id: vvm_signal.cc,v 1.6 2000/12/12 03:30:25 steve Exp $" +#ident "$Id: vvm_signal.cc,v 1.7 2001/01/16 02:44:18 steve Exp $" #endif # include "vvm_signal.h" @@ -63,14 +63,6 @@ unsigned vvm_bitset_t::as_unsigned() const return result; } -ostream& operator << (ostream&os, const vvm_bitset_t&str) -{ - os << str.get_width() << "b'"; - for (unsigned idx = str.get_width() ; idx > 0 ; idx -= 1) - b_output(os, str.get_bit(idx)); - - return os; -} vvm_signal_t::vvm_signal_t() { @@ -105,6 +97,9 @@ vvm_ram_callback::~vvm_ram_callback() /* * $Log: vvm_signal.cc,v $ + * Revision 1.7 2001/01/16 02:44:18 steve + * Use the iosfwd header if available. + * * Revision 1.6 2000/12/12 03:30:25 steve * out-line vvm_bitset_t methods. * diff --git a/vvm/vvm_signal.h b/vvm/vvm_signal.h index afc4f9c56..b003c542c 100644 --- a/vvm/vvm_signal.h +++ b/vvm/vvm_signal.h @@ -19,12 +19,11 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) && !defined(macintosh) -#ident "$Id: vvm_signal.h,v 1.11 2000/12/15 20:05:16 steve Exp $" +#ident "$Id: vvm_signal.h,v 1.12 2001/01/16 02:44:18 steve Exp $" #endif # include "vvm.h" # include "vvm_nexus.h" -class ostream; /* * The vvm_bitset_t is a reference to an array of vpip_bit_t @@ -57,7 +56,6 @@ class vvm_bitset_t { vvm_bitset_t& operator= (const vvm_bitset_t&); }; -extern ostream& operator << (ostream&os, const vvm_bitset_t&str); /* * The vvm_signal_t template is the real object that handles the @@ -121,6 +119,9 @@ class vvm_memory_t : public __vpiMemory { /* * $Log: vvm_signal.h,v $ + * Revision 1.12 2001/01/16 02:44:18 steve + * Use the iosfwd header if available. + * * Revision 1.11 2000/12/15 20:05:16 steve * Fix memory access in vvm. (PR#70) *