From 49ef36712c09cec7c70cddad3f9665aefb972749 Mon Sep 17 00:00:00 2001 From: steve Date: Mon, 31 May 1999 15:46:36 +0000 Subject: [PATCH] Handle time in more places. --- vvm/display.cc | 21 ++++++++++++++++----- vvm/vvm_calltf.cc | 7 ++++++- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/vvm/display.cc b/vvm/display.cc index 0c07ed1a2..5cc479ebb 100644 --- a/vvm/display.cc +++ b/vvm/display.cc @@ -17,16 +17,20 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) -#ident "$Id: display.cc,v 1.4 1999/05/12 04:02:17 steve Exp $" +#ident "$Id: display.cc,v 1.5 1999/05/31 15:46:36 steve Exp $" #endif # include "vvm.h" # include "vvm_calltf.h" # include -static void format_hex(ostream&os, class vvm_calltf_parm*parm) +static void format_hex(vvm_simulation*sim, ostream&os, + class vvm_calltf_parm*parm) { switch (parm->type()) { + case vvm_calltf_parm::TIME: + os << sim->get_sim_time(); + break; case vvm_calltf_parm::NONE: os << "z"; break; @@ -45,9 +49,13 @@ static void format_hex(ostream&os, class vvm_calltf_parm*parm) break; } } -static void format_bit(ostream&os, class vvm_calltf_parm*parm) +static void format_bit(vvm_simulation*sim, ostream&os, + class vvm_calltf_parm*parm) { switch (parm->type()) { + case vvm_calltf_parm::TIME: + os << (sim->get_sim_time()&1); + break; case vvm_calltf_parm::NONE: os << "z"; break; @@ -127,14 +135,14 @@ static unsigned format(vvm_simulation*sim, const string&str, switch (str[idx]) { case 'b': case 'B': - format_bit(cout, parms+next_parm); + format_bit(sim, cout, parms+next_parm); next_parm += 1; break; case 'x': case 'X': case 'h': case 'H': - format_hex(cout, parms+next_parm); + format_hex(sim, cout, parms+next_parm); next_parm += 1; break; case 'd': @@ -236,6 +244,9 @@ void Smonitor(vvm_simulation*sim, const string&name, /* * $Log: display.cc,v $ + * Revision 1.5 1999/05/31 15:46:36 steve + * Handle time in more places. + * * Revision 1.4 1999/05/12 04:02:17 steve * Add %x support contributed by Steve Wilson. * diff --git a/vvm/vvm_calltf.cc b/vvm/vvm_calltf.cc index b81f3399d..450d7fdc1 100644 --- a/vvm/vvm_calltf.cc +++ b/vvm/vvm_calltf.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) -#ident "$Id: vvm_calltf.cc,v 1.1 1998/11/09 23:44:10 steve Exp $" +#ident "$Id: vvm_calltf.cc,v 1.2 1999/05/31 15:46:36 steve Exp $" #endif # include "vvm_calltf.h" @@ -155,6 +155,8 @@ void vvm_calltask(vvm_simulation*sim, const string&fname, case vvm_calltf_parm::BITS: cout << *parms[idx].as_bits(); break; + case vvm_calltf_parm::TIME: + break; } } cout << ")" << endl; @@ -162,6 +164,9 @@ void vvm_calltask(vvm_simulation*sim, const string&fname, /* * $Log: vvm_calltf.cc,v $ + * Revision 1.2 1999/05/31 15:46:36 steve + * Handle time in more places. + * * Revision 1.1 1998/11/09 23:44:10 steve * Add vvm library. *