Commit Graph

46 Commits

Author SHA1 Message Date
Martin Whitaker ecbbb60fb6 Remove "using namespace std" from compiler header files and fix the fallout. 2021-11-04 16:55:03 +00:00
Cary R a56747b747 Update vhdlpp with changes suggested by cppcheck 2021-01-02 13:36:24 -08:00
Larry Doolittle 4521be4510 More spelling, comments only 2016-04-01 11:02:34 -07:00
Larry Doolittle 1784488096 Spelling and whitespace 2016-03-14 12:25:50 -07:00
Maciej Suminski 03e85850e1 vhdlpp: Variables are moved to respective process scopes. 2016-03-07 11:38:11 +01:00
Maciej Suminski b037d533f9 vhdlpp: ProcessStatement inherits after ScopeBase. 2016-03-07 11:38:11 +01:00
Maciej Suminski 25cd0827ba vhdlpp: Removed ProcessStatement::rewrite_as_always_edge_() & extract_anyedge_().
Processes sensitive to edges are now handled with $ivlh_{rising,falling}_edge().
2016-03-07 11:38:11 +01:00
Maciej Suminski d20549b27a vhdlpp: Fixed a crash in case of dynamic_cast failure. 2016-03-07 09:54:28 +01:00
Maciej Suminski 2c4deee0c3 vhdlpp: Support for subprogram overloading. 2016-03-07 09:54:28 +01:00
Maciej Suminski 42ead3a482 vhdlpp: Elaborate types for signals & variables. 2016-03-07 09:54:28 +01:00
Maciej Suminski daed47eb45 vhdlpp: Improved conditional assignments.
Now they handle expressions without the final 'else'.
2016-03-07 09:54:28 +01:00
Maciej Suminski dff1ad08b0 vhdlpp: ExpAttribute split to Exp{Obj,Type}Attribute. 2016-01-06 15:30:06 +01:00
Maciej Suminski 3b310e8227 vhdlpp: Elaborate subprograms in packages. 2016-01-05 14:23:25 +01:00
Maciej Suminski 83f01a5fc4 vhdlpp: Support for implicit initalizers and finalizers. 2015-12-01 16:38:54 +01:00
Maciej Suminski e4ba4b5acd vhdlpp: Added means to use 'initial' and 'final' blocks during translation. 2015-12-01 10:33:20 +01:00
Maciej Suminski df597e19cb vhdlpp: Removed conversion of '*_edge(sig)' to 'always begin..end @(*edge sig)'. 2015-06-24 23:53:33 +02:00
Maciej Suminski 4a31f36646 vhdlpp: Minor code cleaning. 2015-06-08 18:42:52 +02:00
Maciej Suminski 807ad8002d vhdlpp: Check generics when searching through constants. 2015-03-06 20:39:10 +01:00
Maciej Suminski 0f0bef32f2 vhdlpp: Architecture elaboration counts errors coming from expression elaboration. 2015-02-19 17:07:41 +01:00
Maciej Suminski a1a4f47894 vhdlpp: Unnecessary comment. 2015-02-19 17:07:41 +01:00
Maciej Suminski f51c037432 vhdlpp: Generics from external packages are accepted (warning instead of error). 2015-02-19 17:07:37 +01:00
Maciej Suminski 19ff6a434b vhdlpp: Alternative way of dealing with unbounded vectors in fuctions (instances). 2015-02-05 12:00:25 +01:00
Maciej Suminski 962330f20a vhdlpp: Functions support unbounded vectors as return type and parameters. 2015-02-04 16:57:43 +01: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
Stephen Williams 0fcd2d9db6 Handle rising_edge and falling_edge functions. 2013-06-12 14:21:35 -07:00
Stephen Williams 6394a4d78d Rework scope types and constants so we can tell imported from local names.
The package emit of types and constants needs to know which names are
from the current type and which are imported from libraries. Rework
the scope handling of those names so that the information is preserved.
2013-06-12 14:09:07 -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
Arun Persaud f5aafc32f9 updated FSF-address 2012-08-29 10:12:10 -07:00
Stephen Williams 71d2401221 Handle VHDL records.
Elaborate records and emit them as packed SV records. Also handle
record members so handle name prefixes.

