Dead code for memories in scopes.

This commit is contained in:
steve 2007-01-17 05:00:12 +00:00
parent f5a7ee0736
commit 6f3ddce7c4
8 changed files with 52 additions and 92 deletions

View File

@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#ifdef HAVE_CVS_IDENT #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 #endif
# include <stdint.h> # include <stdint.h>
@ -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 ivl_net_logic_t ivl_scope_log(ivl_scope_t net, unsigned idx);
extern unsigned ivl_scope_lpms(ivl_scope_t net); extern unsigned ivl_scope_lpms(ivl_scope_t net);
extern ivl_lpm_t ivl_scope_lpm(ivl_scope_t, unsigned idx); 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_name(ivl_scope_t net);
extern const char* ivl_scope_basename(ivl_scope_t net); extern const char* ivl_scope_basename(ivl_scope_t net);
extern unsigned ivl_scope_params(ivl_scope_t net); extern unsigned ivl_scope_params(ivl_scope_t net);
@ -1756,6 +1754,9 @@ _END_DECL
/* /*
* $Log: ivl_target.h,v $ * $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 * Revision 1.173 2007/01/17 04:39:18 steve
* Remove dead code related to memories. * Remove dead code related to memories.
* *

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#ifdef HAVE_CVS_IDENT #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 #endif
# include "config.h" # 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]; 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) static unsigned scope_name_len(ivl_scope_t net)
{ {
unsigned len = 0; 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 $ * $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 * Revision 1.139 2007/01/17 04:39:18 steve
* Remove dead code related to memories. * Remove dead code related to memories.
* *

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#ifdef HAVE_CVS_IDENT #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 #endif
# include "config.h" # include "config.h"
@ -486,8 +486,6 @@ void dll_target::add_root(ivl_design_s &des_, const NetScope *s)
root_->event_ = 0; root_->event_ = 0;
root_->nlpm_ = 0; root_->nlpm_ = 0;
root_->lpm_ = 0; root_->lpm_ = 0;
root_->nmem_ = 0;
root_->mem_ = 0;
make_scope_parameters(root_, s); make_scope_parameters(root_, s);
root_->type_ = IVL_SCT_MODULE; root_->type_ = IVL_SCT_MODULE;
root_->tname_ = root_->name_; root_->tname_ = root_->name_;
@ -1941,8 +1939,6 @@ void dll_target::scope(const NetScope*net)
scope->event_ = 0; scope->event_ = 0;
scope->nlpm_ = 0; scope->nlpm_ = 0;
scope->lpm_ = 0; scope->lpm_ = 0;
scope->nmem_ = 0;
scope->mem_ = 0;
make_scope_parameters(scope, net); make_scope_parameters(scope, net);
scope->time_units = net->time_unit(); scope->time_units = net->time_unit();
scope->nattr = net->attr_cnt(); scope->nattr = net->attr_cnt();
@ -2191,6 +2187,9 @@ extern const struct target tgt_dll = { "dll", &dll_target_obj };
/* /*
* $Log: t-dll.cc,v $ * $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 * Revision 1.162 2007/01/16 05:44:15 steve
* Major rework of array handling. Memories are replaced with the * Major rework of array handling. Memories are replaced with the
* more general concept of arrays. The NetMemory and NetEMemory * more general concept of arrays. The NetMemory and NetEMemory

View File

@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#ifdef HAVE_CVS_IDENT #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 #endif
# include "target.h" # include "target.h"
@ -531,9 +531,6 @@ struct ivl_scope_s {
unsigned nlpm_; unsigned nlpm_;
ivl_lpm_t* lpm_; ivl_lpm_t* lpm_;
unsigned nmem_;
ivl_memory_t* mem_;
unsigned nparam_; unsigned nparam_;
ivl_parameter_t param_; ivl_parameter_t param_;
@ -669,6 +666,9 @@ struct ivl_statement_s {
/* /*
* $Log: t-dll.h,v $ * $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 * Revision 1.136 2007/01/17 04:39:18 steve
* Remove dead code related to memories. * Remove dead code related to memories.
* *

View File

@ -16,7 +16,7 @@
# 59 Temple Place - Suite 330 # 59 Temple Place - Suite 330
# Boston, MA 02111-1307, USA # 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 SHELL = /bin/sh
@ -52,7 +52,7 @@ dep:
$(CC) $(CPPFLAGS) $(CFLAGS) -MD -c $< -o $*.o $(CC) $(CPPFLAGS) $(CFLAGS) -MD -c $< -o $*.o
mv $*.d dep mv $*.d dep
O = stub.o expression.o memory.o statement.o O = stub.o expression.o statement.o
ifeq (@WIN32@,yes) ifeq (@WIN32@,yes)
TGTLDFLAGS=-L.. -livl TGTLDFLAGS=-L.. -livl

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#ifdef HAVE_CVS_IDENT #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 #endif
# include <ivl_target.h> # include <ivl_target.h>
@ -40,8 +40,6 @@ extern int stub_errors;
*/ */
extern void show_expression(ivl_expr_t net, unsigned ind); extern void show_expression(ivl_expr_t net, unsigned ind);
extern void show_memory(ivl_memory_t mem);
/* /*
* Show the statement. * Show the statement.
*/ */

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#ifdef HAVE_CVS_IDENT #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 #endif
# include "config.h" # include "config.h"
@ -26,72 +26,44 @@
static unsigned show_assign_lval(ivl_lval_t lval, unsigned ind) static unsigned show_assign_lval(ivl_lval_t lval, unsigned ind)
{ {
ivl_memory_t mem;
unsigned wid = 0; 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{name=%s width=%u lvwidth=%u}\n",
fprintf(out, "%*s{ %s.%s width=%u }\n", ind, "", ind, "",
ivl_scope_name(scope), ivl_signal_name(sig),
ivl_memory_basename(mem), ivl_signal_width(sig),
ivl_lval_width(lval)); ivl_lval_width(lval));
fprintf(out, "%*sAddress-0 expression:\n", ind+4, ""); if (ivl_lval_idx(lval)) {
show_expression(ivl_lval_idx(lval), ind+8); fprintf(out, "%*sAddress-0 select expression:\n", ind+4, "");
show_expression(ivl_lval_idx(lval), ind+6);
if (ivl_lval_part_off(lval)) { if (ivl_signal_array_count(sig) <= 1) {
fprintf(out, "%*sPart select base:\n", ind+4, ""); fprintf(out, "%*sERROR: Address on signal with "
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 "
"word count=%u\n", ind+4, "", "word count=%u\n", ind+4, "",
ivl_signal_array_count(sig)); ivl_signal_array_count(sig));
stub_errors += 1; stub_errors += 1;
} }
} else if (ivl_signal_array_count(sig) > 1) {
if (ivl_lval_mux(lval)) { fprintf(out, "%*sERROR: Address missing on signal with "
fprintf(out, "%*sBit select expression:\n", ind+4, ""); "word count=%u\n", ind+4, "",
show_expression(ivl_lval_mux(lval), ind+8); ivl_signal_array_count(sig));
} stub_errors += 1;
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);
} }
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; return wid;
} }

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#ifdef HAVE_CVS_IDENT #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 #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) for (idx = 0 ; idx < ivl_scope_sigs(net) ; idx += 1)
show_signal(ivl_scope_sig(net, idx)); 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) for (idx = 0 ; idx < ivl_scope_events(net) ; idx += 1)
show_event(ivl_scope_event(net, idx)); show_event(ivl_scope_event(net, idx));
@ -1472,6 +1469,9 @@ int target_design(ivl_design_t des)
/* /*
* $Log: stub.c,v $ * $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 * Revision 1.143 2007/01/16 05:44:16 steve
* Major rework of array handling. Memories are replaced with the * Major rework of array handling. Memories are replaced with the
* more general concept of arrays. The NetMemory and NetEMemory * more general concept of arrays. The NetMemory and NetEMemory