Commit Graph

257 Commits

Author SHA1 Message Date
Maciej Suminski f5dd2ac87e vhdlpp: Aggregate expressions for records can be specified in any order. 2014-09-17 16:32:56 +02:00
Maciej Suminski 94abef195a vhdlpp: Commented out named assignment for records. 2014-09-17 16:30:44 +02:00
Maciej Suminski 54696e0127 vhdlpp: Elaboration & emit support for aggregate initializer expressions in records. 2014-09-17 11:24:16 +02:00
Maciej Suminski 9842035d89 vhdlpp: Simplified the initalization for signals/variables. 2014-09-16 16:31:18 +02:00
Maciej Suminski e330a0bd6e vhdlpp: Corrected VTypeArray::write_to_stream().
Now it outputs "typedef(range)" instead of "array (range) of type".
2014-09-15 12:10:05 +02:00
Maciej Suminski cb03802a17 vhdlpp: Added VTypeArray::basic_type() to cope with
arrays based on typedefs.
2014-09-15 12:10:05 +02:00
Maciej Suminski 22d18cb28d vhdlpp: Typedefs in packages are emitted before constants. 2014-09-15 12:10:04 +02:00
Maciej Suminski c98c3e5d14 vhdlpp: Inlined a few functions. 2014-09-15 12:10:04 +02:00
Maciej Suminski a63289c2fc vhdlpp: VTypeArray::range_t handles direction (to/downto). 2014-09-15 12:10:04 +02:00
Maciej Suminski 251b75003f vhdlpp: Skip writing '=>' for ExpAggregates if there are no fields specified. 2014-09-15 12:10:04 +02:00
Maciej Suminski 01b4d49d4a vhdlpp: Do not emit constants from packages.
They are elaborated and emitted by architectures that make use of packages.
2014-09-15 12:10:04 +02:00
Maciej Suminski f851fc6981 vhdlpp: Fixed ExpAggregate::write_to_stream(). 2014-09-15 12:10:04 +02:00
Maciej Suminski a25cde3bc7 vhdlpp: Added ExpString::write_to_stream(). 2014-09-15 12:10:04 +02:00
Maciej Suminski 51b121ae7a vhdlpp: Added ExpBitString::write_to_stream(). 2014-09-15 12:10:04 +02:00
Maciej Suminski 94caa4881e vhdlpp: Added VTypeEnum::write_to_stream(). 2014-09-15 12:10:04 +02:00
Maciej Suminski ef7ac5ed03 vhdlpp: Elaborate all types of initializing expressions. 2014-09-15 12:10:04 +02:00
Maciej Suminski 684c2fe19e Fixed enum typedefs. 2014-08-28 11:04:25 +02:00
Maciej Suminski 0f728b9150 vhdlpp: Minor cleaning, fixed copyright notices. 2014-08-25 17:29:35 +02:00
Maciej Suminski b0c79d5d1c vhdlpp: Added VType::emit_name() that skips emission of a name if it is empty (otherwise '\' is outputted). 2014-08-25 17:05:15 +02:00
Maciej Suminski 150fe088a6 vhdlpp: VTypeRecord is marked as acceptable in packed arrays. VTypeDef is accepted depending on the base type. 2014-08-25 16:56:46 +02:00
Maciej Suminski bb66ed8b9d vhdlpp: "integer" is emitted as "bool[31:0" but is marked as accepted to be used in packed arrays. 2014-08-25 16:51:35 +02:00
Maciej Suminski b1d15436fd Removed ExpReal::evaluate().Its signature does not match the one meant to be overridden. 2014-08-22 16:55:47 +02:00
Maciej Suminski c846b2cf3f vhdlpp: 'integer' is emitted as 'integer' instead of 'bool [31:0]'. 2014-08-22 16:45:17 +02:00
Maciej Suminski 10446df80e vhdlpp: Invert range in ExpAggregate when necessary. 2014-08-22 16:23:22 +02:00
Maciej Suminski 0a2100c87f vhdlpp: Turn on the reg_flag for types that cannot be packed. 2014-08-22 16:22:59 +02:00
Maciej Suminski 27730395ca vhdlpp: Type of an array is selected depending on the element type. 2014-08-22 10:49:55 +02:00
Maciej Suminski 8e9c25a23e vhdlpp: Added 'packed' property for VTypes.
It detetermines if a type can be used as the base type of a packed array.
2014-08-22 10:45:02 +02:00
Maciej Suminski 72ff9ac00b vhdlpp: Aggregate expression are elaborated if
they are used for Signal/Variable initalization.
2014-08-20 14:18:16 +02:00
Maciej Suminski c92dea77fc vhdlpp: Basic support for unbounded array types.
Once a signal/variable of unbounded array type becomes limited in its size, it
is emitted as a packed array. Therefore currently it works only for
bit/logic/reg/wire types.
2014-08-15 10:21:45 +02:00
Maciej Suminski 9031f392ba Convert string to bitstring in SigVarBase
constructor if applicable (vhdlpp).
2014-08-08 11:20:07 +02:00
Maciej Suminski 4786f80b0b Add the string terminator for binary bitstrings. 2014-08-08 09:52:57 +02:00
Maciej Suminski d2ad7a4d28 Increase the output precision for floating point types. 2014-08-06 17:04:52 +02:00
Maciej Suminski 5830ecd67e Avoid freeing the primitive types classes. 2014-08-06 15:01:59 +02:00
Maciej Suminski 69b145e216 Minor cleaning for valgrind output. 2014-08-06 15:01:28 +02:00
Maciej Suminski 5ed60a151f Added support for real type in vhdlpp. 2014-08-06 15:00:35 +02:00
Maciej Suminski 66d31b02be Fixed vhdlpp segfault if it processes an entity without any ports declared. 2014-08-04 20:27:21 -07: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
Larry Doolittle e221a8ced9 Rearrange compiler warning flags
Before this patch, WARNING_FLAGS applied to both C and C++,
and WARNING_FLAGS_CXX applied to C++ only.
This patch adds a WARNING_FLAGS_CC that applies to C only.
That change should be generally useful; in particular the C
code is almost ready for -Wstrict-prototypes, which does not
apply to C++.

-Wextra (or -W) used to only apply to C++ via WARNING_FLAGS_CXX.
This patch moves it to WARNING_FLAGS, to apply to both C and C++.
Unfortunately, that triggers a ton of warnings.

For now, cover most of the new warnings up by adding
-Wno-unused -Wno-sign-compare -Wno-type-limits
to WARNING_FLAGS_CC.  In the long run, I want to change the C coding
style, and take off these disable-warning flags.  But those changes
can dribble in as separate commits; this patch is big enough already.

Actually fix a couple missing-field-initializers in libveriuser/veriusertfs.c.
2014-07-09 09:04:17 -07:00
Cary R 0611135758 Some more cppcheck cleanup/updates 2014-06-29 20:39:40 -07:00
Larry Doolittle be17bfc0e9 Spelling fixes
Mostly comments.
One user-visible string ("Evalutated to ") changed in the debug_eval_tree case.
2014-01-30 15:34:20 -08:00
Martin Whitaker 9e25884f12 Fix for br942 - allow function declaration in VHDL architecture. 2013-12-11 23:00:58 +00:00
Cary R 07cc18284c Fix print token/argument mismatches and other cppcheck fixes 2013-09-09 13:34:38 -07:00
Cary R 21b24c7725 Fix more compile warnings and a minor bug 2013-07-11 19:10:25 -07:00
Cary R 3e75f8e41f Remove a compile warning 2013-07-11 18:03:00 -07:00
Stephen Williams ca9616dc7b Better simple_expression parse rules. 2013-06-12 14:21:36 -07:00
Stephen Williams 24bd630cb2 Parse (to sorry messages) unbounded array definitions. 2013-06-12 14:21:36 -07:00
Stephen Williams 8487cb5616 Do a better job of figuring the vtype of an expression. 2013-06-12 14:21:36 -07:00
Stephen Williams d630e4dfe9 Elaborate VHDL entity port types/expressions.
We need to elaborate expressions so that function calls in
expressions (i.e. ranges) get bound to their proper scope.
This binding is in turn used to emit package scopes. This
is particularly interesting for ports of entities.
2013-06-12 14:21:35 -07:00
Stephen Williams 3d5765949e Some shorthand type marks in write_to_stream. 2013-06-12 14:21:35 -07:00
Stephen Williams 0fcd2d9db6 Handle rising_edge and falling_edge functions. 2013-06-12 14:21:35 -07:00