當我合成以下VHDL代碼時出現上述錯誤。<*>實例<gen[1].*>未連接或連接到無負載信號
這是連接多個實體的頂級設計。
組件聲明:
COMPONENT channel_memory IS
PORT (
clka : IN STD_LOGIC;
rsta : IN STD_LOGIC;
wea : IN STD_LOGIC_VECTOR(0 DOWNTO 0):= (OTHERS => '0');
addra : IN STD_LOGIC_VECTOR(11 DOWNTO 0):= (OTHERS => '0');
dina : IN STD_LOGIC_VECTOR(15 DOWNTO 0):= (OTHERS => '0');
douta : OUT STD_LOGIC_VECTOR(15 DOWNTO 0):= (OTHERS => '0')
);
END COMPONENT;
COMPONENT MAX5190 IS
PORT (
GCLK : IN STD_LOGIC; -- CLK in 200 MHz
RSTN : IN STD_LOGIC; -- Reset
OUTPUT_TRIGGER : IN STD_LOGIC; -- Enable the module (from controller)
TRIGGER_CHIRP : IN STD_LOGIC; -- Start chirping (from channel delay)
LOAD_ACK : IN STD_LOGIC; -- Data ready
DATA_LENGTH : IN STD_LOGIC_VECTOR (11 DOWNTO 0); -- Total words to send to DAC
DIN : IN STD_LOGIC_VECTOR (15 DOWNTO 0) := (OTHERS => '0'); -- Actual data to send to DAC
CHIRP_EN_TRIGGER : IN STD_LOGIC; -- Enable dac >> ××××××××××××
-- ×
-- Memory block ×
LOAD_OUTPUT : OUT STD_LOGIC; -- Request data ×
DATA_ADDR : OUT STD_LOGIC_VECTOR (11 DOWNTO 0); -- Adress to read from ×
-- ×
CHIRP_EN : OUT STD_LOGIC; -- opamp enable << ××××××××××
-- MAX5190 outputs
DAC_EN : OUT STD_LOGIC; -- DAC Enable (always high)
DAC_CS : OUT STD_LOGIC; -- DAC chip select
DAC_CLK : OUT STD_LOGIC; -- DAC clock out
DAC_DATA : OUT STD_LOGIC_VECTOR (7 DOWNTO 0) := (OTHERS => '0') -- dac data
);
END COMPONENT;
COMPONENT memory_controll IS
PORT(
CLK : IN STD_LOGIC;
-- from controller
DATA_IN : IN STD_LOGIC_VECTOR (15 DOWNTO 0); -- data to store
DATA_LENGTH : in STD_LOGIC_VECTOR (11 DOWNTO 0); -- number of words to store
RESET : IN STD_LOGIC; -- reset module
NEW_DATA : IN STD_LOGIC; -- new data available flag
WRITE_ENABLE : IN STD_LOGIC; -- enable writing
-- from MAX5190
ADDRESS_SELECT : IN STD_LOGIC_VECTOR (11 DOWNTO 0) := (others => '0'); -- addres selected by MAX5190 driver
REQUEST_DATA : IN STD_LOGIC; -- request data
DATA_OUT : OUT STD_LOGIC_VECTOR (15 DOWNTO 0); -- data to MAX5190 driver
DATA_READY : OUT STD_LOGIC; -- data to MAX5190 driver ready
-- to memory
DOUTA : IN STD_LOGIC_VECTOR (15 DOWNTO 0) := (others => '0'); -- data from memory
DINA : OUT STD_LOGIC_VECTOR (15 DOWNTO 0); -- data to memory
ADDRA : OUT STD_LOGIC_VECTOR (11 DOWNTO 0); -- addres to write or read
WEA : OUT STD_LOGIC_VECTOR ( 0 DOWNTO 0); -- write enable
RSTA : OUT STD_LOGIC -- reset memory
);
端口映射:
gen: for i in 1 to number_of_channels generate
-- memory controll
memcont: memory_controll
PORT MAP(
CLK => clk400MHz,
-- from controller
DATA_IN => MEMORY_CONTROL_DATA,
DATA_LENGTH => MEMORY_CONTROL_DATA_LENGTH,
RESET => BUTTON,
NEW_DATA => MEMORY_CONTROL_NEW_DATA,
WRITE_ENABLE => MEMORY_CONTROL_WRITE_ENABLE,
-- from MAX5190
ADDRESS_SELECT => ADDRESS_SELECT (i),
REQUEST_DATA => REQUEST_DATA (i),
DATA_OUT => DATA_OUT (i),
DATA_READY => DATA_READY (i),
-- to memory
DOUTA => DOUTA (i),
DINA => DINA (i),
ADDRA => ADDRA (i),
WEA => WEA (i),
RSTA => RSTA (i)
);
-- max5190
max: max5190
PORT MAP(
GCLK => clk200MHz,
RSTN => MAX5190_RESET,
OUTPUT_TRIGGER => MAX5190_ENABLE,
TRIGGER_CHIRP => TRIGGER_CHIRP (i),
LOAD_ACK => DATA_READY (i),
DATA_LENGTH => MAX5190_DATA_LENGTH,
DIN => DATA_OUT (i),
CHIRP_EN_TRIGGER => MAX5190_CHIRP_ENABLE,
-- Memory block
LOAD_OUTPUT => REQUEST_DATA (i),
DATA_ADDR => ADDRESS_SELECT (i),
CHIRP_EN => CHIRP_EN (i),
-- MAX5190 outputs
DAC_EN => DAC_EN (i),
DAC_CS => DAC_CS (i),
DAC_CLK => CHANNEL_CLKS (i),
DAC_DATA => CHANNELS (i)
);
-- memory
mem: channel_memory
PORT MAP(
clka => clk400MHz,
rsta => BUTTON,
wea => WEA (i),
addra => ADDRA (i),
dina => DINA (i),
douta => DOUTA (i)
);
其中我聲明我的類型包:
PACKAGE jelle IS
FUNCTION lookup (input: STD_LOGIC_VECTOR(15 DOWNTO 0)) RETURN INTEGER;
FUNCTION jOR (input: STD_LOGIC_VECTOR(7 DOWNTO 0)) RETURN STD_LOGIC;
TYPE VECTOR_ARRAY is array (POSITIVE) of STD_LOGIC_VECTOR(7 downto 0);
TYPE ADDRESS_ARRAY is array (POSITIVE) of STD_LOGIC_VECTOR(11 downto 0);
TYPE DATA_ARRAY is array (POSITIVE) of STD_LOGIC_VECTOR(15 downto 0);
TYPE WEA_ARRAY is array (POSITIVE) of STD_LOGIC_VECTOR(0 downto 0);
END PACKAGE;
上次我綜合了這些警告的代碼,現在他們已經變成了錯誤,但我認爲它們仍然非常重要。
INFO:Xst:3210 - "E:\Projects\VHDL\New_Phase\toplevel.vhd" line 288: Output port <CLK_OUT3> of the instance <dcm> is unconnected or connected to loadless signal.
INFO:Xst:3210 - "E:\Projects\VHDL\New_Phase\toplevel.vhd" line 288: Output port <LOCKED> of the instance <dcm> is unconnected or connected to loadless signal.
INFO:Xst:3210 - "E:\Projects\VHDL\New_Phase\toplevel.vhd" line 296: Output port <MAX5190_CHIRP_ENABLE_TRIGGER> of the instance <contr> is unconnected or connected to loadless signal.
INFO:Xst:3210 - "E:\Projects\VHDL\New_Phase\toplevel.vhd" line 365: Output port <DATA_OUT> of the instance <gen[1].memcont> is unconnected or connected to loadless signal.
INFO:Xst:3210 - "E:\Projects\VHDL\New_Phase\toplevel.vhd" line 365: Output port <DINA> of the instance <gen[1].memcont> is unconnected or connected to loadless signal.
INFO:Xst:3210 - "E:\Projects\VHDL\New_Phase\toplevel.vhd" line 365: Output port <ADDRA> of the instance <gen[1].memcont> is unconnected or connected to loadless signal.
INFO:Xst:3210 - "E:\Projects\VHDL\New_Phase\toplevel.vhd" line 365: Output port <WEA> of the instance <gen[1].memcont> is unconnected or connected to loadless signal.
INFO:Xst:3210 - "E:\Projects\VHDL\New_Phase\toplevel.vhd" line 365: Output port <RSTA> of the instance <gen[1].memcont> is unconnected or connected to loadless signal.
INFO:Xst:3210 - "E:\Projects\VHDL\New_Phase\toplevel.vhd" line 391: Output port <DATA_ADDR> of the instance <gen[1].max> is unconnected or connected to loadless signal.
INFO:Xst:3210 - "E:\Projects\VHDL\New_Phase\toplevel.vhd" line 391: Output port <DAC_DATA> of the instance <gen[1].max> is unconnected or connected to loadless signal.
INFO:Xst:3210 - "E:\Projects\VHDL\New_Phase\toplevel.vhd" line 414: Output port <douta> of the instance <gen[1].mem> is unconnected or connected to loadless signal.
這些錯誤會爲每個生成的對象重複出現。 輸入端口被賦予默認值,因爲編譯器一直要求它有錯誤(不知道爲什麼要這麼做)。
如果有人能幫助我,這將是太棒了!
這不是[最小完整和可驗證示例](http://stackoverflow.com/help/mcve)。您的代碼片段中找不到前三個錯誤信號。 DATA_OUT互連memory_cont和max。精心設計的輸入端口默認值表示它們未連接。你的代碼片段不足以回答你的問題。你的設計是否模擬? – user1155120
@ user1155120前三個錯誤不應該在本主題中。我期望的那三個。正如你所看到的,這些端口是連接的,所以它不應該要求它。但是,正如你可以在下面看到的,我花了很長時間而不是模塊化的方式來解決問題。無論如何感謝您的興趣! – Xinq