My first FPGA project using Technolomaniac's board
I can now program FPGA!! Well, I can copy someone else's example code and get it to work on my device. Check out this excellent video which shows how to write VHDL to make an LED blink:
When following that tutorial you simply need to select the correct hardware:
For the pinout you need to look at the FPGA Development Board PDF schematics found here:
The pinouts are shown on page 6:
I know from other parts of that document that the crystal oscillator is connected to the FPGA_CLK signal and the LED I'm targeting is connected to IO12. These correspond to P56 and P134 which are used in the pins file.
Here is the code that allowed me to get an LED blinking. Note that this is designed for a 50MHz oscillator but this board actually has a 20MHz oscillator. For this example I don't care about the timing error.
library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; entity LED_Blink is port ( CLK_50MHz: in std_logic; LED: out std_logic ); end LED_Blink; architecture Behavioral of LED_Blink is signal Counter: std_logic_vector(24 downto 0); signal CLK_1Hz: std_logic; begin Prescaler: process(CLK_50MHz) begin if rising_edge(CLK_50MHz) then if Counter < "1011111010111100001000000" then Counter <= Counter + 1; else CLK_1Hz <= not CLK_1Hz; Counter <= (others => '0'); end if; end if; end process Prescaler; LED <= CLK_1Hz; end Behavioral;
NET "CLK_50MHz" LOC = "P56"; NET "LED" LOC = "P134";
That's it! Hello Word!
I was able to poll the FPGA using the Platfrom Cable USB but then all of the sudden I wasn't. I would get the error telling me that the cable was being used by another application. This bug report shows how to clear a bad cable lock: http://www.xilinx.com/support/answers/21931.htm
Hey, more Linux fun to get Xilinx drivers working on a "non-supported" platform (Ubuntu).
Trying to run the cable driver install script bombs out. Finding my way to a workaround for this really really really sucked. I think i have at least 2 hours into this. Finally found this page... follow it religiously:
After going through the ISE Design Suite installation process I'm left with no apparent way to launch the software. I found this thread to help a bit: http://stackoverflow.com/questions/15119734/how-to-launch-xilinx-ise-web-pack-under-ubuntu
1) Navigate to the Xilinx ISE install directory
2) Run the setup file "./settings64.sh" (you may need to chmod +x that file first)
3) Run ./ISE in the ISE_DS/bin/lin64 directory
Guess what? When you click okay it doesn't launch the configuration manager like it says it's going to.
4) Add the "Xilinx/14.7/ISE_DS/common/bin/lin64/" directory to your path then run ./ise again. This time dismissing the error window will launch the license manager.
5) Generate a free ISE WebPACK license by going here: http://www.xilinx.com/getlicense
6) Download the license that Xilinx emailed to you into your ~/.Xilinx/. directory
7) On the Xilinx License Configuration Manager hit the refresh button at the bottom. This should give you a few green boxes in the Version Limit column. Now hit close
Now when you launch ISE there should be no license error.
Xilinx offers software for Windows or Linux. I'm a Linux-only person so I went that route. Here's how I set up the ISE Design Suite under Linux Mint 17:
I downloaded the "ISE Design Suite" "Full Installer for Linux" from the middle of this page: http://www.xilinx.com/support/download/index.html/content/xilinx/en/downloadNav/design-tools.html
The package is about 6.8 GB so download ahead of time.
1) untar the install package to a large partition
2) edited the "xsetup" file so that it reads "#!/bin/bash" at the top of the file
3) run "sudo ./xsetup" and the GUI installer will run
4) I chose not to install to the /opt directory. <strikethrough>If you want it installed there you either need to run the installer as sudo or create the Xilinx directory and set permissions to allow your user account to write to it.</strikethrough> You need to run the installer as sudo or it will bomb out at the end of the process.
5) The installer will take a very long time to complete. In my case it was about 75 minutes.
I went through the entire installation process (75 minutes) and at the end was greeted with a pop-up that said "driver installation failed because you don't have root priviledges". No problem, I'll just install the cable drivers as sudo and fix it! Nope, when I went to do that it told me that the Xilinx directory already existed and I would need to choose a different location. Really Xilinx? Doesn't it seem like you should perform the root privilege test at the beginning of the process instead of bombing out at the end?
This board has a Xilinx Spartan-6 on it. So in essence, when you buy a board you have already purchased the hardware from Xilinx. So it's nice to see they have a free IDE called Vivado.
But when you go to download it you get the shakedown about non-export and what your corporate address and application are. These are mandatory fields you must fill in before download the software. I haven't done a thing with the hardware yet and I already have a sour taste in my mouth.
Getting the Vivado installer running on Ubuntu
Installer crashes on Ubuntu. This thread yields the following commands which are a workaround.
chmod +x Xilinx_Vivado_SDK_2014.2_0612_1_Lin64.bin
./Xilinx_Vivado_SDK_2014.2_0612_1_Lin64.bin --target Xilinx_Install_temp<br>
Now edit the xsetup file and replace "#!/bin/sh" with "#!/bin/bash"
Now the GUI setup window will launch. I didn't run as sudo the first time and a couple of screens in the GUI complains about write permisisons for /opt/Xilinx.
Check that download size and disk space. I'm trying to blink and LED and I've got a 1.89 GB download standing in my way? Maybe this is commonplace for the FPGA crowd, but I'm a fan of programming for embedded using a text editor and makefile (okay, I do use Eclipse more regularly these days but you know what I'm talking about).
As I said above, this does me no good because I have a Spartan-6 I'm trying to work with. I'll post another log on how to install ISE Design Suite.