From fd0f618529dbde8b463ac6180fcc1e2e15aed5c9 Mon Sep 17 00:00:00 2001 From: steve Date: Tue, 12 Dec 2000 03:30:25 +0000 Subject: [PATCH] out-line vvm_bitset_t methods. --- vvm/vvm_signal.cc | 16 +++++++++++++++- vvm/vvm_signal.h | 11 ++++++----- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/vvm/vvm_signal.cc b/vvm/vvm_signal.cc index eb6f6cce1..f929514a2 100644 --- a/vvm/vvm_signal.cc +++ b/vvm/vvm_signal.cc @@ -17,12 +17,17 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) && !defined(macintosh) -#ident "$Id: vvm_signal.cc,v 1.5 2000/04/26 18:35:12 steve Exp $" +#ident "$Id: vvm_signal.cc,v 1.6 2000/12/12 03:30:25 steve Exp $" #endif # include "vvm_signal.h" # include +vvm_bitset_t::vvm_bitset_t(vpip_bit_t*b, unsigned nb) +: bits(b), nbits(nb) +{ +} + vvm_bitset_t::~vvm_bitset_t() { } @@ -33,6 +38,12 @@ vpip_bit_t&vvm_bitset_t::operator[] (unsigned idx) return bits[idx]; } +vpip_bit_t vvm_bitset_t::operator[] (unsigned idx) const +{ + assert(idx < nbits); + return bits[idx]; +} + vpip_bit_t vvm_bitset_t::get_bit(unsigned idx) const { assert(idx < nbits); @@ -94,6 +105,9 @@ vvm_ram_callback::~vvm_ram_callback() /* * $Log: vvm_signal.cc,v $ + * Revision 1.6 2000/12/12 03:30:25 steve + * out-line vvm_bitset_t methods. + * * Revision 1.5 2000/04/26 18:35:12 steve * Handle assigning small values to big registers. * diff --git a/vvm/vvm_signal.h b/vvm/vvm_signal.h index e76a1f6d7..ce7b9b053 100644 --- a/vvm/vvm_signal.h +++ b/vvm/vvm_signal.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_signal.h,v 1.9 2000/04/26 18:35:12 steve Exp $" +#ident "$Id: vvm_signal.h,v 1.10 2000/12/12 03:30:25 steve Exp $" #endif # include "vvm.h" @@ -37,12 +37,10 @@ class ostream; class vvm_bitset_t { public: - explicit vvm_bitset_t(vpip_bit_t*b, unsigned nb) - : bits(b), nbits(nb) { } - + explicit vvm_bitset_t(vpip_bit_t*b, unsigned nb); ~vvm_bitset_t(); - vpip_bit_t operator[] (unsigned idx) const { return get_bit(idx); } + vpip_bit_t operator[] (unsigned idx) const; vpip_bit_t&operator[] (unsigned idx); unsigned get_width() const { return nbits; } @@ -154,6 +152,9 @@ class vvm_memory_t : public __vpiMemory { /* * $Log: vvm_signal.h,v $ + * Revision 1.10 2000/12/12 03:30:25 steve + * out-line vvm_bitset_t methods. + * * Revision 1.9 2000/04/26 18:35:12 steve * Handle assigning small values to big registers. *