Commit Graph

7149 Commits

Author SHA1 Message Date
Cary R 6de80adbe8 Fix space issue 2013-02-12 18:38:33 -08:00
Cary R fdcef3cbc4 A concatenation may also need a BUFZ to hold the drive strength
Just like a select a concatenation needs a BUFZ to hold the drive strength.
2013-02-12 18:36:39 -08:00
Cary R 41c7aa9e83 vlog95: translate darray and class assignments/references
These are not supported in vlog95, but they are easy to translate into
something that looks correct.
2013-02-08 19:16:24 -08:00
Cary R 1929cfc4f9 Fix space issues 2013-02-08 11:24:11 -08:00
Martin Whitaker 8b70fefa59 Refactor eval_tree debug code.
This just pulls the eval_tree debug message generation into one place.
2013-02-08 11:22:49 -08:00
Martin Whitaker af91920a17 Add support for system function calls in constant functions. 2013-02-08 11:19:26 -08:00
Martin Whitaker 89244e0f70 Add support for concatenation operations in constant functions.
Also fix a compiler crash when attempting to evaluate a function
which has no valid statement(s) (due to earlier compilation errors).
2013-02-08 11:19:17 -08:00
Cary R 5abd939655 vlog95: fix bug in min/max translation code 2013-02-08 11:18:49 -08:00
Cary R 06ce23d9c2 vlog95: Add support for Verilog-A abs(), min(), max() and some SV types.
The Verilog-A abs(), min() and max() functions can be converted if the
expressions do not have side effects. Also note the new, null and class
property operators from SystemVerilog are not supported.
2013-02-07 19:53:10 -08:00
Cary R a581e0ef0e vlog95: Report zero argument functions are not supported. 2013-02-07 17:08:59 -08:00
Cary R b6ec138644 vlog95: Add support for recognizing a call to an automatic task.
Automatic tasks are not supported by 1364-1995, but the converter should
be able to correctly convert a call to an automatic task.
2013-02-07 17:08:43 -08:00
Cary R dc387ad9d1 vlog95: Add a messge that ** (power) is not supported in a CA. 2013-02-07 10:21:04 -08:00
Cary R 48b186576e Report in SV that Icarus cannot currently call a function like a task.
SystemVerilog allows a function to be called without an assignment for
the return value. This patch adds a warning that Icarus does not currently
support this and provides a place to add this functionality later.
2013-02-06 12:41:42 -08:00
Cary R 15b0946fc4 vlog95: Add support for the new CONCATZ LPM type. 2013-02-06 10:05:12 -08:00
Cary R 5830e65829 Fix space issues. 2013-02-04 12:17:41 -08:00
Martin Whitaker f3a51fdfd1 Factor out some common eval_tree code.
The eval_tree() function is identical in most of the NetEBinary and
NetEUnary sub-classes.
2013-02-04 12:17:29 -08:00
Martin Whitaker afd23d13d5 Add support for unary operators in constant user functions.
This patch implements the evaluate_function method for the NetEUnary
and NetEUReduce classes.
2013-02-04 12:17:05 -08:00
Martin Whitaker 11f479e028 Add support for all binary operators in constant user functions.
This patch implements the evaluate_function method for the NetEBBits,
NetEBDiv, NetEBLogic, NetEBMinMax, and NetEBPow classes. It also
factors out some common code into the NetEBinary class.
2013-02-04 12:16:51 -08:00
Cary R 838f6ce862 Minor fixes to br916 patch. 2013-02-04 11:45:22 -08:00
Martin Whitaker e99d53b80b Stopgap fix for br916.
Currently, when a variable expression is passed to a system task,
the expression value is stored in thread memory. Values stored
in thread memory cannot safely be passed to $strobe or $monitor,
because the thread memory may get reused or deallocated before
the $strobe or $monitor task actually executes. As a temporary
measure, we just trap this case and terminate with a "sorry"
message. A proper fix would require the expression value to be
calculated at the time the $strobe or $monitor executes, not at
the time it is called.
2013-02-04 11:45:11 -08:00
Stephen Williams 1d314faf97 bool .net8 objects?
This is rather a pointless sort of thing, but it does turn from
from time to time, for example when constant literals (with no x or
z bits) are given strengths. So handle .net8/2s and .net8/2u the
same as .net8.s and .net8 objects.
2013-02-02 17:38:24 -08:00
Stephen Williams 751587e112 PV-to-concat belnding should use a strength-aware concat. 2013-02-02 10:44:16 -08:00
Stephen Williams 673675fecd Properly handle class properties what are wider then native.
Fix a bug where if a class property were wider then a native long
it would get truncated.
2013-01-31 18:13:36 -08:00
Stephen Williams ee58fd749c Merge branch 'x-mil6' 2013-01-30 17:03:19 -08:00
Cary R bcc7973792 Update LDFLAGS usage in tgt-pal and tgt-pcb to match the other directories 2013-01-29 17:28:42 -08:00
Martin Whitaker b176a6410d Fix logic value returned for unambiguous HiZ1 strength.
If a strength aware net has an unambiguous HiZ1 strength, VVP treats
it as a logic '1'. It should be treated as a logic 'z'. An ambiguous
HiZ1/HiZ0 strength should also be treated as a logic 'z'.
2013-01-28 19:06:59 -08:00
Stephen Williams d8592b1444 Allow for class objects an class properties. 2013-01-27 20:10:25 -08:00
Stephen Williams 4568766cff Add support for darrays as class properties. 2013-01-27 20:10:25 -08:00
Stephen Williams c49b21115a Handle strings as class object properties.
While we are at it, fix a handling of null strings in
string expressions.
2013-01-27 20:10:25 -08:00
Stephen Williams 106850ca7d Handle real value class properties.
As a side effect, this also adds support for 64bit integers.
2013-01-27 20:10:25 -08:00
Stephen Williams 2ea5919a4a Get signed-ness of property correct in certain situations. 2013-01-27 20:10:25 -08:00
Stephen Williams 0375ff3923 Handle some different integral types is class properties. 2013-01-27 20:10:25 -08:00
Cary R 59ce217ce2 vlog95: Add support for undefined selects. 2013-01-25 12:46:55 -08:00
Cary R 350369f3fc Handle undefined L-value selects
L-value bit selects were incorrectly converting an undefined index to 0.

