Papilio Platform Quickstart Guide

— by

Papilio Quick Start Guide

Overview

Welcome to the Papilio Quickstart Guide and the exciting world of FPGA development made easy. This guide covers the basics of installing the software and drivers needed to load the various projects that you create for or download to the Papilio Platform hardware. It also covers loading a basic, “Hello World” bitstream that blinks pins and outputs an ASCII table over the serial port.

Operating systems:

  • Windows XP
  • Windows 7
  • Windows Vista

Note: All the Papilio tools will also run under Linux, we will be working on a Linux Quick Start guide very soon.

Hardware this Guide Applies to:

Papilio One Version 2.03+

Download the Papilio Loader

The Papilio Loader allows quick programming of the FPGA chip or the SPI Flash chip on the Papilio board. Programming directly to the FPGA is faster but is not permanent, as soon as power is removed the programming will be lost. To permanently load a design to the Papilio Board the SPI Flash chip needs to be programmed. The FPGA will automatically configure itself at startup with any bitstream programmed to the SPI Flash.

  • Download from the Papilio Loader from the Download page of the Papilio.cc website.
     

     

  • Save the downloaded file to a location of your choice, such as the desktop.
  • Extract the downloaded zip file to your Program Files directory using Winzip or Windows Explorer.

     

Install the Drivers

  • Plug the Papilio Board into the USB port, and wait for the driver installation dialog.

     

  • Select, “No, not this time” and press “Next”.
  • Select, “Install from a list or specific location (Advanced)” and press “Next”.
  • Select, “Include this location in the search:” and press the “Browse” button.
  • Browse to the FTDI USB Drivers folder in the directory you unzipped earlier.
  • Press, “OK” and then “Next” and observer the drivers installation with a window indicating a successful install.
  • This process needs to be done twice for both USB channels. The second driver installation window will automatically pop up.

Make File Associations

It is possible to associate *.bit files with the Papilio_Loader.bat file so that a double click on any bit file will automatically program the Papilio board. It is also possible to add both the Papilio Loader and the SPI Flash loader to the “SendTo” context menu.

  • Associating *.bit files with the Papilio Loader
    • In the file association window select “Select the program from a list” and press “OK”.
    • Select “Browse” and navigate to the Papilio Loader directory. Select “Papilio_Loader.bat” and press “OK” twice.
    • From here on double clicking on any *.bit file will load it to the Papilio Board.
  • Add the Papilio Loader and the SPI Flash loader to the “Send To” context menu.
    • While still in the Papilio Loader directory double click on the Install_to_Sento.bat file
      • A command window will show up and run a couple of commands.
    • To verify that the SendTo command is available navigate to the bitstream_archive folder.
      • Right click on any of the bit files and hover over “Send To”. The Papilio_Loader.bat and Papilio_Loader_SPI_Flash.bat files should be available now. Clicking on either does the desired action.

Load the QuickStart Bitstream

Overview

The Papilio One QuickStart sketch is a “Hello World” example that does the following:

  • Blinks all of the even numbered pins.
  • Configures all of the odd number pins as inputs. When a odd number pin is asserted it will cause the even pin next to it to stop blinking and stay at 3.3V.
  • Sends the ASCII table at 9600 8N1 over the serial port in a continuous loop.
  • The B/LED Wing can be plugged into any of the Wing Slots and the LED’s will be blinking. Pressing any of the buttons will cause the LED to stay lit while the button is pressed.

Download

  • If *.bit files are correctly associated then you should see a window that allows you to program the bit file to the FPGA.
  • Select “OK” to quickly program the bit file to the FPGA over the JTAG port. Selecting this method temporarily stores the bit file in the FPGA, when power is cycled the design will no longer be in the FPGA.
  • Select “Cancel” in order to make the contents of the bit file permanent so that FPGA loads the design from SPI Flash when it powers up. This takes longer to program then the direct JTAG method.
  • Look at the output of the command window and verify that it says, “Done” and reports a programming time.

Observe Results

The output cab be observed by plugging a B/LED Wing in to see the LED’s blinking or by connecting a multimeter to any of the even numbered pins.

  • Viewing the ASCII table output
    • Open a serial communications program such as Hyperterminal or Putty. This assumes the use of Putty.
    • Determine the number of the second com port for the Papilio Board.
      • Right click on “My Computer” and select “Manage”.
      • Click on “Device Manager”
      • Expand “Ports”
      • Observe the “USB Serial Port”
      • The first USB Serial Port is used for JTAG programming, the second USB Serial Port is used for serial communications. In our case we are using the second one which is showing up as COM5.
    • Run Putty.exe and setup the following settings (substitute your COM port)
    • Press “Open” and observe the ASCII Table scrolling by.

Modify the QuickStart sketch

If you want to make changes to the QuickStart sketch or just take a look at the source code.

  • Download the source code for the QuickStart sketch.
  • Download the latest version of the Papilio Arduino IDE from the Papilio.cc Download page.
  • Start up the Arduino IDE and open the QuickStart sketch.
  • Select the correct board, either Papilio One 250K or Papilio One 500K.
  • Press “Upload” on the Arduino toolbar.

Next Steps

The following projects are of interest for further exploration.

  • Logic Analyzer
    • The “Sump” Logic Analyzer supports 32 channels with 4K sample memory up to 100MHz. The included Java client application allows waveform exploration as well as SPI and I2C protocol analysis. The project is
      optimized to run on the Papilio Platform hardware.
  • AVR8 Soft Processor
    • The AVR8 Soft Processor core is an AVR instruction set compatible processor that is optimized to run on the Papilio One FPGA hardware. It is based on the ATmega103 processor and includes a full toolchain to compile and run C code developed with avr-gcc. Existing C code should be easily ported and C code written for the ATmega103 may run without modification. The major differences between the AVR8 and the ATmega103 are in the amount of memory available and the lack of analog inputs.
  • Wiring/Arduino IDE
    • The Papilio Wiring-Arduino IDE is a specially modified version of the Arduino IDE that supports theAVR8 Soft Processor and the Papilio Platform FPGA development boards. Many Arduino sketches can run with no modification.

Newsletter

Our latest updates in your e-mail.


Leave a Reply