Generic hardware access library
HAL::PCIAddressTable Class Reference

The Address Table for PCI Devices. More...

#include <PCIAddressTable.hh>

Inheritance diagram for HAL::PCIAddressTable:
HAL::AddressTable HAL::AddressTableInterface

List of all members.

Public Member Functions

 PCIAddressTable (std::string name, AddressTableReader &tableReader)
 The constructure fills the internal data strucutures of the PCIAddressTable.
virtual ~PCIAddressTable ()
void getAddressBoundaries (uint32_t &minConfigAddress, uint32_t &maxConfigAddress, std::vector< uint32_t > &minAddresses, std::vector< uint32_t > &maxAddresses) const
 Retrieves the highest and lowest configuration space address offset and the highest and lowest address offset with respect to each BAR.
void checkAddressLimits (std::string item, uint32_t offset) const throw ( NoSuchItemException, AddressOutOfLimitsException )
 Implementation of the AddressTableInterface.
void checkAddressLimits (const GeneralHardwareAddress &hardwareAddress, uint32_t offset) const throw ( AddressOutOfLimitsException )
 Implementation of the AddressTableInterface.
void print (std::ostream &os=std::cout) const
 Prints the AddressTable.

Private Member Functions

void determineAddressBoundaries ()

Private Attributes

std::vector< uint32_t > maxAddresses_
std::vector< uint32_t > minAddresses_
uint32_t minConfigAddress_
uint32_t maxConfigAddress_

Detailed Description

The Address Table for PCI Devices.

This class is the first non abstract class in the hierachy of AddressTables. It implements the print function. In the constructor it fills the internal data structures.

Addresses for the PCIAddressTable contain

  • accessmode specifier: (either configuration or memory; io is not yet implemented)
  • bar identifier to specifiy the PCI-Baseaddress for the item.
  • address offset with respect to the Baseaddress.

The specific input to the PCIAddressTable is discussed in the relevant implementations of the AddressTableReader.

See also:
AddressTableReader
Author:
Christoph Schwick
Revision:
1.1
Date:
2007/03/05 18:02:10

Definition at line 47 of file PCIAddressTable.hh.


Constructor & Destructor Documentation

HAL::PCIAddressTable::PCIAddressTable ( std::string  name,
HAL::AddressTableReader tableReader 
)

The constructure fills the internal data strucutures of the PCIAddressTable.

Parameters:
nameis an arbitrary name for the table.
tableReaderis used to fill the data structures.

Definition at line 6 of file PCIAddressTable.cc.

Definition at line 17 of file PCIAddressTable.cc.


Member Function Documentation

void HAL::PCIAddressTable::checkAddressLimits ( std::string  item,
uint32_t  offset 
) const throw ( NoSuchItemException, AddressOutOfLimitsException ) [virtual]

Implementation of the AddressTableInterface.

Implements HAL::AddressTableInterface.

Definition at line 42 of file PCIAddressTable.cc.

void HAL::PCIAddressTable::checkAddressLimits ( const GeneralHardwareAddress hardwareAddress,
uint32_t  offset 
) const throw ( AddressOutOfLimitsException ) [virtual]

Implementation of the AddressTableInterface.

Implements HAL::AddressTableInterface.

Definition at line 63 of file PCIAddressTable.cc.

Definition at line 82 of file PCIAddressTable.cc.

void HAL::PCIAddressTable::getAddressBoundaries ( uint32_t &  minConfigAddress,
uint32_t &  maxConfigAddress,
std::vector< uint32_t > &  minAddresses,
std::vector< uint32_t > &  maxAddresses 
) const

Retrieves the highest and lowest configuration space address offset and the highest and lowest address offset with respect to each BAR.

This function is useful for PCIBusAdapters which map the Addressspace of the hardware device into memory. This service allows the Adapter to determine the needed memory space needed to be mapped. An exmaple of a busadapter which uses this functionality is the PCIDummyBusAdapter. The results of the function are passed by the references given as function arguments.

Definition at line 32 of file PCIAddressTable.cc.

void HAL::PCIAddressTable::print ( std::ostream &  os = std::cout) const [virtual]

Prints the AddressTable.

Implements HAL::AddressTableInterface.

Definition at line 20 of file PCIAddressTable.cc.


Member Data Documentation

std::vector< uint32_t > HAL::PCIAddressTable::maxAddresses_ [private]

Definition at line 97 of file PCIAddressTable.hh.

Definition at line 100 of file PCIAddressTable.hh.

std::vector< uint32_t > HAL::PCIAddressTable::minAddresses_ [private]

Definition at line 98 of file PCIAddressTable.hh.

Definition at line 99 of file PCIAddressTable.hh.


The documentation for this class was generated from the following files: