Lars-Peter Clausen
662e82c013
Handle signedness of struct members
...
struct members are currently always treated as unsigned. This leads to
incorrect behavior in contexts where the sign makes a difference. E.g.
```
struct packed {
int x;
} s;
s.x = -1;
if (s.x > 0) $display("FAILED");
```
Query the signedness of the struct member form the type of the member.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2022-01-27 10:53:19 +01:00
Lars-Peter Clausen
09ac7c207e
Add support for signed packed structs/unions
...
packed structs and packed unions as a whole can either be signed or
unsigned. This information is used when it is used as a primary in an
expression, i.e. without accessing any of the members.
Add support for parsing and elaborating signed structs.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2022-01-16 16:16:24 +01:00
Cary R
d6b6b76015
Update header files to use a more standard name to prevent rereading
...
This is from github report #16 . There are likely a few more issues
that need to be addressed though this takes care of the major ones.
2014-07-23 13:42:56 -07:00
Stephen Williams
0d6c15e45a
Handle packed unions properly during elaboration.
...
This also gets r-value use of packed unions correct.
2013-12-07 12:20:28 -08:00
Stephen Williams
0b4056817a
Generalize struct member type
2013-12-07 12:20:28 -08: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
92313654ec
Rework the way vectors are represented in NetNet objects.
2012-10-14 17:16:47 -07:00
Arun Persaud
f5aafc32f9
updated FSF-address
2012-08-29 10:12:10 -07:00
Stephen Williams
14f229de30
Parse support for dynamic arrays.
...
This includes limited support for dynamic arrays down to the code
generator, and some stubs in the vvp code generator and vvp run time.
2012-07-22 10:52:06 -07:00
Stephen Williams
78b0b49a4e
Support struct members that are packed arrays.
2012-05-22 17:31:25 -07:00
Cary R
42239a8498
Add code to test the width of individual structure elements.
...
This patch adds code to correctly set the type and width of individual
structure elements. Note the sign information is not currently available.
2012-04-02 19:53:47 -07:00
Stephen Williams
3a2866b57c
Handle members of packed struct as implicit part selects.
...
Packed struct members are synonymous with part selects, but in a
much more convenient form, so get them to work that way.
2012-02-02 16:18:49 -08:00
Stephen Williams
d362c8dba0
Parse support for struct variables.
2012-02-02 16:18:49 -08:00