i3c_daa_snoop i3c_hdr_slave
API Reference Manual  /  4 Model-to-Model Interfaces  / 

i3c_hdr_master

Description
SIM_INTERFACE(i3c_hdr_master) {
        void (*hdr_read_response)(conf_object_t *obj, bytes_t bytes, bool more);
        void (*hdr_acknowledge)(conf_object_t *obj, i3c_ack_t ack);
};

#define I3C_HDR_MASTER_INTERFACE "i3c_hdr_master"

The interfaces i3c_hdr_slave and i3c_hdr_master are used together to model I3C HDR communication over the bus. HDR modes are entered by sending one of the ENTHDRx broadcast CCCs on the bus through normal SDR communication. Slaves that support HDR shall now internally switch to HDR mode. The master can exit HDR mode by calling hdr_exit in the i3c_hdr_slave interface and then follow it with a stop call. All slaves that support HDR shall now internally switch back to SDR mode.

All write transfers in HDR mode are done using the hdr_write method. Slaves must always respond through method hdr_acknowledge to either ACK or NACK the write. Devices not supporting active acknowledgement for a certain write transfer block must always respond with an ACK as it represents a passive acknowledgement according to MIPI I3C V1.1.1 spec.

All read transfers in HDR mode are done using the hdr_read method. Parameter max_len in method hdr_read is the maximum number of bytes that the slave is allowed to send in response. The slave shall respond with an hdr_read_response call after each hdr_read call. The parameter more indicates if the slave has more data to send. The slave is allowed to send back less than max_len and at the same time set more to true. This feature is an optimization in order to: 1. Minimize the number of hdr_read calls needed to read a large amount of data. 2. Avoid underflow on the slave side by allowing the slave respond with less data.

If more is set to false, the master has to ends it current transfer by either calling hdr_restart or exit HDR through the procedure described above.

Examples of HDR write transactions:

HDR Private Write 256 bytes followed by a 64 byte write:
+-------------+-----------------+--------------------------------------------------------+
| Master      | Slave           | Arguments                                              |
+-------------+-----------------+--------------------------------------------------------+
| hdr_write   |                 | 2 bytes: RnW @ 15 |  CC @ 14:8 | Target Address @ 8:1  |
+-------------+-----------------+--------------------------------------------------------+
|             | hdr_acknowledge | ACK                                                    |
+-------------+-----------------+--------------------------------------------------------+
| hdr_write   |                 | 100-bytes                                              |
+-------------+-----------------+--------------------------------------------------------+
|             | hdr_acknowledge | ACK                                                    |
+-------------+-----------------+--------------------------------------------------------+
| hdr_write   |                 | 100-bytes                                              |
+-------------+-----------------+--------------------------------------------------------+
|             | hdr_acknowledge | ACK                                                    |
+-------------+-----------------+--------------------------------------------------------+
| hdr_write   |                 | 56-bytes                                               |
+-------------+-----------------+--------------------------------------------------------+
|             | hdr_acknowledge | ACK                                                    |
+-------------+-----------------+--------------------------------------------------------+
| hdr_restart |                 |                                                        |
+-------------+-----------------+--------------------------------------------------------+
| hdr_write   |                 | 2 bytes: RnW @ 15 |  CC @ 14:8 | Target Address @ 8:1  |
+-------------+-----------------+--------------------------------------------------------+
|             | hdr_acknowledge | ACK                                                    |
+-------------+-----------------+--------------------------------------------------------+
| hdr_write   |                 | 64-bytes                                               |
+-------------+-----------------+--------------------------------------------------------+
|             | hdr_acknowledge | ACK                                                    |
+-------------+-----------------+--------------------------------------------------------+
| hdr_exit    |                 |                                                        |
+-------------+-----------------+--------------------------------------------------------+
| stop        |                 |                                                        |
+-------------+-----------------+--------------------------------------------------------+
   

The sequence of hdr_write calls could be made differently. Master can send smaller or larger chunks of data in each hdr_write call. The main concerns are to minimize the number of interface calls and to avoid overflow on the slave side. A balance between the two should be considered in the implementation of the master.

HDR Private Read 256 bytes:
+-----------+-------------------+-------------------------------------------------------+
| Master    | Slave             | Arguments                                             |
+-----------+-------------------+-------------------------------------------------------+
| hdr_write |                   | 2 bytes: RnW @ 15 |  CC @ 14:8 | Target Address @ 8:1 |
+-----------+-------------------+-------------------------------------------------------+
|           | hdr_acknowledge   | ACK                                                   |
+-----------+-------------------+-------------------------------------------------------+
| hdr_read  |                   | max_len = 128                                         |
+-----------+-------------------+-------------------------------------------------------+
|           | hdr_read_response | bytes.len = 64, more = true                           |
+-----------+-------------------+-------------------------------------------------------+
| hdr_read  |                   | max_len = 128                                         |
+-----------+-------------------+-------------------------------------------------------+
|           | hdr_read_response | bytes.len = 64, more = true                           |
+-----------+-------------------+-------------------------------------------------------+
| hdr_read  |                   | max_len = 128                                         |
+-----------+-------------------+-------------------------------------------------------+
|           | hdr_read_response | bytes.len = 64, more = true                           |
+-----------+-------------------+-------------------------------------------------------+
| hdr_read  |                   | max_len = 64                                          |
+-----------+-------------------+-------------------------------------------------------+
|           | hdr_read_response | bytes.len = 64, more = false                          |
+-----------+-------------------+-------------------------------------------------------+
| hdr_exit  |                   |                                                       |
+-----------+-------------------+-------------------------------------------------------+
| stop      |                   |                                                       |
+-----------+-------------------+-------------------------------------------------------+

The sequence of hdr_read calls could be made differently. Master can read smaller chunks of data in each hdr_read call. The main concerns are to minimize the number of interface calls and to avoid underflow on the slave side. A balance between the two should be considered in the implementation of the master.

Note: This interface is in tech-preview and may change without notice.

Execution Context
Cell Context for all methods.

i3c_daa_snoop i3c_hdr_slave