PL1_EVENT_LOGGING_READ

code: 1300

# get
<module-index>/<port-index> PL1_EVENT_LOGGING_READ ?

Description

Read the list of captured Layer-1 event entries. Each entry consists of four parameters, event type, event condition, event lane, and timestamp.

Every read operation dequeues up to 32 events and returns them as JSON.

Important

  • The operation is destructive: events are popped from the software queue as they are read. If the queue is empty, the operation returns an empty list.

  • Each read returns at most 32 entries to keep the response below the protocol size limit.

  • Timestamp is relative, measured from the previously delivered event, not an absolute hardware timestamp.

  • Timestamp rounding is handled by client software.

Actions

get

Parameters

  1. evread: json, event read value. Reads up to 32 events per call and returns them as JSON.

For port-specific events, the JSON response is structured as follows:

{
  "evread": [
    {
      "$po-type": "l1_event_capture_entry",
      "evtype_s": "PCS_LOA",
      "evtype": 6,
      "asserted": true,
      "ts": 1234
    }
  ]
}

For lane-specific events, the JSON response is structured as follows:

{
  "evread": [
    {
      "$po-type": "l1_event_capture_entry_with_lane",
      "evtype_s": "LANE_PRBS_LOCK",
      "evtype": 14,
      "asserted": true,
      "ts": 1234,
      "lane": 0
    }
  ]
}

where

  • evtype_s: Event type as a string.

  • evtype: Event type as an integer. See Layer-1 Event Type Enums for the list of supported event types.

  • asserted: Boolean indicating if the event is asserted. See Layer-1 Event Condition Enums for the list of supported event conditions.

  • lane: Lane number (>= 0) for lane-specific events.

  • ts: Timestamp of the event in the unit of 0.5 nanosecond. The timestamp is relative to the previously delivered event, not an absolute hardware timestamp.

Example

# get
input:  0/1 PL1_EVENT_LOGGING_READ ?
output: 0/1 PL1_EVENT_LOGGING_READ {"evread":[{"$po-type":"l1_event_capture_entry","evtype_s":"MARKER","evtype":0,"asserted":true,"ts":0},{"$po-type":"l1_event_capture_entry","evtype_s":"LINK_SYNC","evtype":2,"asserted":true,"ts":512},{"$po-type":"l1_event_capture_entry","evtype_s":"PCS_LOA","evtype":6,"asserted":true,"ts":1040},{"$po-type":"l1_event_capture_entry",""evtype_s":"PCS_LOA","evtype":6,"asserted":false,"ts":3200},{"$po-type":"l1_event_capture_entry_with_lane","evtype_s":"LANE_CDR_LOCK","evtype":17,"asserted":false,"ts":780,"lane":1}]}