|
Parameterized OR gate megafunction. Altera® recommends using an OR
primitive or operator rather than lpm_or
for easier implementation and to improve compilation time. However, lpm_or
may be useful if you need parameterized inputs.
Altera also recommends instantiating this function as described in Using the MegaWizard® Plug-In Manager.
This topic contains the following information:
FUNCTION lpm_or (data[LPM_SIZE-1..0][LPM_WIDTH-1..0] WITH (LPM_WIDTH, LPM_SIZE) RETURNS (result[LPM_WIDTH-1..0];
COMPONENT lpm_or GENERIC (LPM_WIDTH: POSITIVE; LPM_SIZE: POSITIVE; LPM_TYPE: STRING := "LPM_OR"; LPM_HINT: STRING := "UNUSED"); PORT (data: IN STD_LOGIC_2D(LPM_SIZE-1 DOWNTO 0, LPM_WIDTH-1 DOWNTO 0); result: OUT STD_LOGIC_VECTOR(LPM_WIDTH-1 DOWNTO 0)); END COMPONENT;
LIBRARY lpm; USE lpm.lpm_components.all;
INPUT PORTS
Port Name | Required | Description | Comments |
---|---|---|---|
data[][] |
Yes | Data input to the OR gates. |
Input port LPM_SIZE x LPM_WIDTH
wide. Two-dimensional bus ports are not supported in Verilog HDL. |
OUTPUT PORTS
Port Name | Required | Description | Comments |
---|---|---|---|
result[] |
Yes | Result of OR operators. |
Output port LPM_WIDTH wide. |
Parameter | Type | Required | Description |
---|---|---|---|
LPM_WIDTH |
Integer | Yes | Width of the data[] and result[]
ports. Number of OR gates. |
LPM_SIZE |
Integer | Yes | Number of inputs to each OR gate. Number of input buses. |
LPM_HINT |
String | No | Allows you to specify Altera-specific parameters in VHDL Design Files (.vhd). The default is "UNUSED" . |
LPM_TYPE |
String | No | Identifies the library of parameterized modules (LPM) entity name in VHDL Design Files. |
Each lpm_or
function defines LPM_WIDTH OR
gates. Each OR
gate has the following function:
Inputs | Output |
---|---|
DATA[LPM_SIZE- 1. .0]_[LPM_WIDTH- 1] |
RESULT[LPM_WIDTH- 1] |
1XXX... | 1 |
X1XX... | 1 |
XX1X... | 1 |
... | ... |
0000... | 0 |
Uses one logic cell per output.
This topic prints best in Landscape orientation. |
- PLDWorld - |
|
Created by chm2web html help conversion utility. |