OpenXLR8

Introduction to OpenXLR8

OpenXLR8 is the methodology we are actively developing that allows XLR8 and Snō users to develop their own custom Xcelerator Blocks and integrate them into the FPGA.

We have integrated as much as possible of the design flow into the menu system of the Arduino IDE.  However, the process still requires installing and using the Intel Quartus tool and Mentor’s Modelsim for simulation.

Note:  Creating a custom XB requires knowledge of SystemVerilog/Verilog/VHDL design and familiarity with Intel Quartus and Modelsim tools.  Or, at a minimum, an adventurous spirit and the desire to start learning!  We have done the best we can to automate as much as possible and are actively working to make it even easier as we refine the implementation.

How to Create a Custom XB

1   ARDUINO IDE

Download and install the Arduino IDE as described in Section 2 of our Quick Start Guide.

2   FPGA DEVELOPMENT TOOLS

Download and install Quartus Prime Lite Edition available from Intel here. 

  • Quartus tools are only available for Windows and Linux.
    • Quartus will take up at least 20 GB of space.
    • This should include Modelsim-Intel FPGA Edition Edition and Max 10 FPGA support.
  • LINUX USERS:  You will need to install 32 bit compatibility packages with the terminal commands below.  Copy and paste the contents of each grey box below as individual commands at a terminal prompt.

Back to Top

 sudo dpkg --add-architecture i386

 sudo apt-get update
 sudo apt-get install build-essential

 sudo apt-get install gcc-multilib g++-multilib lib32z1 \
 lib32stdc++6 lib32gcc1 expat:i386 fontconfig:i386 \
 libfreetype6:i386 libexpat1:i386 libc6:i386 \

 libgtk-3-0:i386 libcanberra0:i386 libpng12-0:i386 \
 libice6:i3896 libsm6:i386 libncurses5:i386 zlib1g:i386 \

 libx11-6:i386 libxau6:i386 libxdmcp6:i386 \
 libxext6:i386 libxft2:i386 libxrender1:i386 libxt6:i386 libxtst6:i386

3   PREPARATION

In Arduino IDE

  • Sketch->Include Library->Manage Libraries
  • Filter your search for XLR8.
  • Install XLR8Core, XLR8BuildTemplate, and any other desired libraries.

In your Operating System’s File Explorer:

  • Go to your Arduino/libraries folder:
  • Make a copy of the XLR8BuildTemplate folder and name the copy XLR8Build.
    • The library may have been downloaded as XLR8_Build.  If so, still make a copy named XLR8Build.
    • The XLR8Core library may have been downloaded as XLR8_Core.  If so, rename it to XLR8Core.
    • Note:  We have an open question to Arduino why these libraries are getting renamed and will update these instructions when it gets resolved.

Customize the project

  • For a minimal build (no XBs), nothing needs to be done here
  • To use a single XB:  ( The following steps use XLR8Servo as the example XB to instantiate )
    • Copy XLR8Servo/extras/rtl/xlr8_top.v to XLR8Build/extras/rtl/xlr8_top.v
    • Copy XLR8Servo/extras/rtl/xb_adr_pack.vh to XLR8Build/extras/rtl/xb_adr_pack.vh
    • Copy XLR8Servo/extras/quartus/xlr8_top.qsf to XLR8Build/extras/quartus/xlr8_top.qsf
  • For more complex cases such as multiple XBs
    • Modify XLR8Build/extras/rtl/xlr8_top.v to instantiate the desired XBs
    • Modify XLR8Build/extras/rtl/xb_adr_pack.vh to specify addresses of the XB control/status registers
    • Modify XLR8Build/extras/quartus/xlr8_top.qsf to read XB rtl files, and, if needed, XB sdc files

Open XLR8Build/extras/quartus/xlr8_top.qpf with the Altera Quartus software

  • Opening a qpf file in Quartus is done with “file->open project” instead of “file->open”
  • In windows you can simply double-click on xlr8_top.qpf in Windows Explorer

Back to Top

4   SIMULATION

Note:  Simulation is currently only available on Microsoft Windows and Linux. It is not available on Mac OS.

