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"FPGA 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 Distribution

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

ikalogic_sp1000g-0.1.4-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.4-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for ikalogic_sp1000g-0.1.4-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 32c67b72725ea7d2caa99f7e30418c2e2b9480288c0054d904541d73607dbcc9
MD5 cdf455021b68299e456ce5a3d4113398
BLAKE2b-256 ea088e4d9177d62d9d50f1697fb277a521c44a5f1a93a64b05168540ce5bdf4b

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