Presently the bulk of our focus has laid in configuring a Linux machine to have the capacity to act as a development environment for the Digilent Basys2 Development board. In this document we will walk through the process of loading the basic default program into the Basys2 board.
This document assumes that you’ve erased your Basys2’s Electrically Erasable Programmable Read Only Memory (EEPROM) data or is running some design other than the design shipped with the Basys2. If this is not the case, to ensure that the Basys2 is erased you may execute the following while your Basys2 is connected via USB and is TURNED ON (make sure the power switch is in the ON position):
djtgcfg erase -d Basys2 -i 1
Instructions:
First and foremost we must start the Xilinx ISE WebPack Integrated Development Environment (IDE). To do so, assuming you have used the default installation path, you may execute (similar for different versions) the following:
cd /opt/Xilinx/13.3/ISE_DS/ISE/bin/lin/Minimizing the IDE and opening a web browser, we may goto the following location: http://www.digilentinc.com/Products/Detail.cfm?NavPath=2,400,790&Prod=BASYS2
./ise &
Locate the “Basys2 User Demo project” and download it.
In a terminal you may unzip the downloaded file using the unzip program:
unzip Basys2UserDemo.zipThis creates a pdf and a folder “Basys2UserDemo”. Let’s give focus back to the ISE WebPack IDE (Maximize it) and then select:
- File -> Open Project
- Browse to the unzipped folder location / “UncompiledBasys2UserDemo”
- Change “Files of Type” from “ISE Project Files (*.xise)” to “Old ISE Project Files (*.ise)”
- Select “Basys2UserDemo.ise” and Click “Open”
- When prompted to to mirgate the project, Click “Migrate Only”
- On the left there is a “Panel” called “Design” this may be toggled using “View -> Panels -> Design” though we will ensure this is checked and visible.
- Identify the Basys2UserDemo - Stuctural node in the Design Panel “Hierarchy,” select it and then right click on it.
- Select “Design Properties...”
- Ensure the following:
- Top-Level Source type: “HDL”
- Evaluation Development Board: “None Specified”
- Product Category: “All”
- Family: “Spartan 3E”
- Select “Device” to match if you have a 100K die or 250K die, 100K dies use XC3S100E and 250K dies use XC3S250E
- Package: “CP132”
- Speed: “-5”
- Click “OK”
- Identify the Basys2UserDemo - Stuctural node in the Design Panel “Hierarchy,” select it and then right click on it.
- Select “Implement Top-Module”
- Wait until all processing is complete...
- Identify “Generate Programming File” in the Design Panel under “Processes: Basys2UserDemo”, right click and select “Process Properties”
- Select “Startup Options” Category
- Ensure:
- FPGA Start-Up Clock: “JTAG Clock”
- Click “OK”
- Identify “Generate Programming File” in the Design Panel under “Processes: Basys2UserDemo”, right click and select “Run”
- This Generates a .BIT file which can be used to program the FPGA.
- From a terminal enter into the location enter the Basys2UserDemo/UncompiledBasys2UserDemo” folder and execute the following
- djtgcfg prog -d Basys2 -i 0 -f Basys2UserDemo.bit
- -i 0 : is the FPGA’s Random Access memory (RAM), this will not permanently load the User Demo to the Board.
- (Read the “Linux: Getting Started, Using Digilent Adept 2“ for more information if necessary)
Thanks for writing this. I never erased the EEPROM and had all sorts of glitches trying to flash my own designs. Now everything's working as expected! And ISE running in Linux is so much faster than running in Windows 7, so that's a benefit too.
ReplyDeleteAlways glad to hear I've helped someone! Another satisfied geek.
DeleteThanks for your 3 tutorials, it helped me try ISE for the first time :-) Note: You might want to update your earlier tutorial to tell people that when downloading from the Xilinx site, the downloads page is now for Vivado that doesn't support FPGAs below Spartan-7! So now you need to switch to the "ISE" tab to download ISE instead of Vivado. I learnt that the hard way.
ReplyDeleteI've updated the the link on the article for Installing ISE to point directly to the ISE tab. This way it's still just a click away. I haven't done this in a while, was everything else still valuable? Or did I miss any other steps when you went through it?
DeleteThanks for the feedback!
Thanks! Direct download links often change, so to make it clearer, maybe you should say that the default Download page is for Vivado but Vivado doesn't support Spartan-3E, so you need to install ISE instead. Actually I had to overcome some problems in ISE related to my libstdc++ version, such as not using the libs that come with ISE and using the 32-bit version even though I'm on a 64-bit system, but it doesn't sound like others are having my same issues so maybe it's just a problem on my system and not worth updating your blog for.
DeleteHi, i have an issue with the erase part of the board.
ReplyDeleteEverytime i try to erase the board i get this error "ERROR: failed to initialize scan chain".
Can you please help me