Commit Graph

7149 Commits

Author SHA1 Message Date
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
Stephen Williams a7d8c983ba Blend initializer statements into any explicit constructor.
If there is an explicit constructor, then blend all the statements
of the implicit constructor into it so that there is only one
constructor function.
2013-11-10 18:03:19 -08:00
Stephen Williams d192f545ac Chain class instance constructors with arguments. 2013-11-10 18:03:19 -08:00
Stephen Williams 0157a156fb Elaborate implicit chaining of constructors in class new. 2013-11-10 18:03:19 -08:00
Stephen Williams 9f83882bcc Parse/elaborate class derivation
This gets us down to working classes, but does not yet implement
calls to the parent constructor, implicitly or explicitly.
2013-11-10 18:03:19 -08:00
Martin Whitaker bfb14fbbc6 Fix memory leak in NetBlock::nex_input(). 2013-10-28 23:08:52 +00:00
Martin Whitaker be2595085f Reorder calls to test_width() on binary operands for efficiency.
It is more common to find an unsized number on the right hand side
of a binary operator than on the left hand side, particularly for
comparison operations (e.g. x < 10 rather than 10 > x), so testing
the width of the right operand first is less likely to result in
the width needing to be retested. Counting the number of times an
operand width is retested when running the test suite confirms this;
before this change an operand width was retested 4869 times, after
the change an operand width was retested 99 times.
2013-10-28 22:55:10 +00:00
Martin Whitaker 4625e7e2b6 Improvements to strict-expr-width mode.
Enable error reporting when an unsized number is used in a concatenation
operand. Allow greater pruning of expressions containing unsized numbers.
2013-10-28 22:07:09 +00:00
Martin Whitaker bb39d09d5e Eliminate spurious error message for array word lval in always @* block. 2013-10-26 23:49:43 +01:00
Martin Whitaker 36c91491cc Make tgt-vvp insert a BUFT for pulldown devices.
A BUFT is needed to allow a force to override the pull value. This had
already been done for pullup devices, so factor out the common code and
use for both pullup and pulldown.
2013-10-26 23:49:43 +01:00
Martin Whitaker d291e2b23d Fix errors in constant propagation.
Ensure undriven, multiply-driven, and forced nets are correctly handled
by the constant propagation optimisation pass.
2013-10-26 23:49:43 +01:00
Martin Whitaker 1814c24a90 Fix pullup/pulldown behaviour for tri1/tri0 nets.
Currently vvp only applies the pullup/pulldown for tri1/tri0 nets when
the net is not driven. The correct behaviour is to treat the pullup/
pulldown as an extra driver (with pull strength).
2013-10-26 23:49:43 +01:00
Cary R 92e08fdcd8 Only calculate the output set for a begin/end block when needed.
For synthesis we remove the output set of signals from the input set to
remove temporaries from the final sensitivity set. The @* construct also
uses the input sensitivity list, but because it can include statements
that cannot be synthesized we should not calculate the output set for this
case. Not find the output set is also a speed enhancement since the output
set was already being ignored later in the code for this case.
2013-10-26 15:34:07 -07:00
Cary R 7875880aa1 Add scope file/line information to the dump file 2013-10-25 15:10:44 -07:00
Cary R 383708fde8 Update FST files to latest from GTKWave 2013-10-25 15:07:00 -07:00
Cary R 4047ed7976 Add support for SV wait fork to the run time. 2013-10-22 16:00:29 -07:00
Cary R 3c7d7a7856 vlog95: Warn that array patterns cannot be converted. 2013-10-22 14:27:26 -07:00
Cary R d7c2118d10 Fix space issue 2013-10-22 09:47:49 -07:00
Cary R 97d06b107f Add support for wait fork to the compiler and code generators 2013-10-22 09:41:03 -07:00
Stephen Williams 61fbfb562e Merge branch 'x-mil11' 2013-10-21 08:55:13 -07:00
Martin Whitaker 7e82a37fa3 Extend -gstrict-expr-width to cover unsized numbers.
To be strictly compliant with the standard and compatible with other
EDA tools, unsized numbers should be treated as having a fixed size
(the same size as an integer). The -gstrict-expr-width option is
extended to allow the user to enable this behaviour.
2013-10-20 23:16:11 +01:00
Martin Whitaker 141a23690e Improved error message. 2013-10-20 23:01:26 +01:00
Martin Whitaker a024efb615 Add -compatible command line option to vvp.
This option is intended to make it easier to compare results from
Icarus with results from other simulators. For now, the only effect
it has is to change the default format for displaying real numbers
when no format string is supplied.
2013-10-20 22:59:53 +01:00
Stephen Williams e60804cf41 Handle initialized darray of strings
This includes adding support for returning strings from functions,
adding initializing new darray with array_pattern strings, and
assigning an array_pattern of strings to a preallocated darray.
Also fix up support for initializing array with simple string
expression.
2013-10-19 15:34:15 -07:00
Stephen Williams d5a0f2fc07 Add support for simple expression in darray new initializer. 2013-10-19 15:34:15 -07:00
Stephen Williams 2464582587 Handle number literals as real-valued r-values. 2013-10-19 15:34:15 -07:00
Stephen Williams 82ebf6372c Generate code to implement new element initializers. 2013-10-19 15:34:15 -07:00
Stephen Williams 3945b9df45 Elaborate darray new element initializer to ivl_target API 2013-10-19 15:34:15 -07:00
Stephen Williams 96813f76c1 Generate code to implement array_pattern assignment to darray
This implements the feature in the VVP code generator.
2013-10-19 15:34:14 -07:00
Stephen Williams 2030e06988 Parse/elaborate some array-patterns down to the ivl_target API. 2013-10-19 15:34:14 -07:00
Stephen Williams cd85a42acc Elaborate the null darray literal as a null expression.
This leads to the correct code being generated in the vvp
code generator.
2013-10-19 15:34:14 -07:00
Stephen Williams 18c338ad09 Handle array assignment patters through pform.
This gets us to elaboration. In the process also fix up ivl_type_t
type comparisons to do deep type comparison.
2013-10-19 15:34:14 -07:00
Stephen Williams 2355e1ed8e Clean up some NetNet variable type handling. 2013-10-19 15:34:14 -07:00
Stephen Williams 5494c9ae09 Support DARRAY objects as port arguments. 2013-10-19 15:34:14 -07:00
Martin Whitaker 20ad1ff261 Fix zero/sign extension of parameter values in expressions.
For sized parameters, the choice of zero or sign extension should
be based on the expression type, not the parameter type.
2013-10-19 13:14:39 +01:00