ATLYS FPGA kit, how to light a LED ?

Status
Not open for further replies.

ali8

Member level 2
Joined
Jan 1, 2011
Messages
49
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,646
Hello,

I have an ATLYS FPGA kit, and use ISE 13.1, and I have this code:

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

entity Simple is
    Port ( A : in  STD_LOGIC; Z : out  STD_LOGIC);
end Simple;

architecture arch_simple of Simple is
begin
    process(A)
    begin
        if (A=1) then
			Z <= '1'; 
	else
			Z <= '0';
	end if;
    end process;
end arch_simple;

I want "A" to be SW0 ( A10 ), and "Z" to be LED0 ( U18 ), so
when the switch is on, the LED is on, and vice versa.

I cannot figure out how to do it, any help is appreciated.

-Ali
 

You need a .ucf file to specify the pins for the inputs and outputs. You can download the .ucf from digilent.

Also, you may want to pick more meaningful names than A and Z... If it's a switch, call it that. If it's a led, call it that.
 
Reactions: ali8

    ali8

    Points: 2
    Helpful Answer Positive Rating
Thanks for the quick response : )

In the .ucr I can see:

Code:
NET "sw<0>" LOC = "A10";

So suppose my input switch is named S, what should I do?

Should I modify this code so that it's:

Code:
NET "sw<0>" LOC = "S";

?
 

If you want to name your switch "S", then the .ucf entry for that would be:

NET "S" LOC = "A10";

The "S" in this case being the net name, and the A10 being the pin number on the fpga.

Similarly you can do this:

NET "LED" LOC="U18";
 
Reactions: ali8

    ali8

    Points: 2
    Helpful Answer Positive Rating
Thanks, that's what I wanted :smile: I will get back here if I needed any further help.. :wink:
 

Hi,

In the ref. manual they mentioned the following:

"If programming with a .bit file, the startup clock must be set to CCLK."

Well, clearly ISE 13 will generate a .bit file...So, any idea how can I do this?
 

Hi,

In the ref. manual they mentioned the following:

"If programming with a .bit file, the startup clock must be set to CCLK."

Well, clearly ISE 13 will generate a .bit file...So, any idea how can I do this?


By reading the FAQ?

Digilent Inc. - Digital Design Engineer's Source



Personally I have never had to bother setting this option to get it working on my atlys board. Everything worked just fine with the default ISE settings for generating the .bit file.
 
Reactions: ali8

    ali8

    Points: 2
    Helpful Answer Positive Rating
After reading "Xillinx® ISE WebPACK VHDL Tutorial", I changed the setting
of the "FPGA Start-Up Clock" from CCLK to JTAG-Clock, because I am using
the PC to program the FPGA...

Well, finally, It worked ! :grin::grin:

Thanks mrflibble, I appreciate your help.
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…