Language Change Specification for PATH_NAME and INSTANCE_NAME and Protected Types

LCS Number: LCS-2016-032
Version: 2
Date: 11-Mar-2017
Status: Voting
Author: Jim Lewis and Patrick Lehmann
Email: Main.JimLewis and Main.PatrickLehmann
Source Doc: PATH_NAME and Protected Types
More Doc: history
Summary: PATH_NAME and INSTANCE_NAME, and Protected Types

Style Notes

Changes are shown in red font. Deletions are crossed out. Editing notes in green font.

Reviewing Notes

Details of Language Change

16.2.5 Predefined attributes of named entities

[032.1: On page 250, after 4th paragraph E'INSTANCE_NAME ]

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.

[032.2: On page 251, after last paragraph E'PATH_NAME ]

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.

[032.3: On page 251 to 252, examples ]

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]:"            [delete space before signature]
        -- Proc'INSTANCE_NAME = ":lib:p:proc[integer]:"        [delete space before signature]
    constant C: INTEGER := 42; -- C'PATH_NAME = ":lib:p:c"
    type IncPt1 is protected
        procedure increment;
        impure function get return INTEGER;
    end protected IncPt1;
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"       [delete space before signature]
    begin                    -- x'INSTANCE_NAME = ":lib:p:proc[integer]:x"   [delete space before signature]
        
        
        
    end procedure Proc;
    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;
end package body P;

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 * 1 ns;   [Note: add a 1 before ns]
        wait on sp1 for max;
        c := sp1;
    end procedure Proc1;
    shared variable ArchInc : IncPt1;   -- ArchInc'PATH_NAME = ":e:ArchInc" 
                                        -- ArchInc'INSTANCE_NAME = ":e(a):ArchInc"
begin
    p1: process
        variable T: INTEGER := 12;   -- T'PATH_NAME = :e:p1:t"
    begin                                 -- T'INSTANCE_NAME = ":e(a):p1:t"
        variable ProcInc : IncPt1;   -- ProcInc'PATH_NAME = ":e:p1:ProcInc" 
                                     -- ProcInc'INSTANCE_NAME = ":e(a):p1:ProcInc"
    begin
        
        
        
    end process p1;
    
    process
        variable T: INTEGER := 12;   -- T'PATH_NAME = ":e::t"
    begin                            -- T'INSTANCE_NAME = ":e(a)::t"
        
        
        
    end process;    [Note: delete space between ; and process]
end architecture;

[Entity top and bottom unchanged]



Topic revision: r9 - 2020-02-17 - 15:34:35 - JimLewis
 
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