Bit select of array word
fix support for bit select of array word in behavioral expressions.
This commit is contained in:
parent
e75e7131ac
commit
a72977a7ed
272
elab_expr.cc
272
elab_expr.cc
|
|
@ -1193,7 +1193,7 @@ NetExpr* PEIdent::elaborate_expr_net_word_(Design*des, NetScope*scope,
|
|||
NetESignal*res = new NetESignal(net, word_index);
|
||||
res->set_line(*this);
|
||||
|
||||
// Detect that the word has a part select as well.
|
||||
// Detect that the word has a bin/part select as well.
|
||||
|
||||
index_component_t::ctype_t word_sel = index_component_t::SEL_NONE;
|
||||
if (name_tail.index.size() > 1)
|
||||
|
|
@ -1208,6 +1208,9 @@ NetExpr* PEIdent::elaborate_expr_net_word_(Design*des, NetScope*scope,
|
|||
if (word_sel == index_component_t::SEL_IDX_DO)
|
||||
return elaborate_expr_net_idx_do_(des, scope, res, found_in);
|
||||
|
||||
if (word_sel == index_component_t::SEL_BIT)
|
||||
return elaborate_expr_net_bit_(des, scope, res, found_in);
|
||||
|
||||
ivl_assert(*this, word_sel == index_component_t::SEL_NONE);
|
||||
return res;
|
||||
}
|
||||
|
|
@ -1740,272 +1743,5 @@ NetExpr* PEUnary::elaborate_expr(Design*des, NetScope*scope,
|
|||
|
||||
/*
|
||||
* $Log: elab_expr.cc,v $
|
||||
* Revision 1.126 2007/06/02 03:42:12 steve
|
||||
* Properly evaluate scope path expressions.
|
||||
*
|
||||
* Revision 1.125 2007/05/24 04:07:11 steve
|
||||
* Rework the heirarchical identifier parse syntax and pform
|
||||
* to handle more general combinations of heirarch and bit selects.
|
||||
*
|
||||
* Revision 1.124 2007/04/01 05:28:26 steve
|
||||
* Get offsets into indexed part selects correct.
|
||||
*
|
||||
* Revision 1.123 2007/03/26 19:23:13 steve
|
||||
* Handle part select of array words.
|
||||
*
|
||||
* Revision 1.122 2007/03/14 05:06:49 steve
|
||||
* Replace some asserts with ivl_asserts.
|
||||
*
|
||||
* Revision 1.121 2007/03/07 00:38:15 steve
|
||||
* Lint fixes.
|
||||
*
|
||||
* Revision 1.120 2007/03/06 05:22:49 steve
|
||||
* Support signed function return values.
|
||||
*
|
||||
* Revision 1.119 2007/03/02 01:55:36 steve
|
||||
* Better error message when operating on array.
|
||||
*
|
||||
* Revision 1.118 2007/01/19 05:42:40 steve
|
||||
* Precalculate constant power expressions, and constant function arguments.
|
||||
*
|
||||
* Revision 1.117 2007/01/16 05:44:14 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.116 2006/11/10 04:54:26 steve
|
||||
* Add test_width methods for PETernary and PEString.
|
||||
*
|
||||
* Revision 1.115 2006/11/04 06:19:24 steve
|
||||
* Remove last bits of relax_width methods, and use test_width
|
||||
* to calculate the width of an r-value expression that may
|
||||
* contain unsized numbers.
|
||||
*
|
||||
* Revision 1.114 2006/10/30 05:44:49 steve
|
||||
* Expression widths with unsized literals are pseudo-infinite width.
|
||||
*
|
||||
* Revision 1.113 2006/10/15 03:25:57 steve
|
||||
* More detailed internal error message.
|
||||
*
|
||||
* Revision 1.112 2006/10/03 05:06:00 steve
|
||||
* Support real valued specify delays, properly scaled.
|
||||
*
|
||||
* Revision 1.111 2006/09/28 04:35:18 steve
|
||||
* Support selective control of specify and xtypes features.
|
||||
*
|
||||
* Revision 1.110 2006/09/28 00:29:49 steve
|
||||
* Allow specparams as constants in expressions.
|
||||
*
|
||||
* Revision 1.109 2006/09/19 23:00:15 steve
|
||||
* Use elab_and_eval for bit select expressions.
|
||||
*
|
||||
* Revision 1.108 2006/08/09 05:19:08 steve
|
||||
* Add support for real valued modulus.
|
||||
*
|
||||
* Revision 1.107 2006/07/31 03:50:17 steve
|
||||
* Add support for power in constant expressions.
|
||||
*
|
||||
* Revision 1.106 2006/07/07 04:06:37 steve
|
||||
* Fix context determined with of constants.
|
||||
*
|
||||
* Revision 1.105 2006/06/02 04:48:49 steve
|
||||
* Make elaborate_expr methods aware of the width that the context
|
||||
* requires of it. In the process, fix sizing of the width of unary
|
||||
* minus is context determined sizes.
|
||||
*
|
||||
* Revision 1.104 2006/06/01 03:54:51 steve
|
||||
* Fix broken subtraction of small constants.
|
||||
*
|
||||
* Revision 1.103 2006/04/12 05:05:03 steve
|
||||
* Use elab_and_eval to evaluate genvar expressions.
|
||||
*
|
||||
* Revision 1.102 2006/02/02 02:43:57 steve
|
||||
* Allow part selects of memory words in l-values.
|
||||
*
|
||||
* Revision 1.101 2005/11/27 05:56:20 steve
|
||||
* Handle bit select of parameter with ranges.
|
||||
*
|
||||
* Revision 1.100 2005/11/14 22:11:52 steve
|
||||
* Fix compile warning.
|
||||
*
|
||||
* Revision 1.99 2005/11/10 13:28:11 steve
|
||||
* Reorganize signal part select handling, and add support for
|
||||
* indexed part selects.
|
||||
*
|
||||
* Expand expression constant propagation to eliminate extra
|
||||
* sums in certain cases.
|
||||
*
|
||||
* Revision 1.98 2005/10/04 04:09:25 steve
|
||||
* Add support for indexed select attached to parameters.
|
||||
*
|
||||
* Revision 1.97 2005/09/19 21:45:35 steve
|
||||
* Spelling patches from Larry.
|
||||
*
|
||||
* Revision 1.96 2005/09/14 02:53:13 steve
|
||||
* Support bool expressions and compares handle them optimally.
|
||||
*
|
||||
* Revision 1.95 2005/09/01 04:10:47 steve
|
||||
* Check operand types for compatibility.
|
||||
*
|
||||
* Revision 1.94 2005/07/11 16:56:50 steve
|
||||
* Remove NetVariable and ivl_variable_t structures.
|
||||
*
|
||||
* Revision 1.93 2005/01/24 05:28:30 steve
|
||||
* Remove the NetEBitSel and combine all bit/part select
|
||||
* behavior into the NetESelect node and IVL_EX_SELECT
|
||||
* ivl_target expression type.
|
||||
*
|
||||
* Revision 1.92 2004/12/11 02:31:25 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.91 2004/10/04 01:10:52 steve
|
||||
* Clean up spurious trailing white space.
|
||||
*
|
||||
* Revision 1.90 2004/08/28 15:42:11 steve
|
||||
* Add support for $unsigned.
|
||||
*
|
||||
* Revision 1.89 2004/08/26 03:52:07 steve
|
||||
* Add the $is_signed function.
|
||||
*
|
||||
* Revision 1.88 2004/06/17 16:06:18 steve
|
||||
* Help system function signedness survive elaboration.
|
||||
*
|
||||
* Revision 1.87 2004/06/04 23:34:15 steve
|
||||
* Special case for unary - of real literal.
|
||||
*
|
||||
* Revision 1.86 2004/05/31 23:34:36 steve
|
||||
* Rewire/generalize parsing an elaboration of
|
||||
* function return values to allow for better
|
||||
* speed and more type support.
|
||||
*
|
||||
* Revision 1.85 2004/03/09 04:29:42 steve
|
||||
* Separate out the lookup_sys_func table, for eventual
|
||||
* support for function type tables.
|
||||
*
|
||||
* Remove ipal compile flags.
|
||||
*
|
||||
* Revision 1.84 2004/02/20 06:22:56 steve
|
||||
* parameter keys are per_strings.
|
||||
*
|
||||
* Revision 1.83 2004/01/21 04:57:40 steve
|
||||
* Generate error when missing concatenation operands.
|
||||
*
|
||||
* Revision 1.82 2003/10/09 16:52:52 steve
|
||||
* Put parameter name in NetEConstParam, not scope.
|
||||
*
|
||||
* Revision 1.81 2003/09/19 03:30:05 steve
|
||||
* Fix name search in elab_lval.
|
||||
*
|
||||
* Revision 1.80 2003/06/24 01:38:02 steve
|
||||
* Various warnings fixed.
|
||||
*
|
||||
* Revision 1.79 2003/06/18 03:55:18 steve
|
||||
* Add arithmetic shift operators.
|
||||
*
|
||||
* Revision 1.78 2003/06/10 04:29:57 steve
|
||||
* PR735: bit select indices are signed constants.
|
||||
*
|
||||
* Revision 1.77 2003/05/30 02:55:32 steve
|
||||
* Support parameters in real expressions and
|
||||
* as real expressions, and fix multiply and
|
||||
* divide with real results.
|
||||
*
|
||||
* Revision 1.76 2003/04/22 04:48:29 steve
|
||||
* Support event names as expressions elements.
|
||||
*
|
||||
* Revision 1.75 2003/04/19 04:19:38 steve
|
||||
* Set line number for ternary expressions.
|
||||
*
|
||||
* Revision 1.74 2003/04/02 04:25:26 steve
|
||||
* Fix xz extension of constants.
|
||||
*
|
||||
* Revision 1.73 2003/03/25 03:00:04 steve
|
||||
* Scope names can be relative.
|
||||
*
|
||||
* Revision 1.72 2003/03/15 04:46:28 steve
|
||||
* Better organize the NetESFunc return type guesses.
|
||||
*
|
||||
* Revision 1.71 2003/03/10 23:40:53 steve
|
||||
* Keep parameter constants for the ivl_target API.
|
||||
*
|
||||
* Revision 1.70 2003/03/07 02:44:34 steve
|
||||
* Implement $realtobits.
|
||||
*
|
||||
* Revision 1.69 2003/01/27 05:09:17 steve
|
||||
* Spelling fixes.
|
||||
*
|
||||
* Revision 1.68 2003/01/26 21:15:58 steve
|
||||
* Rework expression parsing and elaboration to
|
||||
* accommodate real/realtime values and expressions.
|
||||
*
|
||||
* Revision 1.67 2002/12/21 00:55:57 steve
|
||||
* The $time system task returns the integer time
|
||||
* scaled to the local units. Change the internal
|
||||
* implementation of vpiSystemTime the $time functions
|
||||
* to properly account for this. Also add $simtime
|
||||
* to get the simulation time.
|
||||
*
|
||||
* Revision 1.66 2002/09/21 21:28:18 steve
|
||||
* Allow constant bit selects out of range.
|
||||
*
|
||||
* Revision 1.65 2002/09/18 04:08:45 steve
|
||||
* Spelling errors.
|
||||
*
|
||||
* Revision 1.64 2002/09/12 15:49:43 steve
|
||||
* Add support for binary nand operator.
|
||||
*
|
||||
* Revision 1.63 2002/08/19 02:39:16 steve
|
||||
* Support parameters with defined ranges.
|
||||
*
|
||||
* Revision 1.62 2002/08/12 01:34:58 steve
|
||||
* conditional ident string using autoconfig.
|
||||
*
|
||||
* Revision 1.61 2002/06/14 21:38:41 steve
|
||||
* Fix expression width for repeat concatenations.
|
||||
*
|
||||
* Revision 1.60 2002/05/24 00:44:54 steve
|
||||
* Add support for $bits (SystemVerilog)
|
||||
*
|
||||
* Revision 1.59 2002/05/06 02:30:27 steve
|
||||
* Allow parameters in concatenation of widths are defined.
|
||||
*
|
||||
* Revision 1.58 2002/05/05 21:11:49 steve
|
||||
* Put off evaluation of concatenation repeat expresions
|
||||
* until after parameters are defined. This allows parms
|
||||
* to be used in repeat expresions.
|
||||
*
|
||||
* Add the builtin $signed system function.
|
||||
*
|
||||
* Revision 1.57 2002/04/27 05:03:46 steve
|
||||
* Preserve stringiness string part select and concatenation.
|
||||
*
|
||||
* Revision 1.56 2002/04/27 02:38:04 steve
|
||||
* Support selecting bits from parameters.
|
||||
*
|
||||
* Revision 1.55 2002/04/25 05:04:31 steve
|
||||
* Evaluate constant bit select of constants.
|
||||
*
|
||||
* Revision 1.54 2002/04/14 21:16:48 steve
|
||||
* Evaluate logical not at elaboration time.
|
||||
*
|
||||
* Revision 1.53 2002/04/14 03:55:25 steve
|
||||
* Precalculate unary - if possible.
|
||||
*
|
||||
* Revision 1.52 2002/04/13 02:33:17 steve
|
||||
* Detect missing indices to memories (PR#421)
|
||||
*
|
||||
* Revision 1.51 2002/03/09 02:10:22 steve
|
||||
* Add the NetUserFunc netlist node.
|
||||
*
|
||||
* Revision 1.50 2002/01/28 00:52:41 steve
|
||||
* Add support for bit select of parameters.
|
||||
* This leads to a NetESelect node and the
|
||||
* vvp code generator to support that.
|
||||
*
|
||||
* Revision 1.49 2002/01/11 05:25:45 steve
|
||||
* The stime system function is 32bits.
|
||||
*/
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue