TWiki
>
P1076 Web
>
Vhdl2019CollectedRequirements
>
LCS2016_032
(2020-02-17,
JimLewis
)
(raw view)
E
dit
A
ttach
---+ Language Change Specification for PATH_NAME and INSTANCE_NAME and Protected Types ---++ | <sticky><b>LCS Number:</b></sticky> | LCS-2016-032 | | <sticky><b>Version:</b> </sticky> | 2 | | <sticky><b>Date:</b> </sticky> | 11-Mar-2017 | | <sticky><b>Status:</b> </sticky> | Voting | | <sticky><b>Author:</b> </sticky> | Jim Lewis and Patrick Lehmann | | <sticky><b>Email:</b> </sticky> | [[Main.JimLewis]] and [[Main.PatrickLehmann]] | | <sticky><b>Source Doc:</b></sticky> | [[PathnameSharedVarSubprograms][PATH_NAME and Protected Types]] | | <sticky><b>More Doc:</b></sticky> | [[LCS2016_032_history][history]] | | <sticky><b>Summary:</b> </sticky> | PATH_NAME and INSTANCE_NAME, and Protected Types | ---++ Style Notes <noautolink> <sticky> Changes are shown in %RED%red font%ENDCOLOR%. Deletions are %RED%<del>crossed out</del>%ENDCOLOR%. Editing notes in %GREEN%green font%ENDCOLOR%. ---++ Reviewing Notes ---++ Details of Language Change ---+++ 16.2.5 Predefined attributes of named entities ---++++ %GREEN%[032.1: On page 250, after 4th paragraph E'INSTANCE_NAME ]%ENDCOLOR% %RED%For a named entity within a protected type, the instance name shall include the package or full instance path to the variable of the protected type.%ENDCOLOR% ---++++ %GREEN%[032.2: On page 251, after last paragraph E'PATH_NAME ]%ENDCOLOR% %RED%For a named entity within a protected type, the path name shall include the package or instance path to the variable of the protected type.%ENDCOLOR% ---++++ %GREEN%[032.3: On page 251 to 252, examples ]%ENDCOLOR% <pre> Examples: library Lib; -- All design units are in this library: package P is -- P'PATH_NAME = ":lib:p:" -- P'INSTANCE_NAME = ":lib:p:" procedure Proc (F: inout INTEGER); -- Proc'PATH_NAME = ":lib:p:proc[integer]:" %GREEN%[delete space before signature]%ENDCOLOR% -- Proc'INSTANCE_NAME = ":lib:p:proc[integer]:" %GREEN%[delete space before signature]%ENDCOLOR% constant C: INTEGER := 42; -- C'PATH_NAME = ":lib:p:c" %RED%type IncPt1 is protected procedure increment; impure function get return INTEGER; end protected IncPt1%ENDCOLOR%; end package P; -- C'INSTANCE_NAME = ":lib:p:c" package body P is procedure Proc (F: inout INTEGER) is variable x: INTEGER; -- x'PATH_NAME = ":lib:p:proc[integer]:x" %GREEN%[delete space before signature]%ENDCOLOR% begin -- x'INSTANCE_NAME = ":lib:p:proc[integer]:x" %GREEN%[delete space before signature]%ENDCOLOR% · · · end %RED%procedure Proc%ENDCOLOR%; %RED%type IncPt1 is protected body variable IncCounter : INTEGER := 0; -- For shared variable ArchInc -- IncCounter'PATH_NAME = "e:ArchInc:IncCounter" -- IncCounter'INSTANCE_NAME = "e(a):ArchInc:IncCounter" -- For variable ProcInc -- IncCounter'PATH_NAME = "e:p1:ProcInc:IncCounter" -- IncCounter'INSTANCE_NAME = "e(a):p1:ProcInc:IncCounter" procedure increment is begin -- For shared variable ArchInc -- increment'PATH_NAME = "e:ArchInc:increment" -- increment'INSTANCE_NAME = "e(a):ArchInc:increment" -- For variable ProcInc -- increment'PATH_NAME = "e:p1:ProcInc:increment" -- increment'INSTANCE_NAME = "e(a):p1:ProcInc:increment" IncCounter := IncCounter + 1; end procedure increment; impure function get return INTEGER is begin -- For shared variable ArchInc -- get'PATH_NAME = "e:ArchInc:get" -- get'INSTANCE_NAME = "e(a):ArchInc:get" -- For variable ProcInc -- get'PATH_NAME = "e:p1:ProcInc:get" -- get'INSTANCE_NAME = "e(a):p1:ProcInc:get" return IncCounter; end function get; end protected IncPt1%ENDCOLOR%; end %RED%package body P%ENDCOLOR%; library Lib; use Lib.P.all; -- Assume that E is in Lib and entity E is -- E is the top-level design entity: -- E'PATH_NAME = ":e:" -- E'INSTANCE_NAME = ":e(a):" generic (G: INTEGER); -- G'PATH_NAME = ":e:g" -- G'INSTANCE_NAME = ":e(a):g" port (P: in INTEGER); -- P'PATH_NAME = ":e:p" end entity E; -- P'INSTANCE_NAME = ":e(a):p" architecture A of E is signal S: BIT_VECTOR (1 to G); -- S'PATH_NAME = ":e:s" -- S'INSTANCE_NAME = ":e(a):s" procedure Proc1 (signal sp1: NATURAL; C: out INTEGER) is -- Proc1'PATH_NAME = ":e:proc1[natural,integer]:" -- Proc1'INSTANCE_NAME = ":e(a):proc1[natural,integer]:" -- C'PATH_NAME = ":e:proc1[natural,integer]:c" -- C'INSTANCE_NAME = ":e(a):proc1[natural,integer]:c" variable max: DELAY_LENGTH; -- max'PATH_NAME = ":e:proc1[natural,integer]:max" -- max'INSTANCE_NAME = ":e(a):proc1[natural,integer]:max" begin max := sp1 * %RED%1%ENDCOLOR% ns; %GREEN%[Note: add a 1 before ns]%ENDCOLOR% wait on sp1 for max; c := sp1; end procedure Proc1; %RED%shared variable ArchInc : IncPt1; -- ArchInc'PATH_NAME = ":e:ArchInc" -- ArchInc'INSTANCE_NAME = ":e(a):ArchInc"%ENDCOLOR% begin p1: process variable T: INTEGER := 12; -- T'PATH_NAME = :e:p1:t" %RED%<del>begin</del>%ENDCOLOR% -- T'INSTANCE_NAME = ":e(a):p1:t" %RED%variable ProcInc : IncPt1; -- ProcInc'PATH_NAME = ":e:p1:ProcInc" -- ProcInc'INSTANCE_NAME = ":e(a):p1:ProcInc" begin%ENDCOLOR% · · · end process p1; process variable T: INTEGER := 12; -- T'PATH_NAME = ":e::t" begin -- T'INSTANCE_NAME = ":e(a)::t" · · · end process; %GREEN%[Note: delete space between ; and process]%ENDCOLOR% end architecture; </pre> %GREEN%[Entity top and bottom unchanged]%ENDCOLOR% %BR% <br> <br>
E
dit
|
A
ttach
|
P
rint version
|
H
istory
: r9
<
r8
<
r7
<
r6
<
r5
|
B
acklinks
|
V
iew topic
|
Ra
w
edit
|
M
ore topic actions
Topic revision: r9 - 2020-02-17 - 15:34:35 -
JimLewis
P1076
Log In
or
Register
P1076 Web
Create New Topic
Index
Search
Changes
Notifications
RSS Feed
Statistics
Preferences
Webs
Main
P1076
Ballots
LCS2016_080
P10761
P1647
P16661
P1685
P1734
P1735
P1778
P1800
P1801
Sandbox
TWiki
VIP
VerilogAMS
Copyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback