Table of Contents

Visibility and validity ranges

Declarative range

Declarative ranges are parts of the description text. Separate, declarative ranges are:

Validity range of a declaration

A declaration`s validity range goes from the beginning of the declaration to the end of the declarative range in which the declaration is made; this range is called the immediate range.

The validity range of the following declarations extends beyond the corresponding declarative range:

In general, the validity range also includes the corresponding configuration, declaration and the configurations and declarations contained therein (hierarchy).

Visibility

Elements are either made visible by selection or are directly visible. The visibility rules define the range in which a declared object (identifier!) can be accessed. Moreover, only one declaration can be valid for using the object (overloading). A declaration is made visible by selection in the following positions:

Eventually, every declaration which stands within the declarative range of any given construct (with the exception of RECORD) is made visible as the suffix of an expanded name with the prefix marking the construct mentioned above.

e.g., within a configuration:

    USE ENTITY WORK.tv(SAT1)
    Prefix.Suffix

as 1.

    Rom cell(0) <= ROMBIB.rom_package.constant(0)
    date.month <= "April"
    date <= (Year => 1997, Day => 9, Month => "April") ;
    ASSERT ack`STABLE(setup_time)
    REPORT "setup time violation by Ack"
    SEVERITY WARNING
    ATTRIBUTE author OF tb_i2c : ENTITY IS "Martin Padeffke"
    FUNCTION ksc_fans(Number) RETURN INTEGER ;
    ARCHITECTURE einschaltquoten OF tv IS
    BEGIN
    ...
    pot_viewers <= ksc_fans(football_fans) + ...
    END einschaltquoten ;
    UUT : bus_monitor
    GENERIC MAP ( setup_time => setup, clock_period => clk_period , ... ) ;
    PORT MAP ( bus => scd, takt => scl, ...) ;

as 8. as 9. as 8. respective as 9.

Direct Visibility

Any given declaration is directly visible within its immediate validity range (except for: hidden declarations): Package declaration can be made directly visible by Use-statements.

A declaration is called hidden if it is overlapped by a local declaration - see the example.

Exception: overloading - several declarations which have the same identifier exist at the same time and the fitting declaration is selected from the context of the call (Overloading resolution).

Signal b is declared in block lbl_1 and in block lbl_2 . If b is addressed without any further designation the `inner` signal is addressed. Otherwise this has to be explicitly designated by placing the corresponding label as a prefix.

lbl_1 : BLOCK
   SIGNAL a, b : bit ;
   BEGIN
 
      lbl_2 : BLOCK
         SIGNAL b : bit ;
         BEGIN
            a <= b AFTER 5 ns ;        -- Equivalent: <- lbl_1.a <= lbl_2.b AFTER 5 ns
            b <= lbl_1.b AFTER 10 ns ; -- Equivalent: <- lbl_2.b <= lbl_1.b AFTER 10 ns
      END BLOCK lbl_2 ;
 
   b <= a AFTER 15 ns ;                -- Equivalent: <- lbl_1.b <= lbl_1.a AFTER 15 ns
END BLOCK lbl_1 ;