Using the binaries on the Xilinx ML401 development board

From Milkymist Wiki

Revision as of 13:00, 18 February 2010 by Admin (Talk | contribs)
(diff) ← Older revision | Current revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Contents

[edit] Required hardware

  • A computer running Linux
  • A Xilinx ML401 development board
  • A DLC9 JTAG cable, also known as "Platform Cable USB". DLC10 cables ("Platform Cable USB II") have also been reported to work.
  • A Compact Flash card.
  • A Compact Flash reader.
  • A VGA monitor.
  • A microphone or another audio source.

Optional (for development and troubleshooting only):

  • A crossover RS232 cable to connect between your computer and the ML401 serial port.
  • If your computer does not have a RS232 port (DB9 plug), a USB/Serial adapter is recommended.

[edit] Required software

[edit] Preparing the board

The BIOS prompt
  1. First, we will flash the BIOS into the NOR flash chips of the board. This step only needs to be done once. Alternatively, you can see instructions about Writing the Flash with Microblaze which should work with more setups (different JTAG cable, different JTAG chain, different Flash chip, etc.).
    1. Tip: Use libusb with the Xilinx programming tools as outlined in http://www.xilinx.com/support/answers/29310.htm. The supplied kernel drivers (Jungo windrvr) are abominable.
    2. From the "flash" directory of the binkit, load the "flasher.bit" bitstream into your FPGA using Impact.
    3. You should see a blinking pattern on the 4 LEDs of your board. Exit Impact.
    4. Write the BIOS image to the Flash using the command : ./flasher bios_splash.bin. Both files are in the "flash" directory of the binkit.
  2. Make sure the DIP SWITCH #2 (on the right side of the board) is in the LOW position (it selects transmission at 230400bps).
  3. Now, connect the RS232 cable and run a terminal program to see what's happening. Communication parameters are 115200bps, 8N1.
  4. Load the "system.bit" bitstream into the FPGA to implement the Milkymist SoC design.
  5. You should see the BIOS startup messages, followed by a prompt. The FPGA board is now ready to execute your software !

[edit] Loading software

  1. If you are running a serial terminal program, exit it.
  2. Prepare the firmware image to be loaded (boot.bin), and the "flterm" program.
  3. Run the following command: ./flterm --port /dev/ttyUSB0 --kernel boot.bin --kernel-adr 0x40000000. Replace /dev/ttyUSB0 by the device name of your serial port.
  4. Press ENTER to get the BIOS prompt again.
  5. Enter the serialboot command. The Milkymist board downloads and runs your firmware image !
  6. You can use the "CPU Reset" button on the ML401 board to initiate a software reset, and load another firmware image.
  7. If you don't want to use serial firmware loading, for example if you want your system to be autonomous, you can place your firmware on the CF card under the name "BOOT.BIN". The BIOS will automatically fetch it and run it when the board is started. If you are at the BIOS prompt, you can also type cardboot boot.bin.

[edit] The official demo firmware

Startup of the demo firmware

The Milkymist core distribution comes with a demonstration firmware which only renders MilkDrop presets (along with providing some debug facilities), without many fancy features. To use it :

  1. place MilkDrop presets on the CF card (at the root, directories are not supported).
  2. load the firmware image either using serial firmware loading with flterm, or by placing it under the name "BOOT.BIN" on the CF card.
  3. connect a VGA monitor and a microphone and enjoy.

[edit] Troubleshooting

DDR SDRAM calibration tool
  • "FAT partition not found" when accessing the CF card: make sure the CF is partitioned using a partition of type 0x06 (FAT16). Some old CF cards use weird partition types (FAT12, FAT16<32M) that will cause problems with Milkymist.
  • "Memory test failed": on some boards, the DCM (clock generator) of the FPGA behaves strangely and will cause the SDRAM to fail. Workaround: use the calibrate command at the BIOS prompt and raise the "DQS Phase" to 120. Use the memtest command to check it worked. If it's OK, you can use serialboot or cardboot to continue. You need to recompile the BIOS for the change to be permanent.
Personal tools