From 007056d671dd8b5d7eb01c17a726d2b1734ec2fe Mon Sep 17 00:00:00 2001 From: Stephen Williams Date: Tue, 20 May 2008 16:57:50 -0700 Subject: [PATCH] Remove last vestiges of the the .mem structures. Before the .array support, we had .mem nodes. These are long since removed because the arrays to all the jobs of the .mem nodes. --- vvp/Makefile.in | 4 +- vvp/codes.h | 3 - vvp/compile.cc | 131 ------------- vvp/compile.h | 8 - vvp/lexor.lex | 3 - vvp/memory.cc | 299 ----------------------------- vvp/memory.h | 180 ------------------ vvp/parse.y | 22 --- vvp/schedule.cc | 29 --- vvp/schedule.h | 6 - vvp/vpi_callback.cc | 4 - vvp/vpi_memory.cc | 449 -------------------------------------------- vvp/vpi_priv.h | 7 - vvp/vthread.cc | 73 ------- 14 files changed, 2 insertions(+), 1216 deletions(-) delete mode 100644 vvp/memory.cc delete mode 100644 vvp/memory.h delete mode 100644 vvp/vpi_memory.cc diff --git a/vvp/Makefile.in b/vvp/Makefile.in index 65cab97f4..ac5cc9bd8 100644 --- a/vvp/Makefile.in +++ b/vvp/Makefile.in @@ -70,14 +70,14 @@ check: all V = vpi_modules.o vpi_callback.o vpi_const.o vpi_event.o vpi_iter.o vpi_mcd.o \ vpi_priv.o vpi_scope.o vpi_real.o vpi_signal.o vpi_tasks.o vpi_time.o \ -vpi_memory.o vpi_vthr_vector.o vpip_bin.o vpip_hex.o vpip_oct.o \ +vpi_vthr_vector.o vpip_bin.o vpip_hex.o vpip_oct.o \ vpip_to_dec.o vpip_format.o vvp_vpi.o O = main.o parse.o parse_misc.o lexor.o arith.o array.o bufif.o compile.o \ concat.o \ dff.o extend.o npmos.o part.o reduce.o resolv.o sfunc.o stop.o symbols.o \ ufunc.o codes.o \ -vthread.o schedule.o statistics.o tables.o udp.o vvp_net.o memory.o \ +vthread.o schedule.o statistics.o tables.o udp.o vvp_net.o \ event.o logic.o delay.o words.o $V ifeq (@WIN32@,yes) diff --git a/vvp/codes.h b/vvp/codes.h index cb033f16f..0e93f72de 100644 --- a/vvp/codes.h +++ b/vvp/codes.h @@ -97,7 +97,6 @@ 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_MV(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); @@ -127,7 +126,6 @@ extern bool of_RELEASE_NET(vthread_t thr, vvp_code_t code); 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_SET_AV(vthread_t thr, vvp_code_t code); -extern bool of_SET_MV(vthread_t thr, vvp_code_t code); extern bool of_SET_VEC(vthread_t thr, vvp_code_t code); extern bool of_SET_WORDR(vthread_t thr, vvp_code_t code); extern bool of_SET_X0(vthread_t thr, vvp_code_t code); @@ -162,7 +160,6 @@ struct vvp_code_s { unsigned long number; vvp_net_t *net; vvp_code_t cptr; - vvp_memory_t mem; vvp_array_t array; struct __vpiHandle*handle; struct __vpiScope*scope; diff --git a/vvp/compile.cc b/vvp/compile.cc index fe9c82f82..d2e1c96d8 100644 --- a/vvp/compile.cc +++ b/vvp/compile.cc @@ -22,7 +22,6 @@ # include "logic.h" # include "resolv.h" # include "udp.h" -# include "memory.h" # include "symbols.h" # include "codes.h" # include "schedule.h" @@ -67,8 +66,6 @@ enum operand_e { OA_FUNC_PTR, /* The operand is a second functor pointer */ OA_FUNC_PTR2, - /* The operand is a pointer to a memory */ - OA_MEM_PTR, /* The operand is a VPI handle */ OA_VPI_PTR, }; @@ -90,7 +87,6 @@ const static struct opcode_table_s opcode_table[] = { { "%and/r", of_ANDR, 3, {OA_BIT1, OA_BIT2, OA_NUMBER} }, { "%assign/av",of_ASSIGN_AV,3,{OA_ARR_PTR,OA_BIT1, OA_BIT2} }, { "%assign/av/d",of_ASSIGN_AVD,3,{OA_ARR_PTR,OA_BIT1, OA_BIT2} }, - { "%assign/mv",of_ASSIGN_MV,3,{OA_MEM_PTR,OA_BIT1, OA_BIT2} }, { "%assign/v0",of_ASSIGN_V0,3,{OA_FUNC_PTR,OA_BIT1, OA_BIT2} }, { "%assign/v0/d",of_ASSIGN_V0D,3,{OA_FUNC_PTR,OA_BIT1, OA_BIT2} }, { "%assign/v0/x1",of_ASSIGN_V0X1,3,{OA_FUNC_PTR,OA_BIT1,OA_BIT2} }, @@ -144,7 +140,6 @@ 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/mv",of_LOAD_MV,3, {OA_BIT1, OA_MEM_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} }, @@ -174,7 +169,6 @@ const static struct opcode_table_s opcode_table[] = { { "%release/reg",of_RELEASE_REG,3,{OA_FUNC_PTR,OA_BIT1,OA_BIT2} }, { "%release/wr",of_RELEASE_WR,2,{OA_FUNC_PTR,OA_BIT1,OA_NONE} }, { "%set/av", of_SET_AV, 3, {OA_ARR_PTR, OA_BIT1, OA_BIT2} }, - { "%set/mv", of_SET_MV, 3, {OA_MEM_PTR, OA_BIT1, OA_BIT2} }, { "%set/v", of_SET_VEC,3, {OA_FUNC_PTR, OA_BIT1, OA_BIT2} }, { "%set/wr", of_SET_WORDR,2,{OA_VPI_PTR, OA_BIT1, OA_NONE} }, { "%set/x0", of_SET_X0, 3, {OA_FUNC_PTR, OA_BIT1, OA_BIT2} }, @@ -551,38 +545,6 @@ void code_label_lookup(struct vvp_code_s *code, char *label) resolv_submit(res); } -/* - * Lookup memories. - */ -struct memory_resolv_list_s: public resolv_list_s { - memory_resolv_list_s(char*label) : resolv_list_s(label) { } - struct vvp_code_s *code; - virtual bool resolve(bool mes); -}; - -bool memory_resolv_list_s::resolve(bool mes) -{ - code->mem = memory_find(label()); - if (code->mem != 0) { - return true; - } - - if (mes) - fprintf(stderr, "Memory unresolved: %s\n", label()); - - return false; -} - -static void compile_mem_lookup(struct vvp_code_s *code, char *label) -{ - struct memory_resolv_list_s *res - = new struct memory_resolv_list_s(label); - - res->code = code; - - resolv_submit(res); -} - struct code_array_resolv_list_s: public resolv_list_s { code_array_resolv_list_s(char*label) : resolv_list_s(label) { } struct vvp_code_s *code; @@ -1504,90 +1466,6 @@ char **compile_udp_table(char **table, char *row) return table; } -/* - * Take the detailed parse items from a .mem statement and generate - * the necessary internal structures. - * - *