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 thedestroyer
Observer
5,285 Views
Registered: ‎07-12-2011

Getting to know pins, and simulate

Jump to solution

Hello guys :-),

 

I'm beginning to learn VHDL with Spartan-3AN. It's a little bit confusing because there are many things I don't know, starting from VHDL coding, going through simulation, and ending with synthesising on a device.

 

I read about VHDL programming and learned the basics, and understood a lot (I'm already a C++ programmer and had a course about digital electronics in the university). But I don't know how to proceed to make my first working example.

 

I have a few questions, I'd appreciate it so much if you could clarify as much as possible. I hope they don't sound stupid :-)

 

I found a small old tutorial for Spartan 3 (not 3AN) online (attached), that describes how to create a binary Decoder using the input switches on the board as input, and the LEDS on the board as output. The tutorial is made for Xilinx navigator 7.1. I'm trying to apply the instructions on the new navigator and the 3AN spartan I have.

 

1- After writing the code, I have to assign inputs and outputs to the board. I got the datasheet of my Spartan from Xilinx's website, but I can't understand the types mentioned in the datasheet. The datasheet is found under this link:

 

http://www.xilinx.com/support/documentation/data_sheets/ds557.pdf

 

At page 79, the last column on the right describes "type". I can only understand that I/O means input/output, but all the others I can't get. So the question is: How can I get the address of the switches on the board and the LEDS on the board? what are their types?

And could you please tell me about the other types?

 

2- Simulating the process with Navigator 13.2

 

I would like to simulate my VHDL code on ISE Simulator. But I don't know where to start. I have the code ready, but don't know what to expect when simulating. Could you guys please tell me something about simulation? And how I can get it running?

 

 

Thank you for your patience. Any efforts are highly appreciated. =-)

0 Kudos
1 Solution

Accepted Solutions
Teacher eteam00
Teacher
6,887 Views
Registered: ‎07-21-2009

Re: Getting to know pins, and simulate

Jump to solution

But could you please tell me how I can reach the slide switches and the LEDs on the board?

 

If you are following the tutorial, and want to manually enter the pin names and package pin locations (starting at page 8 of the tutorial), then you will need the board schematics.  The schematics show all the components on the circuit board and their connections with one another.  Locate the switches, identify the names of the signals to which the switches are connected, and find which FPGA package pin is connected to these same signal names.

 

As you enter the pin locations and signal names into the .UCF file, you can use whatever input signal (pin) names you like.  In your VHDL source code, you will refer to these input signals with the names you use in the .UCF file.

 

The tutorial you posted is a bit dated.  You'll have to adapt to the current ISE design software release, but the process steps described in the tutorial are basically unchanged.

 

I believe you have the Spartan-3AN Starter Kit board.  Is this correct?  If so, there is some useful reference material to be found here, here, and here.

 

This should keep you busy for a while.  Welcome to the wonderful world of FPGA design.

 

-- 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.

View solution in original post

0 Kudos
7 Replies
Scholar joelby
Scholar
5,271 Views
Registered: ‎10-05-2010

Re: Getting to know pins, and simulate

Jump to solution

On an FPGA, I/O pins do have an 'address', but you should think of it as their physical address, which is their location on the chip's die. You use a UCF (User Constraints File) to map between pin locations and your signal names for the particular chip/board you're using. Typically, these ports are defined as the inputs and outputs of your top module.

 

The other types the table on page 79 refers to are described in table 62 on page 71. Unless you're designing a PCB, it's easiest to refer to the documentation for the development board you're using. It should list which I/Os are available (smaller boards may not connect every single I/O) and what they're actually connected to (an on-board switch, a header, a hard-wired peripheral) and the pin names for each. Normally a UCF file specific for your board is available from the manufacturer, but you can reconstruct one from the documentation or schematic if necessary.

 

Simulation involves injecting inputs and a system clock and observing the outputs. For your example, you could write a loop that tries each combination of switch inputs in turn, and checks that the LED output is what you expect. If you don't have a text book that describes how to write test benches, I recommend reading XAPP199 - Writing Efficient Testbenches.

 

0 Kudos
Xilinx Employee
Xilinx Employee
5,270 Views
Registered: ‎08-25-2010

Re: Getting to know pins, and simulate

Jump to solution

For the first question, Please refer to table 62 about types of pins on Spartan-3an FPGAs in ds557.

Thanks
Simon
-------------------------------------------------------------------------
Don't forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
Observer thedestroyer
Observer
5,264 Views
Registered: ‎07-12-2011

Re: Getting to know pins, and simulate

Jump to solution

Thank you so much for your reply.

 

But could you please tell me how I can reach the slide switches and the LEDs on the board?

 

Thank you :-)

0 Kudos
Teacher eteam00
Teacher
6,888 Views
Registered: ‎07-21-2009

Re: Getting to know pins, and simulate

Jump to solution

But could you please tell me how I can reach the slide switches and the LEDs on the board?

 

If you are following the tutorial, and want to manually enter the pin names and package pin locations (starting at page 8 of the tutorial), then you will need the board schematics.  The schematics show all the components on the circuit board and their connections with one another.  Locate the switches, identify the names of the signals to which the switches are connected, and find which FPGA package pin is connected to these same signal names.

 

As you enter the pin locations and signal names into the .UCF file, you can use whatever input signal (pin) names you like.  In your VHDL source code, you will refer to these input signals with the names you use in the .UCF file.

 

The tutorial you posted is a bit dated.  You'll have to adapt to the current ISE design software release, but the process steps described in the tutorial are basically unchanged.

 

I believe you have the Spartan-3AN Starter Kit board.  Is this correct?  If so, there is some useful reference material to be found here, here, and here.

 

This should keep you busy for a while.  Welcome to the wonderful world of FPGA design.

 

-- 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.

View solution in original post

0 Kudos
Teacher eteam00
Teacher
5,257 Views
Registered: ‎07-21-2009

ISE tutorial doc

Jump to solution

If you find the Spartan 3 tutorial is a bit too dated with respect to the current software release,  you should take a look at the ISE In-Depth Tutorial doc, UG695.  Yuo can find additional software tutorials here.

 

-- 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
Observer thedestroyer
Observer
5,249 Views
Registered: ‎07-12-2011

Re: Getting to know pins, and simulate

Jump to solution
Thank you so much! you're right, this information will keep me busy for a while ^^

I got to know the addresses of the switches and leds from this file, actually!

http://www.xilinx.com/products/boards/s3astarter/files/s3astarter.ucf

there I could find LEDs label from 0 to 7 and switches from 0 to 3 :D

Thank you so much again ^^
0 Kudos
Observer thedestroyer
Observer
5,247 Views
Registered: ‎07-12-2011

Re: Getting to know pins, and simulate

Jump to solution
Thanks for the info about simulation, will do :-)
0 Kudos