MiniSpartan6+ bringup

From Hamsterworks Wiki!

Jump to: navigation, search

This FPGA Project was completed in Jan 2015 - the first project of the year.

My Scarab Hardware miniSpartan6+ board arrived while I was away on Holilday. I've finally had a chance to power it on

Contents

Programming tool

I downloaded the Windows version of XC3SPROG from http://superb-dca3.dl.sourceforge.net/project/xc3sprog/xc3sprog_r771_untested.exe.zip

After connecting the boards I verified I could see it with the following command:

Xc3sprog.png

Generating the constraints file

To get the constraints I used cross-referenced the Schematics at https://raw.githubusercontent.com/scarabhardware/miniSpartan6-plus/master/miniSpartan6+_Rev_B.pdf with Table 2-6 in "Spartan-6 FPGA Packaging and Pinouts" from http://www.xilinx.com/support/documentation/user_guides/ug385.pdf

The following pins will be used:

Signal Pin
50MHz clock K3
LED0 P11
LED1 N9
LED2 M9
LED3 P9
LED4 T8
LED5 N8
LED6 P8
LED7 P7

Project Settings

The following project settings were used:

MiniSpartan6 project.png

NOTE - My board is a LX25, change it to LX9 if your board is that size.

Source

The following two files are used in the project - one VHDL module and a constraints file:

led_test.vhd

----------------------------------------------------------------------------------
-- Company: 
-- Engineer:       Mike Field <hamster@snap.net.nz> 
-- Module Name:    led_Test - Behavioral 
-- Project Name:   miniSpartan6/test1
-- Target Devices: miniSpartan6 (XC6SLX25)
-- Description:    A first project for the miniSpartan6
----------------------------------------------------------------------------------
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.NUMERIC_STD.ALL;

entity led_Test is
    Port ( clk50 : in  STD_LOGIC;
           leds : out  STD_LOGIC_VECTOR (7 downto 0));
end led_Test;

architecture Behavioral of led_Test is
   signal count : unsigned(29 downto 0) := (others => '0');
begin

process(clk50)
   begin
      if rising_edge(clk50) then
         count <= count+1;
         leds  <= STD_LOGIC_VECTOR(count(count'high downto count'high-7));      
      end if;
   end process;

end Behavioral;

miniSpartan6.ucf

#Created by Constraints Editor (xc6slx25-ftg256-3) - 2015/01/02
NET "clk50" PERIOD = 20 ns | LOC = "K3"; # IO_L42P_GCLK25_TRDY2_M3UDM
#NET "clk32" PERIOD = 31.25 ns | LOC = "J4"; # IO_L42N_GCLK24_M3LDM_3
NET "LEDS<0>" LOC="P11";
NET "LEDS<1>" LOC="N9";
NET "LEDS<2>" LOC="M9";
NET "LEDS<3>" LOC="P9";
NET "LEDS<4>" LOC="T8";
NET "LEDS<5>" LOC="N8";
NET "LEDS<6>" LOC="P8";
NET "LEDS<7>" LOC="P7";

The design is then built to give "led_test.bit".

Uploading the bit file to the board

The bit-file is then uploaded to the board using XS3CPROG.EXE:

Minispartan6 upload.png

The LEDs are now counting up!

Personal tools