iRiser Power Measurement
iRiser5 can capture high-rate power samples through a DMA engine and the iriser system
service. OCP Group 6 power verification tests (idle, peak, maximum average) use this API.
Requirements
iRiser5 hardware with power measurement rails connected
iriserDMA power service running (see Power DMA service below)EDSFF form-factor systems typically use the
12Vrail; M.2 systems may use3.3Vpaand1.8Vpawhen available
M.2 slots without power measurement hardware should skip power tests (see adaptation
FORM_FACTOR in test scripts).
Power rails
Device |
Description |
|---|---|
|
EDSFF 12.0 V, 20-bit A/D (precision) |
|
EDSFF 3.3 V aux, 20-bit A/D (precision) |
``3.3Vpa``| M.2 3.3 V, 20-bit A/D (precision) |
|
``1.8Vpa``| M.2 1.8 V, 20-bit A/D (precision) |
|
|
EDSFF 12.0 V, 12-bit A/D (speed) — common in OCP tests |
|
EDSFF 3.3 V aux, 12-bit A/D (speed) |
Query available rails on a slot:
from sanblaze import riser
from sanblaze.sanblaze_test_api_util import check_result, get_slot
iriser = riser.Riser(get_slot(dut))
result = iriser.get_power_available()
print(result['power_devices'])
Check that power measurement is supported before starting a test:
power_devices = ['12V']
result = iriser.compare_power_available(power_devices)
check_result(result)
compare_power_available verifies that all requested rails appear in
get_power_available() and returns the
confirmed list on success.
Power DMA service
start_collect_power() calls
verify_service_status() internally. If the DMA
service is not running, the API attempts systemctl start iriser.
Verify manually when troubleshooting:
result = iriser.verify_service_status()
print(result)
Typical workflow
Confirm hardware support (
compare_power_available)Start capture (
start_collect_power)Wait for recording to finish (
verify_recording_state)Read sample count (
get_result_record_count)Retrieve data in chunks (
get_all_data_chunk)Analyze with sliding-window helpers
Idle power example (count-based)
Collect 30 samples at 1 s intervals, as used in
DSSD_26_Idle_Power_Verification_Test_Case.py:
from sanblaze import riser
from sanblaze.sanblaze_test_api_util import check_result, get_slot
iriser = riser.Riser(get_slot(dut))
power_devices = ['12V']
dir_name = 'idle_power_ps0'
check_result(iriser.compare_power_available(power_devices))
result = iriser.start_collect_power(
dir_name=dir_name,
samples='1s',
count=30,
power_devices=power_devices,
log=False,
)
check_result(result)
result = iriser.verify_recording_state(dir_name)
check_result(result)
for device in power_devices:
result = iriser.get_all_data_chunk(dir_name, device, 0, 29)
check_result(result)
power_mw = result['power_data'] # numpy array, milliwatts
power_w = power_mw / 1000.0
Peak power example (duration-based)
Capture at 4 µs sample period for a test interval, as used in
DSSD_26_Peak_Power_Verification_Test_Case.py:
pwr_cap_int_s = 300 # seconds, from adaptation PWR_CAP_PER * 60
dir_name = 'peak_power_seq_read_ps0'
result = iriser.start_collect_power(
dir_name=dir_name,
samples='4us',
duration=f'{pwr_cap_int_s}s',
power_devices=['12V'],
log=False,
)
check_result(result)
check_result(iriser.verify_recording_state(dir_name))
result = iriser.get_result_record_count(dir_name, '12V')
check_result(result)
total_samples = result['record_count']
chunk_size = 10_000_000
for start in range(0, total_samples, chunk_size):
end = min(start + chunk_size - 1, total_samples - 1)
result = iriser.get_all_data_chunk(dir_name, '12V', start, end)
check_result(result)
power_w = result['power_data'] / 1000.0
API reference
start_collect_power
Starts DMA power capture and blocks until the estimated collection time elapses.
Parameters:
dir_name— recording directory name (overwrites prior recording with same name)samples— sample period string, e.g.'4us','1s'duration— total capture time, e.g.'300s'(mutually exclusive withcount)count— number of samples to collect (mutually exclusive withduration)power_devices— list of rail names; defaults to all available rails
CLI equivalent:
iRiser -d <slot> start power <dir_name> <devices> <samples> <duration>
iRiser -d 1 start power testcapture 12V 4us 300s
verify_recording_state
Polls until all devices in the recording report state Complete, or returns an error if
a device reports Aborted.
get_result_record_count
Returns record_count for a device within a recording directory.
get_all_data_chunk
Returns a 1-D NumPy array of Pbus(mW) values for sample indices start through
end (inclusive, zero-based). Use chunked reads for large recordings to limit memory use.
get_sliding_window_sum / get_sliding_window_max
Analyze captured power arrays:
get_sliding_window_sum(data, window_size)— sum of power in each window (peak tests use this for 100 µs windows at 4 µs sample rate withwindow_size=25)get_sliding_window_max(data, window_size)— maximum sample in each window
stop_collect_power
Stops an in-progress capture:
iriser.stop_collect_power()
Instantaneous power reading
For a single-point reading (not DMA capture), use get_power():
result = iriser.get_power()
print(result['power'], result['units'])
Troubleshooting
Symptom |
Action |
|---|---|
|
Confirm EDSFF iRiser slot; check cabling |
Service not running |
|
Recording |
Retry capture; check |
Empty |
Verify |
See iRiser FAQ and iRiser API for additional detail.