#include <pcidev.hh>
Public Member Functions | |
const int | getDevNo () const |
const int | getBusNo () const |
bool | isBridge () |
int | initBridge (unsigned char busNo, unsigned char maxNumBuses) throw (hcalDCC::Exception) |
const char * | getDevAlias () |
const char * | getDevDescription () |
void | setDevAlias (const char *alias="") |
void | setDevDescription (const char *description="") |
int | setDeviceType (unsigned char busNo, unsigned char devNo, const char *alias, const char *description) throw (hcalDCC::Exception) |
int | findMem () throw (hcalDCC::Exception) |
int | doMemAlloc () throw (hcalDCC::Exception) |
const Memory * | getFirstMem () const |
Memory * | getFirstMem () |
Memory * | getNextMem (Memory *pMem) |
const Memory * | getNextMem (const Memory *pMem) const |
const Memory * | getMem (unsigned int barOffs) const |
void | addMemReq (Memory *pMem) |
PciDev (Motherboard *pU2, bool readonly=false, bool debug=false) | |
~PciDev () | |
int | initDev () throw (hcalDCC::Exception) |
void | setConfVmeBaseAddress (unsigned int address) |
unsigned int | getConfVmeBaseAddress () const |
const unsigned int | getVendorID () |
const unsigned int | getDeviceID () |
const unsigned int | getPciInfo () |
const unsigned int | getRevisionNo () |
These class is used to model the devices connected to the PCI buses of a U2 motherboard The class provides methods to initialize the devices. In addition, methods are provided query the PCI devices about their memory needs, i.e. type and size of the memory regions. Finally, the class also implements methods to be able to loop over the memory regions of a given PCI device.
|
Class constructor providing the motherboard to which this device is connected |
|
Class destructor |
|
Adds a new memory request to the device's internal list This function is typically called from finMem in order to populate the internal list of memory requests.
|
|
This function loops over the different PCI memory requests defined in the internal list CMemory *m_memList, and it does its allocation i.e. set the BAR Offset, Offset w.r.t. to the VSI base address, etc. This function must be called after findMem().
|
|
Determines the amount of sizes and types of the PCI memory regions used by the device and sets the internal list of memory request to be then allocated allocated by doMemAlloc().
|
|
Gets the PCI bus number of the current device
|
|
Gets the VME addresss of the PCI configuration region
|
|
Returns an alias for logical position of device. Supported aliases (alias - device #): PCIbus3: "br3" - 0, "dp3" - 1, "u2" - 2, "bc" - 3, "mlc" - 4 PCIbus2: "br2" - 0, "dp2" - 1, "lbr3" - 2, "lbr4" - 3, "lbr5" - 4 PCIbus1: "dp1" - 1, "lbr0" - 2, "lbr1" - 3, "lbr2" - 4 where: "br" - PCI-PCI bridge, "dp" - logic board PMC site, "bc" - Buffer Control PMC site, "u2" - UniverseII, "mlc" - local control FPGA, "lrb" - Link Reciever Board or PC-MIP site |
|
Returns the device description as defined in logicalAliases.hh
|
|
Gets the PCI Device ID
|
|
Gets the PCI device number of the current device
|
|
Utility functions to loop over the internal CMemory requests
|
|
Utility functions to loop over the internal CMemory requests
|
|
Given a Base Address Register (BAR) offset, it allows to find the associated CMemory request object
|
|
Utility functions to loop over the internal CMemory requests
|
|
Utility functions to loop over the internal CMemory requests
|
|
Gets the PCI Id of device (vendor Id + (device Id << 16))
|
|
Gets the PCI revision number of the device
|
|
Gets the PCI vendor ID
|
|
This function performs the initialization of a PCI-PCI bridge
|
|
Performs the initialization of PCI devices. Sets the BARs and enables memory. Works for regular devices and bridges
|
|
Returns a flag to signal whether the device we are dealing with is a PCI-PCI bridge (true) or a regular PCI device (false)
|
|
Sets the VME addresss of the PCI configuration region of the device
|
|
Sets an alias to a device given its geographical positon
|
|
Sets a description to a device given its geographical positon
|
|
Initializes the attributes of the current device which will define its type, e.g. if the device is a bridge
|