Stephen Williams
096e53dea4
Don't crash if function is not found.
2013-06-12 14:09:08 -07:00
Stephen Williams
bc77a19059
Use $ivl_unsigned to implement VHDL to_unsigned function.
...
The VHDL to_unsigned function with to arguments is best handled
in the ivl elaborator, so have it generate an $ivlh_to_unsigned
function call in the vhdlpp code, and implement it in the ivl
core.
Also, implement the 'length attribute as a $bits() call for
similar reasons.
2013-06-12 14:09:08 -07:00
Martin Whitaker
26dc6d68cd
Handle out-of range and undefined LHS word indices in assignments.
...
For constant word indices, issue a warning if the index is out of
range or an undefined value. In any case, the RHS value should be
discarded, and the actual assignment should be skipped.
2013-05-18 19:21:37 +01:00
Stephen Williams
8e559e4e91
Support shallow copy as far as the ivl_target API.
2013-04-27 19:54:13 -07:00
Stephen Williams
eff6e7a441
Parse to pform shallow copy "new" expressions.
2013-04-21 19:27:57 -07:00
Stephen Williams
8994ef1483
Implement class constructors.
...
Class constructors are the "new" method in a class description.
Elaborate the constructor as an ordinary method, but the only
way to access this method is to implicitly call it. The elaborator
will take the constructor call and generate a naked "new" expression
and implicit constructor method call with the object itself as the
return value.
2013-04-20 16:38:35 -07:00
Stephen Williams
20ee350601
Generalize user defined function return type handling.
...
I'm gonna need functions to return class objects, so generalize
the output types of user defined functions.
2013-04-20 16:38:35 -07:00
Cary R
15379f1750
Remove some compile warnings
2013-04-17 17:13:22 -07:00
Stephen Williams
4ad556d464
Update some copyright notices.
2013-04-08 18:35:37 -07:00
Stephen Williams
b1d853bf9b
Fix handling of struct members for variables imported from packages.
2013-04-08 18:20:39 -07:00
Stephen Williams
44cd9158e8
Elaborate parameters, tasks and functions in packages.
...
Get the elaboration to happen all the way to the ivl_target
interface.
2013-04-08 18:20:39 -07:00
Stephen Williams
bae0f1d3a7
Parse more package items
...
Rework lexical support for PACKAGE_IDENTIFIER so that the lexor
can help with package scoped identifiers.
Pform package types and package functions up to elaboration.
2013-04-08 18:20:39 -07:00
Stephen Williams
64dffa5745
Support member functions with arguments.
2013-03-24 15:12:35 -07:00
Stephen Williams
b1613e99e6
Elaborate function methods' this argument.
2013-03-24 15:12:35 -07:00
Stephen Williams
17330a3073
Elaborate class task and function methods.
...
The parse of class methods already works, this patch forms
the methods into their own scopes, and elaborates those scopes.
The "this"
2013-03-24 15:12:35 -07:00
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