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!
07-12-2011 03:24 PM
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. =-)
07-13-2011 03:02 AM
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
07-12-2011 07:09 PM
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.
07-12-2011 07:20 PM
For the first question, Please refer to table 62 about types of pins on Spartan-3an FPGAs in ds557.
07-13-2011 02:35 AM
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 :-)
07-13-2011 03:02 AM
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
07-13-2011 03:18 AM
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
07-13-2011 05:13 AM
07-13-2011 05:38 AM