measure
Runs a sequence of register reads, writes, delays and waits back to back with no host traffic between them, returning results in order to measure hardware timing and behavior.
Instructions
Runs a sequence of steps on the target back to back, with no traffic to the host between them, and returns each step's result in order. Use it when the order and timing of register accesses matter, as when finding out what the hardware does.
Steps (addresses and values as numbers or "0x..." text; width 1, 2, 4, 8 or 16, default 4; any step that gives a result may carry a "label"): {"op": "read", "address": A, "width": W} the value read {"op": "write", "address": A, "width": W, "value": V} {"op": "delay", "cycles": N} waits at least N CPU cycles {"op": "time"} the CPU's cycle counter, 32 bits {"op": "wait", "address": A, "width": W, "mask": M, "value": V, "timeout": N} reads until (value read & M) == V; the cycles waited, or the sequence ends in TIMEOUT {"op": "repeat", "count": N, "steps": [...]} up to three deep {"op": "call", "address": A} calls code at A; what it returned
processor is "ee" or "iop": which runs the steps, and in whose address space. On the
IOP widths go up to 4, and the clock that time, delay and a wait's timeout count in
is a console's 36.864 MHz system clock, which is the IOP's own.
interrupts_off runs it with interrupts disabled. note says what the measurement is
for, and is kept with it in the journal. If a step fails, the results up to it are still
returned, with failed saying why.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"steps": "<steps>"
},
"name": "measure"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | ||
| steps | Yes | ||
| processor | No | ee | |
| interrupts_off | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||