Changes between Version 1 and Version 2 of howto/SD_Config


Ignore:
Timestamp:
Aug 25, 2012, 2:58:14 PM (12 years ago)
Author:
murphpo
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • howto/SD_Config

    v1 v2  
    11= FPGA Configuration via SD Cards =
    22
    3 The WARP v3 board includes an SD card slot and CPLD tied to the Virtex-6 FPGA's dedicated configuration pins. Together these circuits enable configuring the FPGA using bitstreams stored on the SD card. For more details on the hardware design, refer to the [HardwareUsersGuides/WARPv3/FPGAConfig WARP v3 user guide].
     3The WARP v3 board includes an SD card slot and CPLD tied to the Virtex-6 FPGA's dedicated configuration pins. Together these circuits enable configuring the FPGA using bitstreams stored on the SD card. For more details on the hardware design, refer to the [wiki:HardwareUsersGuides/WARPv3/FPGAConfig WARP v3 user guide].
    44
    55The basic steps for SD card configuration:
     
    2828}}}
    2929
    30 The updated bitgen.ut should look like:
     30The updated bitgen.ut should look like this:[[BR]]
    3131[[Image(xps_bitgen_cclk.png,nolink)]]
    3232
     
    4242'''XPS''': Remember that the XPS-generated system.bit does not include any software application. You can generate a .bin file in XPS, but it's not very useful. We recommend using the SDK steps below to generate a .bin version of the download.bit bitstream which includes hardware and software.
    4343
    44 But, for the sake of completeness, to generate system.bin in XPS, open "bitgen.ut" and add the line:
     44There is one flow where an XPS-generated .bin file is useful. You can configure the FPGA with your hardware design, then connect to the board via JTAG from the SDK and download/iterate/debug software projects. We don't use this flow much, but it will work. to generate system.bin in XPS, open "bitgen.ut" and add the line:
    4545{{{
    4646-g Binary:Yes
    47 }}}.
     47}}}
    4848
    49 '''SDK''': Unfortunately the SDK does not include any easy way to generate a .bin file. The SDK can generate download.bit, the bitstream which includes hardware and software designs. But converting download.bit to binary format is a manual two-step process: updating download.bit, then converting download.bit to download.bin.
     49'''SDK''': Unfortunately the SDK does not include any easy way to generate a .bin file. The SDK can generate download.bit, the bitstream which includes hardware and software designs. You must then use a command line tool to convert download.bit into a .bin file.
    5050
    5151'''Updating download.bit'''
     
    6464 1. Run: {{{promgen -u 0 download.bit -p bin -spi -w}}}
    6565 1. Confirm promgen created/updated the file "download.bin"
     66
     67== Copying .bin Files SD Cards ==
     68Now that you've generated a valid binary configuration file (.bin), you must copy it to a specific location on an SD card.
     69
     70|| [[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. ||
     71
     72The 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. The active configuration file is selected by the config DIP switch on the WARP v3 board. You must choose which "slot" when copying the .bin file to the SD card.
     73
     74We 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:
     75{{{
     76dd bs=512 seek=BaseAddr if=someFile.bin of=sdCardDevice
     77}}}
     78 * bs: Block size, always 512 for SD cards
     79 * if: input file (your .bin file)
     80 * of: device descriptor for SD card (OS specific; see below)
     81 * seek: Staring address for the output file, in units of block size. Use (131072 + slotNum*32768) for standard WARP v3 config design:
     82  * Slot 0: 131072
     83  * Slot 1: 163840
     84  * Slot 2: 196608
     85  * Slot 3: 229376
     86  * Slot 4: 262144
     87  * Slot 5: 294912
     88  * Slot 6: 327680
     89  * Slot 7: 360448
     90
     91=== OS X ===
     92Apple provides a copy of dd with recent releases of OS X (at least since 10.7, probably earlier).
     93
     94 1. Insert the SD card
     95 1. Run {{{diskutil list}}} to find device descriptor for SD card. Use this in place of {{{/dev/diskX}}} below.
     96 1. Unmount ('''not''' eject) the drive using this command:
     97{{{
     98diskutil unmountDisk /dev/diskX
     99}}}
     100
     101For each configuration file you wish to write:
     102 1. Run:
     103{{{
     104dd bs=512 seek=N if=yourFile.bin of=/dev/diskX
     105}}}
     106 2. ''N'' (the argument to seek) depends on the target slot number; see the list above
     107 1. If successful, dd should report:
     108{{{
     109blocks written
     110}}}
     111 1. Repeat for additional config files if needed.
     112 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.