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!

Reply

Spartan-6 LX9 MicroBoard, use with Digilent's Adept and SFUtil

Visitor
Posts: 2
Registered: ‎01-23-2012

Spartan-6 LX9 MicroBoard, use with Digilent's Adept and SFUtil

This is a howto targeted to use Digilent's Adept and tools for programming this devkit, intended to windows users.


Got some issues with impact 13.3, so I was looking for a straighter way to get the devboard programmed. Had a look on Digilent's tools, Adept system, Adept utilities, sfutil.exe

>>>: Adept

>>>: SFUtil

However, neither Adept system nor Adept utilities are able to detect the board, reason is the missing device declaration within jtscdvclist.txt

It is possible to add the required device ID.

First, run djtgcfg.exe init -d obp from the Digilent tools. The devkit has to be connected, result should be like that:

  Initializing  scan chain...
  Found Device ID: XXXXXXXX
     ...

Search in jtscdvclist.txt for XC6SLX$, in the section DEVICES add: 9  <Device ID>  0FFFFFFFh, so it looks about like that:

        DEVICES{
            9      XXXXXXXXh  0FFFFFFFh
            16    04002093h    0FFFFFFFh
            ...


Notice the "h" after the device id. The file jtscdvclist.txt is to find under "drive:\program files\common files\digilent\data".

Save jtscdvclist.txt.

Now Adept, as well as the Adept tools will recognice the devkit.

To make it more comfortable, one can use .bat files, which allow drag and drop of .bit files.

One for programming the FPGA:


**********************************************************************************************

@EHO OFF
C:\Xilinx\batchprg\djtgcfg.exe enum
C:\Xilinx\batchprg\djtgcfg.exe init -d obp
C:\Xilinx\batchprg\djtgcfg.exe prog -d obp -i "0" -f %1
@IF ERRORLEVEL 1 GOTO FEHLER
@GOTO END
:FEHLER
@ECHO ##############
@ECHO # ! Fehler ! #
@ECHO ##############
@PAUSE
:END

**********************************************************************************************

 

And one for programming the FPGA's SPI-flash:

 

**********************************************************************************************

call C:\Xilinx\13.3\ISE_DS\settings32.bat

cd .

echo off

:: AVNET IS PROVIDING THIS DESIGN, CODE, OR INFORMATION "AS IS"
:: SOLELY FOR USE IN DEVELOPING PROGRAMS AND SOLUTIONS FOR XILINX
:: DEVICES.  BY PROVIDING THIS DESIGN, CODE, OR INFORMATION
:: AS ONE POSSIBLE IMPLEMENTATION OF THIS FEATURE, APPLICATION
:: OR STANDARD, AVNET IS MAKING NO REPRESENTATION THAT THIS
:: IMPLEMENTATION IS FREE FROM ANY CLAIMS OF INFRINGEMENT,
:: AND YOU ARE RESPONSIBLE FOR OBTAINING ANY RIGHTS YOU MAY REQUIRE
:: FOR YOUR IMPLEMENTATION.  AVNET EXPRESSLY DISCLAIMS ANY
:: WARRANTY WHATSOEVER WITH RESPECT TO THE ADEQUACY OF THE
:: IMPLEMENTATION, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OR
:: REPRESENTATIONS THAT THIS IMPLEMENTATION IS FREE FROM CLAIMS OF
:: INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
:: FOR A PARTICULAR PURPOSE.
::     
:: (c) Copyright 2011 AVNET, Inc.
:: All rights reserved.

@echo ##########################################################################
@echo # This file uses iMPACT to create a PROM file and then erase and program #
@echo #  it using the sfutil utility provided by Digilent, Inc.  The N25Q128   #
@echo #  Flash is the target PROM for the mcs file.  The on-board Digilent     #
@echo #  Atmel Full Speed USB-JTAG programs the mcs to Flash on the Avnet      #
@echo #  Spartan-6 LX9 MicroBoard                                              #
@echo ##########################################################################

:: set bitstream=uart_ctrl
set bitstream=%~n1
set spiPartName=N25Q128
set cmd_file=config_s6lx9.cmd
:: erase size by 65KB (65536) sector, standard LX9 bitstream takes 6 sectors
:: 6 * 65536 = 393216
set erase_size=393216

@echo setMode                   -pff                                                                 > %cmd_file%
@echo setPreference             -pref StartupClock:Auto_Correction                                  >> %cmd_file%
@echo setSubmode                -pffspi                                                             >> %cmd_file%
@echo addDesign                 -version 0 -name "0"                                                >> %cmd_file%
@echo addDeviceChain            -index 0                                                            >> %cmd_file%
@echo addDevice                 -spi %spiPartName% -p 1 -file %bitstream%.bit                       >> %cmd_file%
@echo generate                  -format mcs -generic -spi -fillvalue FF -output %bitstream%.mcs     >> %cmd_file%
@echo quit                                                                                          >> %cmd_file%

impact -batch %cmd_file%
erase %cmd_file%

C:\Xilinx\batchprg\sfutil -d obp -cr -m N25Q128 -e -l %erase_size% -t
C:\Xilinx\batchprg\sfutil -d obp -cr -m N25Q128 -NE -fi -w %bitstream%.mcs -t

@IF ERRORLEVEL 1 GOTO FEHLER
@GOTO END
:FEHLER
@ECHO ##############
@ECHO # ! Fehler ! #
@ECHO ##############
@PAUSE
:END
**********************************************************************************************

 

Please notice AVNET's copyright.

 

The paths (in my example C:\Xilinx\batchprg\) have to be adjusted to your own configuration.

Adding the .bat files to the context menue for the right mouse key further simplifies programming.

Voyager
Posts: 252
Registered: ‎10-01-2007

Re: Spartan-6 LX9 MicroBoard, use with Digilent's Adept and SFUtil

topstat,

 

Thanks for your explanation on how to get Adept to work with this board.  I'll add one additional comment regarding the performance of sfutil -- we've found programming flash through sfutil to be much faster than using iMPACT, even when using Platform Cable USB-II or Digilent HS1.  Here's why.

 

The Atmel ATMEGA16U2 controller that hosts the Digilent USB-JTAG firmware on the MicroBoard also has direct spi connections to the Micron N25Q SPI Flash.  Since sfutil utilizes these direct spi connections, there is no JTAG overhead, and the programming goes much faster.  Since the ATMEGA16U2 only has a full-speed USB connection, performing indirect SPI programming via JTAG and iMPACT is painfully slow.  However, by eliminating JTAG overhead, the full-speed Atmel option via sfutil is actually faster than the high-speed USB cables using iMPACT.

 

The other note is that designers are able to copy the Atmel design from the MicroBoard into their own project, including licensing of the Digilent firmware, which would give you sfutil Direct SPI Programming capability (and full-speed USB-JTAG capability) on your own board.  If you're interested in doing that, send me a message or contact your Avnet FAE for more details.

 

Bryan

Visitor
Posts: 2
Registered: ‎01-23-2012

Re: Spartan-6 LX9 MicroBoard, use with Digilent's Adept and SFUtil

Bryan,

 

it was also my experience with the devboard that sfutil is much faster, another reason I was happy to share my findings.

Thanks for the second notice, that's good info.

 

Ludwig

Newbie
Posts: 5
Registered: ‎07-09-2009

Re: Spartan-6 LX9 MicroBoard, use with Digilent's Adept and SFUtil

Hi Bryan,

 

I have just received my s6microboard and noted on the ATmega16U2 function on the board.

 

I am interested in the firmware design in the ATmega16U2 for my own project/board. How can I get a copy of the Atmel design.

 

Thanks and Regards.

 

Sim CK

Visitor
Posts: 5
Registered: ‎02-17-2010

Re: Spartan-6 LX9 MicroBoard, use with Digilent's Adept and SFUtil

Hi,

 

I thought this might also interest you since apparently you also ran into problem with the Digilent plugin for Impact.

I have found a solution that resolves the issue with Impact. My Spartan6-LX9 Board now gets recognized by Impact immeadiatly.

 

See the post here:

http://forums.xilinx.com/t5/Installation-and-Licensing/Ubuntu-11-10-and-impact-chipscope-etc/td-p/188486

 

 

 

Cheers

Tobias

Visitor
Posts: 8
Registered: ‎02-28-2013

Re: Spartan-6 LX9 MicroBoard, use with Digilent's Adept and SFUtil

What is the answer for a windows 7 user. Where do i get the drive. just got the board but no driver seen by my system.