UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Observer urmilagavale
Observer
9,191 Views
Registered: ‎05-20-2014

Not getting output on LED's on spartan3

Jump to solution

Hello, i want to show output on LEDs. Program gets flashed on board succesfully nothings happens on board. the code and ucf file is here.kindly help me to solve this problem.

library IEEE;
use IEEE.STD_LOGIC_1164.ALL;

entity random is
    generic ( width : integer :=  8 );
port (
      clk : in std_logic;
		reset: in std_logic;
      random_num : out std_logic_vector (width-1 downto 0);	--output vector 
      random_out0: out std_logic;
      random_out1: out std_logic	;
		random_out2: out std_logic	;
		random_out3: out std_logic	;
		random_out4: out std_logic	;
		random_out5: out std_logic	;
		random_out6: out std_logic	;
		random_out7: out std_logic			
    );
end random;

architecture Behavioral of random is
signal output0:std_logic:='0';
signal output1:std_logic:='0';
signal output2:std_logic:='0';
signal output3:std_logic:='0';
signal output4:std_logic:='0';
signal output5:std_logic:='0';
signal output6:std_logic:='0';
signal output7:std_logic:='0';

begin
process(clk)

variable rand_temp : std_logic_vector(width-1 downto 0):= "11110000";
variable temp : std_logic := '0';
begin
if (reset='1') then
random_num <= (others=>'0');
elsif(rising_edge(clk)) then
temp := rand_temp(width-1) xor rand_temp(width-2);
rand_temp(width-1 downto 1) := rand_temp(width-2 downto 0);
rand_temp(0) := temp;
output0 <=rand_temp(0);
output1 <=rand_temp(1);
output2 <=rand_temp(2);
output3 <=rand_temp(3);
output4 <=rand_temp(4);
output5 <=rand_temp(5);
output6 <=rand_temp(6);
output7 <=rand_temp(7);
end if;

random_num <= rand_temp;

end process;
random_out0<= output0;
random_out1<= output1;
random_out2<= output2;
random_out3<= output3;
random_out4<= output4;
random_out5<= output5;
random_out6<= output6;
random_out7<= output7;
end Behavioral;

 ucf file:

NET "random_out0" LOC = "F12";
NET "random_out1" LOC = "E12";
NET "random_out2" LOC = "E11";
NET "random_out3" LOC = "F11";
NET "random_out4" LOC = "C11";
NET "random_out5" LOC = "D11";
NET "random_out6" LOC = "E9";
NET "random_out7" LOC = "F9";

 kindly reply

0 Kudos
1 Solution

Accepted Solutions
Moderator
Moderator
13,821 Views
Registered: ‎01-15-2008

Re: Not getting output on LED's on spartan3

Jump to solution

check the following link regarding clock divider code discussion

 

http://forums.xilinx.com/t5/Timing-Analysis/dividing-system-clock-frequency/m-p/439572/highlight/true#M5809

 

--Krishna

0 Kudos
8 Replies
Observer urmilagavale
Observer
9,179 Views
Registered: ‎05-20-2014

Re: Not getting output on LED's on spartan3

Jump to solution

in above ucf file i forgot to add clk. whwn i add clk signal, all leds gets on bt there is no change in output. bt in simulation outouts are changing. where is mistake not understanding.

0 Kudos
Visitor colinbathe
Visitor
9,172 Views
Registered: ‎12-12-2013

Re: Not getting output on LED's on spartan3

Jump to solution
How fast is your clock? You won't see anything if your clock is faster than a 50Hz or so.
Moderator
Moderator
9,167 Views
Registered: ‎01-15-2008

Re: Not getting output on LED's on spartan3

Jump to solution

Hi Urmila,

 

probably you can divide the faster clock in your logic and provide this divided clock output to your logic so that the change in the  led's can be observed.

 

--Krishna

0 Kudos
Observer urmilagavale
Observer
9,154 Views
Registered: ‎05-20-2014

Re: Not getting output on LED's on spartan3

Jump to solution

can u plz tell me how to devide clk in the logic?

 

0 Kudos
Observer urmilagavale
Observer
9,152 Views
Registered: ‎05-20-2014

Re: Not getting output on LED's on spartan3

Jump to solution

Thanks for the reply but how can i slow my clk then..

0 Kudos
Xilinx Employee
Xilinx Employee
9,151 Views
Registered: ‎02-06-2013

Re: Not getting output on LED's on spartan3

Jump to solution

Hi

 

You can use simple counter to divide the clock .

Regards,

Satish

--------------------------------------------------​--------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful.
--------------------------------------------------​-------------------------------------------
0 Kudos
Observer urmilagavale
Observer
9,143 Views
Registered: ‎05-20-2014

Re: Not getting output on LED's on spartan3

Jump to solution

 ok thank you ll try it..

0 Kudos
Moderator
Moderator
13,822 Views
Registered: ‎01-15-2008

Re: Not getting output on LED's on spartan3

Jump to solution

check the following link regarding clock divider code discussion

 

http://forums.xilinx.com/t5/Timing-Analysis/dividing-system-clock-frequency/m-p/439572/highlight/true#M5809

 

--Krishna

0 Kudos