Commit Graph

7283 Commits

Author SHA1 Message Date
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
Stephen Williams b122ec2a1a parameter table in ivl_scope_s uses vector instead of C arrays. 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
Martin Whitaker 23dbfabb1e Further support for constant functions.
Add support for case, forever, and repeat statements in constant
functions. Also fix a bug in the constant function implementation
of NetESelect when used for zero/sign extension.
2013-04-07 19:13:30 +01:00
Martin Whitaker 6da71fdf56 Fix type/width for case and case item expressions.
The compiler was treating case and case item expressions as
self-determined. They should be context-sensitive, just like
the operands of a comparison operation.
2013-04-07 12:30:25 +01:00
Cary R bdfd5b9b55 Add -g2012 flag and keywords for IEEE 1800-2012. 2013-04-02 14:41:44 -07:00
Stephen Williams 64dffa5745 Support member functions with arguments. 2013-03-24 15:12:35 -07:00
Stephen Williams b9011d89ae Allow objects to work in automatic functions. 2013-03-24 15:12:35 -07:00
Stephen Williams 3b3a4d3ddc vvp code generation for class methods in class scope. 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 d0f2a9e961 Elaborate task methods as tasks with this arguments.
Generate the code to treat "this" as a hidden argument and have
elaborate assign to that argument.
2013-03-24 15:12:35 -07:00
Stephen Williams fb23493a98 Class methods down to the code generator
Emit the elaborated class methods. Also generate root scopes to
represent the classes in order to hold the methods. These scopes
can also in the future be used to implement static properties.
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
Stephen Williams fac5cbca43 Handle this as special identifier strings. / Organize pform class member binding 2013-03-24 15:03:52 -07:00
Stephen Williams 670601bc2a Mark class method pforms with their pform class. 2013-03-24 15:03:52 -07:00
Stephen Williams 25b48fa790 Remove svector template from port handling. 2013-03-24 15:03:52 -07:00
Stephen Williams dd5fb47c6c pform dump class methods. 2013-03-24 15:03:52 -07:00