Cary R
4dbd0442aa
Add missing file/line information to a few expressions.
2013-06-26 21:25:27 -07:00
Cary R
fa9a439bf1
Update fstap files to the latest from GTKWave
2013-06-14 16:35:22 -07:00
Cary R
11e394aacf
Remove space error
2013-06-14 16:35:09 -07:00
Martin Whitaker
9af0811a1c
Fix for br932 part 2 - make $fopen accept SV 'string' type.
...
The is_string_obj function in vpi/sys_priv.c needed to be updated to
recognise the vpiStringVar object type.
2013-06-14 21:00:39 +01:00
Martin Whitaker
503487e9ea
Fix for br932 - support string types in task input ports.
2013-06-13 23:18:23 +01:00
Stephen Williams
ca9616dc7b
Better simple_expression parse rules.
2013-06-12 14:21:36 -07:00
Stephen Williams
24bd630cb2
Parse (to sorry messages) unbounded array definitions.
2013-06-12 14:21:36 -07:00
Stephen Williams
8487cb5616
Do a better job of figuring the vtype of an expression.
2013-06-12 14:21:36 -07:00
Stephen Williams
d630e4dfe9
Elaborate VHDL entity port types/expressions.
...
We need to elaborate expressions so that function calls in
expressions (i.e. ranges) get bound to their proper scope.
This binding is in turn used to emit package scopes. This
is particularly interesting for ports of entities.
2013-06-12 14:21:35 -07:00
Stephen Williams
3d5765949e
Some shorthand type marks in write_to_stream.
2013-06-12 14:21:35 -07:00
Stephen Williams
0fcd2d9db6
Handle rising_edge and falling_edge functions.
2013-06-12 14:21:35 -07:00
Stephen Williams
3446455055
Support compile-time evaluation of named blocks.
2013-06-12 14:21:35 -07:00
Stephen Williams
af304fea65
Fix repeated use of disabled const functions.
...
If constant functions are exited by a return/disable, fix
the leaked "disable" flag that causes blocks in the next
try at the function to not work.
There are also a lot of debug messages added to help find
this and similar problems.
2013-06-12 14:09:08 -07:00
Stephen Williams
bcaa6accec
Fix evaluation wrong expression for const >= expressions.
2013-06-12 14:09:08 -07:00
Stephen Williams
5c00b96127
Handle constant functions from other scopes, i.e. packages.
2013-06-12 14:09:08 -07:00
Stephen Williams
bfe3998eaa
Lexor detects that excaped identifiers may be package names.
2013-06-12 14:09:08 -07:00
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
Stephen Williams
1b178d56b7
Add support for SystemVerilog return statements.
2013-06-12 14:09:07 -07:00
Stephen Williams
dca6171f5f
SV emit function ports in package subprograms.
2013-06-12 14:09:07 -07:00
Stephen Williams
164b5f9348
Fix SV emit of ForLoopStatement and ReturnStmt.
2013-06-12 14:09:07 -07:00
Stephen Williams
e927960121
Implement subprogram bodies in package bodies.
2013-06-12 14:09:07 -07:00
Stephen Williams
6394a4d78d
Rework scope types and constants so we can tell imported from local names.
...
The package emit of types and constants needs to know which names are
from the current type and which are imported from libraries. Rework
the scope handling of those names so that the information is preserved.
2013-06-12 14:09:07 -07:00
Stephen Williams
13be45bd73
Fix dump of primitive CHARACTER types.
2013-06-12 14:09:07 -07:00
Stephen Williams
7f7decde03
Basic structure for emitting packages.
2013-06-12 14:09:07 -07:00
Stephen Williams
d9fea802da
Function declarations in packages
...
This is still basic. Definitions are still not done.
2013-06-12 14:09:07 -07:00
Martin Whitaker
34f6e25b4e
Revised fix for bug 931.
...
We can't directly determine that a %fork operation is a task or function
call, so need to infer this by comparing the parent and child scopes.
2013-05-27 20:17:44 +01:00
Martin Whitaker
afe1e79338
Update a few comments for changes to thread fork/join behaviour.
2013-05-27 10:12:30 +01:00
Martin Whitaker
cbaf36d4b8
Fix for br931.
...
Task and function calls are handled in vvp using the fork/join
instructions. The join instruction after a call must reap the
task/function thread.
2013-05-27 09:34:44 +01:00
Martin Whitaker
6f8eede371
Handle out-of range and undefined LHS bit/part selects in assignments.
...
For constant bit/part selects, issue a warning if the select 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-21 21:44:31 +01:00
Martin Whitaker
c693930595
Fix compiler crash when an attribute value is invalid.
2013-05-19 11:07:37 +01:00
Martin Whitaker
6364aba975
Fix for br930 - support attributes on old-style port declarations.
2013-05-19 09:16:24 +01:00
Martin Whitaker
10ec58703f
Fix vvp memory leak for VPI call with no calltf.
...
If a VPI call with real arguments has no calltf function, we still
need to pop the arguments off the vthread stack. Similarly, if it
has a real result, we need to push a value onto the vthread stack.
2013-05-18 21:22:44 +01:00
Martin Whitaker
9a69fcff7b
Handle out-of-bounds and undefined word indices in constant functions.
2013-05-18 19:39:24 +01: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
Martin Whitaker
0aca19356c
Added thread stack memory leak check to vvp.
...
When a vvp thread terminates, its real and string stacks should be empty.
Adding assertions to this effect catches some code generator bugs.
2013-05-18 19:02:36 +01:00
Cary R
5e94554d72
Don't run final blocks if there was a compiletf, etc error.
2013-05-14 17:45:27 -07:00
Cary R
7d26515bc4
A $finish in a final block should end processing of all final blocks
2013-05-14 16:55:51 -07:00
Cary R
71c6193ff1
Finish adding support for end labels in SystemVerilog
2013-05-14 15:01:54 -07:00
Cary R
b0b6be0d23
Class properties are optional
2013-05-14 14:59:31 -07:00
Cary R
7c1638652a
Add support for closing a procedural begin/fork block with a name
2013-05-08 18:34:16 -07:00
Cary R
1b1aa06dee
Remove some more cppcheck warnings and a valgrind compile warning
2013-04-30 18:35:30 -07:00
Cary R
51d3c03922
A time variable is always unsigned and pass the integer property
2013-04-30 14:05:19 -07:00
Cary R
431d62185b
vlog95: Emit a new doing a shallow copy as an error.
2013-04-30 11:52:52 -07:00
Cary R
c55eb37148
Add support to free an automatic object (valgrind)
...
Add missing code to free an object that is used in an automatic context.
Also remove one compiler warning.
2013-04-30 11:47:19 -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
ac78ba588f
Code generation and runtime for class shallow copy.
2013-04-28 10:10:36 -07: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