Changes between Version 1 and Version 2 of howto/SD_Config
- Timestamp:
- Aug 25, 2012, 2:58:14 PM (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
howto/SD_Config
v1 v2 1 1 = FPGA Configuration via SD Cards = 2 2 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].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 [wiki:HardwareUsersGuides/WARPv3/FPGAConfig WARP v3 user guide]. 4 4 5 5 The basic steps for SD card configuration: … … 28 28 }}} 29 29 30 The updated bitgen.ut should look like :30 The updated bitgen.ut should look like this:[[BR]] 31 31 [[Image(xps_bitgen_cclk.png,nolink)]] 32 32 … … 42 42 '''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. 43 43 44 But, for the sake of completeness,to generate system.bin in XPS, open "bitgen.ut" and add the line:44 There 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: 45 45 {{{ 46 46 -g Binary:Yes 47 }}} .47 }}} 48 48 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. 50 50 51 51 '''Updating download.bit''' … … 64 64 1. Run: {{{promgen -u 0 download.bit -p bin -spi -w}}} 65 65 1. Confirm promgen created/updated the file "download.bin" 66 67 == Copying .bin Files SD Cards == 68 Now 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 72 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. 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 74 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: 75 {{{ 76 dd 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 === 92 Apple 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 {{{ 98 diskutil unmountDisk /dev/diskX 99 }}} 100 101 For each configuration file you wish to write: 102 1. Run: 103 {{{ 104 dd 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 {{{ 109 blocks 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.