Commit Graph

11 Commits

Author SHA1 Message Date
Stephen Williams 6268db6e68 Handle simple type declarations. 2011-10-09 15:25:35 -07:00
Stephen Williams 271aaf6376 Parse enumeration type declarations. 2011-10-01 17:04:04 -07:00
Stephen Williams 3ff7a8f7b0 Add support for constants and package types.
Significant rework of scope management to unify the handling of
types in the ieee library and types/constants/components in packages.
This involved adjusting the parser rules to manage a stack of scopes
and rewriting the IEEE library support to not use global maps for
the loaded types.
2011-04-17 17:19:09 -07:00
Stephen Williams bfcdfd0a7e Handle signed stdlogic. 2011-02-27 10:33:37 -08:00
Stephen Williams 905f68c865 Handle signed vs unsigned vector types.
In principle, some of these should be handled by overloaded operator
functions, but these are built in types with natural translations so
do the obvious things.
2011-02-25 20:09:31 -08:00
Stephen Williams acc4f73186 Declare the numeric signed type. 2011-02-19 16:50:36 -08:00
Stephen Williams c6ea2f3bf5 Stub support for "use" directives.
Implement the parser infrastructure for handling library use clauses,
and use that to handle specific packages of the ieee library. Make
the numeric types come from the numeric_* packages instead of being
built in.
2011-02-19 13:08:26 -08:00
Stephen Williams 8a5225e61f Stub support for library import.
This provides a stub implementation for library import. Use this
stub to make up a slightly more functional ieee library implementation.
2011-02-19 11:39:00 -08:00
Stephen Williams 7d552980a6 Elaborate array subtypes of ports.
There are internal types that are unbounded arrays. Allow subtype
syntax that creates bounded versions of these arrays, and elaborate
them as vectors at port boundaries. This makes some interesting types
work out.

Also start replacing vhdlint and vhdlreal with int64_t and double,
which are reasonable values for universal_integer and universal_real
from the VHDL standard. I need these cleaned up because the ints in
particular are used for the literal expressions in array index constraints.
2011-02-13 19:01:21 -08:00
Stephen Williams f32ede23b7 Do type mapping in the parser.
In VHDL, types are declared before they are used, so it is possible
to do type binding during parse. This makes the parser a little bit
cleaner.
2011-02-13 16:54:56 -08:00
Stephen Williams bc5fe9676e Create the shell of a proper type system.
Rather then just relying on comparing type names all throughout
elaboration, create type description data structures and use them
during elaboration to handle proper types.
2011-02-13 16:54:56 -08:00