multiple drivers problem,..please help

Joined
Jun 27, 2011
Messages
2
Reaction score
0
hello, i am designing a simple shift register. But getting an error:
Xst:528 - Multi-source in Unit <lab3d> on signal <led<7>>; this signal is connected to multiple drivers.

any help appreaciated. thankyou
the following is my vhdl code:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;

---- Uncomment the following library declaration if instantiating
---- any Xilinx primitives in this code.
--library UNISIM;
--use UNISIM.VComponents.all;

entity lab3d is
port (clk : in std_logic;
sw : in std_logic_vector(1 downto 0);
led : out std_logic_vector(7 downto 0));
end lab3d;

architecture Behavioral of lab3d is
signal s : std_logic_vector(7 downto 0);
signal temp : std_logic;
begin
s<= "10000000";
process(clk)
begin
if RISING_EDGE(clk) then
temp <= s(0);
for i in 0 to 6 loop
s(i+1) <= s(i);
end loop;
s(0) <= temp;
end if;
end process;
led <= s(7 downto 0);
end Behavioral;
 
Joined
Mar 10, 2008
Messages
348
Reaction score
0
Try this

Code:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;

---- Uncomment the following library declaration if instantiating
---- any Xilinx primitives in this code.
--library UNISIM;
--use UNISIM.VComponents.all;

entity lab3d is
        port (clk : in std_logic;
        sw : in std_logic_vector(1 downto 0);
       led : out std_logic_vector(7 downto 0));
end lab3d;

architecture Behavioral of lab3d is
       signal s : std_logic_vector(7 downto 0) :=  "10000000";
       signal temp : std_logic;
begin
       ------ Properly the problem  s<= "10000000";
  process(clk)
  begin
     if RISING_EDGE(clk) then
          temp <= s(0);
          for i in 0 to 6 loop
              s(i+1) <= s(i);
         end loop;
         s(0) <= temp;
     end if;
   end process;

   led <= s(7 downto 0);
end Behavioral
;
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top