Software Dependencies

If you intend to ship a software application based on the FrontPanel SDK, there are a few things you will need to consider in order to improve the user experience of your customers. Please consider the notes below when packaging your software for distribution.

Microsoft Visual C++ Redistributable

The FrontPanel DLL, Python, Java, and C# libraries depend on the Microsoft Visual C++ runtime libraries. These are installed by the Microsoft Visual Studio C++ Redistributable. Please see the FrontPanel release notes to determine which version of the redistributable corresponds to the FrontPanel libraries in that release.

Release Checklist

You’ll need to include the following in your software release:

  1. FrontPanel Library – DLL or corresponding libraries for Python, Java, or C#. Note that the bitness of this must match the bitness of your software application.
  2. FrontPanel Driver – Use the DriverOnly installer and run this installer during your application installation process.
  3. Microsoft Visual Studio C++ Redistributable (for FrontPanel) – Install and run this redistributable package. Note that the bitness of this must match the bitness of the FrontPanel Library.
  4. Microsoft Visual Studio C++ Redistributable (for your application) – Install and run this redistributable package. Note that this may or may not be the same version as the one used for FrontPanel.

Testing

It is a good idea to test your software application on a fresh installation of Windows. The recommended way to do this is with a Virtual Machine (e.g. VMWare):

  1. Install the appropriate version(s) of Windows into one or more virtual machines.
  2. After the installation and first update of Windows, make a snapshot.
  3. Test your application installer, making sure to check device enumeration and proper communication with your application.
  4. Once testing is complete, reset your VM to the snapshot.

This process provides an efficient way to test on a clean installation. Once drivers and libraries are installed, the system can make changes that persist even if you uninstall your application. This makes it difficult to truly test the usability of your installer as the test machine is now “tainted” and may not behave in the same manner as a customer’s system.

The okCFrontPanel Class

This class is the workhorse of the FrontPanel API.  It’s methods are organized into three main groups: Device Interaction, Device Configuration, and FPGA Communication.

In a typical application, your software will perform the following steps:

  1. Create an instance of okCFrontPanel.
  2. Using the Device Discovery methods, find an appropriate product with which to communicate and open that device.
  3. Configure the device PLL (for devices with an on-board PLL).
  4. Download a configuration file to the FPGA using ConfigureFPGA(...).
  5. Perform any application-specific communication with the FPGA using the FPGA Communication methods.

Device Configuration

Once an available device has been opened, these methods allow you to configure it’s available features such as PLL settings and EEPROM parameters and to download configuration data to the FPGA.

METHODDESCRIPTION
GetDeviceIDReturns a device identification string stored in the device.  Unlike the serial number, this string may be changed by the user using the API or the FrontPanel application.  It is not guaranteed to be unique.

DEPRECATED: GetDeviceInfo replaces this method.  This method will be removed in a future version of FrontPanel.
SetDeviceIDAllows the user to set the device ID.
LoadDefaultPLLConfigurationConfigures the PLL with settings stored in EEPROM.
GetPLLxxxConfigurationRetrieves the current on-board PLL configuration.   (xxx is either 22150 or 22393)
SetPLLxxxConfigurationSets the on-board PLL to a given configuration.  (xxx is either 22150 or 22393)
GetEepromPLLxxxConfigurationRetrieves the PLL configuration stored in the on-board EEPROM.  (xxx is either 22150 or 22393)
SetEepromPLLxxxConfigurationPrograms the on-board EEPROM with a PLL configuration for later retrieval.  (xxx is either 22150 or 22393)
ConfigureFPGADownloads a Xilinx configuration bitfile to the FPGA.
ConfigureFPGAFromMemorySimilar to above, but with the configuration file contents in memory.
ConfigureFPGAWithReset(USB 3.0 only) Downloads a Xilinx configuration bitfile to the FPGA and provides a reset profile to perform after configuration.
ConfigureFPGAFromMemoryWithReset(USB 3.0 only) Similar to above, but with the configuration file contents in memory.
FlashEraseSector(USB 3.0 only) Erases a single sector in user flash.
FlashWrite(USB 3.0 only) Writes data to user flash.
FlashRead(USB 3.0 only) Reads data from user flash.

FPGA Communication

Once the FPGA has been configured, communication between the application and the FPGA hardware is done through these methods.  The FPGA is connected directly to the bridge device (USB microcontroller or PCIe bridge) on the XEM.  These methods communicate through that connection and require that an instance of the HDL module okHostInterface be installed in the FPGA configuration.

A brief description of the API methods is in the table below.  The way the API and FrontPanel HDL modules communicate is described in more detail later.

METHODDESCRIPTION
IsFrontPanelEnabledChecks to see that an instance of the okHostInterface is installed in the FPGA configuration.
IsFrontPanel3SupportedReturns true if the firmware on the device supports FrontPanel-3.
ResetFPGASends a reset signal through the host interface.  This is used to reset the host interface or any endpoints.  It can also be used to reset user hardware.
UpdateWireInsUpdates all wire in values (to FPGA) simultaneously with the values held internally to the API.
UpdateWireOutsSimultaneously retrieves all wire out values (from FPGA) and stores the values internally.
UpdateTriggerOutsRetrieves all trigger out values (from FPGA) and records which endpoints have triggered since the last query.
SetWireInValueSets a wire in endpoint value.  Requires a subsequent call to UpdateWireIns.
GetWireOutValueRetrieves a wire out endpoint value.  Requires a previous call to UpdateWireOuts.
ActivateTriggerInActivates a given trigger in endpoint.
IsTriggeredReturns true if a particular trigger out endpoint has been triggered since a previous call to UpdateTriggerOuts.
WriteToPipeInWrites data (byte array) to a pipe in.
ReadFromPipeOutReads data (byte array) from a pipe out.
WriteToBlockPipeInWrites data to a block-throttled pipe in.
ReadFromBlockPipeOutReads data from a block-throttled pipe out.
WriteRegister(USB 3.0 only) Performs a single write transaction on the Register Bridge.
ReadRegister(USB 3.0 only) Performs a single read transaction on the Register Bridge.
WriteRegisters(USB 3.0 only) Performs multiple write transactions on the Register Bridge.
ReadRegisters(USB 3.0 only) Performs multiple read transactions on the Register Bridge.