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
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
Martin Whitaker
c4257ecfc9
Add support for array variables inside constant user functions.
2013-04-19 22:08:59 +01:00
Martin Whitaker
a91840c15d
Support concatenations in LHS of assignments in constant user functions.
2013-04-19 22:08:59 +01:00
Cary R
a748736d10
Update COPYING to match FSF version and update tgt-vlog95/Makefile.in
...
The changes in COPYING are mostly cosmetic and use <year> vs 19xx, etc.
Also update the tgt-vlog95/Makefile.in copyright to match the formatting
in the FSF version.
2013-04-19 12:14:37 -07:00
Stephen Williams
11682fc7eb
Harmless cleanup of comments / initialization warnings.
2013-04-18 18:18:40 -07:00
Cary R
255922e545
vlog95: add support for emitting logic pull devices in a CA
...
If a logical pull device is converted into a CA then it is an assignment
with strength, so just emit the appropriate constant to get the correct
functionality (e.g. 1'b1 for a pull up and 1'b0 for a pull down).
Also add missing file/line information.
2013-04-18 17:38:30 -07:00
Cary R
98694f15ce
vlog95: A valid task output can have a cast.
...
When looking for a task call with arguments the output port assignments can
also come from a cast of a simple signal in the task.
2013-04-18 12:40:13 -07:00
Cary R
36b04748d4
Update tgt-vvp to not use deprecated function calls.
...
There was one section of code in the tgt-vvp back end that was using
deprecated functions. This patch fixes that. The functionality is still
missing (force/assign to part of a vector), but the code now compiles
cleanly (no warnings).
2013-04-18 10:50:37 -07:00
Cary R
d2928d500d
Remove a few more compile error messages from RHEL5
2013-04-17 17:46:05 -07:00
Cary R
15379f1750
Remove some compile warnings
2013-04-17 17:13:22 -07:00
Cary R
0a4d8acefb
vlog95: Add support for translating a package as a module with a special name
...
This patch finishes the code needed to translate a SystemVerilog package to a
module with a special name. It also adds code to report that class scopes are
not supported and treats both a class and package as a top level scope.
2013-04-17 10:43:04 -07:00
Stephen Williams
632fd006c5
Merge branch 'master' of github.com:steveicarus/iverilog
2013-04-16 16:56:14 -07:00
Stephen Williams
256c0986bb
Merge branch 'work13b'
2013-04-16 16:47:37 -07:00
Cary R
db7fbba08e
Update fstapi.c to latest from SVN.
2013-04-16 15:00:25 -07:00
Cary R
f536a43e92
Add support for timeunit <time_val> / <time_val>
2013-04-16 14:40:35 -07:00
Cary R
283ae6e538
Fix some cppcheck warnings in vvp.
2013-04-15 12:28:35 -07:00
Cary R
fbafb915d2
Fix some cppcheck warnings
2013-04-15 11:54:15 -07:00
Martin Whitaker
4c52f66f5d
Fix VHDL code generator crash when a ternary operator has a real operand.
2013-04-12 23:46:06 +01:00
Martin Whitaker
46f63db746
Fix VHDL code generator crash when code contains a real-valued parameter.
2013-04-12 23:41:52 +01:00
Stephen Williams
4ad556d464
Update some copyright notices.
2013-04-08 18:35:37 -07:00
Stephen Williams
4dffd97d28
Handle tasks in packages.
2013-04-08 18:20:39 -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
eba3d407ca
packages can contain variables.
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