cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
ali.alsaqqa
Visitor
Visitor
10,906 Views
Registered: ‎04-21-2011

How to start with ATLYS FPGA board ?

Hello,

 

I've just bought ATLYS board (based on Spartan-6). I've read the reference manual.

I also know how to program in VHDL, and I have ISE 13.1.

 

I want to program a LED flasher, very simple I know, but I cannot figure out how to

use the LEDs on the board or the Buttons...with MCUs things were much easier...

 

So, any help with this?

 

-Ali

0 Kudos
16 Replies
eteam00
Professor
Professor
10,904 Views
Registered: ‎07-21-2009

I want to program a LED flasher, very simple I know, but I cannot figure out how to use the LEDs on the board...

The beauty of a LED flasher which toggles high and low is that it will flash LEDs wired up for either drive polarity.

or the Buttons...

Use the button inputs to the FPGA to directly control the LED drive outputs.  The buttons will become pretty simple in a hurry.

with MCUs things were much easier...

First simple step of design is to draw a flowchart or logic diagram of how it works, then implement each logic step of the flowchart or diagram.

 

Another idea:  visit this site for fpga beginners.  Lots of good information and example to be found there.

 

-- Bob Elkind

SIGNATURE:
README for newbies is here: http://forums.xilinx.com/t5/New-Users-Forum/README-first-Help-for-new-users/td-p/219369

Summary:
1. Read the manual or user guide. Have you read the manual? Can you find the manual?
2. Search the forums (and search the web) for similar topics.
3. Do not post the same question on multiple forums.
4. Do not post a new topic or question on someone else's thread, start a new thread!
5. Students: Copying code is not the same as learning to design.
6 "It does not work" is not a question which can be answered. Provide useful details (with webpage, datasheet links, please).
7. You are not charged extra fees for comments in your code.
8. I am not paid for forum posts. If I write a good post, then I have been good for nothing.
0 Kudos
ali.alsaqqa
Visitor
Visitor
10,899 Views
Registered: ‎04-21-2011

Bob, thanks, but here's my problem:

 

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;

 

How should I tell the FPGA that A means SW0 and Z means LED0 ?

 

The only info in the manual is that SW0=A10, LED0=U18...

Tags (2)
0 Kudos
ali.alsaqqa
Visitor
Visitor
10,898 Views
Registered: ‎04-21-2011

In the schematic, it appears that A10 (SW0) is "called" IO_L37N_GCLK12...

0 Kudos
eteam00
Professor
Professor
10,896 Views
Registered: ‎07-21-2009

How should I tell the FPGA that A means SW0 and Z means LED0 ?

The only info in the manual is that SW0=A10, LED0=U18...

Connect A to SW0 and connect Z to LED0.  Pinout details are in reference design .UCF file, and in board schematics.

 

I could spell it out for you quite easily... in Verilog.  I can read VHDL, but I'd rather not post VHDL code which I've written when people are depending on it to be correct.

 

-- Bob Elkind

SIGNATURE:
README for newbies is here: http://forums.xilinx.com/t5/New-Users-Forum/README-first-Help-for-new-users/td-p/219369

Summary:
1. Read the manual or user guide. Have you read the manual? Can you find the manual?
2. Search the forums (and search the web) for similar topics.
3. Do not post the same question on multiple forums.
4. Do not post a new topic or question on someone else's thread, start a new thread!
5. Students: Copying code is not the same as learning to design.
6 "It does not work" is not a question which can be answered. Provide useful details (with webpage, datasheet links, please).
7. You are not charged extra fees for comments in your code.
8. I am not paid for forum posts. If I write a good post, then I have been good for nothing.
0 Kudos
ali.alsaqqa
Visitor
Visitor
10,891 Views
Registered: ‎04-21-2011

I see.

 

