Commit Graph

6718 Commits

Author SHA1 Message Date
Stephen Williams a14b8c517c Clean up Design::find_scope method use. 2012-09-03 16:00:10 -07:00
Stephen Williams 174177d437 Rework symbol search to work incrementally.
This is necessary to handle paths that turn out to end with
member names instead of symbol names.
2012-09-03 16:00:10 -07:00
Stephen Williams 0bdabab4fb Rework packed dimensions handling
Make packed structs more obviously parts of a vector.
Handle arrays of structs in certain cases.
2012-09-03 16:00:10 -07:00
Stephen Williams b4cc9d14a5 Handle packed arrays of packed struct in l-value expressions. 2012-09-03 16:00:09 -07:00
Stephen Williams 3d9ed1f0f8 Clean up PWire handling of wire data type. / Reword packed type handling 2012-09-03 16:00:09 -07:00
Cary R adff837399 Remove some new cppcheck warnings in tgt-vlog95 2012-09-03 11:58:43 -07:00
Cary R 29ade50cab Remove some cppcheck warnings in the main and vvp diretory. 2012-08-31 18:22:59 -07:00
Cary R cb9e1ee37e Remove a few more cppcheck warnings in the tgt-* directories. 2012-08-31 18:18:12 -07:00
Cary R 4cd295cbba Fix printf opcode argument mismatches in tgt-vvp (cppcheck) 2012-08-31 12:36:55 -07:00
Cary R 1a82287f1e Remove some cppcheck reduce scope warnings. 2012-08-31 12:12:08 -07:00
Cary R 882d059c1d Windows (mingw) _vsnprintf() returns -1 not the required size on overflow.
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.
2012-08-31 10:57:24 -07:00
Cary R 7adb30f383 Cleanup after the va_copy()
I missed that va_end() needs to be called on the new ap created by va_copy().
2012-08-31 09:22:23 -07:00
Cary R 0278f513c5 Save the va_list so it can be reused if needed.
The second call to vsnprintf() needs to have a copy of the argument list
so it can run correctly. On some system vsnprintf() destorys the original
argument list.
2012-08-30 20:04:18 -07:00
Cary R 16d569eb3f Fix new/free mismatch in vvp. 2012-08-30 19:33:25 -07:00
Cary R faf456ee7e Allocate a string buffer as needed in the code generator and vvp display 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.
2012-08-30 19:12:11 -07:00
Arun Persaud f5aafc32f9 updated FSF-address 2012-08-29 10:12:10 -07:00
Martin Whitaker 1f152aa838 Fix for pr3557493.
defparam assignments found inside a generate block were being stored
in the enclosing module scope. They should be stored in the generate
block scope.

