Forum Discussion
Altera_Forum
Honored Contributor
9 years agohave error :confused: why
(Error (10481): VHDL Use Clause error at cruise_control.vhd(3): design library "work" does not contain primary unit "my_components") (Error (10800): VHDL error at cruise_control.vhd(3): selected name in use clause is not an expanded name) LIBRARY ieee;
USE ieee.std_logic_1164.all;
USE work.my_components.all;
ENTITY cruise_control IS
PORT (cancel, accleartor, Rest, break, set, cruise_on, cruise_off : IN STD_LOGIC;
setspeed: OUT STD_LOGIC);
END cruise_control;
ARCHITECTURE structural OF cruise_control IS
COMPONENT crease_speed IS
PORT (accleartor, Rest: IN STD_LOGIC; setspeed: OUT STD_LOGIC);
END COMPONENT;
COMPONENT increase_speed IS
PORT (break, set: IN STD_LOGIC; setspeed: OUT STD_LOGIC);
END COMPONENT;
COMPONENT cancel1 IS
PORT (cruise_off: IN STD_LOGIC; setspeed: OUT STD_LOGIC);
END COMPONENT;
COMPONENT cruise IS
PORT (cruise_on: IN STD_LOGIC; setspeed: OUT STD_LOGIC);
END COMPONENT;
SIGNAL setspeed1 : STD_LOGIC;
BEGIN
U1: crease_speed PORT MAP (accleartor, Rest, setspeed);
U2: increase_speed PORT MAP (break, set, setspeed);
U3: cancel1 PORT MAP (cruise_off, setspeed);
U4: cruise PORT MAP (cruise_on, setspeed);
END structural;