FP-4.3.1 Possible bug in okTDeviceInfo.isFrontPanelEnabled


As stated in the title, the FrontPanel version is 4.3.1.

I have run the following piece of code on two different devices, one is a XEM3005, the other is a XEM6310-LX45:

[CODE]#! /usr/bin/env python

-- coding: utf-8 --

import ok
import sys

board_number = int(sys.argv[1])
bit_file_name = sys.argv[2]

xem = ok.FrontPanel()

num_devices = xem.GetDeviceCount()
print “Number of devices: %d” % num_devices

if not (0 < num_devices):
print “Error, board number out of range (0…%d)” % (num_devices - 1)

serial_number = xem.GetDeviceListSerial(board_number)
model_number = xem.GetDeviceListModel(board_number)
model_string = xem.GetBoardModelString(model_number)

error_code = xem.OpenBySerial(serial_number)
if error_code != xem.NoError:
print “Error in OpenBySerial()”

error_code = xem.ConfigureFPGA(bit_file_name)
if error_code != xem.NoError:
print “FPGA configuration failed.”
print “Bit file ‘%s’ was successfully loaded.” % bit_file_name

device_info = ok.okTDeviceInfo()
error_code = xem.GetDeviceInfo(device_info)
if error_code != xem.NoError:
print “Error in GetDeviceInfo(device_info)”

print “Device ID: %s” % device_info.deviceID
#print “Serial number: %s, %s” % (serial_number, device_info.serialNumber)
print “FPGA board: %s, %s” % (model_string, device_info.productName)
print “Firmware version: %d.%d” % (
print “HDL version: %d.%d” % (
print “PLL22150 Supported: %s” % device_info.isPLL22150Supported
print “PLL22393 Supported: %s” % device_info.isPLL22393Supported
print “FrontPanel is enabled: %s, %s” % (
print “Wire width: %d” % device_info.wireWidth
print “Trigger width: %d” % device_info.triggerWidth
print “Pipe width: %d” % device_info.pipeWidth
print “Register address width: %d” % device_info.registerAddressWidth
print “Register data width: %d” % device_info.registerDataWidth[/CODE]

The results were:[CODE]
$ ./ok_test.py 1 counters-xem3005-1200.bit
Number of devices: 3
Bit file ‘counters-xem3005-1200.bit’ was successfully loaded.
Device ID: usbrk5/us/ad:2/mux:16/1
FPGA board: XEM3005, XEM3005
Firmware version: 3.1
HDL version: -1.-1
PLL22150 Supported: True
PLL22393 Supported: False
FrontPanel is enabled: True, False
Wire width: 16
Trigger width: 16
Pipe width: 16
Register address width: 0
Register data width: 0

$ ./ok_test.py 2 counters-xem6310-lx45.bit
Number of devices: 3
Bit file ‘counters-xem6310-lx45.bit’ was successfully loaded.
Device ID: Opal Kelly XEM6310
FPGA board: XEM6310-LX45, XEM6310-LX45
Firmware version: 1.8
HDL version: 1.0
PLL22150 Supported: False
PLL22393 Supported: False
FrontPanel is enabled: True, False
Wire width: 32
Trigger width: 32
Pipe width: 32
Register address width: 32
Register data width: 32[/CODE]

The “okTDeviceInfo.isFrontPanelEnabled” field is returning “False”, while the old API “xem.IsFrontPanelEnabled()” clearly shows that this is not the case.

Also, notice that the HDL version fields are -1 on the XEM3005, I don’t know if they apply.


Hello Marcelo-- Yes, it appears you have found a bug. We’ve fixed this in our API and it will release with the next version of FrontPanel. Thank you!