From 694a6ed4a176618843e9303865d0d343cb0f8d80 Mon Sep 17 00:00:00 2001 From: Stephen Williams Date: Tue, 10 Jun 2008 16:33:34 -0700 Subject: [PATCH] Remove some unused opcodes. Codes from a dfiferent era. --- vvp/codes.h | 2 -- vvp/compile.cc | 2 -- vvp/opcodes.txt | 7 ------- vvp/vthread.cc | 33 +-------------------------------- 4 files changed, 1 insertion(+), 43 deletions(-) diff --git a/vvp/codes.h b/vvp/codes.h index 0ac52e0c6..26fa1bf0d 100644 --- a/vvp/codes.h +++ b/vvp/codes.h @@ -98,11 +98,9 @@ extern bool of_JOIN(vthread_t thr, vvp_code_t code); extern bool of_LOAD_AV(vthread_t thr, vvp_code_t code); extern bool of_LOAD_AVP0(vthread_t thr, vvp_code_t code); extern bool of_LOAD_AVX_P(vthread_t thr, vvp_code_t code); -extern bool of_LOAD_NX(vthread_t thr, vvp_code_t code); extern bool of_LOAD_VEC(vthread_t thr, vvp_code_t code); extern bool of_LOAD_VP0(vthread_t thr, vvp_code_t code); extern bool of_LOAD_WR(vthread_t thr, vvp_code_t code); -extern bool of_LOAD_X(vthread_t thr, vvp_code_t code); extern bool of_LOAD_XP(vthread_t thr, vvp_code_t code); extern bool of_LOADI_WR(vthread_t thr, vvp_code_t code); extern bool of_MOD(vthread_t thr, vvp_code_t code); diff --git a/vvp/compile.cc b/vvp/compile.cc index 898a88b74..2c163df84 100644 --- a/vvp/compile.cc +++ b/vvp/compile.cc @@ -141,11 +141,9 @@ const static struct opcode_table_s opcode_table[] = { { "%load/av",of_LOAD_AV,3, {OA_BIT1, OA_ARR_PTR, OA_BIT2} }, { "%load/avp0",of_LOAD_AVP0,3, {OA_BIT1, OA_ARR_PTR, OA_BIT2} }, { "%load/avx.p",of_LOAD_AVX_P,3,{OA_BIT1, OA_ARR_PTR, OA_BIT2} }, - { "%load/nx",of_LOAD_NX,3, {OA_BIT1, OA_VPI_PTR, OA_BIT2} }, { "%load/v", of_LOAD_VEC,3, {OA_BIT1, OA_FUNC_PTR, OA_BIT2} }, { "%load/vp0",of_LOAD_VP0,3,{OA_BIT1, OA_FUNC_PTR, OA_BIT2} }, { "%load/wr",of_LOAD_WR,2, {OA_BIT1, OA_VPI_PTR, OA_BIT2} }, - { "%load/x", of_LOAD_X, 3, {OA_BIT1, OA_FUNC_PTR, OA_BIT2} }, { "%load/x.p",of_LOAD_XP, 3,{OA_BIT1, OA_FUNC_PTR, OA_BIT2} }, { "%loadi/wr",of_LOADI_WR,3,{OA_BIT1, OA_NUMBER, OA_BIT2} }, { "%mod", of_MOD, 3, {OA_BIT1, OA_BIT2, OA_NUMBER} }, diff --git a/vvp/opcodes.txt b/vvp/opcodes.txt index 46f93b071..735a08d95 100644 --- a/vvp/opcodes.txt +++ b/vvp/opcodes.txt @@ -429,12 +429,6 @@ This instruction is similar to %load/av, but it loads only a single bit, and the is the selector for the bit to use. If is out of range, then x is loaded. -* %load/nx , , - -This instruction load a value from a .net object bit. Since .net -objects don't really exist (they are only named indirection into the -netlist) this instruction indexes into the .net list of bits. - * %load/v , , This instruction loads a vector value from the given functor node into @@ -461,7 +455,6 @@ small vector with a large immediate offset indexing an array. This instruction reads a real value from the vpi-like object to a word register. -* %load/x , , * %load/x.p , , This is an indexed load. It uses the contents of the specified index diff --git a/vvp/vthread.cc b/vvp/vthread.cc index 4c60bac93..dd4706977 100644 --- a/vvp/vthread.cc +++ b/vvp/vthread.cc @@ -2441,37 +2441,6 @@ bool of_LOAD_AVX_P(vthread_t thr, vvp_code_t cp) return true; } -/* - * %load/nx , , ; Load net/indexed. - * - * cp->bit_idx[0] contains the value, an index into the thread - * bit register. - * - * cp->bin_idx[1] is the value from the words array. - * - * cp->handle is the linked reference to the __vpiSignal that we are - * to read from. - */ -bool of_LOAD_NX(vthread_t thr, vvp_code_t cp) -{ - assert(cp->bit_idx[0] >= 4); - assert(cp->bit_idx[1] < 4); - assert(cp->handle->vpi_type->type_code == vpiNet); - - struct __vpiSignal*sig = - reinterpret_cast(cp->handle); - - unsigned idx = thr->words[cp->bit_idx[1]].w_int; - - vvp_fun_signal_vec*fun = dynamic_cast(sig->node->fun); - assert(sig != 0); - - vvp_bit4_t val = fun->value(idx); - thr_put_bit(thr, cp->bit_idx[0], val); - - return true; -} - /* %load/v ,