LPM (Library Parameterized Modules) is a Parameterized macro function module Library. Using these functional module libraries can greatly improve the efficiency of icdesign. The LPM standard was introduced in 1990. In April 1993, LPM, as a subsidiary standard of the Electronic Design interchange format (EDIF), was incorporated into the temporary standard of the Electronic Industry Association (EIA.
It is very convenient to call the LPM library function in MAX + plus ii and Quartus II. You can either directly call the function in the Graphic Input Method or in the HDL source file.
The LPM library is shown in Table 2-5. It is a function module provided by MAX + plus ii and Quartus II for calling.
The directory where the LPM library of MAX + plus ii is located is/maxplus2/max2lib/mega_lpm. The directory where the LPM library of Quartus II is located is/altera/quartus60/libraries/megas.
Table 2-5 LPM Library Unit list
Module category |
Macro Unit |
Brief Description |
Door unit module |
Lpm_and |
Parameterization and gate |
|
Lpm_bustri |
Parameterized three-state Buffer |
|
Lpm_clshift |
Parameterized combination logic Positioner |
|
Lpm_constant |
Parameterized constant Generator |
|
Lpm_decode |
Parameterized Decoder |
|
Lpm_inv |
Parameterized Reverser |
|
Lpm_mux |
Parameterized multi-path Selector |
|
Busmux |
Parameterized bus Selector |
|
MUX |
Multi-path Selector |
|
Lpm_or |
Parameterization or gate |
|
Lpm_xor |
Parameterized exclusive OR gate |
Arithmetic Operation Module |
Lpm_abs |
Parameterized absolute value calculation |
|
Lpm_add_sub |
Parameterized addition/Subtraction |
|
Lpm_compare |
Parameterized Comparator |
|
Lpm_counter |
Parameterized counter |
|
Lpm_mult |
Parameterized Multiplier |
Memory Module |
Lpm_ff |
Parameterized D Trigger |
|
Lpm_latch |
Parameterized latches |
|
Lpm_ram_dq |
Input/Output separate parameterized Ram |
|
Lpm_ram_io |
Parameterized RAM for input and output multiplexing |
|
Lpm_rom |
Parameterized Rom |
|
Lpm_shitreg |
Parameterized shift register |
|
Csfifo |
Parameterization first-in-first-out queue |
|
Csdpram |
Parameterized dual-port RAM |
Other functional modules |
Pll |
Parameterized Phase-Locked Loop Circuit |
|
Ntsc < |
NTSC image control signal generator |
Appendix: Use the LPM Library Unit to construct a four-digit Calculator
The following describes how to use the LPM Library Unit to construct a four-bit calculator.
Lpm_add_sub is a parameterized addition/subtraction operator. It can be used to design the addition or subtraction operator. Compile
Edit the logstore, as shown in Figure 2-7.
Figure 2-7 parameterized addition/subtraction lpm_add_sub
Specify the following parameter values,
LPM_WIDTH = 4 (module signal width is 4 bits)
LPM_DIRECTION = "ADD" (set the module as a calculator)
LPM_REPRESENTATION = "UNSIGNED" (set the input and output data to the UNSIGNED number)
Then you need to set the port. Here, only four ports of the lpm_add_sub Library Unit are used, which are the data input ports.
Data-a [] and data-B [], result [] At the data output end, And cout at the input output end. The simulation results are shown in Figure 2-8.
Figure 2-8lpm_add_sub simulation image when it is set as a multiplier