Compile out the T<...> format in vvp.

This ifdef's the code out. Leave it in place for a little longer
for reference.
This commit is contained in:
Stephen Williams 2014-01-06 20:36:26 -08:00
parent 4820d46353
commit ec6009dd8f
4 changed files with 31 additions and 27 deletions

View File

@ -856,17 +856,6 @@ or &A<>/&PV<> select. The third form retrieves the <base> from thread
space using <twid> bits starting at <tbase>. The base value may be space using <twid> bits starting at <tbase>. The base value may be
signed or unsigned. signed or unsigned.
* The T<> argument
This is the catch-all for arguments that are not otherwise
handled. This references the bits directly in the thread. The format
is:
T '<' <base>, <wid>, <su> '>'
The <base> and <wid> are the base of a vector value in the thread and
the width of the vector. The <su> is 's' or 'u' for signed or unsigned.
TRUTH TABLES TRUTH TABLES
The logic that a functor represents is expressed as a truth table. The The logic that a functor represents is expressed as a truth table. The

View File

@ -536,7 +536,14 @@ bool vpi_handle_resolv_list_s::resolve(bool mes)
unsigned base, wid; unsigned base, wid;
unsigned n = 0; unsigned n = 0;
char ss[32]; char ss[32];
if (2 <= sscanf(label(), "T<%u,%u>%n", &base, &wid, &n) if (2 == sscanf(label(), "W<%u,%[r]>%n", &base, ss, &n)
&& n == strlen(label())) {
val.ptr = vpip_make_vthr_word(base, ss);
sym_set_value(sym_vpi, label(), val);
#if 0
// The T<...> forms are obsolete.
} else if (2 <= sscanf(label(), "T<%u,%u>%n", &base, &wid, &n)
&& n == strlen(label())) { && n == strlen(label())) {
val.ptr = vpip_make_vthr_vector(base, wid, false); val.ptr = vpip_make_vthr_vector(base, wid, false);
sym_set_value(sym_vpi, label(), val); sym_set_value(sym_vpi, label(), val);
@ -559,13 +566,7 @@ bool vpi_handle_resolv_list_s::resolve(bool mes)
val.ptr = vpip_make_vthr_vector(base, wid, signed_flag); val.ptr = vpip_make_vthr_vector(base, wid, signed_flag);
sym_set_value(sym_vpi, label(), val); sym_set_value(sym_vpi, label(), val);
#endif
} else if (2 == sscanf(label(), "W<%u,%[r]>%n", &base, ss, &n)
&& n == strlen(label())) {
val.ptr = vpip_make_vthr_word(base, ss);
sym_set_value(sym_vpi, label(), val);
} else if (1 == sscanf(label(), "S<%u,str>%n", &base, &n) } else if (1 == sscanf(label(), "S<%u,str>%n", &base, &n)
&& n == strlen(label())) { && n == strlen(label())) {

View File

@ -656,7 +656,9 @@ vpiHandle vpip_make_real_param(char*name, double value, bool local_flag,
* thread. * thread.
*/ */
#if 0
vpiHandle vpip_make_vthr_vector(unsigned base, unsigned wid, bool signed_flag); vpiHandle vpip_make_vthr_vector(unsigned base, unsigned wid, bool signed_flag);
#endif
vpiHandle vpip_make_vthr_word(unsigned base, const char*type); vpiHandle vpip_make_vthr_word(unsigned base, const char*type);
vpiHandle vpip_make_vthr_str_stack(unsigned depth); vpiHandle vpip_make_vthr_str_stack(unsigned depth);

View File

@ -38,6 +38,7 @@
extern const char hex_digits[256]; extern const char hex_digits[256];
extern const char oct_digits[64]; extern const char oct_digits[64];
#if 0
struct __vpiVThrVec : public __vpiHandle { struct __vpiVThrVec : public __vpiHandle {
__vpiVThrVec(); __vpiVThrVec();
int get_type_code(void) const; int get_type_code(void) const;
@ -51,7 +52,8 @@ struct __vpiVThrVec : public __vpiHandle {
unsigned signed_flag : 1; unsigned signed_flag : 1;
const char *name; const char *name;
}; };
#endif
#if 0
inline static inline static
vvp_bit4_t get_bit(struct __vpiVThrVec *rfp, unsigned idx) vvp_bit4_t get_bit(struct __vpiVThrVec *rfp, unsigned idx)
{ {
@ -63,7 +65,7 @@ void set_bit(struct __vpiVThrVec *rfp, unsigned idx, vvp_bit4_t bit)
{ {
return vthread_put_bit(vpip_current_vthread, rfp->bas+idx, bit); return vthread_put_bit(vpip_current_vthread, rfp->bas+idx, bit);
} }
#endif
/* /*
* Hex digits that represent 4-value bits of Verilog are not as * Hex digits that represent 4-value bits of Verilog are not as
@ -81,6 +83,7 @@ extern const char hex_digits[256];
extern const char oct_digits[64]; extern const char oct_digits[64];
#if 0
/* /*
* vpi_get * vpi_get
*/ */
@ -109,7 +112,8 @@ static int vthr_vec_get(int code, vpiHandle ref)
return 0; return 0;
} }
} }
#endif
#if 0
static char* vthr_vec_get_str(int code, vpiHandle ref) static char* vthr_vec_get_str(int code, vpiHandle ref)
{ {
struct __vpiVThrVec*rfp = dynamic_cast<__vpiVThrVec*>(ref); struct __vpiVThrVec*rfp = dynamic_cast<__vpiVThrVec*>(ref);
@ -123,7 +127,8 @@ static char* vthr_vec_get_str(int code, vpiHandle ref)
return 0; return 0;
} }
#endif
#if 0
static void vthr_vec_DecStrVal(struct __vpiVThrVec*rfp, s_vpi_value*vp) static void vthr_vec_DecStrVal(struct __vpiVThrVec*rfp, s_vpi_value*vp)
{ {
int nbuf = (rfp->wid+2)/3 + 1; int nbuf = (rfp->wid+2)/3 + 1;
@ -138,7 +143,8 @@ static void vthr_vec_DecStrVal(struct __vpiVThrVec*rfp, s_vpi_value*vp)
return; return;
} }
#endif
#if 0
static void vthr_vec_StringVal(struct __vpiVThrVec*rfp, s_vpi_value*vp) static void vthr_vec_StringVal(struct __vpiVThrVec*rfp, s_vpi_value*vp)
{ {
char tmp = 0; char tmp = 0;
@ -172,7 +178,8 @@ static void vthr_vec_StringVal(struct __vpiVThrVec*rfp, s_vpi_value*vp)
vp->value.str = rbuf; vp->value.str = rbuf;
return; return;
} }
#endif
#if 0
/* /*
* The get_value method reads the values of the functors and returns * The get_value method reads the values of the functors and returns
* the vector to the caller. This causes no side-effect, and reads the * the vector to the caller. This causes no side-effect, and reads the
@ -357,7 +364,8 @@ static void vthr_vec_get_value(vpiHandle ref, s_vpi_value*vp)
assert(0); assert(0);
} }
} }
#endif
#if 0
/* /*
* The put_value method writes the value into the vector. * The put_value method writes the value into the vector.
*/ */
@ -437,7 +445,9 @@ static vpiHandle vthr_vec_put_value(vpiHandle ref, s_vpi_value*vp, int)
return ref; return ref;
} }
#endif
#if 0
// The code fully supports vpiReg, vpi_Net, but we do not // The code fully supports vpiReg, vpi_Net, but we do not
// create such things, yet. Lacking a name, for example. // create such things, yet. Lacking a name, for example.
@ -458,7 +468,8 @@ void __vpiVThrVec::vpi_get_value(p_vpi_value val)
vpiHandle __vpiVThrVec::vpi_put_value(p_vpi_value val, int flags) vpiHandle __vpiVThrVec::vpi_put_value(p_vpi_value val, int flags)
{ return vthr_vec_put_value(this, val, flags); } { return vthr_vec_put_value(this, val, flags); }
#endif
#if 0
/* /*
* Construct a vpiReg object. Give the object specified dimensions, * Construct a vpiReg object. Give the object specified dimensions,
* and point to the specified functor for the lsb. * and point to the specified functor for the lsb.
@ -475,6 +486,7 @@ vpiHandle vpip_make_vthr_vector(unsigned base, unsigned wid, bool signed_flag)
return obj; return obj;
} }
#endif
#ifdef CHECK_WITH_VALGRIND #ifdef CHECK_WITH_VALGRIND
static map<vpiHandle, bool> handle_map; static map<vpiHandle, bool> handle_map;