Commit Graph

7283 Commits

Author SHA1 Message Date
Larry Doolittle 3e95966d70 More spelling fixes
Mostly comments
Changs "initilzers" in a string visible with debug_elaborate.
Includes a few British->American changes in the root directory only.
2014-01-30 16:43:17 -08:00
Larry Doolittle f76d56beb8 Remove lint detected by clang
With this change, iverilog builds and runs with no extra warnings when using clang 3.0
2014-01-30 15:39:55 -08:00
Larry Doolittle be17bfc0e9 Spelling fixes
Mostly comments.
One user-visible string ("Evalutated to ") changed in the debug_eval_tree case.
2014-01-30 15:34:20 -08:00
Larry Doolittle 77a01f65d0 Remove fixable unused-parameter warnings
I see other warnings within vhdlpp/lexor.cc caused by a flex bug
(see http://sourceforge.net/p/flex/bugs/115/), which I won't try to work around.
2014-01-30 15:34:08 -08:00
Stephen Williams 607b63a758 Merge pull request #5 from cliffordwolf/master
Added missing support for binary ^~ in eval_tree.cc
2014-01-23 17:12:05 -08:00
Stephen Williams f906384423 Elaborate r-vlaue packed struct members pads as needed. 2014-01-11 19:19:15 -08: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 6ec31517a9 Implement $bits(type) to get the size of a type
In the process, I implemented a means to get at
previously elaborated types from the pform type
pointer.
2014-01-11 19:19:15 -08:00
Stephen Williams 8a4d769b3d Type name expressions down to elaboration. 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 b0491b9c54 Handle typedefs in $root scope. 2014-01-11 19:19:14 -08:00
Clifford Wolf 2165905613 Merge branch 'master' of https://github.com/steveicarus/iverilog 2014-01-05 23:32:49 +01:00
Martin Whitaker d1c9dd554b Fix for github issue #6.
When creating a constant zero for implementing a unary minus operation
using a binary subtraction operator, the constant needs to be to exactly
the expression width.
2014-01-05 20:53:58 +00:00
Clifford Wolf ef06bf7589 Added missing support for binary ^~ in eval_tree.cc 2013-12-30 11:53:44 +01:00
Cary R 336b29955d vlog95: a zero width expression is special and is not a self determined context 2013-12-19 20:41:43 -08:00
Cary R 7fa2a4ccf3 vlog95: add support for emitting nested class L-values 2013-12-19 20:40:07 -08:00
Cary R e4fc5806c4 vlog95: spelling fixes 2013-12-19 20:39:58 -08:00
Cary R 4def0110b5 Fix compile warning. 2013-12-19 09:22:16 -08:00
Cary R 503a1bf6d7 Add support for the array querying function in a constant context
This patchs adds support for the $dimensions() and $unpacked_dimensions()
array functions. Since the argument is only used to get the type information
these functions can always be evaluated at compile time.

For the following functions if the dimension argument is constant or omitted
and the first argument is not dynamic (a string or dynamic array) they will
return the specified information.

  $left(), $right(), $high(), $low(), $increment() and $size()

Dynamic information and a variable second argument will be implement in a
future patch.
2013-12-18 19:04:22 -08:00
Cary R 92e4ca3a92 Report that vpi_handle_by_index() is not supported for a vpiNet 2013-12-12 17:10:26 -08:00
Martin Whitaker 9e25884f12 Fix for br942 - allow function declaration in VHDL architecture. 2013-12-11 23:00:58 +00: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 7669a42cfb Handle some assertion syntax in the parser.
Implement some yacc rules for assertion syntax.

Add the -gassertions/-gno-assertions command-line flags to
enable or disable assertions.
2013-12-07 12:20:28 -08:00
Stephen Williams 0495d75fcb More relaxed handling of types of packed struct members as l-values. 2013-12-07 12:20:28 -08:00
Stephen Williams 0d6c15e45a Handle packed unions properly during elaboration.
This also gets r-value use of packed unions correct.
2013-12-07 12:20:28 -08:00
Stephen Williams 49756a8e7a Unions through pform. 2013-12-07 12:20:28 -08:00
Stephen Williams 0b4056817a Generalize struct member type 2013-12-07 12:20:28 -08:00
Stephen Williams aced587461 Macros with formal arguments can have default text for those arguments. 2013-12-07 12:20:28 -08:00
Cary R 077bd5b7ef Do not return a handle to a port when searching by name
The standard explicitly states that only object with a full name
can be searched for by name. A port does not have a full name and
hence should be skipped so that a different object (the signal,
etc.) can be returned. This patch adds code to skip ports when
searching for an object handle by name.
2013-12-06 18:28:02 -08:00
Cary R bf9781e8fd In tgt-blif the code must be linked with the C++ compiler 2013-12-06 15:09:56 -08:00
Cary R 40840368bb Fix two compile warnings under RHEL-5 with gcc 4.1.2-54 2013-12-04 16:45:43 -08:00
Cary R 5946fa46a6 Fix memory leak in %putc/str/v opcode. 2013-12-04 16:30:36 -08:00
Cary R 196df151aa Correctly cleanup class and string object when using valgrind 2013-12-04 16:28:28 -08:00
Stephen Williams c1566bc02b Merge branch 'master' of github.com:steveicarus/iverilog 2013-12-04 16:22:11 -08:00
Stephen Williams f349197df3 Describe the %putc/str/v vvp opcode. 2013-12-04 16:22:01 -08:00
Cary R 7e55babb62 Fix leaks in the object stack
This patch fixes some leaks in the object stack when getting various
class properties. With this fix an assert can be added to verify that
the object stack is clean when a thread is exiting.
2013-12-03 17:24:42 -08:00
Cary R 5a0f9f4604 Fix CXX variable in tgt-blif/Makefile.in 2013-12-03 10:12:08 -08:00
Cary R ae90da9951 Improve the classs cleanup code when using valgrind 2013-12-03 09:16:24 -08:00
Cary R 9544cb516d Fix some compile warnings 2013-11-24 14:35:44 -08:00
Stephen Williams fa8d35ae9c Support nested l-value objects
This allows for syntax like a.b.c where a is a class with member
b, which is a class with member c, and so on. The handling is mostly
for the support of compound objects like classes.
2013-11-22 19:54:42 -08:00
Stephen Williams 37ac1ed474 Clean up dead code in ivl_lval_t handling. 2013-11-22 12:02:03 -08:00
Stephen Williams 483d0534ae Merge branch 'master' of github.com:steveicarus/iverilog 2013-11-22 10:40:06 -08:00
Stephen Williams be7d763352 Sorry message for union declarations. 2013-11-22 10:39:48 -08:00
Cary R 04bab6b197 Fix a problem with reaping a thread with detached children
When a thread that has detached children is reaped the detached children
need to be fully detached so they can be reaped correctly. If they are not
fully detached then they may reference a parent that has already been
reaped (memory freed). Found with valgrind.
2013-11-20 18:01:35 -08:00
Cary R f47af361cd For default function arguments do not access an out of range real argument.
The code should only look at the real argument that exist any missing
arguments default to not being defined and hence needs to use the
default expression. Found with valgrind.
2013-11-20 16:52:17 -08:00
Cary R 676786a399 Remove compile warning 2013-11-20 11:29:59 -08:00
Stephen Williams 0692cd54e7 Support some simple class initialization assignments. 2013-11-16 17:04:14 -08:00
Stephen Williams 68d83383ff Elaborate nested l-values.
This gets nested l-values to (but just short of) the ivl_target API.
Now the elaborator can process nested l-values, but I haven't figured
out how to present that at the ivl_target.h API.
2013-11-16 16:27:05 -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