Fix addressing of variable words.

Variable word addresses are not to be adjusted by the bit select
of the vector direction. That is a holdover from when arrays were
stored as bit vectors.

Signed-off-by: Stephen Williams <steve@icarus.com>
This commit is contained in:
Stephen Williams 2007-09-28 18:22:17 -07:00
parent 14c0cfd3b1
commit 5bb936a226
2 changed files with 3 additions and 268 deletions

View File

@ -18,7 +18,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#ifdef HAVE_CVS_IDENT
#ident "$Id: t-dll-proc.cc,v 1.71 2007/06/02 03:42:13 steve Exp $"
#ident "$Id: $"
#endif
# include "config.h"
@ -178,13 +178,6 @@ void dll_target::make_assign_lvals_(const NetAssignBase*net)
if (asn->word()) {
assert(expr_ == 0);
asn->word()->expr_scan(this);
// lsb_dist is the distance for this
// index. If this is >1, then this may be an
// array of arrays, so we need to multiply
// to get the canonical index.
if (cur->n.sig->lsb_dist != 1)
mul_expr_by_const_(cur->n.sig->lsb_dist);
cur->type_ = IVL_LVAL_ARR;
cur->idx = expr_;
expr_ = 0;
@ -735,261 +728,3 @@ void dll_target::proc_while(const NetWhile*net)
stmt_cur_ = save_cur_;
}
/*
* $Log: t-dll-proc.cc,v $
* Revision 1.71 2007/06/02 03:42:13 steve
* Properly evaluate scope path expressions.
*
* Revision 1.70 2007/04/04 01:50:38 steve
* t-dll should not canonicalize word addresses, elaboration already does it.
*
* Revision 1.69 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
* classes are removed from the ivl core program, and the IVL_LPM_RAM
* lpm type is removed from the ivl_target API.
*
* Revision 1.68 2006/02/02 02:43:59 steve
* Allow part selects of memory words in l-values.
*
* Revision 1.67 2005/07/11 16:56:51 steve
* Remove NetVariable and ivl_variable_t structures.
*
* Revision 1.66 2004/12/11 02:31:28 steve
* Rework of internals to carry vectors through nexus instead
* of single bits. Make the ivl, tgt-vvp and vvp initial changes
* down this path.
*
* Revision 1.65 2004/10/04 01:10:55 steve
* Clean up spurious trailing white space.
*
* Revision 1.64 2004/05/31 23:34:39 steve
* Rewire/generalize parsing an elaboration of
* function return values to allow for better
* speed and more type support.
*
* Revision 1.63 2004/05/19 03:18:40 steve
* Add ivl_target support for non-blocking assign of real.
*
* Revision 1.62 2003/12/19 01:27:10 steve
* Fix various unsigned compare warnings.
*
* Revision 1.61 2003/12/03 02:46:24 steve
* Add support for wait on list of named events.
*
* Revision 1.60 2003/06/24 01:38:03 steve
* Various warnings fixed.
*
* Revision 1.59 2003/05/14 05:26:41 steve
* Support real expressions in case statements.
*
* Revision 1.58 2003/05/07 19:56:20 steve
* Improve internal error message.
*
* Revision 1.57 2003/03/01 06:25:30 steve
* Add the lex_strings string handler, and put
* scope names and system task/function names
* into this table. Also, permallocate event
* names from the beginning.
*
* Revision 1.56 2003/01/30 16:23:08 steve
* Spelling fixes.
*
* Revision 1.55 2003/01/26 21:15:59 steve
* Rework expression parsing and elaboration to
* accommodate real/realtime values and expressions.
*
* Revision 1.54 2002/08/19 00:06:12 steve
* Allow release to handle removal of target net.
*
* Revision 1.53 2002/08/13 05:35:00 steve
* Do not elide named blocks.
*
* Revision 1.52 2002/08/12 01:35:00 steve
* conditional ident string using autoconfig.
*
* Revision 1.51 2002/08/07 00:54:39 steve
* Add force to nets.
*
* Revision 1.50 2002/08/04 18:28:15 steve
* Do not use hierarchical names of memories to
* generate vvp labels. -tdll target does not
* used hierarchical name string to look up the
* memory objects in the design.
*
* Revision 1.49 2002/06/16 20:39:12 steve
* Normalize run-time index expressions for bit selects
*
* Revision 1.48 2002/06/16 19:19:16 steve
* Generate runtime code to normalize indices.
*
* Revision 1.47 2002/06/05 03:44:25 steve
* Add support for memory words in l-value of
* non-blocking assignments, and remove the special
* NetAssignMem_ and NetAssignMemNB classes.
*
* Revision 1.46 2002/06/04 05:38:44 steve
* Add support for memory words in l-value of
* blocking assignments, and remove the special
* NetAssignMem class.
*
* Revision 1.45 2002/05/29 22:05:55 steve
* Offset lvalue index expressions.
*
* Revision 1.44 2002/05/27 00:08:45 steve
* Support carrying the scope of named begin-end
* blocks down to the code generator, and have
* the vvp code generator use that to support disable.
*
* Revision 1.43 2002/05/26 01:39:03 steve
* Carry Verilog 2001 attributes with processes,
* all the way through to the ivl_target API.
*
* Divide signal reference counts between rval
* and lval references.
*
* Revision 1.42 2002/04/21 22:31:02 steve
* Redo handling of assignment internal delays.
* Leave it possible for them to be calculated
* at run time.
*
* Revision 1.41 2002/01/19 19:02:08 steve
* Pass back target errors processing conditionals.
*
* Revision 1.40 2001/11/14 03:28:49 steve
* DLL target support for force and release.
*
* Revision 1.39 2001/11/01 04:25:31 steve
* ivl_target support for cassign.
*
* Revision 1.38 2001/10/31 05:24:52 steve
* ivl_target support for assign/deassign.
*
* Revision 1.37 2001/10/30 02:52:07 steve
* Stubs for assign/deassign for t-dll.
*
* Revision 1.36 2001/10/19 21:53:24 steve
* Support multiple root modules (Philip Blundell)
*
* Revision 1.35 2001/09/15 18:27:04 steve
* Make configure detect malloc.h
*
* Revision 1.34 2001/08/25 23:50:03 steve
* Change the NetAssign_ class to refer to the signal
* instead of link into the netlist. This is faster
* and uses less space. Make the NetAssignNB carry
* the delays instead of the NetAssign_ lval objects.
*
* Change the vvp code generator to support multiple
* l-values, i.e. concatenations of part selects.
*
* Revision 1.33 2001/07/27 02:41:56 steve
* Fix binding of dangling function ports. do not elide them.
*
* Revision 1.32 2001/07/25 03:10:49 steve
* Create a config.h.in file to hold all the config
* junk, and support gcc 3.0. (Stephan Boettcher)
*
* Revision 1.31 2001/07/19 04:55:06 steve
* Support calculated delays in vvp.tgt.
*
* Revision 1.30 2001/06/21 23:23:14 steve
* Initialize stmt_cur_ substatements during dll case building.
*
* Revision 1.29 2001/05/08 23:59:33 steve
* Add ivl and vvp.tgt support for memories in
* expressions and l-values. (Stephan Boettcher)
*
* Revision 1.28 2001/04/15 03:19:44 steve
* Oops, excessive test assert neets to be removed.
*
* Revision 1.27 2001/04/15 03:14:31 steve
* Handle noop as case statements.
*
* Revision 1.26 2001/04/15 02:58:11 steve
* vvp support for <= with internal delay.
*
* Revision 1.25 2001/04/07 19:26:32 steve
* Add the disable statemnent.
*
* Revision 1.24 2001/04/06 02:28:02 steve
* Generate vvp code for functions with ports.
*
* Revision 1.23 2001/04/05 03:20:57 steve
* Generate vvp code for the repeat statement.
*
* Revision 1.22 2001/04/04 04:50:35 steve
* Support forever loops in the tgt-vvp target.
*
* Revision 1.21 2001/04/03 04:50:37 steve
* Support non-blocking assignments.
*
* Revision 1.20 2001/04/02 02:28:12 steve
* Generate code for task calls.
*
* Revision 1.19 2001/04/01 06:52:28 steve
* support the NetWhile statement.
*
* Revision 1.18 2001/04/01 01:48:21 steve
* Redesign event information to support arbitrary edge combining.
*
* Revision 1.17 2001/03/31 17:36:39 steve
* Generate vvp code for case statements.
*
* Revision 1.16 2001/03/30 23:24:02 steve
* Make empty event sub-expression a noop.
*
* Revision 1.15 2001/03/30 05:49:52 steve
* Generate code for fork/join statements.
*
* Revision 1.14 2001/03/29 03:47:38 steve
* Behavioral trigger statements.
*
* Revision 1.13 2001/03/28 06:07:39 steve
* Add the ivl_event_t to ivl_target, and use that to generate
* .event statements in vvp way ahead of the thread that uses it.
*
* Revision 1.12 2001/03/27 06:27:40 steve
* Generate code for simple @ statements.
*
* Revision 1.11 2001/03/20 01:44:14 steve
* Put processes in the proper scope.
*
* Revision 1.10 2000/10/18 20:04:39 steve
* Add ivl_lval_t and support for assignment l-values.
*
* Revision 1.9 2000/10/08 04:01:54 steve
* Back pointers in the nexus objects into the devices
* that point to it.
*
* Collect threads into a list in the design.
*
* Revision 1.8 2000/10/06 23:46:50 steve
* ivl_target updates, including more complete
* handling of ivl_nexus_t objects. Much reduced
* dependencies on pointers to netlist objects.
*
* Revision 1.7 2000/10/05 05:03:01 steve
* xor and constant devices.
*
* Revision 1.6 2000/09/30 02:18:15 steve
* ivl_expr_t support for binary operators,
* Create a proper ivl_scope_t object.
*
* Revision 1.5 2000/09/26 00:30:07 steve
* Add EX_NUMBER and ST_TRIGGER to dll-api.
*
* Revision 1.4 2000/09/23 05:15:07 steve
* Add enough tgt-verilog code to support hello world.
*
* Revision 1.3 2000/09/22 03:58:30 steve
* Access to the name of a system task call.
*
* Revision 1.2 2000/09/19 04:15:27 steve
* Introduce the means to get statement types.
*
* Revision 1.1 2000/09/18 01:24:32 steve
* Get the structure for ivl_statement_t worked out.
*
*/

View File

@ -64,8 +64,8 @@ static void show_binary_expression(ivl_expr_t net, unsigned ind)
width = ivl_expr_width(ivl_expr_oper1(net));
width += ivl_expr_width(ivl_expr_oper2(net));
if (ivl_expr_width(net) != width) {
fprintf(out, "%*sERROR: Result width incorrect\n",
ind+3, "");
fprintf(out, "%*sERROR: Result width incorrect. Expecting %u, got %u\n",
ind+3, "", width, ivl_expr_width(net));
stub_errors += 1;
}
break;