Instantiated on the pcie_device template’s top-level ide_dev group when
the IDE capability lives inside the PCIe device itself (internal IDE
handling). It automatically locates the pcie_ide_cap instance in its
parent scope and provides the IDE API needed by the PCIe library for key
validation, transaction processing, flow-through checks, and stream
invalidation.
The device’s pcie_config bank must have an IDE capability instantiated.
Applied on a connect that references the external IDE controller device.
This template ensures the controller is automatically instantiated as a
sub-object and enforces the instantiated class to implement the
pcie_external_ide interface. It also sets a connect attribute
(pcie_device_ide) in the external controller so that the controller has a
reference back to its associated PCIe device. This attribute is expected to
exist in the external controller since the external controller should be
instantiating the
pcie_ide_external_implementation
template.
Instantiated on the top-level ide_dev group of a pcie_device when the
IDE capability lives in a separate external controller object. This template
delegates all IDE operations — key validation, transaction processing,
completion key handling, flow-through checks, and stream invalidation — to
the external controller via the pcie_external_ide interface.
It also implements the pcie_ide_device interface on an internal ide port
so that the external controller can report IDE errors (misrouted
transactions, check failures) and request translator invalidation back to
this PCIe device.
external_ide_connect — must point to the connect object (with
pcie_ide_controller_subobj applied) that references the external IDE
controller.Applied at device level on a separate DML device that acts as an external IDE controller. This template:
pcie_external_ide interface, which the associated PCIe
device calls (via pcie_ide_external_handler) for key validation,
transaction processing, completion key addition, and stream invalidation.ide_dev group that allows the IDE capability to be
instantiated in this external controller device’s scope, separate from the
PCIe device’s own capabilities.pcie_device_ide connect that points back to the PCIe device.
This connect enforces the pcie_ide_device interface and is used to
report IDE errors (misrouted transactions, check failures) and to
invalidate translators when stream configuration changes.The external controller device must also instantiate an IDE capability in a
bank with use_standard_access_templates and use_standard_write_templates
set explicitly (since this is not a PCIe device).
The purpose of the is_ide_link_receiver and method is to indicate if the device is allowed to be the ultimate receiver of an IDE encapsulated TLP. IDE Decryption is exclusively a (link receiver) ingress operation. So for example, a downstream port has no link receiver ingress interface for transactions coming from upstream.
This template instantiated by the
ide_capability
template and provides the functional implementation for the IDE capability.
It relies on an IDE handler template being instantiated on the ide_dev group
of the pcie_device.
If the IDE capability is directly present in a function in the PCIe device,
then the pcie_ide_internal_handler
template should be instantiated. Instantiating an
pcie_ide_internal_handler without the
presence of an IDE capability in the device is forbidden.
If the capability instead resides in a separate DML device, then the
pcie_ide_external_handler template
should instead be instantiated in the ide_dev group of the pcie_device.
When this template is instantiated, the methods get_stream_key(),
get_tx_active_key_set(), invalidate_keys_iv() and increment_iv() should
be implemented, as these are vendor-specific implementations.
If no internal or external handler is instantiated, then the registers will be present but the library will not provide any functional behavior for IDE. In this case, there’s no need to implement aforementioned vendor-specific methods.
For the external device scenario, the external device must instantiate the
pcie_ide_external_implementation
on the top-level scope of the device.
Vendor-specific methods expected to be implemented when this template is instantiated and a functional IDE handler is present:
This method should return the active key set for the given stream.
This method should return the IDE stream key for the given parameters.
This method should increment the IV for the given stream and key set.
This method should invalidate the keys and IVs for the given stream.