In Arduino, select the following

  • Tools-> Board-> Open XLR8
  • Tools-> Floating Point XB-> Enabled (Can set to disabled if you have the Floating Point XB but want to use software floating point anyway for some reason).
  • Tools-> FPGA Image->  choose AVR frequency that matches the rtl and sdc file (16MHz if you haven’t changed the rtl)
  • Tools-> Upload Action->  Send Sketch to Quartus-Modelsim directory
  • Tools-> Port->  doesn’t matter for this step
  • Tools-> Sketch-> Upload (or hit the Upload button)

In Quartus

  • Processing->Start->Start Analysis and Elaboration
  • Tools->Run Simulation Tool->RTL Simulation

In Modelsim

  • The simulation starts running with the top level inputs and outputs logged to the wave window.
  • You may want to stop the simulation, add additional signals to the wave window, and then run-continue
  • You may want to stop the simulation, add some breakpoints or enter a number milli-seconds you would like to simulate, and then run-continue.
    • It is also possible for a sketch to control when the simulation finishes.
    • The testbench watches the AVR’s GPIOR1 register and if bit 7 is set, it will end the simulation at that point (and by convention report a passing status if bit 6 is also set).
    • If your sketch doesn’t set GPIOR1 (most sketches don’t), the simulation will run until you hit the stop button.

Back to Top

5   SYNTHESIS

Note:  Synthesis is only available on Microsoft Windows and Linux (Linux untested). It is not available on Mac OS.

In Quartus:

  • Do Processing->Start Compilation (or simply click the blue triangle icon)
  • Do File->Convert Programming Files
  • This step will become automated, but for now it is a manual step
  • Open Conversion Setup Data->openxlr8.cof
  • Generate
  • Ok
  • Close

Back to Top 

6   BURNING the FPGA IMAGE

In Arduino, select the following:

  • Board-> Open XLR8
  • “Floating Point XB” and “Upload Action” setting don’t matter for this step
  • FPGA Image->  choose AVR frequency that matches the rtl and sdc file (16MHz if you haven’t changed the rtl)
  • Port->  Serial Port that XLR8 board is connected to
  • Burn Bootloader (takes about a minute)
  • Copy the URL that is printed at the end of the status message, paste it into a web browser, and leave us any comments you may have.

Back to Top

7   MORE HELP

  1. Issues? Check the Alorium Technology Forums.
  2. Intel has both paid and free on-line training here.
  3. An overview of the ModelSim HDL simulator is also available from intel here.

Back to Top

1   ARDUINO IDE

Download and install the Arduino IDE as described in Section 2 of our Quick Start Guide.

2   FPGA DEVELOPMENT TOOLS

Download and install Quartus Prime Lite Edition available from Intel here. 

  • Quartus tools are only available for Windows and Linux.
    • Quartus will take up at least 20 GB of space.
    • This should include Modelsim-Intel FPGA Edition Edition and Max 10 FPGA support.
  • LINUX USERS:  You will need to install 32 bit compatibility packages with the terminal commands below.  Copy and paste the contents of each grey box below as individual commands at a terminal prompt.

Back to Top

 sudo dpkg --add-architecture i386

 sudo apt-get update
 sudo apt-get install build-essential

 sudo apt-get install gcc-multilib g++-multilib lib32z1 \
 lib32stdc++6 lib32gcc1 expat:i386 fontconfig:i386 \
 libfreetype6:i386 libexpat1:i386 libc6:i386 \

 libgtk-3-0:i386 libcanberra0:i386 libpng12-0:i386 \
 libice6:i3896 libsm6:i386 libncurses5:i386 zlib1g:i386 \

 libx11-6:i386 libxau6:i386 libxdmcp6:i386 \
 libxext6:i386 libxft2:i386 libxrender1:i386 libxt6:i386 libxtst6:i386

3   PREPARATION

In Arduino IDE

  • Sketch->Include Library->Manage Libraries
  • Filter your search for XLR8.
  • Install XLR8Core, XLR8BuildTemplate, and any other desired libraries.

