When using MinGW, routines registered via atexit() inside a DLL are only called when the DLL is detached. If not detached manually, DLLs are automatically detached *after* all remaining open files are closed. This meant that by the time the LXT or LXT2 close_dumpfile routine was called, the dump file handle was no longer valid, so any remaining output was lost. This patch fixes the problem by manually detaching the VPI modules.
This patch adds the SystemVerilog keywords to Icarus. This allows use to easily verify that out plain Verilog does not contain any SystemVerilog keywords. The keywords are not parsed in any way. When parsing a Verilog file using -gsystem-verilog any identifier that is a keyword will cause a parse error. It is the users responsibility to figure out the problem since bison does not give nice error message when it finds a keyword instead of an identifier.
When handling the $signed/$unsigned system functions, the compiler was applying the new signed/unsigned property to the NetExpr object representing the input argument. This caused the input argument to be evaluated incorrectly. This patch fixes this by applying the new property to the NetExpr object created to pad the result to the required size. In testing this fix, it was also discovered that the width of the input argument expression was not being calculated correctly. This patch also fixes this issue.
Creation of implicit nets requires knowledge of whether an identifier has been declared before it is used. Currently implicit nets are created during elaboration, but by this stage the order of declaration and use is not known. This patch moves the creation of implicit nets into the parser stage.
Often the val_ array is treated as a word (for speed) so make sure all the bytes of val_ are initialized, even if not used.
After changing an array word, vvp propagates the change to every port attached to the array. The code did not properly handle the case of an array port declared in an automatic scope with an associated array declared in a static scope.
This patch fixes a few bugs in constant bit/part selects and adds optional warnings for out of bound or undefined selects.
The process of inverting and copying can be collapsed into a single operation that should run a little faster. Also, inverting readily vectorizes itself. I've also possibly reduced useless vvp_not_fun iterations. Also, include some minor tweaks to the vvp_vector8_t handling of vector copies. This is more to clean up code, although it should slightly improve performance as well.
The scope thread rework broek --with-valgrind builds due to the different handling of the list of threads. Rework valgrind enabled handling of the thread set within a scope.
Rather then lock/unlock the work queue ring for every item, save tons of pthread lock manipulation by allocating to the producer in batches. Over the long run, this doesn't change the CPU balance or hold up either thread, but it eliminates almost 3/4 of the lock/unlock episodes.
The time change is usually a trivial operation, so instead carry a timestamp on all the work items and let the work thread decide on its own when to do a SET_TIME operation. This reduces some pthread overhead and thus gets us some better performance.
This gives a little bit more specificity to the event step display.
The padding for a signal select was using the signal to determine if the padding should be singed or not. In reality this should be unsigned padding unless the select was enclosed in a $signed().