Altera_Forum
Honored Contributor
15 years agoNeed help from Guru
Hey guys,
I am looking for some help in the syntax. Following is my syntax to perform a voting system. Library IEEE; USE IEEE.std_logic_1164.all; Entity Gproject IS PORT ( Se0, Se1, Se2, Se3 : IN std_logic; Sn0, Sn1, Sn2, Sn3 : IN std_logic; D : OUT std_logic_vector (6 downto 0); Co : OUT std_logic; L1, l2, L3 : OUT std_logic; less : out std_logic; equal : out std_logic; greater : out std_logic); End Gproject; Architecture Vsystem OF Gproject IS Component Attendance PORT ( Se0, Se1, Se2, Se3 : IN std_logic; S1, S2, Co : OUT std_logic); END component; Component AddSub PORT( A, B :IN std_logic_vector(3 DOWNTO 0); S :IN std_logic; Co :OUT std_logic; X :OUT std_logic_vector(3 DOWNTO 0)); END component; Component Comparator port( A : in std_logic_vector(3 downto 0); B : in std_logic_vector(3 downto 0); less : out std_logic; equal : out std_logic; greater : out std_logic); end component; Component SegmentDisplay port( W :IN std_logic_vector (3 downto 0); D :OUT std_logic_vector (6 downto 0)); End component; Signal at: std_logic_vector (12 downto 5); Signal X: std_logic_vector (3 downto 0); Begin at(5) <= '0'; at(9) <= '0'; X(3) <= '0'; Att : Attendance PORT MAP (Se0, Se1, Se2, Se3, at(6), at(7), at(8)); Display1 : SegmentDisplay PORT MAP (at(8 downto 5), D(6 downto 0)); Vsystem : Attendance PORT MAP (Sn0, Sn1, Sn2, Sn3, at(10), at(11), at(12)); Display2 : SegmentDisplay PORT MAP (at(12 downto 9), D(6 downto 0)); Add_Sub : AddSub PORT MAP (at(8 downto 5), at (12 downto 9), '1', Co, X(3 downto 0)); Compare : Comparator PORT MAP (at(12 downto 9), X(3 downto 0), less, equal, greater); End Vsystem; ________________________________________________________________ I got the error msg Error (10028): Can't resolve multiple constant drivers for net "X[3]" at Gproject.vhd(52) ________________________________________________________________ I do not understand and can't find where is my mistake. I hope anyone here would help me to answer my question. Thanks