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
Stephen Williams
886b6cd349
Debug messages.
2014-08-30 10:18:57 -07:00
Stephen Williams
0dc28c0fc3
Fix the %qpop/f instruction detection.
2014-08-30 10:18:57 -07:00
Stephen Williams
dec4cd5071
Handle arrays of class objects.
...
This goes all the way down to the vvp level, where we create support
for arrays of objects, generate the new code in the -tvvp code
generator, and elaborate the arrays in the first place.
2014-08-30 10:18:57 -07:00
Stephen Williams
0cd6fbaf41
foreach loops around static arrays
...
Arrays with static dimensions can be handled specially.
This also allows for arbitrary numbers of dimensions.
2014-08-30 10:18:57 -07:00
Stephen Williams
9fa764285a
foreach multiple indices through the pform.
2014-08-30 10:18:57 -07:00
Stephen Williams
fe8e7a6261
Merge pull request #39 from orsonmmz/testenum_fix
...
Fixed enum typedefs.
2014-08-29 21:06:20 -07:00
Cary R
a0ea7e17cf
Packages can contain enum definitions so emit them in the pform.
2014-08-28 17:01:30 -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
Maciej Suminski
684c2fe19e
Fixed enum typedefs.
2014-08-28 11:04:25 +02:00
Maciej Suminski
a67f18f8ef
ivl: Do not delete range objects right after setting range for a net.
2014-08-28 10:02:56 +02:00
Cary R
931039761a
Don't try to print the vector size if it is empty (a single bit)
2014-08-27 17:54:46 -07:00
Stephen Williams
3852545f21
Merge pull request #38 from orsonmmz/unbounded_array
...
Support for VHDL unbounded arrays.
2014-08-27 09:15:28 -07:00
Cary R
b4d0c43a96
Remove some compile warnings.
2014-08-25 18:24:58 -07:00
Cary R
c24c26725e
A method call needs to ignore a single NULL argument from the parser
...
The parser always passes a single NULL argument for system tasks. For a
method call which will add a signal to call the method on we need to
ignore this NULL argument.
2014-08-25 18:06:08 -07:00
Cary R
1269c12054
vlog95: Handle a system task with a NULL last argument
2014-08-25 18:06:01 -07:00
Cary R
4fb91ec7c7
vlog95: Add SV queue specific error message and code generation.
2014-08-25 16:41:08 -07:00
Martin Whitaker
e5f49baaac
Fix for GitHub issue #37 - bug in expression width pruning.
...
If an expression contains a division, remainder, or right shift operation,
set the expression min_width to UINT_MAX to flag that the expression width
cannot be pruned. Using UINT_MAX ensures that the min_width won't change
as we continue to elaborate the expression.
2014-08-25 20:27:22 +01:00
Maciej Suminski
0f728b9150
vhdlpp: Minor cleaning, fixed copyright notices.
2014-08-25 17:29:35 +02:00
Maciej Suminski
b0c79d5d1c
vhdlpp: Added VType::emit_name() that skips emission of a name if it is empty (otherwise '\' is outputted).
2014-08-25 17:05:15 +02:00
Maciej Suminski
150fe088a6
vhdlpp: VTypeRecord is marked as acceptable in packed arrays. VTypeDef is accepted depending on the base type.
2014-08-25 16:56:46 +02:00
Maciej Suminski
bb66ed8b9d
vhdlpp: "integer" is emitted as "bool[31:0" but is marked as accepted to be used in packed arrays.
2014-08-25 16:51:35 +02:00
Cary R
447e402d16
Require a space between the synthesis and translate_* key words
2014-08-22 16:55:47 +02:00
Martin Whitaker
86bb269d47
Fix for GitHub issue #33 - Problem with multi-dimensional arrays.
...
normalize_variable_unpacked() was not correctly calculating the
minimum expression width required to calculate the canonical
index.
2014-08-22 16:55:47 +02:00
Stephen Williams
486dc7abeb
Do a better job with synthesis translate pragmas.
2014-08-22 16:55:47 +02:00
Cary R
6765e32ab9
Add message that L-value concatenation is not supported in synthesis
2014-08-22 16:55:47 +02:00
Maciej Suminski
b1d15436fd
Removed ExpReal::evaluate().Its signature does not match the one meant to be overridden.
2014-08-22 16:55:47 +02:00
Maciej Suminski
c846b2cf3f
vhdlpp: 'integer' is emitted as 'integer' instead of 'bool [31:0]'.
2014-08-22 16:45:17 +02:00
Maciej Suminski
10446df80e
vhdlpp: Invert range in ExpAggregate when necessary.
2014-08-22 16:23:22 +02:00
Maciej Suminski
0a2100c87f
vhdlpp: Turn on the reg_flag for types that cannot be packed.
2014-08-22 16:22:59 +02:00
Maciej Suminski
27730395ca
vhdlpp: Type of an array is selected depending on the element type.
2014-08-22 10:49:55 +02:00
Maciej Suminski
8e9c25a23e
vhdlpp: Added 'packed' property for VTypes.
...
It detetermines if a type can be used as the base type of a packed array.
2014-08-22 10:45:02 +02:00
Maciej Suminski
feccae56bf
libmisc: Added empty_perm_string.
2014-08-22 10:42:51 +02:00
Stephen Williams
5de83906f7
Sorry message for multi-dimension foreach loop indices.
2014-08-21 20:34:55 -07:00
Stephen Williams
8b969202c0
Clean up some bugs introduced by recent patches.
2014-08-21 20:21:23 -07:00
Stephen Williams
ea5789e4d9
Implement $low() for certain types.
2014-08-21 16:44:46 -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
335db49282
Add vvp implementations for pop_back and pop_front methods.
2014-08-21 16:44:46 -07:00
Stephen Williams
8c2d51142b
Elaborate pop_back/pop_front methods on dynamic arrays.
2014-08-21 16:44:46 -07:00
Stephen Williams
5ee253b03b
Fix mis-spelled vpiStatisARray in sv_vpi_user.h header file
2014-08-21 16:44:46 -07:00
Stephen Williams
c9ff48bd4e
Add support for dynamic array/queue "last" index ($)
...
Internally, treat the "$" as a special expression type that takes
as an argument the signal that is being indexed. In the vvp target,
use the $last system function to implement this.
2014-08-21 16:44:45 -07:00
Stephen Williams
9b4681918b
Array access to queue variables.
2014-08-21 16:44:45 -07:00
Stephen Williams
0894bc6409
Non-synthesis version of the devel-stub.sh by default.
2014-08-21 16:44:45 -07:00
Stephen Williams
da63ef02d4
Implement the size method for queues.
...
This works by translating it to a $size() system function call.
The $size function is already implemented for dynamic queues and
it is easy enough to expand it for queues.
2014-08-21 16:44:45 -07:00
Stephen Williams
a730572e37
Elaborate size method of darray/queue objects.
2014-08-21 16:44:45 -07:00
Stephen Williams
d891285326
vvp code generation for push_back/push_front for queue objects.
2014-08-21 16:44:45 -07:00
Stephen Williams
e8b8fcba57
Support declaring queue variables all the way to vvp.
...
Nothing actually useful happens here, but the declarations
are functional.
2014-08-21 16:44:45 -07:00
Stephen Williams
6d052d4ff7
Handle queue types and expressions at pform level.
2014-08-21 16:44:45 -07:00
Maciej Suminski
72ff9ac00b
vhdlpp: Aggregate expression are elaborated if
...
they are used for Signal/Variable initalization.
2014-08-20 14:18:16 +02:00
Maciej Suminski
c92dea77fc
vhdlpp: Basic support for unbounded array types.
...
Once a signal/variable of unbounded array type becomes limited in its size, it
is emitted as a packed array. Therefore currently it works only for
bit/logic/reg/wire types.
2014-08-15 10:21:45 +02:00