# Upgrading FPGA Bitstreams

{% hint style="info" %}
**NOTE:**  Your screen may not match exactly with the screen representations shown in this article, depending on your system configuration and installed firmware/software versions.
{% endhint %}

## Before You Begin

Insure these prerequisites are met prior to following the instructions listed below:

* DAQ board must be powered-on.
* DAQ must have valid microcontroller firmware already installed.
  * Note: [microcontroller firmware](https://docs.axsun.com/axsun-knowledge-base/how-tos/upgrading-board-firmware) is different than the FPGA firmware ("bitstream") being installed per these instructions.
* DAQ must be connected to the host PC via a USB or Ethernet cable.
  * If upgrading via USB, the Axsun USB device driver must be installed on the host PC.
  * If upgrading via Ethernet, the network adapter must be configured with the appropriate static IP address.
* *OCTHost.exe* application must be installed on the host PC.
* A valid FPGA bitstream file provided by Axsun must be available on your PC or network.

## Installation of FPGA Firmware Bitstream

* Launch the OCT Host application (*OCTHost.exe*) and wait for indication of a successful connection with the board.  **DAQ** will be listed in the **Connected Boards:** indicator in the lower left region of the window. Note that “OCT Engine” may be indicated here as well, but is not required for this installation procedure.

![Connected Boards indicator.](https://3144558317-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LP1icDU_wgMhPOYQY7u%2F-LPSTR7w4E10FLUXsweg%2F-LPSULCC-1UJXT8kuxOz%2FScreen%20Shot%202018-10-22%20at%2011.12.04%20AM.png?alt=media\&token=bf69ec25-838e-4a26-92da-b5d44923a7bf)

* Select the **Firmware** tab on the main OCT Host window and then select **DAQ FPGA** from the System drop-down menu:

![Main OCT Host window showing Firmware tab with DAQ FPGA selected.](https://3144558317-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LP1icDU_wgMhPOYQY7u%2F-LPS_8tdaVUqdSKUIV1W%2F-LPS_OThzdUdXNE18gsU%2FScreen%20Shot%202018-10-22%20at%2011.06.44%20AM.png?alt=media\&token=cb916f7d-89ea-4077-a216-e87dc620d07a)

{% hint style="warning" %}
**WARNING:** A FPGA bitstream firmware *.bin* file is different from the microcontroller firmware *.bin* file which is described in a [separate article](https://docs.axsun.com/axsun-knowledge-base/how-tos/upgrading-board-firmware). Do not confuse these files and attempt to upload a microcontroller <*firmware>.bin* file to the DAQ FPGA or a DAQ FPGA <*bitstream>.bin* to the microcontroller.
{% endhint %}

* Press the **Load Firmware** button and use the file dialog to find and open the desired *\<bitstream>.bin* file provided by Axsun to be installed on the FPGA.  The filename, type, date, and size of the selected file will be indicated below the buttons.  The File Type: field will be indicated as **FPGA Firmware**:

![](https://3144558317-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LP1icDU_wgMhPOYQY7u%2F-LPS_TFCY23lxUc6UCvZ%2F-LPS_kbo24b7Ys5Oy86g%2FScreen%20Shot%202018-10-22%20at%2011.07.05%20AM.png?alt=media\&token=fc18ccf7-a0e2-4156-9b20-f489184433ae)

* Confirm that **DAQ FPGA** is seleted in the System drop-down menu and then press the **Send Firmware** button to start the file upload to the board’s flash RAM.  Wait several minutes until all sections are complete and a “Firmware sent \<x,xxx,xxx> bytes successfully” message is given:

![Message indicating FPGA upload is completed.](https://3144558317-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LP1icDU_wgMhPOYQY7u%2F-LPS_px6CwWGyyYfIEHv%2F-LPS_uv11Ls7-T8_WH7U%2FScreen%20Shot%202018-10-22%20at%2011.11.32%20AM.png?alt=media\&token=8581742d-d68d-4323-857b-098c3f19032f)

{% hint style="warning" %}
**WARNING:** If an error message is received or if the process is interrupted before upload is complete, this installation process should be re-attempted ***prior to restarting the hardware***. If attempts continue to fail, contact Axsun Customer Support.
{% endhint %}

## Confirming Successful Installation

* Reset the DAQ by cycling its power off and on.  Wait for the DAQ to reconnect to the OCT Host application and confirm the correct version number is listed in the **Devices** tab.  (If the FPGA version is listed as 255.255.255.255, the update was not successful and should be re-attempted.)

![Main OCT Host window showing Devices tab with FPGA version listed.](https://3144558317-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LP1icDU_wgMhPOYQY7u%2F-LPSa3HCgr10hVvfI-6W%2F-LPSa6vV_mIWxuv1BCwy%2FScreen%20Shot%202018-10-22%20at%204.48.18%20PM.png?alt=media\&token=28455873-acab-429c-986d-81778cde746c)

{% hint style="success" %}
**Congratulations!** You have completed the steps to upgrade FPGA firmware on your Axsun DAQ Board.
{% endhint %}

## Watch a Video

{% embed url="<https://youtu.be/1y5mXwWpJYk>" %}
