A Library Mapping File (.lmf) is used to map EDIF cells to corresponding Quartus II logic functions. These Quartus II functions are directly substituted for the EDIF cells when a file is opened or compiled in the Quartus II software.
A Library Mapping File includes statements that declare the names and I/O ports of Quartus II logic functions and corresponding EDIF cells.
The following example shows a sample Library Mapping File that maps a single function:
LIBRARY sample
% This Library Mapping File includes one entry that maps %
% Mentor Graphics NOR3 to Quartus II NOR3 %
BEGIN
FUNCTION nor3 (IN1, IN2, IN3)
RETURNS (OUT)
FUNCTION "$nor3" ("I0", "I1", "I2")
RETURNS ("OUT")
END
Library Mapping Files have the following characteristics:
The LIBRARY keyword, followed by the library name, occurs once at the beginning of the Library Mapping File. The remainder of the file consists of one or more pairs of FUNCTION-RETURNS statements that declare Quartus II logic functions and EDIF cells. A Library Mapping File must contain at least one pair of FUNCTION-RETURNS statements.
Every two pairs of FUNCTION-RETURNS statements, which are enclosed in one BEGIN-END statement, represent a mapping between a Quartus II logic function and an EDIF cell. The Quartus II FUNCTION-RETURNS statement must come first.
The Quartus II function ports must correspond to the EDIF cell ports in order. The EDIF cell name and individual port names must be enclosed in double quotation marks (""). Within these double quotation marks, you may use any alphanumeric character except the percent symbol (%) and additional double quotation marks. If port names span multiple lines, no continuation character is required.
Library Mapping Files are case-sensitive. The case for EDIF cell names and EDIF input/output pin lists within a Library Mapping File must match the case in the EDIF netlist.
Comments must be enclosed in percent symbols (%). You must place comments anywhere outside the mapping construct, that is, before the BEGIN or after the END keyword. Nested comments are not allowed.
Several different EDIF cells can be mapped to the same Quartus II logic function. All of the mappings must list the same inputs and outputs. A single EDIF cell cannot be mapped to multiple Quartus II logic functions; if an EDIF cell is mapped to multiple Quartus II logic functions, only the first instance of a mapping is used.