diff --git a/vvp/vvp_net.cc b/vvp/vvp_net.cc index 27c20c014..2c44bfa5a 100644 --- a/vvp/vvp_net.cc +++ b/vvp/vvp_net.cc @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ -#ident "$Id: vvp_net.cc,v 1.26 2005/04/28 04:59:53 steve Exp $" +#ident "$Id: vvp_net.cc,v 1.27 2005/05/07 03:14:50 steve Exp $" # include "config.h" # include "vvp_net.h" @@ -353,6 +353,14 @@ char* vvp_vector4_t::as_string(char*buf, size_t buf_len) return res; } +ostream& operator<< (ostream&out, vvp_vector4_t&that) +{ + out << that.size() << "'b"; + for (unsigned idx = 0 ; idx < that.size() ; idx += 1) + out << that.value(that.size()-idx-1); + return out; +} + bool vector4_to_value(const vvp_vector4_t&vec, unsigned long&val) { unsigned long res = 0; @@ -1338,6 +1346,9 @@ vvp_bit4_t compare_gtge_signed(const vvp_vector4_t&a, /* * $Log: vvp_net.cc,v $ + * Revision 1.27 2005/05/07 03:14:50 steve + * ostream insert for vvp_vector4_t objects. + * * Revision 1.26 2005/04/28 04:59:53 steve * Remove dead functor code. * diff --git a/vvp/vvp_net.h b/vvp/vvp_net.h index 03746d6a0..2a5759f94 100644 --- a/vvp/vvp_net.h +++ b/vvp/vvp_net.h @@ -18,7 +18,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ -#ident "$Id: vvp_net.h,v 1.24 2005/04/25 04:42:17 steve Exp $" +#ident "$Id: vvp_net.h,v 1.25 2005/05/07 03:14:50 steve Exp $" # include "config.h" # include @@ -109,6 +109,7 @@ class vvp_vector4_t { }; extern vvp_vector4_t operator ~ (const vvp_vector4_t&that); +extern ostream& operator << (ostream&, const vvp_vector4_t&); extern vvp_bit4_t compare_gtge(const vvp_vector4_t&a, const vvp_vector4_t&b, @@ -698,6 +699,9 @@ class vvp_wide_fun_t : public vvp_net_fun_t { /* * $Log: vvp_net.h,v $ + * Revision 1.25 2005/05/07 03:14:50 steve + * ostream insert for vvp_vector4_t objects. + * * Revision 1.24 2005/04/25 04:42:17 steve * vvp_fun_signal eliminates duplicate propagations. *