Skip to main content

Python bindings for SP1000G Logic Analyzer API

Project description

Ikalogic SP1000G Python Bindings

Python bindings for the Ikalogic SP1000G series logic analyzers (SP1018G, SP1054G, SP1108G).

Installation

pip install ikalogic-sp1000g

Quick Start

from ikalogic import sp1000g

# Create API instance
api = sp1000g.SP1000G(sp1000g.Model.SP1054G)

# Find and open device
api.create_device_list()
count = api.get_devices_count()
print(f"Found {count} device(s)")

if count > 0:
    api.device_open_first()
    
    # Get firmware version
    fpga_ver = f"{api.get_fpga_version_major()}.{api.get_fpga_version_minor()}"
    print(f"Firmware version: {fpga_ver}")
    
    api.device_close()

Supported Devices

  • SP1018G: 18 channels, 1 GHz sampling
  • SP1036G: 36 channels, 1 GHz sampling
  • SP1054G: 54 channels, 1 GHz sampling

Basic Usage

Device Management

# Create device list
api.create_device_list()

# Get number of devices
count = api.get_devices_count()

# Get device info
for i in range(count):
    desc = api.get_device_descriptor(i)
    print(f"Device {i}: {desc.serial_number}")

# Open device
api.device_open_first()  # or api.device_open(index)

# Check if open
if api.get_device_open_flag():
    print("Device is open")

# Close device
api.device_close()

Capture Configuration

# Create settings
settings = sp1000g.Settings()
settings.sampling_depth = 1000000      # Total samples
settings.post_trig_depth = 900000      # Samples after trigger
settings.s_clk = 250000000             # 250 MHz sampling

# Set thresholds (mV) - one per channel
settings.thresh_capture_mv = [1650] * 18  # For SP1018G

# Apply settings
api.apply_settings(settings)

Triggering

# Simple trigger
trigger = sp1000g.TriggerDescription()
trigger.type = sp1000g.TriggerType.TRG_RISING
trigger.channel = 0

api.launch_new_capture_simple_trigger(trigger, settings, 0, True, 0, 0, 0)

# Wait for capture
while not api.is_capture_complete():
    time.sleep(0.1)

Reading Data

# Reset transition iterator
api.trs_reset(0)

# Read transitions
while api.trs_is_not_last(0):
    trs = api.trs_get_next(0)
    print(f"Sample {trs.sample_index}: Channel {trs.channel} = {trs.value}")

API Reference

Classes

  • SP1000G(model) - Main API class
  • Settings - Capture configuration
  • TriggerDescription - Trigger configuration
  • DeviceDescriptor - Device information
  • Transition - Signal transition data

Enums

  • Model - Device models (SP1018G, SP1054G, SP1108G)
  • TriggerType - Trigger types (RISING, FALLING, ANY_EDGE, etc.)
  • DeviceState - Device states

Requirements

  • Python 3.7+
  • Linux x86_64
  • libusb-1.0 (usually pre-installed)
  • libudev (usually pre-installed)

License

See LICENSE file for details.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

ikalogic_sp1000g-0.1.14-cp312-cp312-win_amd64.whl (1.4 MB view details)

Uploaded CPython 3.12Windows x86-64

File details

Details for the file ikalogic_sp1000g-0.1.14-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for ikalogic_sp1000g-0.1.14-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 7aca4262f81226f71669b9c7c0ca6028e85fe1fd5bae6ed3e69d506f59bce7d6
MD5 01cb689fd8dc031dbb2e3bb1b5de542a
BLAKE2b-256 9d2db745ceed8743cc0caf37834363983040972c63ef403c3b850ec94270f1fe

See more details on using hashes here.

File details

Details for the file ikalogic_sp1000g-0.1.14-cp312-cp312-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ikalogic_sp1000g-0.1.14-cp312-cp312-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 60f2e3b4ec782c32d0dd8ebfabca37b318cada41e0c3eda463f2a64d51f8000e
MD5 5b4c5d65cba63acc6c52fd5de3e1c7c2
BLAKE2b-256 035b5472dc5bb44049edb33f75e160048e2f6fe3f86a502836e1b840acb02369

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