diff --git a/vvp/codes.h b/vvp/codes.h
index a827af48b..af6c99ba0 100644
--- a/vvp/codes.h
+++ b/vvp/codes.h
@@ -186,8 +186,6 @@ extern bool of_RELEASE_REG(vthread_t thr, vvp_code_t code);
extern bool of_RELEASE_WR(vthread_t thr, vvp_code_t code);
extern bool of_REPLICATE(vthread_t thr, vvp_code_t code);
extern bool of_SCOPY(vthread_t thr, vvp_code_t code);
-extern bool of_SET_QB(vthread_t thr, vvp_code_t code);
-extern bool of_SET_QF(vthread_t thr, vvp_code_t code);
extern bool of_SET_DAR_OBJ_REAL(vthread_t thr, vvp_code_t code);
extern bool of_SET_DAR_OBJ_STR(vthread_t thr, vvp_code_t code);
extern bool of_SET_DAR_OBJ_VEC4(vthread_t thr, vvp_code_t code);
diff --git a/vvp/compile.cc b/vvp/compile.cc
index 3b8695805..933ef8563 100644
--- a/vvp/compile.cc
+++ b/vvp/compile.cc
@@ -237,8 +237,6 @@ static const struct opcode_table_s opcode_table[] = {
{ "%set/dar/obj/real",of_SET_DAR_OBJ_REAL,1,{OA_NUMBER,OA_NONE,OA_NONE} },
{ "%set/dar/obj/str", of_SET_DAR_OBJ_STR, 1,{OA_NUMBER,OA_NONE,OA_NONE} },
{ "%set/dar/obj/vec4",of_SET_DAR_OBJ_VEC4,1,{OA_NUMBER,OA_NONE,OA_NONE} },
- { "%set/qb", of_SET_QB, 3, {OA_FUNC_PTR, OA_BIT1, OA_BIT2} },
- { "%set/qf", of_SET_QF, 3, {OA_FUNC_PTR, OA_BIT1, OA_BIT2} },
{ "%shiftl", of_SHIFTL, 1, {OA_NUMBER, OA_NONE, OA_NONE} },
{ "%shiftr", of_SHIFTR, 1, {OA_NUMBER, OA_NONE, OA_NONE} },
{ "%shiftr/s", of_SHIFTR_S, 1, {OA_NUMBER, OA_NONE, OA_NONE} },
@@ -531,48 +529,23 @@ bool vpi_handle_resolv_list_s::resolve(bool mes)
{
symbol_value_t val = sym_get_value(sym_vpi, label());
if (!val.ptr) {
- // check for thread vector T
+ // check for thread access symbols
unsigned base, wid;
- int n = 0;
+ size_t n = 0;
char ss[32];
- if (2 == sscanf(label(), "W<%u,%[r]>%n", &base, ss, &n)
+ if (2 == sscanf(label(), "W<%u,%[r]>%zn", &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())) {
- val.ptr = vpip_make_vthr_vector(base, wid, false);
- sym_set_value(sym_vpi, label(), val);
- } else if (3 <= sscanf(label(), "T<%u,%u,%[su]>%n", &base,
- &wid, ss, &n)
- && n == (int)strlen(label())) {
-
- bool signed_flag = false;
- for (char*fp = ss ; *fp ; fp += 1) switch (*fp) {
- case 's':
- signed_flag = true;
- break;
- case 'u':
- signed_flag = false;
- break;
- default:
- break;
- }
-
- val.ptr = vpip_make_vthr_vector(base, wid, signed_flag);
- sym_set_value(sym_vpi, label(), val);
-#endif
- } else if (1 == sscanf(label(), "S<%u,str>%n", &base, &n)
+ } else if (1 == sscanf(label(), "S<%u,str>%zn", &base, &n)
&& n == strlen(label())) {
val.ptr = vpip_make_vthr_str_stack(base);
sym_set_value(sym_vpi, label(), val);
- } else if (3 == sscanf(label(), "S<%u,vec4,%[su]%u>%n", &base, ss, &wid, &n)
+ } else if (3 == sscanf(label(), "S<%u,vec4,%[su]%u>%zn", &base, ss, &wid, &n)
&& n == strlen(label())) {
bool signed_flag = false;
diff --git a/vvp/vthread.cc b/vvp/vthread.cc
index 8f2ed02a6..68837fbc8 100644
--- a/vvp/vthread.cc
+++ b/vvp/vthread.cc
@@ -308,11 +308,6 @@ struct __vpiScope* vthread_scope(struct vthread_s*thr)
struct vthread_s*running_thread = 0;
-#if 0
-// this table maps the thread special index bit addresses to
-// vvp_bit4_t bit values.
-static vvp_bit4_t thr_index_to_bit4[4] = { BIT4_0, BIT4_1, BIT4_X, BIT4_Z };
-#endif
void vthread_push_vec4(struct vthread_s*thr, const vvp_vector4_t&val)
{
@@ -394,55 +389,6 @@ template T coerce_to_width(const T&that, unsigned width)
/* Explicitly define the vvp_vector4_t version of coerce_to_width(). */
template vvp_vector4_t coerce_to_width(const vvp_vector4_t&that,
unsigned width);
-#if 0
-static unsigned long* vector_to_array(struct vthread_s*thr,
- unsigned addr, unsigned wid)
-{
- if (addr == 0) {
- unsigned awid = (wid + CPU_WORD_BITS - 1) / (CPU_WORD_BITS);
- unsigned long*val = new unsigned long[awid];
- for (unsigned idx = 0 ; idx < awid ; idx += 1)
- val[idx] = 0;
- return val;
- }
- if (addr == 1) {
- unsigned awid = (wid + CPU_WORD_BITS - 1) / (CPU_WORD_BITS);
- unsigned long*val = new unsigned long[awid];
- for (unsigned idx = 0 ; idx < awid ; idx += 1)
- val[idx] = -1UL;
-
- wid -= (awid-1) * CPU_WORD_BITS;
- if (wid < CPU_WORD_BITS)
- val[awid-1] &= (-1UL) >> (CPU_WORD_BITS-wid);
-
- return val;
- }
-
- if (addr < 4)
- return 0;
-
- return thr->bits4.subarray(addr, wid);
-}
-#endif
-
-#if 0
-/*
- * This function gets from the thread a vector of bits starting from
- * the addressed location and for the specified width.
- */
-static vvp_vector4_t vthread_bits_to_vector(struct vthread_s*thr,
- unsigned bit, unsigned wid)
-{
- /* Make a vector of the desired width. */
-
- if (bit >= 4) {
- return vvp_vector4_t(thr->bits4, bit, wid);
-
- } else {
- return vvp_vector4_t(wid, thr_index_to_bit4[bit]);
- }
-}
-#endif
/*
* Some of the instructions do wide addition to arrays of long. They
@@ -4762,70 +4708,6 @@ bool of_SET_DAR_OBJ_VEC4(vthread_t thr, vvp_code_t cp)
return true;
}
-/*
- * %set/qb ,
- */
-bool of_SET_QB(vthread_t /*thr*/, vvp_code_t /*cp*/)
-{
-#if 0
- unsigned bit = cp->bit_idx[0];
- unsigned wid = cp->bit_idx[1];
- /* Make a vector of the desired width. */
- vvp_vector4_t value = vthread_bits_to_vector(thr, bit, wid);
-
- vvp_net_t*net = cp->net;
- vvp_fun_signal_object*obj = dynamic_cast (net->fun);
- assert(obj);
-
- vvp_queue*dqueue = obj->get_object().peek();
- if (dqueue == 0) {
- assert(obj->get_object().test_nil());
- dqueue = new vvp_queue_vec4;
- vvp_object_t val (dqueue);
- vvp_net_ptr_t ptr (cp->net, 0);
- vvp_send_object(ptr, val, thr->wt_context);
- }
-
- assert(dqueue);
- dqueue->push_back(value);
-#else
- fprintf(stderr, "XXXX FORGOT TO IMPLEMENT %%set/qb\n");
-#endif
- return true;
-}
-
-/*
- * %set/qf ,
- */
-bool of_SET_QF(vthread_t /*thr*/, vvp_code_t /*cp*/)
-{
-#if 0
- unsigned bit = cp->bit_idx[0];
- unsigned wid = cp->bit_idx[1];
- /* Make a vector of the desired width. */
- vvp_vector4_t value = vthread_bits_to_vector(thr, bit, wid);
-
- vvp_net_t*net = cp->net;
- vvp_fun_signal_object*obj = dynamic_cast (net->fun);
- assert(obj);
-
- vvp_queue*dqueue = obj->get_object().peek();
- if (dqueue == 0) {
- assert(obj->get_object().test_nil());
- dqueue = new vvp_queue_vec4;
- vvp_object_t val (dqueue);
- vvp_net_ptr_t ptr (cp->net, 0);
- vvp_send_object(ptr, val, thr->wt_context);
- }
-
- assert(dqueue);
- dqueue->push_front(value);
-#else
- fprintf(stderr, "XXXX FORGOT TO IMPLEMENT %%set/qf\n");
-#endif
- return true;
-}
-
/*
* %set/dar/obj/str
*/