Changes between Version 3 and Version 4 of HardwareUsersGuides/WARPv3/FPGAConfig


Ignore:
Timestamp:
Aug 25, 2012, 9:47:25 PM (12 years ago)
Author:
murphpo
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • HardwareUsersGuides/WARPv3/FPGAConfig

    v3 v4  
    3535'''picture here'''
    3636
    37 
    38 === Preparing an FPGA Bitstream ===
    39 When configuring the FPGA via slave serial mode the configuration startup clock must be CCLK. The default XPS bitgen.ut specifies the JTAG clock, along with other options that are unnecessary for configuration from the SD card. Change the XPS bitgen.ut to:
    40 {{{
    41 -g StartupClk:Cclk
    42 }}}
    43 
    44 The SD card configuration mode uses the binary bitstream format (.bin files). To automatically generate a .bin file:
    45  * ISE: open the Generate Programming File properties and check Create Binary Configuration File
    46  * XPS: edit Project -> bitgen.ut, add a line:
    47 {{{
    48 -g Binary:Yes
    49 }}}
    50 
    51 To convert an existing .bit file to .bin:
    52  * Open a Xilinx command prompt
    53  * Run:
    54 {{{
    55 promgen -u 0 yourFile.bit -p bin -spi
    56 }}}
    57 
    58 === Programming an SD Card ===
    59 We recommend using a standard SD card (not SDHC, SDXC, etc.) with a capacity <=2GB.
    60 
    61 Every WARP v3 kit ships with a pre-tested SD card. These SD cards are divided into two partitions. The first is a 32MB FAT16 partition, occupying the lowest sectors of the SD card. The second partition occupies the rest of the card and is unformatted. FPGA configuration files are written to this unformatted space as raw binary files.
    62 
    63 When you mount the card on your PC your OS should recognize and mount the small FAT partition. Because the WARP v3 board will ignore this partition, you can use it if desired. We suggest storing a text file there describing which designs are written to the SD card's configuration slots.
    64 
    65 || [[Image(wiki:HardwareUsersGuides/WARPv3/files:important.png,valign=middle,nolink)]] || '''WARNING:''' the tools for writing binary files to arbitrary locations on the SD card are also capable of overwriting critical areas of your computer's hard drive. '''Always''' verify the output device descriptor before running these tools. ||
    66 
    67 The default WARP v3 CPLD design loads configuration files from the SD card starting at an offset of 64MB. Up to 8 configuration files can be stored per card, with each file separated by 16MB.
    68 
    69 We use the open-source dd tool to write configuration files to SD cards. dd is available for OS X, Linux and Windows (and probably other OSs). Each call to dd copies one configuration file. There are four arguments:
    70 {{{
    71 dd bs=512 seek=BaseAddr if=someFile.bin of=sdCardDevice
    72 }}}
    73  * bs: Block size, always 512 for SD cards
    74  * if: input file (your .bin file)
    75  * of: device descriptor for SD card (OS specific; see below)
    76  * seek: Staring address for the output file, in units of block size. Use (131072 + slotNum*32768) for standard WARP v3 config design:
    77   * File 0: 131072
    78   * File 1: 163840
    79   * File 2: 196608
    80   * File 3: 229376
    81   * File 4: 262144
    82   * File 5: 294912
    83   * File 6: 327680
    84   * File 7: 360448
    85 
    86 '''OS X'''[[BR]]
    87  1. Insert SD card
    88  1. Run {{{diskutil list}}} to find device descriptor for SD card. Use this in place of {{{/dev/diskX}}} below.
    89  1. Unmount ('''not''' eject) the drive using Disk Utility or this command:
    90 {{{
    91 diskutil unmountDisk /dev/diskX
    92 }}}
    93 
    94 For each configuration file you wish to write:
    95  1. Run:
    96 {{{
    97 dd bs=512 seek=N if=yourFile.bin of=/dev/diskX
    98 }}}
    99  2. See above for correct values of seek argument
    100  1. If successful, dd will report how many bytes were written and how long it took (usually ~10 seconds on our test machines).
    101  1. Some versions of OS X re-mount the FAT volume after each call to dd. Run {{{diskutil unmountDisk /dev/diskX}}} again to un-mount it.
    102  1. Repeat for additional config files if needed.
    103 
    104 '''Windows'''[[BR]]
    105 ''coming soon''
    106  * Get dd for windows
    107  * Find device descriptor via dd --list (cross check drive letter in My Computer)
    108  * same dd cmds, add --progress
    109 
    110 '''Linux'''[[BR]]
    111 ''coming soon''
    112  * Find device descriptor with mount
    113  * same dd cmds
     37For instructions on writing configuration files to an SD card, see the [wiki:howto/SD_Config SD Config Howto].
    11438
    11539----
     40
    11641== SPI Flash ==
    11742The WARP v3 board includes a 128Mb SPI flash device (Numonyx M25P128). This device can be used to configure the FPGA at power-up without an external JTAG cable or SD card. Configuration from SPI flash uses the Virtex-6 Master SPI mode.