Open JHertz5 opened 6 days ago
I've done some testing and the results are actually better than I'd expected. It turns out that all generic map rules other than 001 and 002 do already work on all instances of generic maps.
generic map rule | component | package | subprogram | block |
---|---|---|---|---|
001 | y | n | n | n |
002 | y | n | n | n |
003 | y | y | y | y |
004 | y | y | y | y |
005 | y | y | y | y |
006 | y | y | y | y |
007 | y | y | y | y |
008 | y | y | y | y |
100 | y | y | y | y |
600 | y | y | y | y |
601 | y | y | y | y |
I've also discovered that the alignment rule that I'd been looking for to work on generic maps was actually instantiation_001
, so I'll need an alignment rule for each of the constructs within which generic maps appear. I will create a separate issue (#1333) for this.
I've created a PR #1332 to resolve this issue.
Environment v3.27.0
Describe the bug Generic maps can be used in package instantiations, subprogram instantiations, blocks and component instantiations. However, most generic map rules only apply to component instantiations.
To Reproduce Steps to reproduce the behavior:
ARCHITECTURE RTL OF TEST IS
FUNCTION MY_FUNC IS NEW MY_FUNC GENERIC MAP (G_TEST => C_TEST);
BEGIN
CMP_G_TEST : COMPONENT TEST GENERIC MAP (G_TEST => C_TEST);
MY_BLOCK : BLOCK IS
GENERIC (G_TEST : BOOLEAN); GENERIC MAP (G_TEST => C_TEST);
BEGIN
END BLOCK MY_BLOCK;
END ARCHITECTURE RTL;
Note that the component instantiation is now nicely formatted, while the others are not.
Expected behavior I expect the generic map rules to act on all of these instances.