Larry Doolittle
4dd65926ae
Spelling fixes
2015-08-17 11:35:10 -07:00
Martin Whitaker
5facf243cd
Fix for br990 - handle empty expression in parameter assignment by name.
2015-08-07 21:11:07 +01:00
Martin Whitaker
b400532169
Added support for interface declaration and instantiation.
...
modport and extern tf declarations are not yet supported.
2014-12-19 23:10:14 +00:00
Martin Whitaker
60ab1daa1f
Restore some master branch fixes lost in the vec4-stack merge.
2014-12-07 12:10:15 +00:00
Stephen Williams
2aeb3871ed
Merge branch 'master' into vec4-stack
...
This was a challenging merge...
Conflicts:
elab_scope.cc
synth2.cc
tgt-vvp/eval_expr.c
vvp/vthread.cc
2014-11-13 16:26:15 -08:00
Cary R
6948c27c2d
Enumerations are compatible if their type definitions match.
2014-11-04 15:05:49 -08:00
Cary R
2e9c4cde55
More refined check for enumeration width and constant width
2014-11-04 12:10:38 -08:00
Cary R
cc9fcfd13d
Only a literal constant size has to match the enumeration width.
2014-11-03 19:46:10 -08:00
Cary R
4660e0bf2f
Another tweak to the enumeration elaboration code
2014-11-02 20:26:36 -08:00
Cary R
1e7509a021
Update enumeration elaboration checks
2014-11-02 11:45:19 -08:00
Stephen Williams
d5123011b3
Merge branch 'master' into vec4-stack
...
Conflicts:
elab_scope.cc
2014-11-01 14:57:05 -07:00
Cary R
c25538d750
Pass the integer type for enumerations to the IVL target stage
2014-10-31 18:09:19 -07:00
Cary R
4f62a0d1f2
Check enum trimmed bits for values with undefined bits
...
If an enumeration constant has undefined bits then we need to verify that
the bits that are trimmed match the MSB of the remaining bits.
2014-10-30 19:54:38 -07:00
Cary R
e7df9774aa
When comparing that an enumeration is in range cast the value to 2-state
...
When checking that an enumeration value is in range we need to cast it to
a 2-state value so that when we compare it we get a true or false value
instead of an undefined value. Undefined bits in the comparison return
undefined which is not logically false.
2014-10-30 18:23:47 -07:00
Stephen Williams
a98f21aa65
Merge branch 'master' into vec4-stack
...
Conflicts:
elab_lval.cc
netmisc.cc
tgt-vvp/eval_object.c
tgt-vvp/vvp_process.c
vvp/codes.h
vvp/compile.cc
vvp/opcodes.txt
vvp/vpi_tasks.cc
vvp/vpi_vthr_vector.cc
vvp/vthread.cc
2014-10-21 09:12:02 -07:00
Stephen Williams
712f394224
Elaborate classes in packages.
2014-10-10 18:53:53 -07:00
Stephen Williams
c5fee8bdb9
Elaborate root tasks/functions.
2014-09-30 16:06:32 -07:00
Stephen Williams
480668fee6
Add support for classes defined in $root scope.
2014-09-15 17:37:30 -07:00
Stephen Williams
fa21527e9f
Classes in $root scope up to elaboration.
2014-09-15 17:37:30 -07:00
Stephen Williams
697701a26e
Sorry messages for property arrays.
2014-09-07 17:48:19 -07:00
Stephen Williams
1465fd1570
Class definitions may reference class types in containing scopes.
...
We need the scope where the class is defined so that it can find
types in that containing scope. Note that most definitions cannot
escape into the the lexical scope of the class, but some can.
2014-09-02 09:22:41 -07:00
Cary R
8c3f7d78b9
Partial fix for br956 (various enumeration bugs)
...
This patch fixes the following enumeration bugs:
When looking for an enumeration look in the current scope and then
recursively in any parent scope.
Add enumeration definitions to a package scope.
2014-08-28 13:02:42 -07:00
Stephen Williams
f602ae84ab
Elaborate foreach loops as synthetic for loops.
...
Create an implicit scope to hold the index variable, and
generate a for loop to perform the functionality of the
foreach.
2014-08-21 16:44:46 -07:00
Stephen Williams
2e2317b7c7
Generalize the hname_t to handle n-dimensional scope arrays.
...
... Not that they actually exist yet. But this fixes some symbol
search issues and makes room for this support in the future.
2014-04-06 08:40:09 -07:00
Stephen Williams
b5e0099f28
Fix support for enum literals with undefined values.
2014-03-01 17:45:13 -08:00
Martin Whitaker
a3450bf856
Fixes for GitHub issues 13 and 15.
...
The verinum arithmetic operators now observe the standard Verilog
rules for calculating the result width if all operands are sized.
If any operand is unsized, the result is lossless, as before.
They also now all observe the standard rules for handling partially
undefined operands (if any operand bit is 'x', the entire result is
'x').
I've also added the unary '-' operator, and renamed v_not() to be
the unary '~' operator. This has allowed some simplification in
other parts of the compiler.
2014-02-25 20:39:21 +00:00
Stephen Williams
fc42f40770
Fix problem with enum types in re-used modules
...
When a module is instantiated multiple times, the enum
types contained within would cause trouble. This fixes
that by elaborating in proper scope context.
2014-01-11 19:19:15 -08:00
Stephen Williams
a3b29dd70b
Handle enumeration literals that are in $root.
2014-01-11 19:19:14 -08:00
Stephen Williams
819770a6c4
Handle enumerations as packed struct/union members.
...
There were also some subtleties related to using enumerations
from typedefs and using them in multiple places. Fix various
bugs related to those issues.
2013-12-07 12:20:28 -08:00
Stephen Williams
9bd9c8f301
Implement class extends arguments.
...
This implements constructor arguments right after the base class
name in the class extends syntax.
2013-11-10 18:03:19 -08:00
Stephen Williams
f16fd03dab
Elaborate PChainConstructor calls.
...
It is better to leave the handling of PChainConstructor calls to
the elaboration, instead of stripping them out early. This allows
for handling the arguments of the chain constructor in the correct
scope.
2013-11-10 18:03:19 -08:00
Stephen Williams
a7d8c983ba
Blend initializer statements into any explicit constructor.
...
If there is an explicit constructor, then blend all the statements
of the implicit constructor into it so that there is only one
constructor function.
2013-11-10 18:03:19 -08:00
Stephen Williams
d192f545ac
Chain class instance constructors with arguments.
2013-11-10 18:03:19 -08:00
Stephen Williams
9f83882bcc
Parse/elaborate class derivation
...
This gets us down to working classes, but does not yet implement
calls to the parent constructor, implicitly or explicitly.
2013-11-10 18:03:19 -08:00
Cary R
d8f945be23
Add support for SV do/while
2013-09-16 20:02:09 -07:00
Stephen Williams
cf47a759d1
Implement the "local" class member protection.
...
Test during elaboration that the member really is
accessible in the context where the elaboration
happens.
2013-07-02 20:16:47 -07:00
Stephen Williams
046535cfbb
Blend implicit constructor with explicit constructor
...
Class types that have both implicit construction and
an explicit constructor can blend the implicit and
explicit construction into the "new" function defined
by the user. This doesn't change the behavior any, but
removes a function call and related scope.
2013-07-02 20:16:47 -07:00
Stephen Williams
75b4b94061
Elaborate implicit initializers
...
Remaining pform fixup of property initializers, and
elaboration and code generation for implicit constructor.
2013-07-02 20:16:46 -07:00
Stephen Williams
d346fb098f
Collect initializer statements in the pform.
2013-07-02 20:16:46 -07:00
Cary R
431d62185b
vlog95: Emit a new doing a shallow copy as an error.
2013-04-30 11:52:52 -07:00
Stephen Williams
de6c57d661
Elaborate classes in lexical order so that mutual references work.
2013-04-28 16:28:24 -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
Stephen Williams
4ad556d464
Update some copyright notices.
2013-04-08 18:35:37 -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
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
Stephen Williams
fac5cbca43
Handle this as special identifier strings. / Organize pform class member binding
2013-03-24 15:03:52 -07: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
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
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
e0f82981e7
Remove some compiler warnings
2012-09-24 10:28:17 -07:00