Altera_Forum
Honored Contributor
15 years agoType do not match for port
--- Quote Start --- WARNING[1]: D:/Quartus/January_2011/Final 1/PhamNT.vhd(75): Types do not match for port x_in WARNING[1]: D:/Quartus/January_2011/Final 1/PhamNT.vhd(75): A use of this default binding for this component instantiation will result in an elaboration error. WARNING[1]: D:/Quartus/January_2011/Final 1/PhamNT.vhd(75): Types do not match for port u_in WARNING[1]: D:/Quartus/January_2011/Final 1/PhamNT.vhd(75): A use of this default binding for this component instantiation will result in an elaboration error. WARNING[1]: D:/Quartus/January_2011/Final 1/PhamNT.vhd(75): Types do not match for port err WARNING[1]: D:/Quartus/January_2011/Final 1/PhamNT.vhd(75): A use of this default binding for this component instantiation will result in an elaboration error. WARNING[1]: D:/Quartus/January_2011/Final 1/PhamNT.vhd(75): Types do not match for port yn WARNING[1]: D:/Quartus/January_2011/Final 1/PhamNT.vhd(75): A use of this default binding for this component instantiation will result in an elaboration error. --- Quote End ---
LIBRARY ieee;
USE ieee.std_logic_1164.ALL;
USE ieee.std_logic_arith.ALL;
USE ieee.std_logic_unsigned.ALL;
entity PhamNT is
port(x_in,kd,ki,kp :in signed(15 downto 0):=(others => '0');
clk :in std_logic:='0';
clk_op :in std_logic:='0';
yn :out signed (15 downto 0):=(others => '0')
);
end PhamNT;
ARCHITECTURE structural OF PhamNT IS
signal u,y :signed(15 downto 0):=(others => '0'); --x(n-1),Y(n-1)
signal err :signed(15 downto 0):=(others => '0');
signal go :std_logic:='0';
signal pl_go :std_logic:='0';
signal start : std_logic:='0';
signal mic_in : signed(15 downto 0):=(others => '0');
signal z_out : signed(15 downto 0):=(others => '0');
signal done : std_logic:='0';
signal u_in : signed(15 downto 0):=(others => '0');
component simp_cpu IS
PORT(start : in std_logic;
mic_in,kd,ki,kp :in signed(15 downto 0);
z_out :out signed(15 downto 0);
done :out std_logic;
clk :in std_logic );
END component;
component dtdk_plant is
port(x_in :in signed(15 downto 0);
u_in :in signed(15 downto 0);
go :in std_logic;
clk :in std_logic;
clk_op :in std_logic;
err :out signed(15 downto 0);
yn :out signed(15 downto 0);
pl_go :out std_logic);
end component;
begin
U_Simp_CPU: simp_cpu port map (
start => pl_go,
mic_in => err,
kd => kd,
ki => ki,
kp => kp,
z_out => u,
done => go,
clk => clk_op
);
U_dtdk_plant: dtdk_plant port map(
x_in => x_in,
u_in => u,
go => go,
clk => clk,
clk_op => clk_op,
err => err,
yn => yn,
pl_go => pl_go
);
end structural ; When I compile it's ok. But I simulate it error. I did not know this error. Could you help me? Thanks (I use Modelsim)