I3C 32-bit Register Target¶
The PxI3C32BitRegisterTarget class represents a generic I3C target. It supports standard I3C features like IBI, Hot-Join, and CCC handling, along with a register-based memory model.
Features¶
- IBI Generation: Initiate In-Band Interrupts.
- Hot-Join: Request to join the bus after initialization.
- Configurable PID/BCR/DCR: Customize the device characteristics.
PxI3C32BitRegisterTarget
¶
PxI3C32BitRegisterTarget(
exerciser: AqProtocolExerciser,
*args,
pid: int | None = None,
bcr: int = 0,
dcr: int = 0,
config: I3C32BitRegisterTargetConfig | None = None,
static_addr: int = 0,
minimum_mrl: int | None = None,
minimum_mwl: int | None = None,
getcaps_std_value: bytes | None = None,
getcaps_usr_value: list[tuple[int, bytes]] | None = None,
sub_address_type: SubAddressType = NONE,
getstatus_std_value: bytes | None = None,
getstatus_usr_value: list[tuple[int, bytes]] | None = None,
getmxds_std_value: bytes | None = None,
getmxds_usr_value: list[tuple[int, bytes]] | None = None,
supported_group_address_count: int = 3,
**kwargs
)
Bases: PxAbstractTarget
I3C Base Target Class.
| PARAMETER | DESCRIPTION |
|---|---|
|
The exerciser instance to use.
TYPE:
|
|
The 48-bit Provisioned ID (PID) of the target. On a given I3C bus there should be no Provisioned ID collision, otherwise the discovery mechanism may fail. If not provided, a default PID will be generated with Acute's manufacturer ID and a random 32-bit vendor value.
TYPE:
|
|
The 8-bit Bus Characteristic Register (BCR) of the target. This register describes the device bus related capabilities.
TYPE:
|
|
The 8-bit Device Characteristic Register (DCR) of the target. This register describes the functionalities provided by the device
TYPE:
|
|
The static address of the target.
TYPE:
|
|
The minimum read length of the target.
TYPE:
|
|
The minimum write length of the target.
TYPE:
|
|
The sub-address type of the target.
TYPE:
|
|
The default value for GETCAPS.
TYPE:
|
|
The defining bytes and the corresponding value for GETCAPS. format: [(defining byte, getcaps value)] |
|
set the default value for GETSTATUS.
TYPE:
|
|
set the defining bytes and the corresponding value for GETSTATUS. format: [(first defining byte, first status value), (second defining byte, second status value)] |
|
set the default value for GETMXDS.
TYPE:
|
|
set the default bytes and the corresponding value for GETMXDS. format: [(defining byte, mxds value)] |
|
set the count of group address that the target can support.
TYPE:
|
|
The configuration of the device using protobuf structure.
TYPE:
|
|
Additional arguments to pass to the device constructor.
DEFAULT:
|
|
Additional keyword arguments to pass to the device constructor.
DEFAULT:
|
| CLASS | DESCRIPTION |
|---|---|
HotJoinType |
IBI type enumeration. |
IbiType |
IBI type enumeration. |
SubAddressType |
Sub-address type enumeration. |
| METHOD | DESCRIPTION |
|---|---|
add_event_handler |
Add an event handler to the current device instance. |
attach_to_bus |
Attach the target to a bus. |
config |
Set the config of the target. |
detach_from_bus |
Detach the device from the bus. |
get_event_handlers |
Retreive handlers registerd on this device. |
ibi_request |
Initiate an IBI request from the current target. |
on_event |
Add an event handler to the instance by decorator. |
perform_operation |
Send an operation. |
remove_event_handler |
Remove an event handler. |
send_hotjoin |
Initiate an Hot-join request from the current target. |
| ATTRIBUTE | DESCRIPTION |
|---|---|
assigned_address |
Get the assigned address of the target.
TYPE:
|
available_events_map |
A reverse mapping of |
event_state |
Get the event state of the target.
TYPE:
|
group_addresses |
Get the group addresses assigned to the target. |
is_attached |
Check if the device is attached to a bus.
TYPE:
|
mrl |
Get the maximum read length of the target.
TYPE:
|
mwl |
Get the maximum write length of the target.
TYPE:
|
name |
Get the name of the device.
TYPE:
|
register_value |
Get the current register value of the target.
TYPE:
|
state |
Get the state of the device.
TYPE:
|
sub_address_type |
Get the current register type of the target.
TYPE:
|
available_events_map
¶
A reverse mapping of field_name_by_number, which uses field name as key.
HotJoinType
¶
Bases: IntEnum
IBI type enumeration.
This is intended to avoid exporting protobuf enum to the interface.
IbiType
¶
Bases: IntEnum
IBI type enumeration.
This is intended to avoid exporting protobuf enum to the interface.
SubAddressType
¶
Bases: IntEnum
Sub-address type enumeration.
This is intended to avoid exporting protobuf enum to the interface.
add_event_handler
¶
Add an event handler to the current device instance.
attach_to_bus
¶
attach_to_bus(bus: PxAbstractBus) -> None
Attach the target to a bus.
This method is used to make the device aware of the bus it is connected to. It is used to set the bus attribute of the device.
Note
This method will not automatically create an actual instance on
the Protocol Exerciser until user call the attach_to_bus method.
| PARAMETER | DESCRIPTION |
|---|---|
|
The bus to attach the device to
TYPE:
|
| RAISES | DESCRIPTION |
|---|---|
ValueError
|
If the device is already attached to a bus |
detach_from_bus
¶
Detach the device from the bus.
The opposite of the attach_to_bus method.
get_event_handlers
¶
Retreive handlers registerd on this device.
ibi_request
¶
ibi_request(
ibi_type: IbiType = IMMEDIATE,
mdb_value: bytes = b"",
additional_data: bytes = b"",
skip_bcr_check: bool = False,
) -> None
Initiate an IBI request from the current target.
| PARAMETER | DESCRIPTION |
|---|---|
|
The type of IBI to request, either
TYPE:
|
|
The mandatory data byte (MDB) value to send with the IBI.
TYPE:
|
|
Additional data to send along with the IBI payload.
TYPE:
|
|
If True, the BCR check will be dismissed and still proceed to send and IBI request.
TYPE:
|
| RAISES | DESCRIPTION |
|---|---|
ValueError
|
It the current target BCR does not allow IBI. |
ValueError
|
It the current target BCR does not allow IBI payload, but the caller still tries to send an IBI payload. |
ValueError
|
If the |
on_event
¶
Add an event handler to the instance by decorator.
perform_operation
¶
Send an operation.
send_hotjoin
¶
send_hotjoin(hotjoin_type: HotJoinType = IMMEDIATE) -> None
Initiate an Hot-join request from the current target.
| PARAMETER | DESCRIPTION |
|---|---|
|
The type of Hot-join to request, either
TYPE:
|