While we are at it, handle some cases of array aggregate expressions.
2012-05-22 17:31:26 -07:00
Stephen Williams ae06863db1 Elaborate prefix names which may be structure variables. 2012-05-22 17:31:26 -07:00
Stephen Williams 1249b5dd32 Initial support for if_generate syntax. 2012-05-22 17:31:25 -07:00
Larry Doolittle 84f14dbc81 Spelling fixes to vhdlpp tree
Mostly comments as usual, but one error message is changed.
2012-05-17 16:42:03 -07:00
Stephen Williams 98d928f6e0 Add support for VHDL for-generate 2011-10-30 17:10:19 -07:00
Stephen Williams 2be682f8a5 Support VHDL component instantiations with generics as Verilog parameters. 2011-10-23 17:08:48 -07:00
Pawel Szostek 981425fcce Add semantics check in component instantiation
There have been applied rules for port and signal
association in component instatiation statements
described in the VHDL standard.
2011-07-24 10:14:41 -07:00
Pawel Szostek e19089e838 Use multimap in VHDL Component Instantiations
Port map aspects were held in std::maps. Because
of that, in case of multiple assignments to the same
port, some assignments were lost and in effect vhdlpp
produced correct verilog code from a buggy VHDL.

Std::map was replaced by std::multimap. Thanks to it
we can gather this multiple assignments and detect them
in the elaboration phase.
2011-07-24 10:08:14 -07:00
Stephen Williams e2932cb6b5 Add ExpName::elaborate_rval member function
This function is for the time being used in the
component instatiation. It is checked, whether
an expression is a correct r-value.
To be a correct r-value, it must be either
port name or signal name.
2011-07-19 21:29:05 -07:00
Stephen Williams 41601696cc properly handle vhdl open ports in component instantiations. 2011-06-12 16:59:07 -07:00
Stephen Williams cab974c0c2 vhdl sequential l-values cause variables to be reg vs. net.
When a signal (or port) is assigned by a sequential assignment,
the signal or port becomes a reg, instead of a wire(net). Detect
this distinction during elaboration and generate the correct
signal/port declaration.
2011-06-12 15:38:03 -07:00
Stephen Williams bf40c8ecc5 Conditional statements and expressions
Elaborate and emit a variety of conditional constructs.
Fix up type handling for some expression types
Elaborate continuous signal assignments.
2011-06-12 10:51:31 -07:00
Stephen Williams 22ab8e4a76 Elaboration of r-value expressions
R-value expressions are more general then L-value expressions, in that
the expression type may be a bit more complex. If the R-value expression
is part of an assignment, then elaborate with the constrained type from
the L-value. In other cases, where the expression type is not as obvious,
use expression type probes to figure out the type of the expression and
elaborate using that calculated type.
2011-05-30 19:17:40 -07:00
Stephen Williams da0fb1666f Detect always @edge patterns
VHDL doesn't have a direct way to express "always @(posedge...)"
statements, but we do want to detect common paradigms that naturally
translate. This makes for a better translation.
2011-05-28 10:49:33 -07:00
Stephen Williams a53082176d Arrange for ports used as l-values to be declared as "reg".
Entity output ports may be used as l-values in a process within
the bound architecture. Detect that case during elaboration and
adjust the signal declaration so that it works in the Verilog pass.
2011-05-15 16:17:51 -07:00
Stephen Williams 27b58a7f93 Reorganize architecture debug methods. 2011-05-15 08:57:19 -07:00
Stephen Williams 791adfab68 Check ports match up in component instantiations.
Make sure in a conponent instantiation that the instantiated
component is really declared, and that the ports of the binding
really do match the ports of the declared component. This requires
that we create and save component declarations, and that components
have methods for mapping the ports.
2011-04-10 09:42:22 -07:00
Stephen Williams 799864eabf Add more complete support for vhdl local signals.
These signals are declared in the architecture and are local to
the module. The Architecture already parsed and stored these signal
declarations, but this patch adds the ability to actually emit these
signals in the generated code.

In the process of doing this, I had to regularize the elaboration
and emit of VTypes, so that it can be used in multiple places, not
just in entity headers (for ports).

I also added support for bit selects of signals. This effected a couple
places in the parser, and expressions in general.
2011-03-27 12:01:58 -07:00