Parchrome的小站

Be together. Not the same.

0%

FPGA笔记-LPM库-MULT

LPM_MULT

VHDL声明程序

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
component LPM_MULT
generic ( LPM_WIDTHA : natural;
LPM_WIDTHB : natural;
LPM_WIDTHS : natural := 1;
LPM_WIDTHP : natural;
LPM_REPRESENTATION : string := "UNSIGNED";
LPM_PIPELINE : natural := 0;
LPM_TYPE: string := L_MULT;
LPM_HINT : string := "UNUSED");
port ( DATAA : in std_logic_vector(LPM_WIDTHA-1 downto 0);
DATAB : in std_logic_vector(LPM_WIDTHB-1 downto 0);
ACLR : in std_logic := '0';
CLOCK : in std_logic := '0';
CLKEN : in std_logic := '1';
SUM : in std_logic_vector(LPM_WIDTHS-1 downto 0) := (OTHERS => '0');
RESULT : out std_logic_vector(LPM_WIDTHP-1 downto 0));
end component;

Generic

port 描述
lpm_widtha 输入数据A长度
lpm_widthb 输入数据B长度
lpm_widths 输入sum[]长度,可选
lpm_widthp 输出数据长度,默认为lpm_widtha+lpm_widthb ,小于默认值时,输出只保留高位数据
lpm_representation 运算数据类型,”UNSIGNED”、”SIGNED”,默认为”UNSIGNED”
lpm_pipeline 定义输出延时的时钟周期

Ports

port 必须 描述
dataa[] * 输入数据A
datab[] * 输入数据B
clock 输入时钟信号,lpm_pipeline不为0时必须接入时钟信号
result * 乘法器结果输出

参考

intel用户手册

LPM快速指南