Larry Doolittle
b23faff27c
Just a few more spelling fixes
...
Includes some user-visible messages
2015-06-17 08:09:34 -07:00
Larry Doolittle
2739f83702
Spelling fixes in C and C++ comments
2015-06-04 15:00:29 -07:00
Martin Whitaker
ab688613cc
Fix for br978 - assertion involving addition of $ivlh_to_unsigned() result.
...
$ivlh_to_unsigned, unlike $signed and $signed, can cause a reduction
in width. The shared PECallFunction::cast_to_width_ method did not
support this.
2015-05-22 00:05:39 +01:00
Martin Whitaker
301a7e587b
Fix for GitHub issue #62 - assertion failure on too many array/vector indices.
...
Provide an error message for invalid code that contains more indices than
there are dimensions.
2015-04-25 22:57:14 +01:00
Martin Whitaker
22d15f9ca9
Fix handling of expression width with $ivlh_to_unsigned.
...
The first argument to $ivlh_to_unsigned should be treated as having
a self-determined width.
2015-04-25 09:20:31 +01:00
Maciej Suminski
83d721232d
ivl: $ivlh_to_unsigned() also tests its argument width.
2015-03-27 20:53:14 +01:00
Cary R
102d2d534f
Remove extra warning code.
2015-03-09 14:35:31 -07:00
Cary R
bddfcac823
The === and !== operators cannot be used with a SV string
2015-03-02 15:34:22 -08:00
Maciej Suminski
8b3667f76e
ivl: Casting vectors to dynamic arrays.
2015-02-04 16:02:38 +01:00
Maciej Suminski
a52242745a
ivl: Casting dynamic arrays to vectors.
2015-02-04 16:02:38 +01:00
Maciej Suminski
35401f0e2c
ivl: Functions may return dynamic arrays.
2015-01-12 11:08:31 +01:00
Cary R
96472e5537
For a signed R-value we can use the full width when converting to long
...
When trying to get the value we can use the full width of a long if the
expression is signed.
2014-12-10 14:41:27 -08:00
Stephen Williams
38f277d81b
Merge branch 'master' into vec4-stack
...
Conflicts:
vvp/array.cc
vvp/vthread.cc
2014-12-02 11:21:58 -08:00
Maciej Suminski
c3a318f14e
ivl: Casting vectors to strings.
2014-11-27 17:36:23 +01:00
Maciej Suminski
b2deae7ba9
ivl: More meaningful errors messages. Minor code formatting.
2014-11-27 17:36:23 +01:00
Maciej Suminski
675dd91403
ivl: Added sign checking & casting between integers of different size.
2014-11-27 17:36:23 +01:00
Maciej Suminski
b12e00d875
ivl: String to vector casting.
2014-11-27 17:36:23 +01:00
Maciej Suminski
103828577b
ivl: Fixed indentations.
2014-11-27 17:36:23 +01:00
Maciej Suminski
89d1125979
ivl: Bit selection using variables in strings.
2014-11-27 17:36:23 +01:00
Maciej Suminski
43c6a0bacd
ivl: Casting to int.
2014-11-27 17:36:23 +01:00
Maciej Suminski
13f861a963
ivl: Added PECastType to handle type casting.
2014-11-27 17:36:23 +01:00
Stephen Williams
82ca4cf641
Add a warning if an expression pads itself to a crazy width.
2014-11-25 14:49:04 -08:00
Stephen Williams
a98f21aa65
Merge branch 'master' into vec4-stack
...
Conflicts:
elab_lval.cc
netmisc.cc
tgt-vvp/eval_object.c
tgt-vvp/vvp_process.c
vvp/codes.h
vvp/compile.cc
vvp/opcodes.txt
vvp/vpi_tasks.cc
vvp/vpi_vthr_vector.cc
vvp/vthread.cc
2014-10-21 09:12:02 -07:00
Cary R
d85096c56a
Add support for implict this in class methods
2014-09-16 17:08:57 -07:00
Stephen Williams
480668fee6
Add support for classes defined in $root scope.
2014-09-15 17:37:30 -07:00
Stephen Williams
ea4b000be6
Get arrayed property expressions down to the ivl_target API.
2014-09-15 17:37:30 -07:00
Stephen Williams
697701a26e
Sorry messages for property arrays.
2014-09-07 17:48:19 -07:00
Stephen Williams
88e951418b
Handle elaboration of class properties referenced within sub-scopes.
2014-09-06 16:26:08 -07:00
Stephen Williams
d1a35d5152
Handle nil queue as a was to delete a queue.
...
Treat this like assigning null to a dynamic array. This deletes the
queue and thus has the effect of clearing it.
2014-09-02 12:19:58 -07:00
Stephen Williams
886b6cd349
Debug messages.
2014-08-30 10:18:57 -07:00
Stephen Williams
dec4cd5071
Handle arrays of class objects.
...
This goes all the way down to the vvp level, where we create support
for arrays of objects, generate the new code in the -tvvp code
generator, and elaborate the arrays in the first place.
2014-08-30 10:18:57 -07:00
Cary R
b4d0c43a96
Remove some compile warnings.
2014-08-25 18:24:58 -07:00
Martin Whitaker
e5f49baaac
Fix for GitHub issue #37 - bug in expression width pruning.
...
If an expression contains a division, remainder, or right shift operation,
set the expression min_width to UINT_MAX to flag that the expression width
cannot be pruned. Using UINT_MAX ensures that the min_width won't change
as we continue to elaborate the expression.
2014-08-25 20:27:22 +01:00
Stephen Williams
8c2d51142b
Elaborate pop_back/pop_front methods on dynamic arrays.
2014-08-21 16:44:46 -07:00
Stephen Williams
c9ff48bd4e
Add support for dynamic array/queue "last" index ($)
...
Internally, treat the "$" as a special expression type that takes
as an argument the signal that is being indexed. In the vvp target,
use the $last system function to implement this.
2014-08-21 16:44:45 -07:00
Stephen Williams
da63ef02d4
Implement the size method for queues.
...
This works by translating it to a $size() system function call.
The $size function is already implemented for dynamic queues and
it is easy enough to expand it for queues.
2014-08-21 16:44:45 -07:00
Stephen Williams
a730572e37
Elaborate size method of darray/queue objects.
2014-08-21 16:44:45 -07:00
Stephen Williams
6d052d4ff7
Handle queue types and expressions at pform level.
2014-08-21 16:44:45 -07:00
Martin Whitaker
e82bafcb84
Fix for GitHub issue #30 : failed assertion in eval_tree.cc
...
The root cause was the constant propagation done during elaboration
of a multiply operation, which didn't check for mixed real/logic
expressions.
2014-06-20 20:52:15 +01:00
Cary R
81947edaa5
A bit select is not the same as selecting part of a packed array
...
When adding the ability to select part of a multi-dimensional packed
array the sign and size information for a true bit select was broken.
2014-06-12 09:20:31 -07:00
Stephen Williams
40b36337e2
Fix some bugs with packed array dimensions.
...
The netparray_t::slice_dimensions bug was the most insidious and
caused all manner of confusion. Also fix some other packed array
and unpacked array (and mixed) indexing calculations.
2014-04-06 08:40:10 -07:00
Stephen Williams
df4889ba3d
Handle SEL_IDX_UP is some situations.
2014-04-06 08:40:09 -07:00
Stephen Williams
fc1f9ac6a5
Handle unpacked arrays as module input ports.
2014-04-06 08:40:09 -07:00
Stephen Williams
6caa41cc93
First pass at support for continuous assign of unpacked net arrays.
2014-04-06 08:40:09 -07:00
Stephen Williams
7ceb18fb37
Merge branch 'master' into vec4-stack
...
Conflicts:
netmisc.cc
tgt-vvp/eval_expr.c
vvp/vthread.cc
2014-03-01 09:02:14 -08:00
Stephen Williams
d2ff77d56c
More standard handling of unsized numbers as system task arguments.
2014-03-01 08:38:23 -08:00
Cary R
d0d421ebe2
Remove compile warning
2014-02-28 17:29:55 -08:00
Martin Whitaker
ed2e339dd6
Fix for GitHub issue #18 : undef propagation of const multiplies is incorrect.
...
When an expression is elaborated, the compiler converts multiplies with
one constamt zero operand into a constant zero value. This is only valid
if the other operand is not a 4-state variable.
2014-02-27 19:30:28 +00:00
Martin Whitaker
5dcd2e8957
Added width cap for unsized expressions.
...
Unsized expressions can expand to extremely large widths. Usually this
is actually a mistake in the source code, but it can lead to the compiler
temporarily using extremely large amounts of memory, or in the worst
case, crashing. This adds a cap on the width of unsized expressions (by
default 65536 bits, but overridable by the user), and causes a warning
message to be output when the cap is reached.
2014-02-27 19:20:20 +00:00
Martin Whitaker
a3450bf856
Fixes for GitHub issues 13 and 15.
...
The verinum arithmetic operators now observe the standard Verilog
rules for calculating the result width if all operands are sized.
If any operand is unsized, the result is lossless, as before.
They also now all observe the standard rules for handling partially
undefined operands (if any operand bit is 'x', the entire result is
'x').
I've also added the unary '-' operator, and renamed v_not() to be
the unary '~' operator. This has allowed some simplification in
other parts of the compiler.
2014-02-25 20:39:21 +00:00