In your Operating System’s File Explorer:

  • Go to your Arduino/libraries folder:
  • Make a copy of the XLR8BuildTemplate folder and name the copy XLR8Build.
    • The library may have been downloaded as XLR8_Build.  If so, still make a copy named XLR8Build.
    • The XLR8Core library may have been downloaded as XLR8_Core.  If so, rename it to XLR8Core.
    • Note:  We have an open question to Arduino why these libraries are getting renamed and will update these instructions when it gets resolved.

Customize the project

  • For a minimal build (no XBs), nothing needs to be done here
  • To use a single XB:  ( The following steps use XLR8Servo as the example XB to instantiate )
    • Copy XLR8Servo/extras/rtl/xlr8_top.v to XLR8Build/extras/rtl/xlr8_top.v
    • Copy XLR8Servo/extras/rtl/xb_adr_pack.vh to XLR8Build/extras/rtl/xb_adr_pack.vh
    • Copy XLR8Servo/extras/quartus/xlr8_top.qsf to XLR8Build/extras/quartus/xlr8_top.qsf
  • For more complex cases such as multiple XBs
    • Modify XLR8Build/extras/rtl/xlr8_top.v to instantiate the desired XBs
    • Modify XLR8Build/extras/rtl/xb_adr_pack.vh to specify addresses of the XB control/status registers
    • Modify XLR8Build/extras/quartus/xlr8_top.qsf to read XB rtl files, and, if needed, XB sdc files

Open XLR8Build/extras/quartus/xlr8_top.qpf with the Altera Quartus software

  • Opening a qpf file in Quartus is done with “file->open project” instead of “file->open”
  • In windows you can simply double-click on xlr8_top.qpf in Windows Explorer

Back to Top

4   SIMULATION

Note:  Simulation is currently only available on Microsoft Windows and Linux. It is not available on Mac OS.

In Arduino, select the following

  • Tools-> Board-> Open XLR8
  • Tools-> Floating Point XB-> Enabled (Can set to disabled if you have the Floating Point XB but want to use software floating point anyway for some reason).
  • Tools-> FPGA Image->  choose AVR frequency that matches the rtl and sdc file (16MHz if you haven’t changed the rtl)
  • Tools-> Upload Action->  Send Sketch to Quartus-Modelsim directory
  • Tools-> Port->  doesn’t matter for this step
  • Tools-> Sketch-> Upload (or hit the Upload button)

In Quartus

  • Processing->Start->Start Analysis and Elaboration
  • Tools->Run Simulation Tool->RTL Simulation

In Modelsim

  • The simulation starts running with the top level inputs and outputs logged to the wave window.
  • You may want to stop the simulation, add additional signals to the wave window, and then run-continue
  • You may want to stop the simulation, add some breakpoints or enter a number milli-seconds you would like to simulate, and then run-continue.
    • It is also possible for a sketch to control when the simulation finishes.
    • The testbench watches the AVR’s GPIOR1 register and if bit 7 is set, it will end the simulation at that point (and by convention report a passing status if bit 6 is also set).
    • If your sketch doesn’t set GPIOR1 (most sketches don’t), the simulation will run until you hit the stop button.

Back to Top

5   SYNTHESIS

Note:  Synthesis is only available on Microsoft Windows and Linux (Linux untested). It is not available on Mac OS.

In Quartus:

  • Do Processing->Start Compilation (or simply click the blue triangle icon)
  • Do File->Convert Programming Files
  • This step will become automated, but for now it is a manual step
  • Open Conversion Setup Data->openxlr8.cof
  • Generate
  • Ok
  • Close

Back to Top

6   BURNING the FPGA IMAGE

In Arduino, select the following:

  • Board-> Open XLR8
  • “Floating Point XB” and “Upload Action” setting don’t matter for this step
  • FPGA Image->  choose AVR frequency that matches the rtl and sdc file (16MHz if you haven’t changed the rtl)
  • Port->  Serial Port that XLR8 board is connected to
  • Burn Bootloader (takes about a minute)
  • Copy the URL that is printed at the end of the status message, paste it into a web browser, and leave us any comments you may have.

Back to Top

7   MORE HELP

  1. Issues? Check the Alorium Technology Forums.
  2. Intel has both paid and free on-line training here.
  3. An overview of the ModelSim HDL simulator is also available from intel here.

Back to Top