scisdk


Namescisdk JSON
Version 1.1 PyPI version JSON
download
home_pageNone
SummarySDK for SciCompiler generated firmware
upload_time2024-03-21 10:23:27
maintainerNone
docs_urlNone
authorNone
requires_python>=3.5
licenseNone
keywords caen nuclear instruments scicompiler firmware fpga
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            #SciSDK: SciCompiler Python SDK wrapper

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

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

SciCompiler 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 SciCompiler 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 SciCompiler.


## 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:

```bash
pip install scisdk
```

## Usage

### Import the library

Import the library in your python script:

```python
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:

```python   

# 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:

```python
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

```




            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "scisdk",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.5",
    "maintainer_email": null,
    "keywords": "CAEN, Nuclear Instruments, SciCompiler, firmware, fpga",
    "author": null,
    "author_email": "Andrea Abba <abba@nuclearinstruments.eu>",
    "download_url": "https://files.pythonhosted.org/packages/60/b3/39dccacbe53af7238f57cf1428377c30b3b95c20077f4a8ec861aae7a7ea/scisdk-1.1.tar.gz",
    "platform": null,
    "description": "#SciSDK: SciCompiler Python SDK wrapper\n\nThis package will install a wrapper for the SciCompiler SDK, the software layer to develop Python application to readout and configure firmware generated by SciCompiler\n\n## Introduction\nThe SciSDK is a cross-platform library to write custom control and readout software for SciCompiler generated user firmware.\n\nSciCompiler 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/)\n\nThe SciCompiler 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 SciCompiler.\n\n\n## Installation\n\n### Pre-requisites (Binary files installation)\n\n**This library requires that the SciSDK and all hardware related libraries are installed in the system.**\n\nThe SciSDK can be installed precompiled or compiled from source.\nDetailed instructions on haw install the SciSDK are explained at this link: SciSDK installation(https://nuclearinstruments.github.io/SCISDK/)\nThe last version of the compiled SciSDK libraries setup are available here: SciSDK setup (https://github.com/NuclearInstruments/SCISDK/releases)\n\nIt 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.\nWhile 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. \nFor 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\nFor 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\nPlease double check the version of python (32 or 64 bit) and use dll/so accordingly.\n\n### Python wrapper installation\nIn order to install the SciSDK python wrapper, just run the following command:\n\n```bash\npip install scisdk\n```\n\n## Usage\n\n### Import the library\n\nImport the library in your python script:\n\n```python\nfrom scisdk.scisdk import SciSDK\nfrom scisdk.scisdk_defines import *\n```\n\n### Create the SciSDK object\n\nCreate the SciSDK object and pass the connection string and the path to the JSON file:\n\n```python   \n\n# initialize scisdk library\nsdk = SciSDK()\n\n# add new device\n\n# USB board (DT1260)                usb:10500\n# ETHERNET (X556X) board            192.168.90.2:8888\n# FELIB based board (CAEN X274x):   10.105.250.18\nres = sdk.AddNewDevice(\"usb:10500\",\"dt1260\", \"./DT1260RegisterFile.json\",\"board0\")\nif res != 0:\n    print (\"Script exit due to connetion error\")\n    exit()\n\n```\n\n### Readout the data\nPlease refere to the official documentation (https://nuclearinstruments.github.io/SCISDK/)\n\nExample of readout of the data from the oscilloscope:\n\n```python\nres = sdk.SetParameterString(\"board0:/MMCComponents/Oscilloscope_0.data_processing\",\"decode\")\nres = sdk.SetParameterInteger(\"board0:/MMCComponents/Oscilloscope_0.trigger_level\", 1000)\nres = sdk.SetParameterString(\"board0:/MMCComponents/Oscilloscope_0.trigger_mode\",\"self\")\nres = sdk.SetParameterInteger(\"board0:/MMCComponents/Oscilloscope_0.trigger_channel\", 0)\nres = sdk.SetParameterInteger(\"board0:/MMCComponents/Oscilloscope_0.pretrigger\", 150)\nres = sdk.SetParameterString(\"board0:/MMCComponents/Oscilloscope_0.acq_mode\", \"blocking\")\nres = sdk.SetParameterInteger(\"board0:/MMCComponents/Oscilloscope_0.timeout\", 3000)\n\nres, buf = sdk.AllocateBuffer(\"board0:/MMCComponents/Oscilloscope_0\")\n\nres, buffer = sdk.ReadData(\"board0:/MMCComponents/Oscilloscope_0\", buffer)# read data from board\n\n```\n\n\n\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "SDK for SciCompiler generated firmware",
    "version": "1.1",
    "project_urls": {
        "Bug Tracker": "https://github.com/NuclearInstruments/SCISDK/issues",
        "Homepage": "https://github.com/NuclearInstruments/SCISDK"
    },
    "split_keywords": [
        "caen",
        " nuclear instruments",
        " scicompiler",
        " firmware",
        " fpga"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "24ec4fcdbeeafdd99c62196354080674ecdcc317fb2fccb37945a07eeb275c88",
                "md5": "e737bab169c8c837c8544567519c4912",
                "sha256": "a1660b98ad4354fdbd1cc03c2f465be2ea6b28e5b8d3c3457283dc31e414228e"
            },
            "downloads": -1,
            "filename": "scisdk-1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e737bab169c8c837c8544567519c4912",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.5",
            "size": 8635,
            "upload_time": "2024-03-21T10:23:26",
            "upload_time_iso_8601": "2024-03-21T10:23:26.546622Z",
            "url": "https://files.pythonhosted.org/packages/24/ec/4fcdbeeafdd99c62196354080674ecdcc317fb2fccb37945a07eeb275c88/scisdk-1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "60b339dccacbe53af7238f57cf1428377c30b3b95c20077f4a8ec861aae7a7ea",
                "md5": "d4e9e71427aa8b07bb1cf6ac443c5fed",
                "sha256": "d383d5e01eae6d8976ee6c0ced8bae04324d2d44da0587ba3103c4382e59e240"
            },
            "downloads": -1,
            "filename": "scisdk-1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "d4e9e71427aa8b07bb1cf6ac443c5fed",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.5",
            "size": 7860,
            "upload_time": "2024-03-21T10:23:27",
            "upload_time_iso_8601": "2024-03-21T10:23:27.683465Z",
            "url": "https://files.pythonhosted.org/packages/60/b3/39dccacbe53af7238f57cf1428377c30b3b95c20077f4a8ec861aae7a7ea/scisdk-1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-21 10:23:27",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "NuclearInstruments",
    "github_project": "SCISDK",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "scisdk"
}
        
Elapsed time: 0.22816s