From 6f3ddce7c4cff460e8b7b6c6483626ecca5113d6 Mon Sep 17 00:00:00 2001 From: steve Date: Wed, 17 Jan 2007 05:00:12 +0000 Subject: [PATCH] Dead code for memories in scopes. --- ivl_target.h | 7 ++-- t-dll-api.cc | 18 +++------- t-dll.cc | 9 +++-- t-dll.h | 8 ++--- tgt-stub/Makefile.in | 4 +-- tgt-stub/priv.h | 4 +-- tgt-stub/statement.c | 86 +++++++++++++++----------------------------- tgt-stub/stub.c | 8 ++--- 8 files changed, 52 insertions(+), 92 deletions(-) diff --git a/ivl_target.h b/ivl_target.h index aa44f9448..65bb7cb2c 100644 --- a/ivl_target.h +++ b/ivl_target.h @@ -19,7 +19,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #ifdef HAVE_CVS_IDENT -#ident "$Id: ivl_target.h,v 1.173 2007/01/17 04:39:18 steve Exp $" +#ident "$Id: ivl_target.h,v 1.174 2007/01/17 05:00:12 steve Exp $" #endif # include @@ -1408,8 +1408,6 @@ extern unsigned ivl_scope_logs(ivl_scope_t net); extern ivl_net_logic_t ivl_scope_log(ivl_scope_t net, unsigned idx); extern unsigned ivl_scope_lpms(ivl_scope_t net); extern ivl_lpm_t ivl_scope_lpm(ivl_scope_t, unsigned idx); -extern unsigned ivl_scope_mems(ivl_scope_t net); -extern ivl_memory_t ivl_scope_mem(ivl_scope_t net, unsigned idx); extern const char* ivl_scope_name(ivl_scope_t net); extern const char* ivl_scope_basename(ivl_scope_t net); extern unsigned ivl_scope_params(ivl_scope_t net); @@ -1756,6 +1754,9 @@ _END_DECL /* * $Log: ivl_target.h,v $ + * Revision 1.174 2007/01/17 05:00:12 steve + * Dead code for memories in scopes. + * * Revision 1.173 2007/01/17 04:39:18 steve * Remove dead code related to memories. * diff --git a/t-dll-api.cc b/t-dll-api.cc index 726b45e1d..183dbaad2 100644 --- a/t-dll-api.cc +++ b/t-dll-api.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #ifdef HAVE_CVS_IDENT -#ident "$Id: t-dll-api.cc,v 1.139 2007/01/17 04:39:18 steve Exp $" +#ident "$Id: t-dll-api.cc,v 1.140 2007/01/17 05:00:12 steve Exp $" #endif # include "config.h" @@ -1358,19 +1358,6 @@ extern "C" ivl_lpm_t ivl_scope_lpm(ivl_scope_t net, unsigned idx) return net->lpm_[idx]; } -extern "C" unsigned ivl_scope_mems(ivl_scope_t net) -{ - assert(net); - return net->nmem_; -} - -extern "C" ivl_memory_t ivl_scope_mem(ivl_scope_t net, unsigned idx) -{ - assert(net); - assert(idx < net->nmem_); - return net->mem_[idx]; -} - static unsigned scope_name_len(ivl_scope_t net) { unsigned len = 0; @@ -1947,6 +1934,9 @@ extern "C" ivl_statement_t ivl_stmt_sub_stmt(ivl_statement_t net) /* * $Log: t-dll-api.cc,v $ + * Revision 1.140 2007/01/17 05:00:12 steve + * Dead code for memories in scopes. + * * Revision 1.139 2007/01/17 04:39:18 steve * Remove dead code related to memories. * diff --git a/t-dll.cc b/t-dll.cc index 8587fc521..b098101e9 100644 --- a/t-dll.cc +++ b/t-dll.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #ifdef HAVE_CVS_IDENT -#ident "$Id: t-dll.cc,v 1.162 2007/01/16 05:44:15 steve Exp $" +#ident "$Id: t-dll.cc,v 1.163 2007/01/17 05:00:12 steve Exp $" #endif # include "config.h" @@ -486,8 +486,6 @@ void dll_target::add_root(ivl_design_s &des_, const NetScope *s) root_->event_ = 0; root_->nlpm_ = 0; root_->lpm_ = 0; - root_->nmem_ = 0; - root_->mem_ = 0; make_scope_parameters(root_, s); root_->type_ = IVL_SCT_MODULE; root_->tname_ = root_->name_; @@ -1941,8 +1939,6 @@ void dll_target::scope(const NetScope*net) scope->event_ = 0; scope->nlpm_ = 0; scope->lpm_ = 0; - scope->nmem_ = 0; - scope->mem_ = 0; make_scope_parameters(scope, net); scope->time_units = net->time_unit(); scope->nattr = net->attr_cnt(); @@ -2191,6 +2187,9 @@ extern const struct target tgt_dll = { "dll", &dll_target_obj }; /* * $Log: t-dll.cc,v $ + * Revision 1.163 2007/01/17 05:00:12 steve + * Dead code for memories in scopes. + * * Revision 1.162 2007/01/16 05:44:15 steve * Major rework of array handling. Memories are replaced with the * more general concept of arrays. The NetMemory and NetEMemory diff --git a/t-dll.h b/t-dll.h index e97510963..d811d0ac1 100644 --- a/t-dll.h +++ b/t-dll.h @@ -19,7 +19,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #ifdef HAVE_CVS_IDENT -#ident "$Id: t-dll.h,v 1.136 2007/01/17 04:39:18 steve Exp $" +#ident "$Id: t-dll.h,v 1.137 2007/01/17 05:00:12 steve Exp $" #endif # include "target.h" @@ -531,9 +531,6 @@ struct ivl_scope_s { unsigned nlpm_; ivl_lpm_t* lpm_; - unsigned nmem_; - ivl_memory_t* mem_; - unsigned nparam_; ivl_parameter_t param_; @@ -669,6 +666,9 @@ struct ivl_statement_s { /* * $Log: t-dll.h,v $ + * Revision 1.137 2007/01/17 05:00:12 steve + * Dead code for memories in scopes. + * * Revision 1.136 2007/01/17 04:39:18 steve * Remove dead code related to memories. * diff --git a/tgt-stub/Makefile.in b/tgt-stub/Makefile.in index 02f0a49c6..d9b8211e2 100644 --- a/tgt-stub/Makefile.in +++ b/tgt-stub/Makefile.in @@ -16,7 +16,7 @@ # 59 Temple Place - Suite 330 # Boston, MA 02111-1307, USA # -#ident "$Id: Makefile.in,v 1.18 2007/01/16 05:44:16 steve Exp $" +#ident "$Id: Makefile.in,v 1.19 2007/01/17 05:00:12 steve Exp $" # # SHELL = /bin/sh @@ -52,7 +52,7 @@ dep: $(CC) $(CPPFLAGS) $(CFLAGS) -MD -c $< -o $*.o mv $*.d dep -O = stub.o expression.o memory.o statement.o +O = stub.o expression.o statement.o ifeq (@WIN32@,yes) TGTLDFLAGS=-L.. -livl diff --git a/tgt-stub/priv.h b/tgt-stub/priv.h index 4d4109a7c..35ff52750 100644 --- a/tgt-stub/priv.h +++ b/tgt-stub/priv.h @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #ifdef HAVE_CVS_IDENT -#ident "$Id: priv.h,v 1.4 2007/01/16 05:44:16 steve Exp $" +#ident "$Id: priv.h,v 1.5 2007/01/17 05:00:12 steve Exp $" #endif # include @@ -40,8 +40,6 @@ extern int stub_errors; */ extern void show_expression(ivl_expr_t net, unsigned ind); -extern void show_memory(ivl_memory_t mem); - /* * Show the statement. */ diff --git a/tgt-stub/statement.c b/tgt-stub/statement.c index e98916f36..c74b911dc 100644 --- a/tgt-stub/statement.c +++ b/tgt-stub/statement.c @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #ifdef HAVE_CVS_IDENT -#ident "$Id: statement.c,v 1.11 2007/01/16 05:44:16 steve Exp $" +#ident "$Id: statement.c,v 1.12 2007/01/17 05:00:12 steve Exp $" #endif # include "config.h" @@ -26,72 +26,44 @@ static unsigned show_assign_lval(ivl_lval_t lval, unsigned ind) { - ivl_memory_t mem; unsigned wid = 0; - if ( (mem = ivl_lval_mem(lval)) ) { + ivl_signal_t sig = ivl_lval_sig(lval); + assert(sig); - ivl_scope_t scope = ivl_memory_scope(mem); - fprintf(out, "%*s{ %s.%s width=%u }\n", ind, "", - ivl_scope_name(scope), - ivl_memory_basename(mem), - ivl_lval_width(lval)); + fprintf(out, "%*s{name=%s width=%u lvwidth=%u}\n", + ind, "", + ivl_signal_name(sig), + ivl_signal_width(sig), + ivl_lval_width(lval)); - fprintf(out, "%*sAddress-0 expression:\n", ind+4, ""); - show_expression(ivl_lval_idx(lval), ind+8); - - if (ivl_lval_part_off(lval)) { - fprintf(out, "%*sPart select base:\n", ind+4, ""); - show_expression(ivl_lval_part_off(lval), ind+8); - } - - /* When the l-value is a memory word, the lval_width - must exactly match the word width. */ - if (ivl_lval_width(lval) != ivl_memory_width(mem)) { - fprintf(out, "%*sERROR: l-value width mismatch with " - " memory word width=%u\n", ind, "", - ivl_memory_width(mem)); - stub_errors += 1; - } - - } else { - ivl_signal_t sig = ivl_lval_sig(lval); - assert(sig); - - fprintf(out, "%*s{name=%s width=%u lvwidth=%u}\n", - ind, "", - ivl_signal_name(sig), - ivl_signal_width(sig), - ivl_lval_width(lval)); - - if (ivl_lval_idx(lval)) { - fprintf(out, "%*sAddress-0 select expression:\n", ind+4, ""); - show_expression(ivl_lval_idx(lval), ind+6); - if (ivl_signal_array_count(sig) <= 1) { - fprintf(out, "%*sERROR: Address on signal with " - "word count=%u\n", ind+4, "", - ivl_signal_array_count(sig)); - stub_errors += 1; - } - } else if (ivl_signal_array_count(sig) > 1) { - fprintf(out, "%*sERROR: Address missing on signal with " + if (ivl_lval_idx(lval)) { + fprintf(out, "%*sAddress-0 select expression:\n", ind+4, ""); + show_expression(ivl_lval_idx(lval), ind+6); + if (ivl_signal_array_count(sig) <= 1) { + fprintf(out, "%*sERROR: Address on signal with " "word count=%u\n", ind+4, "", ivl_signal_array_count(sig)); stub_errors += 1; } - - if (ivl_lval_mux(lval)) { - fprintf(out, "%*sBit select expression:\n", ind+4, ""); - show_expression(ivl_lval_mux(lval), ind+8); - } - if (ivl_lval_part_off(lval)) { - fprintf(out, "%*sPart select base:\n", ind+4, ""); - show_expression(ivl_lval_part_off(lval), ind+8); - } - - wid = ivl_lval_width(lval); + } else if (ivl_signal_array_count(sig) > 1) { + fprintf(out, "%*sERROR: Address missing on signal with " + "word count=%u\n", ind+4, "", + ivl_signal_array_count(sig)); + stub_errors += 1; } + if (ivl_lval_mux(lval)) { + fprintf(out, "%*sBit select expression:\n", ind+4, ""); + show_expression(ivl_lval_mux(lval), ind+8); + } + if (ivl_lval_part_off(lval)) { + fprintf(out, "%*sPart select base:\n", ind+4, ""); + show_expression(ivl_lval_part_off(lval), ind+8); + } + + wid = ivl_lval_width(lval); + return wid; } diff --git a/tgt-stub/stub.c b/tgt-stub/stub.c index fb42b2ca2..4c643743f 100644 --- a/tgt-stub/stub.c +++ b/tgt-stub/stub.c @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #ifdef HAVE_CVS_IDENT -#ident "$Id: stub.c,v 1.143 2007/01/16 05:44:16 steve Exp $" +#ident "$Id: stub.c,v 1.144 2007/01/17 05:00:12 steve Exp $" #endif /* @@ -1378,9 +1378,6 @@ static int show_scope(ivl_scope_t net, void*x) for (idx = 0 ; idx < ivl_scope_sigs(net) ; idx += 1) show_signal(ivl_scope_sig(net, idx)); - for (idx = 0 ; idx < ivl_scope_mems(net) ; idx += 1) - show_memory(ivl_scope_mem(net, idx)); - for (idx = 0 ; idx < ivl_scope_events(net) ; idx += 1) show_event(ivl_scope_event(net, idx)); @@ -1472,6 +1469,9 @@ int target_design(ivl_design_t des) /* * $Log: stub.c,v $ + * Revision 1.144 2007/01/17 05:00:12 steve + * Dead code for memories in scopes. + * * Revision 1.143 2007/01/16 05:44:16 steve * Major rework of array handling. Memories are replaced with the * more general concept of arrays. The NetMemory and NetEMemory