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 classSettings- Capture configurationTriggerDescription- Trigger configurationDeviceDescriptor- Device informationTransition- 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
Release history Release notifications | RSS feed
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ikalogic_sp1000g-0.1.6-cp312-cp312-win_amd64.whl.
File metadata
- Download URL: ikalogic_sp1000g-0.1.6-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 1.4 MB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
682e6c511b381cc2e94ecf8c4db69874725dd6f4adb0c5018c98556c55b2fbce
|
|
| MD5 |
8db61d714a259dd79355b601a77ab6f6
|
|
| BLAKE2b-256 |
7888846a2e7d14a2f0faccda76fd6f8cb2e380e72760d574bd687fef5f260ba0
|