HTTPS clone URL
Subversion checkout URL
History for iverilog/elab_expr.cc
Commits on Apr 7, 2011
When a user or system function is called on the RHS of a continuous assignment, and one of the function arguments is an undeclared identifier, the compiler reports the error correctly but then crashes. This patch fixes the crash.
This patch changes the method used to signal that a constant expression is being elaborated from flags stored in global variables to flags passed down the call chain. It also generates more informative error messages when variable references are found in a constant expression.
Commits on Mar 28, 2011
Commits on Mar 14, 2011
This patch ensures that the result of a shift is an undefined value if the right operand is an undefined value. It also improves the code generated for right shifts where the right operand is constant and optimises away shifts where the right operand is a constant 0. It also fixes a few places where the expression type (signed/unsigned) was not being set correctly.
Commits on Mar 3, 2011
This patch adds a check on the expression type before adjusting an unsized expression width up to integer_width. This adjustment should only be performed for vectorable expressions. The patch also fixes a few compiler warnings that only show up on 32-bit builds.
Commits on Mar 2, 2011
Commits on Mar 1, 2011
This patch modifies the compiler and the ivl interface to pass the type of indexed part select that is being represented (up/down) in a procedural L-value or R-value. This is needed by any back end that wants to correctly denormalize the (zero based) base expression.
Commits on Feb 11, 2011
When taking a variable part select of a parameter we need to give file and line information to the select not the parameter.
Commits on Dec 6, 2010
Constant user functions aren't currently supported. A suitable error message should be output when a user function call is encountered in a parameter expression. This got lost in the parameter expression rework.
The compiler currently performs parameter expression elaboration before performing parameter overrides. This means that the information needed to correctly determine the expression type and width may not be available at the time elaboration is performed. This patch reworks the code to delay elaboration until after all overrides have been performed. It also provides a new -g option that controls how the width of parameter expressions is calculated when the parameter itself is unsized.
Commits on Nov 28, 2010
Commits on Nov 20, 2010
Commits on Nov 7, 2010
Commits on Nov 6, 2010
Commits on Nov 3, 2010
Commits on Nov 2, 2010
This patch covers more than it should. It removes many of the -Wextra warnings in the main ivl directory. It also makes some minor code improvements, adds support for constant logicals in eval_tree (&&/||), adds support for correctly sign extending === and !==, it starts to standardize the eval_tree debug messages and fixes a strength bug in the target interface (found with -Wextra). The rest of the warnings and eval_tree() rework will need to come as a second patch.
This patch changes all the iterator code to use a prefix ++ instead of postfix since it is more efficient (no need for a temporary). It is likely that the compiler could optimize this away, but lets make it efficient from the start.
Commits on Oct 31, 2010
SystemVerilog .name() methods can be converted to equivilent system functions.
Commits on Oct 26, 2010
Commits on Oct 2, 2010
Commits on Oct 1, 2010
Commits on Sep 30, 2010
An unsized signed constant that is smaller than integer_width needs to be resized up to either the integer_width or the expression width whichever is smaller.
Commits on Sep 22, 2010
Commits on Sep 19, 2010
This patch mimics what was done for vectors, but is simpler since arrays don't use the endian information. It also needs to address the fact that .array/port assumes the expression is unsigned so any signed expression must be padded to make it larger than the maximum array word when it is converted to unsigned.
This patch modifies all the variable bit and indexed part selects to use a common routine. This routine determines the minimum width needed to calculate the result correctly, pads the expression if needed and then converts the expression to signed if required to make the calculation correct.
Commits on Sep 4, 2010
Commits on Aug 7, 2010
Added 'expr_wid' parameter to calls to 'eval_expr()' within PEBinary::elaborate_eval_expr_base_()'. This makes a specific problem go away and may even be the correct thing to do.
Commits on Jul 7, 2010
We only need to set the width of a multiple if the width is greater than zero and if the expression is vectorable. This matches what is done for addition.
Commits on May 14, 2010
Some new shadow issues have crept in. This patch fixes these new issues and adds -Wshadow to the normal warning flags to keep any new occurrences from happening.