Commit Graph

65 Commits

Author SHA1 Message Date
Stephen Williams b6eb86d696 Blend new_darray and new_class expression nodes. 2012-12-10 19:13:43 -08: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 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 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
Arun Persaud f5aafc32f9 updated FSF-address 2012-08-29 10:12:10 -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 d0e6b24ca2 Support the new[] operator for arrays
Implement through the ivl core to the ivl_target.h API.
Also draft implementation of creating and storing arrays
in the vvp runtime and code generator.
2012-07-22 10:52:06 -07:00
Stephen Williams a337a9388b Handle string[x] in l-values and system function arguments
When string[x] is an l-value, generate code to implement something
like the string.putc(x, ...) method.

Also handle when string[x] is the argument of a system task. In that
case resort to treating it as a calculated 8-bit vector, because that
is what it is.
2012-07-22 10:52:06 -07:00
Stephen Williams dc39714d65 Support string literal strings in the vvp runtime.
This also advances support for string expressions in general.
Handle assignments to string variables in the code generator by
trying to calculate a string expression. This involves the new
string object thread details.
2012-07-22 10:52:06 -07:00
Stephen Williams d48362b861 First pass at getting strings to work.
In vvp, create the .var/str variable for representing strings, and
handle strings in the $display system task.

Add to vvp threads the concept of a stack of strings. This is going to
be how complex objects are to me handled in the future: forth-like
operation stacks. Also add the first two instructions to minimally get
strings to work.

In the parser, handle the variable declaration and make it available
to the ivl_target.h code generator. The vvp code generator can use this
information to generate the code for new vvp support.
2012-07-22 10:52:06 -07:00
Stephen Williams 9ba6ab49ac Fix compressed assign to memory word.
This is a pretty trivial fix for the code generation of compressed
assign to a memory word. We generated incorect code for the stash
of the calculated word index, causing the assign of the result to
not work properly.
2011-12-18 17:56:41 -08:00
Cary R 0553250997 Use the correct space in the a.out file.
We use four spaces before most opcodes in the a.out file.
2011-12-18 16:45:42 -08:00
Stephen Williams eeca366092 Handle part selects in l-values of compressed assignments. 2011-11-28 16:41:50 -08:00
Stephen Williams 7a812fbe39 Rework vvp code generator for compressed assignments
Now we have a code generator that can handle compressed assignments
as they have been re-imagined in elaboration. There are some cases
that are not yet supported, we'll patch them up in due course.
2011-11-28 15:29:53 -08:00