Add support for %v is the display system task.

Change the encoding of H and L outputs from
 the bufif devices so that they are logic x.
This commit is contained in:
steve
2002-09-06 04:56:28 +00:00
parent 4d090b64bd
commit ea21fab379
6 changed files with 188 additions and 16 deletions
+12 -4
View File
@@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#ifdef HAVE_CVS_IDENT
#ident "$Id: bufif.cc,v 1.8 2002/08/12 01:35:07 steve Exp $"
#ident "$Id: bufif.cc,v 1.9 2002/09/06 04:56:28 steve Exp $"
#endif
# include "bufif.h"
@@ -25,9 +25,12 @@
# include "schedule.h"
# include "statistics.h"
vvp_bufif_s::vvp_bufif_s(bool en_invert, bool out_invert)
vvp_bufif_s::vvp_bufif_s(bool en_invert, bool out_invert,
unsigned str0, unsigned str1)
: pol_(en_invert? 1 : 0), inv_(out_invert? 1 : 0)
{
odrive0 = str0;
odrive1 = str1;
count_functors_bufif += 1;
}
@@ -41,8 +44,8 @@ void vvp_bufif_s::set(vvp_ipoint_t ptr, bool push, unsigned v, unsigned)
unsigned char out0 = 0x00 | (odrive0<<0) | (odrive0<<4);
unsigned char out1 = 0x88 | (odrive1<<0) | (odrive1<<4);
unsigned char outX = 0x80 | (odrive0<<0) | (odrive1<<4);
unsigned char outH = 0x88 | (0) | (odrive1<<4);
unsigned char outL = 0x00 | (odrive0<<0) | (0);
unsigned char outH = 0x80 | (0) | (odrive1<<4);
unsigned char outL = 0x80 | (odrive0<<0) | (0);
unsigned val;
unsigned str;
@@ -98,6 +101,11 @@ void vvp_bufif_s::set(vvp_ipoint_t ptr, bool push, unsigned v, unsigned)
/*
* $Log: bufif.cc,v $
* Revision 1.9 2002/09/06 04:56:28 steve
* Add support for %v is the display system task.
* Change the encoding of H and L outputs from
* the bufif devices so that they are logic x.
*
* Revision 1.8 2002/08/12 01:35:07 steve
* conditional ident string using autoconfig.
*
+8 -2
View File
@@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#ifdef HAVE_CVS_IDENT
#ident "$Id: bufif.h,v 1.5 2002/08/12 01:35:07 steve Exp $"
#ident "$Id: bufif.h,v 1.6 2002/09/06 04:56:29 steve Exp $"
#endif
# include "functor.h"
@@ -27,7 +27,8 @@
class vvp_bufif_s : public functor_s {
public:
vvp_bufif_s(bool en_invert, bool out_invert);
vvp_bufif_s(bool en_invert, bool out_invert,
unsigned str0, unsigned str1);
virtual void set(vvp_ipoint_t i, bool push, unsigned val, unsigned str);
@@ -38,6 +39,11 @@ class vvp_bufif_s : public functor_s {
/*
* $Log: bufif.h,v $
* Revision 1.6 2002/09/06 04:56:29 steve
* Add support for %v is the display system task.
* Change the encoding of H and L outputs from
* the bufif devices so that they are logic x.
*
* Revision 1.5 2002/08/12 01:35:07 steve
* conditional ident string using autoconfig.
*
+10 -5
View File
@@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#ifdef HAVE_CVS_IDENT
#ident "$Id: logic.cc,v 1.11 2002/08/29 03:04:01 steve Exp $"
#ident "$Id: logic.cc,v 1.12 2002/09/06 04:56:29 steve Exp $"
#endif
# include "logic.h"
@@ -92,10 +92,10 @@ void compile_functor(char*label, char*type,
obj = new table_functor_s(ft_BUF, ostr0, ostr1);
} else if (strcmp(type, "BUFIF0") == 0) {
obj = new vvp_bufif_s(true,false);
obj = new vvp_bufif_s(true,false, ostr0, ostr1);
} else if (strcmp(type, "BUFIF1") == 0) {
obj = new vvp_bufif_s(false,false);
obj = new vvp_bufif_s(false,false, ostr0, ostr1);
} else if (strcmp(type, "BUFZ") == 0) {
obj = new table_functor_s(ft_BUFZ, ostr0, ostr1);
@@ -131,10 +131,10 @@ void compile_functor(char*label, char*type,
obj = new table_functor_s(ft_NOT, ostr0, ostr1);
} else if (strcmp(type, "NOTIF0") == 0) {
obj = new vvp_bufif_s(true,true);
obj = new vvp_bufif_s(true,true, ostr0, ostr1);
} else if (strcmp(type, "NOTIF1") == 0) {
obj = new vvp_bufif_s(false,true);
obj = new vvp_bufif_s(false,true, ostr0, ostr1);
} else if (strcmp(type, "XNOR") == 0) {
obj = new table_functor_s(ft_XNOR, ostr0, ostr1);
@@ -167,6 +167,11 @@ void compile_functor(char*label, char*type,
/*
* $Log: logic.cc,v $
* Revision 1.12 2002/09/06 04:56:29 steve
* Add support for %v is the display system task.
* Change the encoding of H and L outputs from
* the bufif devices so that they are logic x.
*
* Revision 1.11 2002/08/29 03:04:01 steve
* Generate x out for x select on wide muxes.
*
+7 -1
View File
@@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#ifdef HAVE_CVS_IDENT
#ident "$Id: resolv.cc,v 1.14 2002/08/12 01:35:08 steve Exp $"
#ident "$Id: resolv.cc,v 1.15 2002/09/06 04:56:29 steve Exp $"
#endif
# include "resolv.h"
@@ -35,6 +35,7 @@
# define STREN1(v) ( ((v)&0x80)? ((v)&0xf0) : (0x70 - ((v)&0xf0)) )
# define STREN0(v) ( ((v)&0x08)? ((v)&0x0f) : (0x07 - ((v)&0x0f)) )
# include <iostream>
static unsigned blend(unsigned a, unsigned b)
{
if (a == HiZ)
@@ -203,6 +204,11 @@ void resolv_functor_s::debug_print(vvp_ipoint_t fnc)
/*
* $Log: resolv.cc,v $
* Revision 1.15 2002/09/06 04:56:29 steve
* Add support for %v is the display system task.
* Change the encoding of H and L outputs from
* the bufif devices so that they are logic x.
*
* Revision 1.14 2002/08/12 01:35:08 steve
* conditional ident string using autoconfig.
*
+48 -1
View File
@@ -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.46 2002/08/12 01:35:09 steve Exp $"
#ident "$Id: vpi_signal.cc,v 1.47 2002/09/06 04:56:29 steve Exp $"
#endif
/*
@@ -378,6 +378,48 @@ static void signal_get_value(vpiHandle ref, s_vpi_value*vp)
break;
}
case vpiStrengthVal: {
s_vpi_strengthval*op = (s_vpi_strengthval*)
need_result_buf(wid * sizeof(s_vpi_strengthval),
RBUF_VAL);
/* Convert the internal strength values of each
functor in the vector to a PLI2.0 version. */
for (unsigned idx = 0 ; idx < wid ; idx += 1) {
vvp_ipoint_t fptr = vvp_fvector_get(rfp->bits, idx);
functor_t fp = functor_index(fptr);
unsigned str = fp->get_ostr();
unsigned s0 = 1 << (str&0x07);
unsigned s1 = 1 << ((str>>4) & 0x07);
switch (fp->get()) {
case 0:
op[idx].logic = vpi0;
op[idx].s0 = s0|s1;
op[idx].s1 = 0;
break;
case 1:
op[idx].logic = vpi1;
op[idx].s0 = 0;
op[idx].s1 = s0|s1;
break;
case 2:
op[idx].logic = vpiX;
op[idx].s0 = s0;
op[idx].s1 = s1;
break;
case 3:
op[idx].logic = vpiZ;
op[idx].s0 = vpiHiZ;
op[idx].s1 = vpiHiZ;
break;
}
}
break;
}
default:
fprintf(stderr, "vvp internal error: signal_get_value: "
"value type %u not implemented.\n", vp->format);
@@ -673,6 +715,11 @@ vpiHandle vpip_make_net(const char*name, int msb, int lsb,
/*
* $Log: vpi_signal.cc,v $
* Revision 1.47 2002/09/06 04:56:29 steve
* Add support for %v is the display system task.
* Change the encoding of H and L outputs from
* the bufif devices so that they are logic x.
*
* Revision 1.46 2002/08/12 01:35:09 steve
* conditional ident string using autoconfig.
*