This component samples and/or traces bus traffic.
This component resembles a probe that transparently monitors bus traffic.
| Behaviors | |
|---|---|
| bus traffic passthrough |
When the downstream accessor is configured, all incoming bus API calls to the upstream bus are passed through verbatim. Without the downstream accessor configured, the upstream bus will return bus::unmapped for all calls. Still, the sampling and tracing functions are still active. |
| bus traffic sampling |
Every now and then (at an interval configured by the sample-interval attribute), a transaction is also reported via a collection of output pins. In sequence, the following output pins are driven:
This sampling function is disabled if sample-interval is zero. The read-only interval-counter attribute indicates the current value of the modular transaction counter. |
| bus traffic tracing |
If the trace? attribute is set, sampled bus traffic is traced to stdout in a compact format. The sampling counter is shared with the traffic probing behavior above. One line per transaction is shown in a format resembling the common gdb simulators' --trace-core output: [LABEL:] MODE:ADDRESS ARROW DATA [LATENCY] [STATUS] where LABEL is an optional label identifying the probe component. MODE is an encoding of the access type: zzz where le and be represent little- or big-endianness, and 1-8 represent the number of bytes transferred. ARROW is a redundant encoding of direction: {->,<-} for {read,write} ADDRESS and DATA are hex-encoded host-endian values, LATENCY is a string encoding of the bus access latency, though 0 is ommited STATUS is a string encoding of the bus::status, though ok is omitted Examples: write-be-2:0xa002001c <- 0x3442
read-le-8:0x807fff30 -> 0xffffffff807fff68 l:10
write-be-4:0xfeedface <- 0xdeadbeef unmapped!
|
| SID Conventions | ||
|---|---|---|
| functional | supported | This is a functional component. |
| state save/restore | not supported | This component does not support state save/restore. |
| watchpoints | not supported | This component does not support watchpoints. |
| Reentrancy Control | not supported | Reentrancy is not controlled. |
| presentation | supported | This component presents attributes in the "pin", "setting", and "register" categories. |
Related components
This component may be interjected between bus masters and a mapper to trace traffic.
new hw-glue-probe-bus bus-prober
new SOME_KIND_OF_CPU cpu
new SOME_KIND_OF_MAPPER mapper
connect-bus cpu insn-memory bus-prober upstream
connect-bus bus-prober downstream mapper access-port
set bus-prober trace? 1
A statistics-gathering component could attach to the sampling output pins to maintain a picture of a program's memory access patterns.
| pins | |||
|---|---|---|---|
| name | direction | legalvalues | behaviors |
| address | out | any | bus traffic sampling |
| data-high | out | any | bus traffic sampling |
| data-low | out | any | bus traffic sampling |
| status | out | bus::status values | bus traffic sampling |
| type | out | enum values | bus traffic sampling |
| buses | |||
|---|---|---|---|
| name | addresses | accesses | behaviors |
| upstream | unrestricted | unrestricted | bus traffic passthrough/etc. |
| attributes | |||||
|---|---|---|---|---|---|
| name | category | legal values | default value | behaviors | |
| trace? | setting | boolean | 0 | bus traffic tracing | |
| sample-interval | setting | numeric | 1 | bus traffic sampling | |
| interval-counter | register | numeric | - | bus traffic sampling | |
| address | pin | numeric | - | bus traffic sampling | |
| data-high | pin | numeric | - | bus traffic sampling | |
| data-low | pin | numeric | - | bus traffic sampling | |
| status | pin | numeric | - | bus traffic sampling | |
| type | pin | numeric | - | bus traffic sampling | |
| label | setting | any string | - | bus traffic sampling | |
| accessors | ||
|---|---|---|
| name | accesses | behaviors |
| downstream | unrestricted | bus traffic passthrough |