Commit Graph

39 Commits

Author SHA1 Message Date
Maciej Suminski 94f7504372 vhdlpp: Subprograms are linked to Package instead of generic Scope. 2016-03-07 17:11:53 +01:00
Maciej Suminski 03e85850e1 vhdlpp: Variables are moved to respective process scopes. 2016-03-07 11:38:11 +01:00
Maciej Suminski 2c4deee0c3 vhdlpp: Support for subprogram overloading. 2016-03-07 09:54:28 +01:00
Maciej Suminski cc729e8dd9 vhdlpp: Removed redundant ActiveScope::bind_name() for subprograms. 2016-03-07 09:54:28 +01:00
Maciej Suminski 23633c498f vhdlpp: Moved dump_scope() to ScopeBase class. 2016-01-06 15:30:06 +01:00
Maciej Suminski 83f01a5fc4 vhdlpp: Support for implicit initalizers and finalizers. 2015-12-01 16:38:54 +01:00
Christian Taedcke 6d5aabd4f0 Make a few constructors explicit.
This removes cppcheck warnings.
2015-10-22 12:33:33 +02:00
Larry Doolittle 4dd65926ae Spelling fixes 2015-08-17 11:35:10 -07:00
Maciej Suminski 5858e1bbac vhdlpp: ExpName::probe_type() checks Subprogram parameters. 2015-06-24 23:53:33 +02:00
Maciej Suminski 47c5ce0ab6 vhdlpp: Subprogram split to SubprogramHeader and SubprogramBody. 2015-06-24 23:53:31 +02:00
Maciej Suminski 7db01d8ded vhdlpp: ScopeBase::is_enum_name() returns VTypeEnum* instead of bool. 2015-05-07 16:28:30 +02:00
Maciej Suminski 0ca856d4e8 bugfix #942: VHDL function bodies in arch declaration not supported 2015-03-31 10:46:24 +02:00
Maciej Suminski 807ad8002d vhdlpp: Check generics when searching through constants. 2015-03-06 20:39:10 +01:00
Maciej Suminski 0046e9eca0 vhdlpp: ActiveScope::is_vector_name() checks also for constants. 2015-02-19 17:07:41 +01:00
Maciej Suminski 12b4914b63 vhdlpp: ExpName resolves enum values. 2015-02-17 10:15:57 +01:00
Maciej Suminski 1a367c84b6 vhdlpp: Subprograms can have instances that take a different set of parameter types. 2015-02-05 11:25:03 +01:00
Maciej Suminski 621cf37339 vhdlpp: Added ScopeBase::find_param() method. 2015-02-04 16:57:43 +01:00
Maciej Suminski 747e656a0e vhdlpp: Added ScopeBase::transfer_from() method. 2014-09-30 15:00:55 +02:00
Maciej Suminski 7b5470c8a7 vhdlpp: Subprogram class inherits from ScopeBase. 2014-09-30 15:00:55 +02:00
Maciej Suminski 5830ecd67e Avoid freeing the primitive types classes. 2014-08-06 15:01:59 +02: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 e927960121 Implement subprogram bodies in package bodies. 2013-06-12 14:09:07 -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 d9fea802da Function declarations in packages
This is still basic. Definitions are still not done.
2013-06-12 14:09:07 -07:00
Arun Persaud f5aafc32f9 updated FSF-address 2012-08-29 10:12:10 -07:00
Stephen Williams 4748f0cb5e Handle incomplete type declarations
Use these in the package library to allow for arbitrary mixing
of type declaration and use. This makes writing libraries much
easier.
2012-05-22 17:31:27 -07:00
Stephen Williams ed3da959f3 Support types in packages.
Types declared in packages should be written into the package library.
2012-05-22 17:31:25 -07:00
Cary R 209a78a439 Remove a more cppcheck warnings in vhdlpp.
This patch removes a few more cppcheck warnings in the vhdlpp directory.
2011-10-14 18:40:39 -07:00
Stephen Williams 3497e2e663 Distinguish bit selects of entity ports from function calls.
Besides variables and signals, a name with a bit select may
be an entity port. Distinguish these from function calls.
2011-09-11 15:28:58 -07:00
Stephen Williams 4464c5849b Handle a few built-in functions internally.
The "unsigned" and "std_logic_vector" functions are internal
functions and VHDL and can be handled internally in the code
generator.
2011-08-28 15:30:45 -07:00
Stephen Williams f5220c54f1 Handle variables in process statements
Parse variables declared in the declaration section of process
statements, and support variable assignment statements.
2011-08-17 20:19:15 -07:00
Cary R 836e61e878 Fix spacing issues in the code.
Remove space at the end of line and space before tab since they serve
no purpose.
2011-07-30 09:33:28 -07:00
Pawel Szostek a8fae6bbf7 Use stl algorithms and templates in ScopeBase destructor
This patch applies a more sophisticated method for
cleaning containers in VHDL ScopeBase class.
2011-07-24 09:57:20 -07:00
Pawel Szostek a5ca9ea8be Use separate containers for current and previous scopes
This patch introduces in ScopeBase separate containers
for declarations coming from the current scope and from
the previous scopes.
Until now, in one scope, all objects were kept in an stl map.
When a scope was created inside other scopes, a shallow
copy of the map was made. This solution was nice for
name shadowing (in new scopes, when a name was
encountered, the old objects were overridden by a new
one), but didn't allow for distinguishing where the objects
were allocated. As a result, it is impossible to know who
the owner is and who should delete them.

In this commit ScopeBase gets two containers: for old
and new objects. If a ScopeBase is made from another
ScopeBase object, all objects from the copied object
go to an old_XXX container, where XXX depends on the
type of the copied objects. When a ScopeBase object
is deleted, the objects from new_XXX are deleted and
the ones from old_XXX are not touched.

This patch adds some complexity to the internals
of ScopeBase, but leaves its interface unchanged.
2011-07-24 09:53:06 -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
Cary R 029309103f Fix some space issues. 2011-04-27 10:53:36 -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 303f057de1 Support collecting ALL component declarations from a used scope. 2011-04-13 19:55:18 -07:00
Stephen Williams d4c5cfc584 Add packages and component declarations within those packages.
This creates the Package class to represent packages, and the
Scope class to represent scopes in general. The library functions
are worked up to support scanning scopes for declarations that are
imported by "use" clauses.
2011-04-13 18:30:00 -07:00