Why Arduino on an FPGA? (REDe further explained)

The question of why implement an Arduino on an FPGA has come up quite a bit lately. The short answer is that it is the first step towards a Rapid Electronics Design Environment (REDe) which will allow Gadget makers to focus on their creation instead of the underlying hardware.

The long answer involves a more detailed explanation of what we are trying to accomplish with REDe. As our name implies, the single most important reason for the existence of Gadget Factory is to make Open Source Gadgets. REDe and the Butterfly Platform hardware is meant to make the gadget creation process easier, not only for ourselves but for anyone who has an idea they want to bring to life.

We think the following will make Gadget creation easier:

  • Hardware modules that plug in and just work.
    • No worrying about what pins connect where.
    • No more breadboarding, just plug in a hardware module.
    • Any hardware module can plug into any available socket.
    • No studying a datasheet to figure out how the hardware works.
    • Hardware modules have easy to use code examples that are easily accessible.

    • Portable code that works across a hardware continuum.
      • Code that is written for a mid level FPGA board will work on the smallest microcontroller board.
      • Designs started with a small inexpensive board that run into the physical limits of the board can just re-target to a more capable board.
      • Designs started with a more expensive board can reduce costs by re-targeting to the smallest board that is capable of running the code.
      • Re-targeting just means selecting the board from a drop down menu.

      • Hardware that is easy to put into an enclosure.
        • No Gadget really feels complete until it has a nice enclosure.
        • Use off the shelf enclosures.
        • Allow a gadget to be placed into an enclosure after the design is done. No more designing a circuit around a target enclosure.
        • Position modules at different locations within the enclosure.

      In order to accomplish the goals above we are working to implement what we call a REDe or Rapid Electronics Design Environment, pronounced “Ready”. The two key technologies that will help enable a REDe are the Arduino IDE and FPGA/CPLD technology. The Arduino IDE enables portable code that will work across a board continuum. As a welcome bonus it makes coding in C++ a little easier. FPGA/CPLD technology enables hardware modules that just plug in and work. Working together they enable a REDe that allows a Gadget maker to focus on their idea instead of the underlying hardware.

      The Wiring/Arduino IDE is a key tool for making code portable and easy to use. The Arduino IDE excels in hiding the complexity of the underlying hardware. At its core it is a collection of libraries that define a standard way to do hardware operations such as serial communication. Each type of board defined in the Arduino IDE can have its own set of libraries that provide a bridge between how the board implements hardware and how the Arduino user expects to use the hardware. When a user does a Serial.read() command the board library translates that command into the serial read command required for the board type that is selected. The end user can accomplish the same result on different boards with one single, portable command. As far as the end user is concerned they always use the Serial.read() command whether they are targeting a Butterfly FPGA board with an 8051 soft processor or an AVR microcontroller with a CPLD Butterfly board. The board libraries take care of the translations behind the scenes.

      While the Arduino IDE is a great tool to enable portable code that works across a board continuum it is only half the battle. The Arduino IDE by itself is not enough to enable hardware modules that just plug in and work. Most boards have fixed pin locations which thwart the attempt to make hardware modules that work across a board continuum. A hardware module that needs a SPI connection needs to plug into a very specific location on most boards. Our solution is to use a FPGA or a CPLD to move specialized pins to where they are needed. A hardware module that needs SPI can plug into any available slot and the FPGA/CPLD will connect the necessary pins behind the scenes. Or in the case that the targeted board does not have the needed resource the FPGA/CPLD can implement the desired resource as needed. If four hardware modules that use a UART are connected and the underlying board only has two UARTs then the FPGA/CPLD will implement the difference. The end result is that a user just plugs in a hardware module and follows example code to start using it, REDe takes care of everything else in the background.

      We still have a lot of work to get to a functioning REDe but our end goal is to develop a system that is useful for the rapid creation of Open Source Gadgets. While some of the steps we are taking such as implementing Arduino on an FPGA may not seem to have much use right now we expect them to be very useful once we have a fully functioning REDe system in place.