Hi thanks for persevering with me, I have altered as last post, but still have the same errors..
my buzzer.vhd code is this:
-- Example of a car door, seatbelt, ignition buzzer.
-- Definition of buzzer.
library ieee;
use ieee.std_logic_1164.all;
library work;
use work.basic_func.all;
entity buzzer is
port (DOOR, IGNITION, SBELT: in std_logic;
WARNING: out std_logic);
end buzzer;
architecture structural of buzzer is
-- Declarations of architectural components.
component AND21
port (in1, in2: in std_logic;
out1: out std_logic);
end component;
component OR21
port (in1, in2: in std_logic;
out1: out std_logic);
end component;
component NOT11
port (in1: in std_logic;
out1: out std_logic);
end component;
-- Declaration of signals used to interconnect gates
signal DOOR_NOT, SBELT_NOT, B1, B2: std_logic;
begin
-- Map architecture of buzzer i.e. connections between components.
-- Component instantiations statements
U0: NOT11 port map (DOOR, DOOR_NOT);
U1: NOT11 port map (SBELT, SBELT_NOT);
U2: AND21 port map (IGNITION, DOOR_NOT, B1);
U3: AND21 port map (IGNITION, SBELT_NOT, B2);
U4: OR21 port map (B1, B2, WARNING);
end structural;
with my basic_func.vhd file (in the same directory) being:
-- Package declaration
library ieee;
use ieee.std_logic_1164.all;
package basic_func is
-- AND2 declaration
component AND21
port (in1, in2: in std_logic; out1: out std_logic);
end component;
-- OR2 declaration
component OR21
port (in1, in2: in std_logic; out1: out std_logic);
end component;
--NOT1 declaration
component NOT11
port (in1: in std_logic; out1: out std_logic);
end component;
end package basic_func;
-- Package body declarations
library ieee;
use ieee.std_logic_1164.all;
package body basic_func is
-- 2 input AND gate
entity AND21 is
port (in1, in2: in std_logic; out1: out std_logic);
end AND21;
architecture model_conc of AND21 is
begin
out1 <= in1 and in2;
end model_conc;
-- 2 input OR gate
entity OR21 is
port (in1, in2: in std_logic; out1: out std_logic);
end OR21;
architecture model_conc2 of AND21 is
begin
out1 <= in1 or in2;
end model_conc2;
-- 1 input NOT gate
entity NOT11 is
port (in1: in std_logic; out1: out std_logic);
end NOT11;
architecture model_conc3 of NOT11 is
begin
out1 <= not in1;
end model_conc3;
end package body basic_func;
compile messages are:
Info: *******************************************************************
Info: Running Quartus II Analysis & Synthesis
Info: Version 5.0 Build 168 06/22/2005 Service Pack 1 SJ Web Edition
Info: Processing started: Thu Mar 06 11:25:31 2008
Info: Command: quartus_map --read_settings_files=on --write_settings_files=off buzzer -c buzzer
Error: VHDL Use Clause error at buzzer.vhd(7): design library "work" does not contain primary unit "basic_func"
Error: Ignored construct buzzer at buzzer.vhd(9) because of previous errors
Error: VHDL error at buzzer.vhd(14): entity "buzzer" is used but not declared
Error: VHDL error at buzzer.vhd(17): object "std_logic" is used but not declared
Error: VHDL error at buzzer.vhd(18): object "std_logic" is used but not declared
Error: VHDL error at buzzer.vhd(22): object "std_logic" is used but not declared
Error: VHDL error at buzzer.vhd(23): object "std_logic" is used but not declared
Error: VHDL error at buzzer.vhd(27): object "std_logic" is used but not declared
Error: VHDL error at buzzer.vhd(28): object "std_logic" is used but not declared
Error: VHDL error at buzzer.vhd(31): object "std_logic" is used but not declared
Error: VHDL error at buzzer.vhd(36): object "DOOR" is used but not declared
Error: VHDL error at buzzer.vhd(36): object "DOOR_NOT" is used but not declared
Error: VHDL error at buzzer.vhd(36): cannot associate formal port "out1" of mode "out" with an expression
Error: VHDL error at buzzer.vhd(37): object "SBELT" is used but not declared
Error: VHDL error at buzzer.vhd(37): object "SBELT_NOT" is used but not declared
Error: VHDL error at buzzer.vhd(37): cannot associate formal port "out1" of mode "out" with an expression
Error: VHDL error at buzzer.vhd(38): object "IGNITION" is used but not declared
Error: VHDL error at buzzer.vhd(38): object "DOOR_NOT" is used but not declared
Error: VHDL error at buzzer.vhd(38): object "B1" is used but not declared
Info: Found 0 design units, including 0 entities, in source file buzzer.vhd
Error: Quartus II Analysis & Synthesis was unsuccessful. 19 errors, 0 warnings
Error: Processing ended: Thu Mar 06 11:25:32 2008
Error: Elapsed time: 00:00:01
Error: Quartus II Full Compilation was unsuccessful. 19 errors, 0 warnings
I'm thinking maybe that I don't have the package code set out right, but can't figure out what it is...