Commit Graph

7149 Commits

Author SHA1 Message Date
Stephen Williams 222b683849 Clean up invokations of the vector4_to_value template. 2012-10-25 09:13:09 -07:00
Stephen Williams 559d965681 Merge branch 'x-mil4'
Conflicts:
	tgt-vvp/eval_real.c
	vvp/codes.h
	vvp/compile.cc
	vvp/opcodes.txt
2012-10-23 14:48:25 -07:00
Stephen Williams 9d3548798c Clean up the API for the string stack. 2012-10-22 17:37:51 -07:00
Stephen Williams a5fd5363b3 Rewire real value expressions to use a stack instead of register space.
This will hopefully improve performance slightly, but also this
intended as a model for what to do when I get around to doing the
same thing to other data types.
2012-10-22 17:20:43 -07:00
Stephen Williams 0339f5ed57 Parse package import declarations. 2012-10-21 15:06:23 -07:00
Stephen Williams 62be9c5b46 Parse (with sorry message) package declarations. 2012-10-21 11:42:19 -07:00
Stephen Williams 0059fb1ec7 Support for dynamic arrays of strings.
Strings, when put into dynamic arrays, are treated as first class
types much line reals. Add the code generator and vvp support for
this situation. Also fix a bug distinguishing between character
selects from strings and select form arrays of strings.
2012-10-14 17:16:47 -07:00
Stephen Williams d6efece5dd Handle DARRAYs of real variables
This involves working out the code to get the base type of a select
expression of a darray. Also added the runtime support for darrays
with real value elements.
2012-10-14 17:16:47 -07:00
Stephen Williams 1326f9aef1 Handle darray objects of all integral atom types.
Clean up the vector4_to_value to use templates and explicit
instantiations. This makes the interface much cleaner for a
wider variety of integral types.
2012-10-14 17:16:47 -07:00
Stephen Williams e071bd81ee Handle select of darray signals in general expressions. 2012-10-14 17:16:47 -07:00
Stephen Williams a2d980540d Get some type information to the "new" expression for darrays. 2012-10-14 17:16:47 -07:00
Stephen Williams 1aa21aa9e8 ivl_target interface to packed type details.
The darray in particular needs to know about the subtype info.
In the process, clean up some of the type information.
2012-10-14 17:16:47 -07:00
Stephen Williams 914ebeca4a Some rework to allow for nested packed types.
This also simplifies the NetNet set of contructors and generalizes
the types that are supported, especially packed types.
2012-10-14 17:16:47 -07:00
Stephen Williams 4e76912331 ivl_target access to type information. 2012-10-14 17:16:47 -07:00
Stephen Williams 494dc876a5 Move net vector properties to netvector_t object. 2012-10-14 17:16:47 -07:00
Stephen Williams 997274b98f Cleaner netdarray_t implementation. 2012-10-14 17:16:47 -07:00
Stephen Williams 92313654ec Rework the way vectors are represented in NetNet objects. 2012-10-14 17:16:47 -07:00
Cary R 5347217b56 A signal can be an enumeration variable.
An enumeration variable can be a R-value in an enumeration assignment so
pass on this attribute.
2012-10-10 18:28:21 -07:00
Cary R f957deeca7 Get the vvp code to compile with the valgrind hooks again.
This patch updates the vvp code so it will compile with the valgrind hooks
again. There are still new constructs that need to be cleaned up correctly
and some old constructs were changed enough that the old code no longer
works, but the rest of this can be done as an incremental improvement.
2012-10-08 18:53:55 -07:00
Cary R e0f82981e7 Remove some compiler warnings 2012-09-24 10:28:17 -07:00
Cary R 016d64e443 Remove spacing errors. 2012-09-24 09:57:28 -07:00
Stephen Williams 6137566385 Merge branch 'work12' 2012-09-14 17:28:50 -07:00
Cary R daa12ec2b3 Update line numbers for cppcheck suppressions 2012-09-13 12:44:39 -07:00
Stephen Williams c14134aa2e Handle genvar variables in expressions.
In generate for blocks, there is a genvar that can be used in
expressions within the generate block. Generate this genvar in
the generated output, matched to the generate scope.
2012-09-07 15:14:48 -07:00
Cary R f5407824ba Add %u support to the scanf routines. 2012-09-05 14:24:01 -07:00
Cary R a3f3f7ae58 Add support for %z to the scanf() routines 2012-09-04 18:46:24 -07:00
Stephen Williams 9cca1378bb Handle continuous assign to packed member of packed array of struct.
This still requires that the index expression is constant.
2012-09-03 16:00:10 -07:00
Stephen Williams b8093be42f Rework parse rules to handle more net types.
This makes the rules for types to be more in line with IEEE1800.
2012-09-03 16:00:10 -07:00
Stephen Williams f24d6b055d Use data_type_t instead of raw type bits. 2012-09-03 16:00:10 -07:00
Stephen Williams 85e000ed0c Handle prefix expressions that include array index expressions. 2012-09-03 16:00:10 -07:00
Stephen Williams 7fad717a1e Redesign selected_name rule to better handle complex prefixes
Prefixes of hierarchical names are complex and cannot be handled
by simple strings, to the rules must be reworked.
2012-09-03 16:00:10 -07:00
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