…flow. Windows and hence mingw does not follow the standard regarding the return value of vsnprintf(). The mingw code needs to iteratively search for a buffer large enough to print the output.
…lay code When sending a string to a system task/function allocate the space needed to avoid truncating the string vs using a large fixed buffer. In vvp allocate and use an exactly sized buffer for the MCD print routine if the fixed buffer is not large enough. Using a fixed buffer keeps normal printing fast.
When built with MinGW, pow() may not always generate an exact integer result when supplied with integer operands. Converting the result to an integer before we use it seems to be enough to work round this issue.
The compiler doesn't currently check that the width of an indexed part select is non-zero. If code contains this erroneous case, the compiler can crash (with an assertion failure). This patch causes the compiler to output a suitable error message and recover. It also fixes a potential crash if an illegal expresson is encountered. (cherry picked from commit c4ff830)
The parser does not distinguish between module and UDP instances, so a UDP delay is handled by the rules used for parsing module parameter overrides. Although these rules had been relaxed to accept the case of a simple decimal value (e.g. #10), they did not allow a simple real value (e.g. #0.1).
Currently, localparam declarations inside generate blocks are elaborated after any nested generate constructs are elaborated. This prevents the localparams being used by the nested constructs. Reversing the elaboration order fixes this bug.
When vpi_put_value() is asked to delay the assignment any pointer data needs to be duplicated so that the caller can clean up the locally allocated memory without causing memory access problems.
This patch is a modification of a user contributed patch that fixes the time formatting when the time is less than 1 and $timeformat() is used.
Normal Verilog does not allow a function to be defined without at least an input argument. This patch fixes a crash that was happening when a function with no arguments was defined. It also adds checks and prints a descriptive error message when calling a function without an argument. The development branch allows this in SV.
… builds Not all the lex/yacc (flex/bison) targets were using a consistent syntax. This patch fixes that and explicitly serializes the *.c/*.cc and *.h build. Not doing this was causing problem when using make -j. The issue appears to be that if two targets are specified for a rule (e.g. file.cc file.h: file.y) make does not realize they are both built by the same call so the rule is executed twice. Once for the .cc target and once for the .h target. This is not a problem for a serial build. To work around this only use the .c/.cc file in the main target and then make the .h file depend on the .c/.cc file as a sub-target.
This same change was done in the vpi directory. This patch fixes the issues in the libveriuser directory. This fixed a fail in the vpi timescale test under MinGW.
The standard allows a parameter (or localparam) declaration of the form "parameter signed my_param = ...". The parser currently rejects this. A small adjustment is also required in the parameter evaluation code to correctly apply the type.
The tran island rework included an optimisation that meant that an island port would only be resolved once the initial value for the net attached to that port had propagated to the port. However, v0.9 does not propagate initial values in some cases, so this optimisation cannot be used.
Not giving this a default value was leaving the value undefined under some circumstances. This was producing incorrect results on Cygwin.
An @* with no sensitivities should be treated as something that will never trigger vs something that will run continuously. This patch makes this change and adds a warning when an @* has no sensitivities since this is almost certainly a coding bug.
It is legal for a named block to contain variable definitions and no statements. This patch fixes this for both style of blocks. It also organizes the block parsing code to be a bit more clear, adds an error case for fork/join and changes on check for size() > 0 for the more efficient ! empty().
If a wired and/or net has more than four connections all the other resolution branches must also be wired and/or. All other nets can just be tri since tri0/tri1 only needs the final resolution to be an active pull up/down.
…imitive. Since synthesis is not currently supported we do not support/generate sync/async set or clear control inputs. This is further complicated by the fact that the VVP DFF primitive is not fully implemented.