embeddedci 0.2.2__tar.gz → 2.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- embeddedci-2.0.0/.gitignore +20 -0
- embeddedci-2.0.0/CHANGELOG.md +167 -0
- embeddedci-2.0.0/LICENSE +202 -0
- embeddedci-2.0.0/PKG-INFO +1221 -0
- embeddedci-2.0.0/README.md +1183 -0
- {embeddedci-0.2.2 → embeddedci-2.0.0}/docs/event-uart-design.md +33 -27
- embeddedci-2.0.0/examples/README.md +83 -0
- embeddedci-2.0.0/examples/test_bmp280.py +135 -0
- {embeddedci-0.2.2 → embeddedci-2.0.0}/pyproject.toml +21 -8
- embeddedci-2.0.0/src/embeddedci/benchpod/__init__.py +251 -0
- embeddedci-2.0.0/src/embeddedci/benchpod/can.py +274 -0
- embeddedci-2.0.0/src/embeddedci/benchpod/capabilities.py +318 -0
- embeddedci-2.0.0/src/embeddedci/benchpod/capture.py +255 -0
- embeddedci-2.0.0/src/embeddedci/benchpod/ci.py +302 -0
- embeddedci-2.0.0/src/embeddedci/benchpod/client.py +1651 -0
- {embeddedci-0.2.2 → embeddedci-2.0.0}/src/embeddedci/benchpod/cloud_auth.py +59 -6
- {embeddedci-0.2.2 → embeddedci-2.0.0}/src/embeddedci/benchpod/connection.py +37 -4
- embeddedci-2.0.0/src/embeddedci/benchpod/constants.py +173 -0
- embeddedci-2.0.0/src/embeddedci/benchpod/control_loop.py +317 -0
- embeddedci-2.0.0/src/embeddedci/benchpod/decode.py +258 -0
- embeddedci-2.0.0/src/embeddedci/benchpod/discovery.py +101 -0
- embeddedci-2.0.0/src/embeddedci/benchpod/dsp.py +281 -0
- embeddedci-2.0.0/src/embeddedci/benchpod/errors.py +135 -0
- {embeddedci-0.2.2 → embeddedci-2.0.0}/src/embeddedci/benchpod/flash.py +21 -12
- embeddedci-2.0.0/src/embeddedci/benchpod/gpio.py +146 -0
- {embeddedci-0.2.2 → embeddedci-2.0.0}/src/embeddedci/benchpod/i2c.py +17 -0
- embeddedci-2.0.0/src/embeddedci/benchpod/lease.py +185 -0
- embeddedci-2.0.0/src/embeddedci/benchpod/lowlevel.py +96 -0
- embeddedci-2.0.0/src/embeddedci/benchpod/power.py +149 -0
- embeddedci-2.0.0/src/embeddedci/benchpod/pytest_plugin.py +541 -0
- embeddedci-2.0.0/src/embeddedci/benchpod/replay.py +142 -0
- embeddedci-2.0.0/src/embeddedci/benchpod/results.py +320 -0
- {embeddedci-0.2.2 → embeddedci-2.0.0}/src/embeddedci/benchpod/sensor.py +13 -8
- embeddedci-2.0.0/src/embeddedci/benchpod/server_api.py +193 -0
- embeddedci-2.0.0/src/embeddedci/benchpod/state.py +304 -0
- {embeddedci-0.2.2 → embeddedci-2.0.0}/src/embeddedci/benchpod/transport/__init__.py +4 -1
- {embeddedci-0.2.2 → embeddedci-2.0.0}/src/embeddedci/benchpod/transport/base.py +15 -14
- {embeddedci-0.2.2 → embeddedci-2.0.0}/src/embeddedci/benchpod/transport/cloud.py +14 -2
- embeddedci-2.0.0/src/embeddedci/benchpod/transport/serial.py +596 -0
- {embeddedci-0.2.2 → embeddedci-2.0.0}/src/embeddedci/benchpod/transport/tcp.py +76 -18
- {embeddedci-0.2.2 → embeddedci-2.0.0}/src/embeddedci/benchpod/uart.py +87 -61
- embeddedci-2.0.0/src/embeddedci/benchpod/waveforms.py +165 -0
- embeddedci-2.0.0/src/embeddedci/benchpod/wiring.py +338 -0
- embeddedci-2.0.0/src/embeddedci/upload_build.py +174 -0
- embeddedci-2.0.0/tests/api_surface.json +870 -0
- embeddedci-2.0.0/tests/conftest.py +24 -0
- embeddedci-2.0.0/tests/e2e/README.md +53 -0
- embeddedci-2.0.0/tests/e2e/conftest.py +129 -0
- embeddedci-2.0.0/tests/e2e/e2e_helpers.py +92 -0
- embeddedci-2.0.0/tests/e2e/test_e2e_cloud.py +66 -0
- embeddedci-2.0.0/tests/e2e/test_e2e_dut.py +234 -0
- embeddedci-2.0.0/tests/e2e/test_e2e_gpio.py +225 -0
- embeddedci-2.0.0/tests/e2e/test_e2e_pod.py +480 -0
- embeddedci-2.0.0/tests/e2e/test_e2e_usb.py +70 -0
- {embeddedci-0.2.2 → embeddedci-2.0.0}/tests/examples/test_bmp280_hil.py +35 -21
- embeddedci-2.0.0/tests/examples/test_can_ecu_demo.py +138 -0
- embeddedci-2.0.0/tests/examples/test_can_loopback_hil.py +91 -0
- embeddedci-2.0.0/tests/examples/test_smoke.py +124 -0
- embeddedci-2.0.0/tests/test_adc_fft_hw.py +72 -0
- embeddedci-2.0.0/tests/test_api_surface.py +80 -0
- embeddedci-2.0.0/tests/test_can.py +300 -0
- embeddedci-2.0.0/tests/test_capabilities.py +65 -0
- embeddedci-2.0.0/tests/test_capture.py +142 -0
- embeddedci-2.0.0/tests/test_capture_replay_hw.py +74 -0
- embeddedci-2.0.0/tests/test_ci.py +92 -0
- embeddedci-2.0.0/tests/test_client_v2.py +326 -0
- {embeddedci-0.2.2 → embeddedci-2.0.0}/tests/test_cloud.py +5 -5
- embeddedci-2.0.0/tests/test_connection.py +96 -0
- embeddedci-2.0.0/tests/test_control_loop.py +394 -0
- embeddedci-2.0.0/tests/test_control_loop_hw.py +82 -0
- embeddedci-2.0.0/tests/test_dac_path_ranges.py +76 -0
- embeddedci-2.0.0/tests/test_decode.py +97 -0
- embeddedci-2.0.0/tests/test_dsp.py +114 -0
- embeddedci-2.0.0/tests/test_gpio.py +238 -0
- embeddedci-2.0.0/tests/test_i2c_parity.py +89 -0
- embeddedci-2.0.0/tests/test_image_switching.py +231 -0
- {embeddedci-0.2.2 → embeddedci-2.0.0}/tests/test_integration.py +1 -1
- embeddedci-2.0.0/tests/test_la_voltage_fixture.py +56 -0
- embeddedci-2.0.0/tests/test_lease.py +71 -0
- embeddedci-2.0.0/tests/test_pins_bias.py +41 -0
- {embeddedci-0.2.2 → embeddedci-2.0.0}/tests/test_protocol.py +2 -2
- embeddedci-2.0.0/tests/test_replay.py +122 -0
- embeddedci-2.0.0/tests/test_serial_autodetect.py +126 -0
- {embeddedci-0.2.2 → embeddedci-2.0.0}/tests/test_serial_json.py +16 -10
- embeddedci-2.0.0/tests/test_serial_text_console.py +136 -0
- {embeddedci-0.2.2 → embeddedci-2.0.0}/tests/test_tcp_transport.py +30 -7
- embeddedci-2.0.0/tests/test_timing.py +99 -0
- embeddedci-2.0.0/tests/test_trigger_power.py +176 -0
- {embeddedci-0.2.2 → embeddedci-2.0.0}/tests/test_uart_session.py +61 -18
- embeddedci-2.0.0/tests/test_upload_build.py +185 -0
- embeddedci-2.0.0/tests/test_waveforms.py +104 -0
- embeddedci-2.0.0/tests/test_wiring.py +229 -0
- embeddedci-2.0.0/tests/testdata/i2c_decode_vectors.json +332 -0
- embeddedci-0.2.2/.gitignore +0 -13
- embeddedci-0.2.2/PKG-INFO +0 -333
- embeddedci-0.2.2/README.md +0 -303
- embeddedci-0.2.2/examples/README.md +0 -57
- embeddedci-0.2.2/examples/test_bmp280.py +0 -97
- embeddedci-0.2.2/src/embeddedci/benchpod/__init__.py +0 -98
- embeddedci-0.2.2/src/embeddedci/benchpod/client.py +0 -355
- embeddedci-0.2.2/src/embeddedci/benchpod/constants.py +0 -95
- embeddedci-0.2.2/src/embeddedci/benchpod/errors.py +0 -61
- embeddedci-0.2.2/src/embeddedci/benchpod/pytest_plugin.py +0 -189
- embeddedci-0.2.2/src/embeddedci/benchpod/transport/serial.py +0 -352
- embeddedci-0.2.2/tests/conftest.py +0 -9
- embeddedci-0.2.2/tests/examples/test_smoke.py +0 -49
- embeddedci-0.2.2/tests/test_connection.py +0 -54
- {embeddedci-0.2.2 → embeddedci-2.0.0}/src/embeddedci/__init__.py +0 -0
- {embeddedci-0.2.2 → embeddedci-2.0.0}/src/embeddedci/benchpod/protocol.py +0 -0
- {embeddedci-0.2.2 → embeddedci-2.0.0}/src/embeddedci/py.typed +0 -0
- {embeddedci-0.2.2 → embeddedci-2.0.0}/tests/test_flash_bridge.py +0 -0
- {embeddedci-0.2.2 → embeddedci-2.0.0}/tests/test_i2c_decode.py +0 -0
- {embeddedci-0.2.2 → embeddedci-2.0.0}/tests/test_sensor.py +0 -0
- {embeddedci-0.2.2 → embeddedci-2.0.0}/tests/test_timed_power.py +0 -0
- {embeddedci-0.2.2 → embeddedci-2.0.0}/tests/test_uart_capture.py +0 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*.egg-info/
|
|
5
|
+
.pytest_cache/
|
|
6
|
+
|
|
7
|
+
# Build artifacts
|
|
8
|
+
build/
|
|
9
|
+
dist/
|
|
10
|
+
|
|
11
|
+
# Virtualenvs
|
|
12
|
+
.venv/
|
|
13
|
+
venv/
|
|
14
|
+
|
|
15
|
+
# ADC FFT capture outputs (scripts/adc_fft_capture.py)
|
|
16
|
+
adc_capture_*.csv
|
|
17
|
+
adc_capture_*.json
|
|
18
|
+
adc_capture_*.png
|
|
19
|
+
|
|
20
|
+
.DS_Store
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
# Changelog — `embeddedci`
|
|
2
|
+
|
|
3
|
+
## 2.0.0 — the frozen API
|
|
4
|
+
|
|
5
|
+
2.0.0 is the first release with a stability promise. Everything in
|
|
6
|
+
`embeddedci.benchpod.__all__` follows [semantic versioning](https://semver.org): within 2.x
|
|
7
|
+
names and signatures only grow, never break. `tests/api_surface.json` snapshots that surface and
|
|
8
|
+
CI fails on any unreviewed change. `BenchPod.command()`, `BenchPod.transport` and
|
|
9
|
+
`BenchPod.lowlevel` are escape hatches **outside** the promise.
|
|
10
|
+
|
|
11
|
+
### Conventions (apply everywhere)
|
|
12
|
+
|
|
13
|
+
- **Units are volts, seconds and hertz.** `sample_rate_mhz` → `sample_rate_hz`, `*_us`/`*_ms`
|
|
14
|
+
arguments → seconds, millivolt/microamp readings → volts/amps.
|
|
15
|
+
- **Invalid arguments raise `ValueError`.** `BenchPodError` (and subclasses) now means a device,
|
|
16
|
+
transport or server failure only.
|
|
17
|
+
- **Device state is typed.** Methods that returned raw firmware dicts return frozen dataclasses
|
|
18
|
+
from `embeddedci.benchpod.state` (each keeps the untouched reply in `.raw`).
|
|
19
|
+
- **String options are `Literal` types** (`DacPath`, `AnalogPath`, `AdcSource`, `LoopSource`,
|
|
20
|
+
`Waveshape`, `ReplayMapping`, `DecodeProtocol`, `CanMode`, `FaultType`) and are validated.
|
|
21
|
+
- Python **3.10+** (3.9 is end-of-life).
|
|
22
|
+
|
|
23
|
+
### Migration table
|
|
24
|
+
|
|
25
|
+
| 1.x / 0.x | 2.0 |
|
|
26
|
+
| --- | --- |
|
|
27
|
+
| **Connection** | |
|
|
28
|
+
| `bp = BenchPod(conn); bp.set_la_voltage(3.3)` | `BenchPod(conn, la_voltage=3.3)` (or `BENCHPOD_LA_VOLTAGE=3.3`) |
|
|
29
|
+
| pytest: `--benchpod-la-voltage 3.3` on every run | override the `benchpod_la_voltage` fixture once in `conftest.py` (the flag remains a per-run override) |
|
|
30
|
+
| `status()` returned text over serial | `status()` is a dict on every transport |
|
|
31
|
+
| `transport.set_la_voltage(mv)` / `get_la_voltage()` | removed — use `BenchPod.set_la_voltage` / `get_la_voltage` |
|
|
32
|
+
| **LA voltage** | |
|
|
33
|
+
| `set_la_voltage(3300)` (millivolts accepted) | `set_la_voltage(3.3)` — volts only |
|
|
34
|
+
| `set_la_voltage(...)` / `get_la_voltage()` → `{"mv", "st"}` | → `LaVoltage(voltage, readback)`; `voltage is None` until selected |
|
|
35
|
+
| **Power** | |
|
|
36
|
+
| `power_status()` → `{"internal": {"bus_mv", "current_ua"}, …}` | → `PowerStatus`: `.rail(1).bus_voltage` (V), `.current` (A) |
|
|
37
|
+
| `command({"cmd": "target_status"})` | `target_status()` → `TargetStatus`: `.efuse(1).fault` |
|
|
38
|
+
| — | new: `reset_target(pulse=0.1)`, `set_reset(asserted)`, `reset_state()`, `usb_cc()` |
|
|
39
|
+
| **Bias resistors** | |
|
|
40
|
+
| `pullup(la, on=True/False)` | `set_pull(la, enabled)` → `PullState` |
|
|
41
|
+
| `pullup(la)` (query) | `pull_state(la)` → `PullState(enabled, direction, ohms)` |
|
|
42
|
+
| `pullup_status()` → `{"la_pullup_mask"}` | `enabled_pulls()` → `[1, 2]` |
|
|
43
|
+
| `enable_pullup(7)` silently engaged a pull-**down** | raises `ValueError`; use `enable_pulldown(7)` / `disable_pulldown(7)` |
|
|
44
|
+
| **Flash** | |
|
|
45
|
+
| `flash(nreset=PIN3)` — an LA channel wired to the target's NRST | `flash(nreset=True)` — NRST wired to the pod's own reset pin (DUT header J1 pin 22, rev3 pods) |
|
|
46
|
+
| **Emulated I2C sensor** | |
|
|
47
|
+
| `i2c_sensor_la_decoded(samples, sample_rate_mhz)` | `i2c_sensor_capture(samples, *, sample_rate_hz)` |
|
|
48
|
+
| `i2c_sensor_la(...)` (raw packed bytes) | removed — `i2c_sensor_capture` decodes |
|
|
49
|
+
| `i2c_sensor_regs(start, length)` | `i2c_sensor_regs(*, start, length)` |
|
|
50
|
+
| **Analog** | |
|
|
51
|
+
| `analog_path("5v")`, `("ext")`, `("sma")` aliases | canonical names only: `"dac_5v"`, `"adc_ext"`; returns `AnalogPathState` |
|
|
52
|
+
| `dac_output(path, volts)` → `{"path", "mv", "code"}` | `dac_output(path, *, volts=)` → `DacOutput(path, voltage, code)` |
|
|
53
|
+
| `adc_read(source)` → `{"source", "mv", "count"}` | → `AdcReading(source, voltage, count, span)` |
|
|
54
|
+
| `measure_volts(source)` | `adc_read(source).voltage` |
|
|
55
|
+
| `route_dac_to_adc("5v")` / `("12v")` | `analog_path("cal1")` / `analog_path("cal2")` |
|
|
56
|
+
| `adc_from_sma()` | `analog_path("adc_ext")` |
|
|
57
|
+
| `dac_mux`, `dac_mux_status`, `cal_switch`, `cal_switch_status` | `bp.lowlevel.dac_mux(...)` etc. (outside the stability promise) |
|
|
58
|
+
| `dac_set(value, channel=)` (`channel` was ignored) | `bp.lowlevel.dac_set(code, divider=)` |
|
|
59
|
+
| **Captures** | |
|
|
60
|
+
| `capture(samples, sample_rate_mhz=)` → raw `List[int]` | `capture_adc(samples).counts` |
|
|
61
|
+
| `scope_capture(samples, *, sample_rate_mhz, source)` | `capture_adc(samples, *, sample_rate_hz, source)` — `source` now actually routes the ADC; default 4096 samples; above 32768 it streams from PSRAM |
|
|
62
|
+
| `capture_la(n, *, sample_rate_mhz, stop_dac_after_us)` | `capture_la(n, *, sample_rate_hz, stop_dac_after)` (seconds) |
|
|
63
|
+
| `capture_analog(adc_samples, adc_rate_mhz, la_samples, la_rate_mhz, stop_dac_after_us)` | `capture_correlated(adc_samples, adc_sample_rate_hz, la_samples, la_sample_rate_hz, stop_dac_after)` |
|
|
64
|
+
| `AnalogCapture` | `CorrelatedCapture` |
|
|
65
|
+
| `Capture.duration_s`, `LaCapture.duration_s` | `.duration` |
|
|
66
|
+
| `LaCapture.decode_i2c(sda=, scl=)` | `LaCapture.decode("i2c", sda=, scl=)` |
|
|
67
|
+
| **DAC** | |
|
|
68
|
+
| `generate(w, *, freq, amplitude, offset=0.0, duration_ms, sample_rate_mhz)` — amplitude/offset were firmware 8-bit **codes**, offset defaulted to code 0 | `generate(w, *, freq_hz, amplitude, offset=None, dac_path="5v", duration, sample_rate_hz)` — **volts**; offset defaults to mid-range; routes `dac_path`; returns a `DacHandle` |
|
|
69
|
+
| `replay(..., sample_rate_mhz=)` | `replay(..., sample_rate_hz=)` (defaults to a `Capture`'s own rate) |
|
|
70
|
+
| `replaying(...)` | `replay(...)` (already a context manager) |
|
|
71
|
+
| `replay_waveform(waveform_id="…")` | `replay_waveform("…")` (positional id or `Waveform`) |
|
|
72
|
+
| `replay_waveform(..., dac_path="5v")` default | `dac_path=None` → the waveform's own path (else `5v`), used for both routing and scaling |
|
|
73
|
+
| `Segment(shape, duration_ms, v_start, v_end)` | `Segment(shape, duration, v_start, v_end)` — `duration` in seconds |
|
|
74
|
+
| `dac_stop()` / `ReplayHandle.stop()` returned the reply | return `None` |
|
|
75
|
+
| **UART** | |
|
|
76
|
+
| `UartSession.read(timeout=)` returned everything received so far | returns the output since the last read and marks it read (everything received is `.text`) |
|
|
77
|
+
| `UartSession.drain()` | `read()` |
|
|
78
|
+
| `UartSession.read_until` / `expect` searched everything ever received and consumed nothing; both returned the match | both search the unread output and mark it read up to the end of the match; `read_until` returns that output (or `None`), `expect` returns the match (`re.Match` for a regex) |
|
|
79
|
+
| **Control loop** | |
|
|
80
|
+
| `loop_input(...)` → dict | → `LoopState(source, input_code, step, output_code)` |
|
|
81
|
+
| `ControlLoopHandle.set_input(...)` → dict | → `LoopState` |
|
|
82
|
+
| `IVPoint.current_code`, `IVPoint.voltage_code` | `IVPoint.i`, `IVPoint.v` |
|
|
83
|
+
| `fpga_image(0)` → dict | `fpga_image(FpgaImage.LOOP)` → `FpgaImageInfo(image, version, features)` |
|
|
84
|
+
| **CAN** | |
|
|
85
|
+
| `can_read(max=8)` → `{"frames", "overflow"}` | `can_read(max_frames=8)` → `CanReadResult(frames: List[CanFrame], overflow)` |
|
|
86
|
+
| `CanBus.read(max=8)` | `CanBus.read(max_frames=8)` |
|
|
87
|
+
| **Stepper** | |
|
|
88
|
+
| `la_step(la, steps, delay_us, dir_la, direction)` | `la_step(la, *, steps, delay, dir_la=None, direction=0)` — `delay` in seconds |
|
|
89
|
+
| **Errors** | |
|
|
90
|
+
| `coerce_pin` / `coerce_efuse` / decoder and flash argument checks raised `BenchPodError` / `FlashError` | raise `ValueError` |
|
|
91
|
+
|
|
92
|
+
### Added
|
|
93
|
+
|
|
94
|
+
- `BenchPod(la_voltage=...)` / `BENCHPOD_LA_VOLTAGE` select the LA bank voltage on connect; the
|
|
95
|
+
`benchpod_la_voltage` pytest fixture sets it once for a test suite from `conftest.py`.
|
|
96
|
+
- `target_status()`, `reset_target()`, `set_reset()`, `reset_state()`, `usb_cc()`.
|
|
97
|
+
- `enable_pulldown()`, `disable_pulldown()`, `set_pull()`, `pull_state()`, `enabled_pulls()`.
|
|
98
|
+
- `LoopInputMap` (`control_loop(input_map=...)`) and `Capabilities.dac_loop_input_map` for
|
|
99
|
+
gateware v30's engineering-units loop input.
|
|
100
|
+
- `LaCapture.edges(la)`, `FpgaImage`, `DacHandle`, `CanReadResult`, `CloudAuthError` export,
|
|
101
|
+
the `Literal` option types, and the `embeddedci[pytest]` extra.
|
|
102
|
+
- The serial transport probes whether the pod's USB console has a JSON mode. The STM32 pod's does
|
|
103
|
+
not (it is a text shell), so over USB `status()` (parsed from the text report), `ping()`, the LA
|
|
104
|
+
voltage and target power on/off run as text commands, and every other operation raises a
|
|
105
|
+
`TransportError` at once that points at the network/cloud connection (instead of timing out).
|
|
106
|
+
On firmware with a JSON mode, chunked replies now stream too.
|
|
107
|
+
- `generate(..., route=False)` / `replay(..., route=False)` keep the current analog switching, so a
|
|
108
|
+
DAC→ADC loopback set up with `analog_path("cal1")` survives starting the output.
|
|
109
|
+
- `BenchPod.leased`: whether this client holds a cloud device lease.
|
|
110
|
+
- **Automatic gateware image switching.** `control_loop()`, `replay()` and `replay_waveform()` take
|
|
111
|
+
`switch_image=True` and switch the pod to the image they need (loop / deep replay) instead of
|
|
112
|
+
failing, logging a warning; `ControlLoopHandle.switched_image` / `ReplayHandle.switched_image`
|
|
113
|
+
record the switch. `switch_image=False` raises a `BenchPodError` (the control loop used to reach
|
|
114
|
+
the firmware and fail there). The `benchpod_capability` marker switches the image for
|
|
115
|
+
`dac_control_loop` / `dac_deep_replay` instead of skipping. The README has a new
|
|
116
|
+
"Gateware images" section.
|
|
117
|
+
- **Wiring profiles.** `Wiring` / `Signal` describe which DUT signal is on which LA channel (UART, I2C,
|
|
118
|
+
SWD, SPI roles, the target-power rail, the LA voltage and named signals) with the same schema the
|
|
119
|
+
embeddedci.com server and web UI store. `BenchPod(wiring=...)`, `bp.wiring` (argument → `BENCHPOD_WIRING`
|
|
120
|
+
file → a cloud device's stored profile → defaults), `bp.save_wiring()`, `bp.signal(name)`, the pytest
|
|
121
|
+
`benchpod_wiring` fixture and `--benchpod-wiring`. Channel arguments of `open_uart`, `capture_uart`,
|
|
122
|
+
`power_cycle_and_capture`, `flash`, `enable_i2c_sensor` and the power methods are now optional and
|
|
123
|
+
fall back to the profile; LA arguments accept role/signal names.
|
|
124
|
+
- **GPIO on the LA pins and pin ownership.** `bp.gpio()` → `GpioPin` (`configure`, `set`, `high`/`low`,
|
|
125
|
+
`activate`, `read`, `wait_for`, `pulse`, `release`), `set_gpio`, `read_gpio`, `pin_levels`,
|
|
126
|
+
`wait_for_level`, `release_gpio`, `la_pins()` → `LaPinState`, and `gpio_pins()`/`configure_gpio()` to
|
|
127
|
+
claim several channels as one group (a conflict on any of them claims none). Each channel has one
|
|
128
|
+
function at a time:
|
|
129
|
+
a second one fails with `PinConflictError`, an incompatible bias resistor with `PullConflictError`.
|
|
130
|
+
- **Triggered captures.** `Trigger(la, edge)` on `capture_adc`/`capture_la`/`capture_correlated`
|
|
131
|
+
(`trigger_timeout`, `TriggerTimeout`); results carry `.trigger`.
|
|
132
|
+
- **Timing helpers.** `LaCapture.edge_times`, `first_edge`, `level_at`, `pulse_widths`, `frequency`,
|
|
133
|
+
`duty_cycle`, `delay`; `Capture.crossing_times`, `first_crossing`; the `Edge` option type.
|
|
134
|
+
- **Power profiles.** `bp.measure_power()` and `bp.power_profile()` → `PowerProfile` /
|
|
135
|
+
`PowerProfileSession` (average/min/peak current, voltage, energy, charge, trace) from timestamped
|
|
136
|
+
sampling of the rail monitor, integrated over real time. `rate_hz` is the rate actually delivered
|
|
137
|
+
(measured) and `adc_rate_hz` the sensor's configured conversion rate: ask for 100-500 Hz and the
|
|
138
|
+
pod tracks the request to ~200 Hz, flattening near 365 Hz. The README documents the rails' current
|
|
139
|
+
limits.
|
|
140
|
+
- `Capabilities.la_pins`, `gpio_read`, `capture_trigger`, `power_profile`.
|
|
141
|
+
- The `hardware` marker now skips a test when no connection is configured, even if the test
|
|
142
|
+
requests no device fixture.
|
|
143
|
+
|
|
144
|
+
### Fixed
|
|
145
|
+
|
|
146
|
+
- `generate()` sent `offset=0.0` (8-bit code 0) by default and truncated fractional volts; it now
|
|
147
|
+
converts volts to the generator's codes for the chosen path.
|
|
148
|
+
- `BENCHPOD_API_BASE` was ignored by the cloud transport when `BenchPod` was constructed directly.
|
|
149
|
+
- `scope_capture(source=...)` only labelled the result; `capture_adc(source=...)` routes it.
|
|
150
|
+
- The `benchpod_target` fixture ignored `--benchpod-efuse`.
|
|
151
|
+
- Over USB, `target_power` sent a `target-power` verb the STM32 console doesn't have (it is
|
|
152
|
+
`power`); a delayed change over USB now raises instead of being silently ignored.
|
|
153
|
+
- `LaVoltage.readback` is `None` (not 0.0 V) on boards that cannot measure the bank.
|
|
154
|
+
- `fpga_image` was documented as a ~10 ms warm boot; it reprograms the FPGA (~2-3 s).
|
|
155
|
+
- The `12v` DAC path was mapped as 0..12 V; it is bipolar −12..+12 V (0 V at mid-scale), so
|
|
156
|
+
`generate` and `replay` volts on it were wrong — confirmed against the firmware calibration and on
|
|
157
|
+
a pod. `generate`'s default offset on `12v` is now 0 V. (`dsp.volts_to_codes` gained
|
|
158
|
+
`path_min_v`; `dsp.dac_path_range_v` gives each path's range.)
|
|
159
|
+
- A replay deeper than 2048 samples on the control-loop gateware image was accepted and then
|
|
160
|
+
produced no output (measured on a pod); it now switches the pod to the deep-replay image first
|
|
161
|
+
(or raises a `BenchPodError` with `switch_image=False`).
|
|
162
|
+
- `DacOutput.path` reports the output path you asked for (`5v`), not the firmware's analog-path
|
|
163
|
+
name (`dac_5v`).
|
|
164
|
+
- `replay_waveform` scaled a segments waveform for its stored path but routed the `5v` default.
|
|
165
|
+
- `capture_adc(source=...)` now waits for the relays to settle before capturing.
|
|
166
|
+
- Error messages no longer claim the cloud destination is CI-only or suggest OpenOCD builds that
|
|
167
|
+
lack the `cmsis_dap_tcp` backend.
|
embeddedci-2.0.0/LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|