pci_upstream pcie_adapter_compat
API Reference Manual  /  4 Model-to-Model Interfaces  / 

pci_upstream_operation

Description
This interface is implemented by PCI(e) buses to handle upstream transactions (primarily memory or IO) from PCI(e) devices.

The initiator should be the PCI device object itself. There are currently no requirements on this object in terms of interfaces. It is intended for future use and could be left NULL.

The 16-bit Requester ID is provided by the rid parameter. This is the ID that uniquely identifies the initiator in a PCIe hierarchy, also more commonly known as the BDF (Bus/Device/Function). This ID can be left blank (0) by non-PCIe devices if the BDF is not known.

Return value is of type exception_type_t and maps, just like all other PCI interfaces, onto PCI concepts accordingly:

Sim_PE_No_Exception
OK
Sim_PE_IO_Not_Taken
Master Abort
Sim_PE_IO_Error
Target Abort

Other return values are currently unexpected.

SIM_INTERFACE(pci_upstream_operation) {
        exception_type_t (*read)(conf_object_t *obj,
                                 conf_object_t *initiator,
                                 uint16 rid,
                                 addr_space_t space,
                                 physical_address_t address,
                                 buffer_t buffer);
        exception_type_t (*write)(conf_object_t *obj,
                                  conf_object_t *initiator,
                                  uint16 rid,
                                  addr_space_t space,
                                  physical_address_t address,
                                  bytes_t buffer);
};
#define PCI_UPSTREAM_OPERATION_INTERFACE   "pci_upstream_operation"

Execution Context
Cell Context for all methods.

pci_upstream pcie_adapter_compat