Also removed the genvar list from the PGenerate class, as this is
already declared in the base LexicalScope class.
2012-08-21 17:46:34 -07:00
Cary R 83fff3adf7 Remove more CVS stuff
Remove the CVS information in the documentation and the remaining
tgt-* directories.
2012-08-16 15:15:26 -07:00
Cary R 2989cebaa5 Update lxt, lxt2 and fst files to latest from GTKWave 2012-08-16 14:56:01 -07:00
Cary R 4313fbbf1f Fix space errors in various files 2012-08-16 11:13:32 -07:00
Cary R 0d61f7384d Remove CVS remnants for libveriuser files. 2012-08-16 10:51:29 -07:00
Cary R 3e9f831026 Reduce scope to avoid cppcheck warning.
This patch reduces the scope of the str variable to avoid a cppcheck
warning. It also sets the end pointer to NULL since it is not used/needed.
2012-08-16 10:51:18 -07:00
Cary R 69c5d6f5ce Update uninstall include directory rule 2012-08-13 17:10:55 -07:00
Cary R 3af34263ab Fix a bug where top level module ports were double elaborated 2012-08-08 13:34:26 -07:00
Cary R bc85385f13 Change duplicate msb_ to be lsb_ 2012-08-08 12:23:14 -07:00
Cary R 0f1523e15d vlog95: minor tweak for array index calculation 2012-08-08 11:59:11 -07:00
Cary R 87ea093b4e Remove some cppcheck warnings in vvp directory 2012-08-08 11:43:26 -07:00
Cary R 7ce8a9b01c Fix some cppcheck warnings in the main directory 2012-08-08 11:28:20 -07:00
Cary R 429babf831 vlog95: Translate some assignment with opcode statements.
This patch updates the code to translate the SystemVerilog assignments with
an opcode to the appropriate vlog95. This includes ++ and -- when used in
a statement context. The ++ and -- operators are not currently translated
in an expression context. This translation only occurs in two places:
A simple assignment statement (foo += 2;) and the increment of a for
statement. I still need to check if there are other places where these
operators are allowed.
2012-08-07 16:45:21 -07:00
Cary R 331c9ef64a Fix mistake in post incr/decr warning messages. 2012-08-07 16:22:29 -07:00
Cary R e26dbfefe7 Minor spelling fix 2012-08-07 16:20:29 -07:00
Cary R 0faaa79bae Remove two duplicate typedef statements.
These two typedefs exactly matched earlier ones in the same scope and
gcc was complaining that they were shadowing the previous definitions.
Since the definitions matched exactly just deleting the second
typedef was acceptable.
2012-08-07 10:52:24 -07:00
Cary R 8158153ea4 vlog95: Add checks for missing assignments with opcodes
SystemVerilog supports using assignments with opcodes (e.g. +=). This
patch checks for these in a few common places and prints a warning
that they are not currently supported. Eventually the simple cases
will be converted.
2012-08-06 19:19:02 -07:00
Cary R 62412700aa vlog95: Add an error message that SV strings and darrays are not supported
We can not convert SystemVerilog strings or dynamic arrays to valid vlog95.
This patch adds an error message that they are not supported. There are still
issues with converting some of the dynamic array constructs (the compiler
crashes), but the message is printed before the crash.
2012-08-06 18:20:14 -07:00
Cary R 1749d10966 Fix some clang/bison compile warnings. 2012-08-06 15:49:11 -07:00
Martin Whitaker 34719c3163 Fix time scaling in PLI TF routines for MinGW.
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.
2012-08-06 13:38:14 -07:00
Martin Whitaker 4af8b03e9d Fix premature memory delete and missing DLL export definition.
A couple of errors that showed up in a MinGW build.
2012-08-06 13:31:03 -07:00
Cary R 7179274bde vlog95: Add support for some more SV constructs and add some sorry messages
This patch adds support for SystemVerilog packed arrays and adds sorry
messages for generate blocks as well as the new SV final and
fork/join_any/join_none statements.
2012-08-06 10:16:35 -07:00
Martin Whitaker 5aa97b379d Add missing semi-colons in parser rules.
Plus a few minor spelling/formatting fixes.
2012-08-01 15:38:36 -07:00
Stephen Williams 813f548a4b Merge branch 'x-mil3'
Conflicts:
	vpi/Makefile.in
	vpi/sys_table.c
2012-07-30 17:02:57 -07:00
Stephen Williams 082418d73b Add missing netdarray.h header file. 2012-07-29 16:25:26 -07:00
Martin Whitaker ebe81f7059 Eliminate duplicate error messages for indexed part selects.
This patch stops the compiler generating duplicate error messages
when an indexed part select has an illegal width.
2012-07-27 18:42:53 -07:00
Martin Whitaker c4ff8300d3 Handle error case of zero width in indexed part select.
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.
2012-07-27 18:42:43 -07:00
Martin Whitaker a5a512758e Allow a UDP instance to have a simple real delay.
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).
2012-07-27 18:30:09 -07:00
Larry Doolittle befff82655 Spelling fixes
Comments and debug messages.
2012-07-27 18:25:32 -07:00
Martin Whitaker dd284ee582 Additional support for $countdrivers.
This patch extends the implementation of $countdrivers to handle wires
connected to islands.
2012-07-27 18:09:41 -07:00
Martin Whitaker 6836068a16 Initial support for $countdrivers.
This patch implements the $countdrivers system function. It does not
yet support wires connected to islands (and outputs a suitable "sorry"
message when this is detected).
2012-07-27 18:09:32 -07:00
Martin Whitaker a290c58a2e Rework of vvp resolver networks to support $countdrivers.
To implement the $countdrivers system function, we need to be able to
find all the driver values for a given wire. Currently, if a wire has
has more than four drivers, the compiler builds a resolver tree out
of 4-input nodes to resolve the driven values, and there is no way at
run time to work back from the output node to the original driver
values. This patch moves the implementation of the resolver tree into
a single vvp functor (using a mechanism similar to wide functors to
support more than 4 inputs), thus gathering all the driver values into
a single place.
2012-07-27 18:09:25 -07:00
Stephen Williams 94e217f02b vvp support for dynamic arrays.
This words completely for single-dimension dynamic arrays of
32bit integers. These changes also act as a stub for other
target types.
2012-07-22 10:52:07 -07:00
Stephen Williams fdc92ea464 Elaborate dynamic array expressions (lval/rval) down to ivl_target.h 2012-07-22 10:52:07 -07:00