Am Donnerstag, 24. Januar 2013 04:52:57 UTC+1 schrieb willmann817:
> Below is the entity where the error is occurring. I understand the error message but I do not know how to fix. Can anyone please tell me how to fix it? I know it is something simple (at least I hope so!). Thanks.
>
> Here are the error message:
>
> Error (1002
: Can't resolve multiple constant drivers for net "light" at LED.vhd(25)
>
> Error (10029): Constant driver at LED.vhd(1
>
>
>
>
>
>
>
> library IEEE;
>
> use IEEE.STD_LOGIC_1164.all;
>
>
>
> entity LED is
>
> port(
>
> numSoldiersMissing : in STD_logic_vector(15 downto 0);
>
> light : out STD_Logic
>
> );
>
> end LED;
>
>
>
> architecture LED of LED is
>
> signal sig1 : std_logic;
>
>
>
> begin
>
>
>
> process (numSoldiersMissing)
>
> begin
>
> if numSoldiersMissing <= "0000000000000000" then
>
> light <= '0';
>
> else
>
> light <= '1';
>
> end if;
>
> end process;
>
> --output logic
>
> light <= sig1;
>
>
>
> end LED;
Hi,
that's a simple one.
Just delete the sig1 stuff.
You are assigning the output light directly in the process, which is OK here.
The signal and the output assignment are not needed in this case.
Just when you have some feedback situation you need an intermediate signal or variable, since you can't read from an output port.
But sth. else looks strange:
Can there be a value less than zero in a std logic vector?
Std_logic_vectors are not integers so they have no negative values.
Have a nice synthesis
Eilert