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
Stephen Williams
e5c49022b4
The NetNet class carries multiple packed dimensions.
2012-02-06 17:47:53 -08:00
Stephen Williams
3a2866b57c
Handle members of packed struct as implicit part selects.
...
Packed struct members are synonymous with part selects, but in a
much more convenient form, so get them to work that way.
2012-02-02 16:18:49 -08:00
Stephen Williams
d362c8dba0
Parse support for struct variables.
2012-02-02 16:18:49 -08:00
Cary R
142f661737
Fix the compiler to keep the original file/line information.
...
For a parameter we want to keep the base definition file/line information
not the file/line information for the override.
2012-01-02 10:23:08 -08:00
Cary R
8e3d80679d
Add an implementation for the enumeration name() method.
...
Add an implementation for the enumeration name() method. This currently
only works if the context defines the return width (e.g. the result is
assigned to a variable). It does not work in a self-determined context
(e.g. as an argument to a system function or in a comparison). This is
a limitation in the compiler/code generator/run time not the method
implementation provided here. We may need full string support to make
this work 100%.
2011-10-14 18:37:06 -07:00
Cary R
b905c699d1
Rework enumeration next() and prev() methods to support count argument.
...
Rework the actual next() and prev() methods to correctly process the
numeric count argument. Also rework the compiletf routine to give better
error messages and combine the call routine for the two methods.
Add a compiletf routine that checks the arguments and then report that
the name() method is not currently implemented.
2011-10-14 18:31:18 -07:00
Cary R
0bad7bc337
An enumeration method can be called as a function.
...
Add code to allow an enumeration method to be called as a function.
This is only the compiler support. The runtime support is still missing
so only an empty argument call will succeed (e.g. next(), etc.). For now
the rest get a warning message.
2011-10-14 17:52:03 -07:00