Issues with Generic-Mapped package

Proposal Details

  • Who Updates:
  • Date Proposed:2016-09-15
  • Date Last Updated:
  • Priority:
  • Complexity:Low
  • Focus:

Current Situation

This code looks valid according to the LRM but doesn't make sense:


package pkg1 is
 generic (c : natural)
 generic map (c => c)
end pkg1;

Requirement

Implementation details

Code Examples

Use Cases

Arguments FOR

Arguments AGAINST

General Comments

Supporters

Add your signature here to indicate your support for the proposal

Comments

Yes I thought this odd and so delved a bit further. This is apparently called a generic-mapped package and I quote from Peter Ashenden's "The Designer's Guide To VHDL":

"While VHDL allows us to write a generic-mapped package explicitly, we would not normally do so. Rather the feature is included in the language as a definitional aid.

....

Since generic-mapped packages are not a feature intended for regular use, we won't dwell on them further."

So not much of clue here!

-- Brent Hayhoe - 2016-09-15

Topic revision: r3 - 2020-02-17 - 15:34:32 - JimLewis
 
Copyright © 2008-2025 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback