Return to previous page Advance to next page
VHDL Reference Guide
Chapter 9: Foundation Express Directives

Foundation Express Directives

The three types of directives follow.

-- pragma map_to_entity entity_name
-- pragma return_port_name port_name

Translation Stop and Start Pragma Directives

Foundation Express supports the synthesis_off and synthesis_on pragma directives.

Note: It is recommended that you not use the following directives.

-- pragma translate_off 
-- pragma translate_on

The use of these directives in Foundation Express can lead to errors in your design.

synthesis_off and synthesis_on Directives

The synthesis_off and synthesis_on directives are the recommended mechanisms for hiding simulation-only constructs from synthesis. Any text between these directives is checked for syntax, but no corresponding hardware is synthesized.

The example below shows how you can use the directives to protect a simulation driver.

-- The following test driver for entity EXAMPLE
-- should not be translated:
-- pragma synthesis_off
-- Translation stops

entity DRIVER is
end DRIVER;
architecture VHDL of DRIVER is
signal A, B : INTEGER range 0 to 255;
signal SUM : INTEGER range 0 to 511;

    component EXAMPLE 
port (A, B: in INTEGER range 0 to 255;
SUM: out INTEGER range 0 to 511);
end component;

begin
U1: EXAMPLE port map(A, B, SUM);
process
begin
for I in 0 to 255 loop
for J in 0 to 255 loop
A <= I;
B <= J;
wait for 10 ns;
assert SUM = A + B;
end loop;
end loop;
end process;
end VHDL;

-- pragma synthesis_on
-- Code from here on is translated

entity EXAMPLE is
port (A, B: in INTEGER range 0 to 255;
SUM: out INTEGER range 0 to 511);
end EXAMPLE;

architecture VHDL of EXAMPLE is
begin
SUM <= A + B;
end VHDL;

Resolution Function Directives

Resolution function directives determine the resolution function associated with resolved signals. (See the “Resolution Functions” section of the “Design Descriptions” chapter.) Foundation Express does not support arbitrary resolution functions. It does support the following three methods.

-- pragma resolution_method wired_and 
-- pragma resolution_method wired_or
-- pragma resolution_method three_state

Note: Do not connect signals that use different resolution functions. Foundation Express supports only one resolution function per network.

Component Implication Directives

Component implication directives map VHDL subprograms onto existing components or VHDL entities. These directives are described under the “Procedures and Functions as Design Components” section of the “Sequential Statements” chapter.

-- pragma map_to_entity entity_name
-- pragma return_port_name port_name