我用Megacore建了IFFT,可是编译时总报错说:“VHDL Use Clause error at IFFTcore.vhd(35): design library "fft_lib" does not contain primary unit "fft_pack_fft_110”,我在安装文件C:\altera\11.0\ip\altera\fft\lib里找到fft_pack_fft_110.vhd,那这个库要怎么改?
程序如下:
library IEEE;
use IEEE.std_logic_1164.all;
library fft_lib;
use fft_lib.fft_pack_fft_110.all;
ENTITY IFFTcore IS
PORT (
clk : IN STD_LOGIC;
reset_n : IN STD_LOGIC;
inverse : IN STD_LOGIC;
sink_valid : IN STD_LOGIC;
sink_sop : IN STD_LOGIC;
sink_eop : IN STD_LOGIC;
sink_real : IN STD_LOGIC_VECTOR (9 DOWNTO 0);
sink_imag : IN STD_LOGIC_VECTOR (9 DOWNTO 0);
sink_error : IN STD_LOGIC_VECTOR (1 DOWNTO 0);
source_ready : IN STD_LOGIC;
sink_ready : OUT STD_LOGIC;
source_error : OUT STD_LOGIC_VECTOR (1 DOWNTO 0);
source_sop : OUT STD_LOGIC;
source_eop : OUT STD_LOGIC;
source_valid : OUT STD_LOGIC;
source_exp : OUT STD_LOGIC_VECTOR (5 DOWNTO 0);
source_real : OUT STD_LOGIC_VECTOR (9 DOWNTO 0);
source_imag : OUT STD_LOGIC_VECTOR (9 DOWNTO 0)
);
END IFFTcore;
ARCHITECTURE SYN OF IFFTcore IS
COMPONENT asj_fft_si_se_so_b_fft_110
GENERIC (
nps : NATURAL;
bfp : NATURAL;
nume : NATURAL;
mpr : NATURAL;
twr : NATURAL;
bpr : NATURAL;
bpb : NATURAL;
fpr : NATURAL;
mram : NATURAL;
m512 : NATURAL;
mult_type : NATURAL;
mult_imp : NATURAL;
dsp_arch : NATURAL;
srr : STRING;
rfs1 : STRING;
rfs2 : STRING;
rfs3 : STRING;
rfc1 : STRING;
rfc2 : STRING;
rfc3 : STRING
);
PORT (
clk : IN STD_LOGIC;
reset_n : IN STD_LOGIC;
inverse : IN STD_LOGIC;
sink_valid : IN STD_LOGIC;
sink_sop : IN STD_LOGIC;
sink_eop : IN STD_LOGIC;
sink_real : IN STD_LOGIC_VECTOR (9 DOWNTO 0);
sink_imag : IN STD_LOGIC_VECTOR (9 DOWNTO 0);
sink_error : IN STD_LOGIC_VECTOR (1 DOWNTO 0);
source_ready : IN STD_LOGIC;
sink_ready : OUT STD_LOGIC;
source_error : OUT STD_LOGIC_VECTOR (1 DOWNTO 0);
source_sop : OUT STD_LOGIC;
source_eop : OUT STD_LOGIC;
source_valid : OUT STD_LOGIC;
source_exp : OUT STD_LOGIC_VECTOR (5 DOWNTO 0);
source_real : OUT STD_LOGIC_VECTOR (9 DOWNTO 0);
source_imag : OUT STD_LOGIC_VECTOR (9 DOWNTO 0)
);
END COMPONENT;
BEGIN
asj_fft_si_se_so_b_fft_110_inst : asj_fft_si_se_so_b_fft_110
GENERIC MAP (
nps => 64,
bfp => 1,
nume => 1,
mpr => 10,
twr => 10,
bpr => 16,
bpb => 4,
fpr => 4,
mram => 0,
m512 => 0,
mult_type => 0,
mult_imp => 0,
dsp_arch => 0,
srr => "AUTO_SHIFT_REGISTER_RECOGNITION=OFF",
rfs1 => "IFFTcore_1n64sin.hex",
rfs2 => "IFFTcore_2n64sin.hex",
rfs3 => "IFFTcore_3n64sin.hex",
rfc1 => "IFFTcore_1n64cos.hex",
rfc2 => "IFFTcore_2n64cos.hex",
rfc3 => "IFFTcore_3n64cos.hex"
)
PORT MAP (
clk => clk,
reset_n => reset_n,
inverse => inverse,
sink_valid => sink_valid,
sink_sop => sink_sop,
sink_eop => sink_eop,
sink_real => sink_real,
sink_imag => sink_imag,
sink_ready => sink_ready,
sink_error => sink_error,
source_error => source_error,
source_ready => source_ready,
source_sop => source_sop,
source_eop => source_eop,
source_valid => source_valid,
source_exp => source_exp,
source_real => source_real,
source_imag => source_imag
);
END SYN;
|