,我發現了以下錯誤的不兼容:從我的VHDL項目:類型的「變量」,類型爲「可變」
ERROR:HDLParsers:800 - "C:/Users/Theo/Desktop/Dropbox/ECE 120/Robotic Arm/top.vhd" Line 90. Type of in_tilt is incompatible with type of tilt.
ERROR:HDLParsers:800 - "C:/Users/Theo/Desktop/Dropbox/ECE 120/Robotic Arm/top.vhd" Line 91. Type of in_pan is incompatible with type of pan.
ERROR:HDLParsers:800 - "C:/Users/Theo/Desktop/Dropbox/ECE 120/Robotic Arm/top.vhd" Line 92. Type of pwm_tilt is incompatible with type of pwm_tilt.
ERROR:HDLParsers:800 - "C:/Users/Theo/Desktop/Dropbox/ECE 120/Robotic Arm/top.vhd" Line 93. Type of pwm_pan is incompatible with type of pwm_pan.
這裏是適用的代碼。我用下面的代碼頂級VHDL模塊:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use ieee.std_logic_unsigned.all;
entity top is
port (
clk_in : in std_logic;
pause : in std_logic;
reset : in std_logic;
switch : in std_logic_vector(3 downto 0);-----------------------------------------
deb_in : in std_logic; ---from another switch
deb_out : out std_logic; ---to test the debouncer
pwm_pan : out std_logic_vector(7 downto 0);
pwm_tilt : out std_logic_vector(7 downto 0)
);
end top;
爲PWM組件聲明:
COMPONENT PWM
PORT(
clk_100 : in std_logic;
reset : IN std_logic;
in_tilt : in std_logic;
in_pan : in std_logic;
pwm_pan : OUT std_logic;
pwm_tilt : out std_logic
);
END COMPONENT;
另外適當的信號:後
signal tilt : std_logic_vector (7 downto 0);
signal pan : std_logic_vector (7 downto 0);
然後在此代碼:(這是我的錯誤出現的地方。)
u1: PWM PORT MAP (
clk_100 => clk_100,
reset => reset,
--Line 90 in_tilt => tilt,
--Line 91 in_pan => pan,
--Line 92 pwm_tilt => pwm_tilt,
--Line 93 pwm_pan => pwm_pan
);
這是PWM模塊VHDL代碼中:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use ieee.std_logic_unsigned.all;
entity PWM is
Port (clk_100 : in STD_LOGIC;
reset : in STD_LOGIC;
in_tilt : in std_logic_vector(7 downto 0);
in_pan : in std_logic_vector(7 downto 0);
pwm_tilt : out std_logic_vector (7 downto 0);
pwm_pan : out std_logic_vector (7 downto 0)
);
end PWM;
任何想法是什麼造成這個錯誤?我希望我已經包含了所有相關的代碼。謝謝。
「傾斜」和「平移」的類型是什麼? 「PWM」組件聲明的外觀如何? – baldyHDL 2013-04-23 05:46:21
@baldyHDL我添加了組件聲明以及傾斜和平移的類型。 – codedude 2013-04-23 12:33:19