Handle time in more places.

This commit is contained in:
steve 1999-05-31 15:46:36 +00:00
parent ac6e15aeae
commit 49ef36712c
2 changed files with 22 additions and 6 deletions

View File

@ -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 <iostream>
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.
*

View File

@ -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.
*