Skip to main content

SDK for Sci-Compiler generated firmware

Project description

SciSDK: Sci-Compiler Python SDK wrapper

This package will install a wrapper for the Sci-Compiler SDK, the software layer to develop Python application to readout and configure firmware generated by Sci-Compiler

Introduction

The SciSDK is a cross-platform library to write custom control and readout software for Sci-Compiler generated user firmware.

Sci-Compiler is a Nuclear Instruments (http://www.nuclearinstruments.eu) tool to generate FPGA firmware con NI/Caen OpenHardware FPGA (https://www.caen.it/families/open-fpga-digitizers/)

The Sci-Compiler convert a block diagram description of the user firmware is a hardware compatible bitstream managing also the readout of the data from the hardware. This library is intended to be used to write the control and readout software for the user firmware and works only with firmware generated by Sci-Compiler.

Installation

Pre-requisites (Binary files installation)

This library requires that the SciSDK and all hardware related libraries are installed in the system.

The SciSDK can be installed precompiled or compiled from source. Detailed instructions on haw install the SciSDK are explained at this link: SciSDK installation(https://nuclearinstruments.github.io/SCISDK/) The last version of the compiled SciSDK libraries setup are available here: SciSDK setup (https://github.com/NuclearInstruments/SCISDK/releases)

It is also possible to install avoid to install the SciSDK libraries system wide copying all DLL or so in the python script exectuable folder. It that case double check to execute the python.exe command from the folder where the script and all the libraries are located otherwise the script will be unable to locate the required libraries and an exception is rised. While the setup will install in the system folder the SciSDK dll and all the libraries for the supported boards, if manual setup is used, the user must ensure thal all dll are copied in the python script executable folder. For example if the user intent to connecto to the DT1260 on windows system ( Python x64 ) the following libraries are required: SciSDK_DLL.dll SCIDK_Lib.dll ftd2xx64.dll For example if the user intent to connecto to the R5560 on windows system ( Python x64 ) the following libraries are required: SciSDK_DLL.dll R5560_SDKLib.dll libzmq-v140-mt-4_3_4.dll libsodium.dll Please double check the version of python (32 or 64 bit) and use dll/so accordingly.

Python wrapper installation

In order to install the SciSDK python wrapper, just run the following command:

pip install scisdk

Usage

Import the library

Import the library in your python script:

from scisdk.scisdk import SciSDK
from scisdk.scisdk_defines import *

Create the SciSDK object

Create the SciSDK object and pass the connection string and the path to the JSON file:

# initialize scisdk library
sdk = SciSDK()

# add new device

# USB board (DT1260)                usb:10500
# ETHERNET (X556X) board            192.168.90.2:8888
# FELIB based board (CAEN X274x):   10.105.250.18
res = sdk.AddNewDevice("usb:10500","dt1260", "./DT1260RegisterFile.json","board0")
if res != 0:
    print ("Script exit due to connetion error")
    exit()

Readout the data

Please refere to the official documentation (https://nuclearinstruments.github.io/SCISDK/)

Example of readout of the data from the oscilloscope:

res = sdk.SetParameterString("board0:/MMCComponents/Oscilloscope_0.data_processing","decode")
res = sdk.SetParameterInteger("board0:/MMCComponents/Oscilloscope_0.trigger_level", 1000)
res = sdk.SetParameterString("board0:/MMCComponents/Oscilloscope_0.trigger_mode","self")
res = sdk.SetParameterInteger("board0:/MMCComponents/Oscilloscope_0.trigger_channel", 0)
res = sdk.SetParameterInteger("board0:/MMCComponents/Oscilloscope_0.pretrigger", 150)
res = sdk.SetParameterString("board0:/MMCComponents/Oscilloscope_0.acq_mode", "blocking")
res = sdk.SetParameterInteger("board0:/MMCComponents/Oscilloscope_0.timeout", 3000)

res, buf = sdk.AllocateBuffer("board0:/MMCComponents/Oscilloscope_0")

res, buffer = sdk.ReadData("board0:/MMCComponents/Oscilloscope_0", buffer)# read data from board

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

scisdk-2.1.6.tar.gz (9.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

scisdk-2.1.6-py3-none-any.whl (10.4 kB view details)

Uploaded Python 3

File details

Details for the file scisdk-2.1.6.tar.gz.

File metadata

  • Download URL: scisdk-2.1.6.tar.gz
  • Upload date:
  • Size: 9.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for scisdk-2.1.6.tar.gz
Algorithm Hash digest
SHA256 d7744a9ad3567dc2c5e26790043854b4c2eae15706ae1407eb1fac8c5125a302
MD5 74c74a1f1906d2899b94c469716eff8a
BLAKE2b-256 3b0ef66d5c9432f507a1e96bfd23d63f7ab17c3f8fdfdeba7e32d2f3a0bd9d2a

See more details on using hashes here.

File details

Details for the file scisdk-2.1.6-py3-none-any.whl.

File metadata

  • Download URL: scisdk-2.1.6-py3-none-any.whl
  • Upload date:
  • Size: 10.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for scisdk-2.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 e6753b38c6bd25201d0e4ab491d5bdc6de33e19e1a2cd7698e331fe87db57666
MD5 ef972efe57f55062ab5632886ca43668
BLAKE2b-256 7780d06afbd6f4e3401e65d4cef9639f21b2fb8ef5c074b16265446422753736

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page