L-value part selects were asserting if an undefined index was given.

This patch unifies how all these are handle (including indexed part selects).

The base is set to an undefined value and an appropriate width is used.
A warning message is always printed since this is not a simple out of
range issue. It is the responsibility of the code generator to skip the
assignment, but we always want to execute the R-value since it could have
a side effect.
2013-01-25 10:32:36 -08:00
Cary R d9c400ac0c A scope port can be a uwire for some cases. 2013-01-24 18:28:04 -08:00
Cary R 922b74be9e Fix uninitialized buffer when drawing a real VPI argument 2013-01-22 09:22:50 -08:00
Martin Whitaker cd239a9857 Fix display of net array words when data type is signed.
When VVP compiles a .array statement for a net array, it does not
know the data type, so initialises the array signed_flag to false.
We need to set the signed_flag to the correct value once we know
the data type, to allow the VPI routines to correctly format the
data.
2013-01-21 18:46:48 -08:00
Cary R 8e515a9a64 Merge branch 'master' of github.com:steveicarus/iverilog 2013-01-11 15:10:17 -08:00
Martin Whitaker 45bb1313e7 Correctly handle negative genvar values.
During expression elaboration, genvar values were being erroneously
cast to unsigned values when creating a verinum for use in expression
evaluation.
2013-01-11 15:09:20 -08:00
Stephen Williams d04aa4b234 Merge branch 'master' of github.com:steveicarus/iverilog 2013-01-05 16:40:14 -08:00
Stephen Williams 074055bc58 Implement static arrays of strings.
This means extending the vvp to add .array/str objects and
include instructions to access the array. Also add the parser
and code generator support.
2013-01-05 15:57:58 -08:00
Stephen Williams d6726f62fc Implement substring method for string expressions. 2013-01-05 11:40:12 -08:00
Stephen Williams bc9e31a444 Cleanup of v2009.vpoi module. 2013-01-05 11:39:17 -08:00
Cary R f682d9cad1 Clean up some more memory when using valgrind
When checking with valgrind clean up the following:

  The arguments for invalid task/function calls.

  The simulation callback queues (only needed when the runtime aborts).

  Call pthread_exit(NULL) just before exiting to cleanup dynamic loading.
2013-01-03 17:57:15 -08:00
Cary R 1305d7659c Remoce space issues. 2013-01-03 16:21:24 -08:00
Cary R 502a0708ea Merge branch 'master' of github.com:steveicarus/iverilog 2013-01-03 16:19:18 -08:00
Cary R c64407f7cf Cleanup new darray in array structure
The valsr real array support was switched to a dynamic array vals. This
patch updates teh valgrind cleanup code to use the correct name.
2013-01-03 16:18:59 -08:00
Stephen Williams cdbfe28c4e Merge branch 'master' of github.com:steveicarus/iverilog 2013-01-03 11:49:50 -08:00
Stephen Williams fbd2843cad Runtime support for arrays of atom2 types.
This handles all of the atom integer types in unpacked arrays.
2013-01-03 11:33:47 -08:00
Cary R 10b5a82904 Remove redundent map clear. 2013-01-02 19:18:37 -08:00