vpiStringVal does not include leading nulls.
This commit is contained in:
parent
72f9dc5094
commit
a4c5ff0bd3
|
|
@ -17,7 +17,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#ifdef HAVE_CVS_IDENT
|
||||
#ident "$Id: vpi_signal.cc,v 1.59 2004/02/19 21:31:59 steve Exp $"
|
||||
#ident "$Id: vpi_signal.cc,v 1.60 2004/02/20 01:52:25 steve Exp $"
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
|
@ -216,8 +216,13 @@ static char *signal_vpiStringVal(struct __vpiSignal*rfp, s_vpi_value*vp)
|
|||
}
|
||||
|
||||
if ((bitnr&7)==0){
|
||||
*cp++ = tmp? tmp : ' ';
|
||||
tmp = 0;
|
||||
/* Skip leading nulls. */
|
||||
if (tmp == 0 && cp == rbuf)
|
||||
continue;
|
||||
|
||||
/* Nulls in the middle get turned into spaces. */
|
||||
*cp++ = tmp? tmp : ' ';
|
||||
tmp = 0;
|
||||
}
|
||||
}
|
||||
*cp++ = 0;
|
||||
|
|
@ -845,6 +850,9 @@ vpiHandle vpip_make_net(const char*name, int msb, int lsb,
|
|||
|
||||
/*
|
||||
* $Log: vpi_signal.cc,v $
|
||||
* Revision 1.60 2004/02/20 01:52:25 steve
|
||||
* vpiStringVal does not include leading nulls.
|
||||
*
|
||||
* Revision 1.59 2004/02/19 21:31:59 steve
|
||||
* vpiStringVal writes need to set all the bits of a reg.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#ifdef HAVE_CVS_IDENT
|
||||
#ident "$Id: vpi_vthr_vector.cc,v 1.18 2003/06/17 19:17:42 steve Exp $"
|
||||
#ident "$Id: vpi_vthr_vector.cc,v 1.19 2004/02/20 01:52:25 steve Exp $"
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
|
@ -146,8 +146,13 @@ static void vthr_vec_StringVal(struct __vpiVThrVec*rfp, s_vpi_value*vp)
|
|||
}
|
||||
|
||||
if ((bitnr&7)==0){
|
||||
*cp++ = tmp? tmp : ' ';
|
||||
tmp = 0;
|
||||
// Don't including leading nulls
|
||||
if (tmp == 0 && cp == rbuf)
|
||||
continue;
|
||||
|
||||
// Translated embedded nulls to space.
|
||||
*cp++ = tmp? tmp : ' ';
|
||||
tmp = 0;
|
||||
}
|
||||
}
|
||||
*cp++ = 0;
|
||||
|
|
@ -519,6 +524,9 @@ vpiHandle vpip_make_vthr_word(unsigned base, const char*type)
|
|||
|
||||
/*
|
||||
* $Log: vpi_vthr_vector.cc,v $
|
||||
* Revision 1.19 2004/02/20 01:52:25 steve
|
||||
* vpiStringVal does not include leading nulls.
|
||||
*
|
||||
* Revision 1.18 2003/06/17 19:17:42 steve
|
||||
* Remove short int restrictions from vvp opcodes.
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in New Issue