Then I will wait until any VHDL programmer help me in this : (

0 Kudos
eteam00
Professor
Professor
10,889 Views
Registered: ‎07-21-2009

Then I will wait until any VHDL programmer help me in this : (

In the meantime, suggest you spend your time learning VHDL.  This is a matter of a basic VHDL construct.  If this is a challenge to you, you have much to learn yet.  I wouldn't waste any time while you are waiting for help on this one item.

 

You can also learn quite a bit from reviewing example and reference designs which are written in VHDL.  Connecting signal pins really is a generic VHDL lesson, and surely is applicable universally to all FPGAs and FPGA families.

 

-- Bob Elkind

SIGNATURE:
README for newbies is here: http://forums.xilinx.com/t5/New-Users-Forum/README-first-Help-for-new-users/td-p/219369

Summary:
1. Read the manual or user guide. Have you read the manual? Can you find the manual?
2. Search the forums (and search the web) for similar topics.
3. Do not post the same question on multiple forums.
4. Do not post a new topic or question on someone else's thread, start a new thread!
5. Students: Copying code is not the same as learning to design.
6 "It does not work" is not a question which can be answered. Provide useful details (with webpage, datasheet links, please).
7. You are not charged extra fees for comments in your code.
8. I am not paid for forum posts. If I write a good post, then I have been good for nothing.
0 Kudos
joelby
Advisor
Advisor
10,877 Views
Registered: ‎10-05-2010

Add a user constraints file (UCF) to your project. From the Atlys reference UCF on the Digilent site, copy the definition for the LED and switch you want to use and rename the led<0> (or whatever it's called) to Z, and the switch to A.

I generally include the entire reference UCF and comment out the parts I'm not using, as you'll get errors if there are constraints that don't apply to anything in your design.
0 Kudos
bassman59
Historian
Historian
10,872 Views
Registered: ‎02-25-2008

 


@ali.alsaqqa wrote:

I see.

 

Then I will wait until any VHDL programmer help me in this : (


 

You'll wait forever, like this:

 

waitforever : process is

    wait;

end process waitforever;

 

because people who use VHDL are not programmers, we are hardware design engineers.

You do not write a VHDL program. You write VHDL that describes the hardware you wish to create.

 

This is not an irrelevant distinction.

----------------------------Yes, I do this for a living.
0 Kudos
Anonymous
Not applicable
10,641 Views

So did you figure this out yet? I only briefly looked at your HDL but I didn't see any errors. At least not in the logic but those "bad synchrnous descriptions" seem to sneak up on me. The answer is indeed in the UCF file. When you were working with uC's did you just declare a variable LED, set it to 1 and expect the LED to go on? You needed to map that variable LED to your GPIO. So you would have something like PORTA |= LED right? That's what the UCF file does. Well kindof, it's actually more like mapping PORTA to the actual pins on the chip. I can't remember the syntax but it's simple and it's in the example project (provided the example is correct, Digilent has always made errors with the boards I have purchased). Look for the line in the.ucf file that has the LED you want to use. It will start with NET, I remember that much. Digilent also usually writes these right on the board so next to the LED and SW you should see a letter followed by 1 or 2 numbers in the silkscreen. So you will have something like

 

NET LED LOC=X##; (roughly)

NET SW0 LOC=X##; (roughly)

 

Now when you write to LED the hardware knows what to do. You seem to know enough VHDL to do this. I don't know why anyone what giving you a hard time about that. First poster should have said "you need a UCF file" and closed the thread lol. UCF file was mentioned but too much kack along with it...

 

Neither VHDL or Verilog should take you more than a week to learn. I took a class in which we used the Basys board and by the end of the class I had designed an 8 bit processor, a VGA pong game and a 2 channel VGA oscilliscope. I don't think the professor spent more than 3 hours teaching VHDL. Like someone said before you don't write a VHDL program, you use it to describe hardware and as long as you understand what you want to do with the hardware, it's just a matter of asking Google how to say it in HDL.

0 Kudos
rcingham
Teacher
Teacher
7,354 Views
Registered: ‎09-09-2010

"Neither VHDL or Verilog should take you more than a week to learn."

I must be a *really* slow learner, as after 12 years I'm still learing better ways...
However, 40 hours of study should get most people well past the 'novice' stage.

------------------------------------------
"If it don't work in simulation, it won't work on the board."
0 Kudos
eteam00
Professor
Professor
7,350 Views
Registered: ‎07-21-2009

However, 40 hours of study should get most people well past the 'novice' stage.

 

Possibly 80 hours, if Verilog.  Double that (at least) for VHDL.

 

-- Bob Elkind

SIGNATURE:
README for newbies is here: http://forums.xilinx.com/t5/New-Users-Forum/README-first-Help-for-new-users/td-p/219369

Summary:
1. Read the manual or user guide. Have you read the manual? Can you find the manual?
2. Search the forums (and search the web) for similar topics.
3. Do not post the same question on multiple forums.
4. Do not post a new topic or question on someone else's thread, start a new thread!
5. Students: Copying code is not the same as learning to design.
6 "It does not work" is not a question which can be answered. Provide useful details (with webpage, datasheet links, please).
7. You are not charged extra fees for comments in your code.
8. I am not paid for forum posts. If I write a good post, then I have been good for nothing.
0 Kudos
ali.alsaqqa
Visitor
Visitor
7,343 Views
Registered: ‎04-21-2011

Hello, I have successfully done some simple projects, like LED flasher, simple adder, etc.

 

I am now studying Xilinix University Program's tutorials. They teach how to use MicroBlaze processor specifically

 

with ATLYS development board.

 

Thank you guys for your help, If I need any further assistance I will post a new topic. Thanks again.

 

Regards,

Ali 

0 Kudos
Anonymous
Not applicable
7,332 Views

I didn't mean to imply I learned all there is to know about VHDL and Verilog in a week. But I definitley learned enough to design (in my oppinion) some really cool projects in a matter of days. I still look at things and think "what the hell is this?"

0 Kudos
Anonymous
Not applicable
7,330 Views

Can you post some links to these Microblaze tutorials you are following? Would it be this stuff by any chance?

 

http://www.xilinx.com/university/workshops/embedded-system-design-flow/index.htm

 

 

0 Kudos
eteam00
Professor
Professor
7,327 Views
Registered: ‎07-21-2009

I didn't mean to imply I learned all there is to know about VHDL and Verilog in a week. But I definitley learned enough to design (in my oppinion) some really cool projects in a matter of days. I still look at things and think "what the hell is this?"

 

Thank you for the clarification.  After reading your earlier post, I was starting to feel woefully inadequate.  I feel better now, and I think I'll cancel my application for the night watchman job.

 

-- Bob Elkind

SIGNATURE:
README for newbies is here: http://forums.xilinx.com/t5/New-Users-Forum/README-first-Help-for-new-users/td-p/219369

Summary:
1. Read the manual or user guide. Have you read the manual? Can you find the manual?
2. Search the forums (and search the web) for similar topics.
3. Do not post the same question on multiple forums.
4. Do not post a new topic or question on someone else's thread, start a new thread!
5. Students: Copying code is not the same as learning to design.
6 "It does not work" is not a question which can be answered. Provide useful details (with webpage, datasheet links, please).
7. You are not charged extra fees for comments in your code.
8. I am not paid for forum posts. If I write a good post, then I have been good for nothing.
0 Kudos
ali.alsaqqa
Visitor
Visitor
7,317 Views
Registered: ‎04-21-2011

@

 
Yes That's it.
0 Kudos