Commit Graph

6718 Commits

Author SHA1 Message Date
Stephen Williams a186e5ad31 Garbage collection of DARRAY and CLASS objects.
While we're at it, provide a stub class_new runtime.
2012-12-10 19:13:43 -08:00
Stephen Williams b6eb86d696 Blend new_darray and new_class expression nodes. 2012-12-10 19:13:43 -08:00
Stephen Williams 7a2ad01f2e Class new expressions, down to the ivl_target.h API. 2012-12-10 19:13:43 -08:00
Stephen Williams 3e7adbeda0 Stub class object variables.
Create stub class objects at the vvp level and generate the code
to invoke that stub. Implement the routines needed to implement
a test for null object references.
2012-12-10 19:13:43 -08:00
Stephen Williams 6278a5760c Rationalize the vvp_object_t stack API to match other types. 2012-12-10 19:13:43 -08:00
Stephen Williams 77d24cd095 Elaborate class_new and (null) expressions
This gets the types right for class_new and null expressions, and
elaborate them down to the ivl_target.h API.
2012-12-10 19:13:43 -08:00
Stephen Williams 55bebc8c39 Stub to pform class properties and null expressions. 2012-12-10 19:13:43 -08:00
Cary R 80fe66b224 Update cppcheck suppression file to match new fstapi.c 2012-11-27 09:28:45 -08:00
Cary R cb1d4ab359 Update fstapi.c from GTKWave to fix MinGW compile. 2012-11-27 09:19:18 -08:00
Cary R 397054d5fc Update cppcheck suppressions in fst/lxt2 files. 2012-11-15 15:32:36 -08:00
Cary R afdc1fa923 Update fstapi.c and lxt2_write.c to latest from GTKWave
This just fixes warnings in cppcheck
2012-11-15 15:32:29 -08:00
Cary R f01a106c25 Remove a space issue 2012-11-12 18:15:33 -08:00
Cary R 15fb58f8e4 Remove some cppcheck warnings, etc. 2012-11-12 18:15:25 -08:00
Martin Whitaker 78128dd95d Fix for pr3582052.
The code that calculated the canonical index for a multi-dimensional
array access did not correctly estimate the index expression width
in the case that the first index value was a constant zero. This
patch fixes the problem, and, in passing, also makes the expression
calculation more efficient if any of the indices are constant zeroes.
2012-11-03 10:30:17 -07:00
Stephen Williams bad8ed39c1 Parse VHDL subprogram bodies and return statements. 2012-11-03 09:54:07 -07:00
Stephen Williams 0ccb1b4990 Delect class_new and print "sorry" message. 2012-11-03 08:40:03 -07:00
Stephen Williams 5651e6e001 Improve error handling. 2012-11-02 19:30:12 -07:00
Cary R b32e1bcbcb Fix space before EOL in vvp/vthread.cc 2012-10-25 10:37:08 -07:00
Cary R e72852d53f Fix make check in vvp and windows (cygwin) compile 2012-10-25 09:59:06 -07:00
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