Martin Whitaker
b80401e1ee
Improved error reporting for constant user functions.
2013-03-24 14:43:10 -07:00
Martin Whitaker
1bcd3a97ad
Support disable statements and system task calls in constant functions.
...
This patch implements the evaluate_function method for the NetDisable
and NetSTask classes. It also makes the checks for a function being
constant work when the function contains nested scopes (named blocks).
2013-03-24 14:42:59 -07:00
Martin Whitaker
ee71ade720
Handle implicit cast when short-circuiting ternary expression.
...
If a ternary expression with mixed logic and real operands is
short-circuited and the logic value is selected, that value
should be cast to a real value.
2013-03-24 14:24:42 -07:00
Martin Whitaker
22769afd20
Fix implicit casts in assignments (part 1).
...
This patch adds support for implicit casts to the elaborate_rval_expr()
function. This will handle the majority of cases where an implicit cast
can occur.
2013-03-24 10:14:07 -07:00
Stephen Williams
64401ab815
Merge branch 'work13a'
2013-03-04 08:59:50 -08:00
Stephen Williams
60cb78e4ab
Add packages and their own scope.
...
This makes <pkg>::<name> work properly, and also makes the
package descriptions available through VPI.
2013-02-17 17:00:15 -08:00
Stephen Williams
69de1da172
Handle ranges of slices.
2013-02-13 19:50:05 -08:00
Stephen Williams
4568766cff
Add support for darrays as class properties.
2013-01-27 20:10:25 -08:00
Cary R
8e515a9a64
Merge branch 'master' of github.com:steveicarus/iverilog
2013-01-11 15:10:17 -08:00
Martin Whitaker
45bb1313e7
Correctly handle negative genvar values.
...
During expression elaboration, genvar values were being erroneously
cast to unsigned values when creating a verinum for use in expression
evaluation.
2013-01-11 15:09:20 -08:00
Stephen Williams
d6726f62fc
Implement substring method for string expressions.
2013-01-05 11:40:12 -08:00
Stephen Williams
318a4033b8
Flesh out class type elaboration
...
Add properties to the classes, and elaborate expressions that
have class properties. Describe class object property references
all the way down to the stub target.
2012-12-10 19:20:02 -08:00
Stephen Williams
f7033ca19a
Handle class-type identifier expressions.
2012-12-10 19:13:44 -08:00
Stephen Williams
79903ecadd
Handle null objects in general.
2012-12-10 19:13:44 -08:00
Stephen Williams
b6eb86d696
Blend new_darray and new_class expression nodes.
2012-12-10 19:13:43 -08:00
Stephen Williams
7a2ad01f2e
Class new expressions, down to the ivl_target.h API.
2012-12-10 19:13:43 -08:00
Stephen Williams
77d24cd095
Elaborate class_new and (null) expressions
...
This gets the types right for class_new and null expressions, and
elaborate them down to the ivl_target.h API.
2012-12-10 19:13:43 -08:00
Cary R
15fb58f8e4
Remove some cppcheck warnings, etc.
2012-11-12 18:15:25 -08:00
Stephen Williams
a2d980540d
Get some type information to the "new" expression for darrays.
2012-10-14 17:16:47 -07:00
Stephen Williams
1aa21aa9e8
ivl_target interface to packed type details.
...
The darray in particular needs to know about the subtype info.
In the process, clean up some of the type information.
2012-10-14 17:16:47 -07:00
Stephen Williams
914ebeca4a
Some rework to allow for nested packed types.
...
This also simplifies the NetNet set of contructors and generalizes
the types that are supported, especially packed types.
2012-10-14 17:16:47 -07:00
Stephen Williams
4e76912331
ivl_target access to type information.
2012-10-14 17:16:47 -07:00
Stephen Williams
92313654ec
Rework the way vectors are represented in NetNet objects.
2012-10-14 17:16:47 -07:00
Stephen Williams
174177d437
Rework symbol search to work incrementally.
...
This is necessary to handle paths that turn out to end with
member names instead of symbol names.
2012-09-03 16:00:10 -07:00
Stephen Williams
0bdabab4fb
Rework packed dimensions handling
...
Make packed structs more obviously parts of a vector.
Handle arrays of structs in certain cases.
2012-09-03 16:00:10 -07:00
Arun Persaud
f5aafc32f9
updated FSF-address
2012-08-29 10:12:10 -07:00
Stephen Williams
813f548a4b
Merge branch 'x-mil3'
...
Conflicts:
vpi/Makefile.in
vpi/sys_table.c
2012-07-30 17:02:57 -07:00
Martin Whitaker
ebe81f7059
Eliminate duplicate error messages for indexed part selects.
...
This patch stops the compiler generating duplicate error messages
when an indexed part select has an illegal width.
2012-07-27 18:42:53 -07:00
Martin Whitaker
c4ff8300d3
Handle error case of zero width in indexed part select.
...
The compiler doesn't currently check that the width of an indexed
part select is non-zero. If code contains this erroneous case, the
compiler can crash (with an assertion failure). This patch causes
the compiler to output a suitable error message and recover. It
also fixes a potential crash if an illegal expresson is encountered.
2012-07-27 18:42:43 -07:00
Stephen Williams
94e217f02b
vvp support for dynamic arrays.
...
This words completely for single-dimension dynamic arrays of
32bit integers. These changes also act as a stub for other
target types.
2012-07-22 10:52:07 -07:00
Stephen Williams
fdc92ea464
Elaborate dynamic array expressions (lval/rval) down to ivl_target.h
2012-07-22 10:52:07 -07:00
Stephen Williams
d0e6b24ca2
Support the new[] operator for arrays
...
Implement through the ivl core to the ivl_target.h API.
Also draft implementation of creating and storing arrays
in the vvp runtime and code generator.
2012-07-22 10:52:06 -07:00
Stephen Williams
14f229de30
Parse support for dynamic arrays.
...
This includes limited support for dynamic arrays down to the code
generator, and some stubs in the vvp code generator and vvp run time.
2012-07-22 10:52:06 -07:00
Stephen Williams
2bef6b8624
Detect and implement string.len() method, and string[index] expressions
...
Implement the string.len() method in the system.vpi, and implement
the string[index] method in vvp.
2012-07-22 10:52:06 -07:00
Stephen Williams
f77bdf7e38
Handle concatenation of SystemVerilog strings.
2012-07-22 10:52:06 -07:00
Stephen Williams
d10e4bca4c
Remove some uses of the svector class.
2012-05-28 16:49:41 -07:00
Stephen Williams
342646264e
Merge branch 'pei1'
2012-05-25 16:32:12 -07:00
Stephen Williams
6e8aef8262
Get unpacked arrays working.
2012-05-25 15:58:29 -07:00
Stephen Williams
315ac4f179
support part select of struct members that are packed arrays.
2012-05-22 17:31:26 -07:00
Stephen Williams
78b0b49a4e
Support struct members that are packed arrays.
2012-05-22 17:31:25 -07:00
Martin Whitaker
44c5a37ab8
Allow specparam declarations outside specify blocks.
...
This patch extends the compiler to support all specparam declarations
allowed by the 1364-2005 standard. For compatibility with other
simulators, it allows specparam values to be used in any constant
expression, but outputs a warning message and disables run-time
annotation of a specparam if it is used in an expression that must
be evaluated at compile time.
2012-05-17 16:18:38 -07:00
Stephen Williams
8ea1e49768
Improve net bit select calculations.
2012-04-30 11:48:33 -07:00
Cary R
42239a8498
Add code to test the width of individual structure elements.
...
This patch adds code to correctly set the type and width of individual
structure elements. Note the sign information is not currently available.
2012-04-02 19:53:47 -07:00
Cary R
51ef541969
Fix compile on cygwin and fix a few compile warnings.
...
This patch fixes a few compile warnings and adds the new packed routines
to the ivl.def file so that this links correctly on cygwin.
2012-02-22 10:20:49 -08:00
Stephen Williams
fec1c1efde
Handle r-value constant slice selects.
2012-02-12 16:19:58 -08:00
Stephen Williams
77f168cf28
Support non-constant indexed part select of packed arrays.
2012-02-12 14:52:47 -08:00
Stephen Williams
5e067bd651
Handle constant indexed part selects.
2012-02-12 12:03:43 -08:00
Stephen Williams
c1b73c83f4
Respond better to some error/sorry situations.
2012-02-12 11:16:31 -08:00
Stephen Williams
6eeef8311f
Handle indexed bit select of packed arrays.
...
This handles a few cases where the non-constant bit selects are
in the final index. This doesn't handle all the cases of packed
arrays, but it handles some common cases.
2012-02-12 10:13:20 -08:00
Stephen Williams
3e4f8b625f
Get packed signals working through to simulation in some situations.
...
When dynamic indexing of early dimensions is not needed, we can get
pretty far with getting packed arrays to work.
2012-02-10 17:17:59 -08:00