Otawa  0.10
otawa::hard::Memory Class Reference

Class to represent the whole memory of the platform. More...

#include <otawa/hard/Memory.h>

Public Member Functions

 Memory (bool full=false)
 Memory constructor. More...
 
virtual ~Memory (void)
 
const Table< const Bank * > & banks (void) const
 Get the list of banks in memory. More...
 
const Table< const Bus * > & buses (void) const
 Get the list of buses connected to memory banks. More...
 
const Bankget (Address address) const
 Get the bank matching the given address. More...
 
int worstAccess (void) const
 Compute the worst access latency. More...
 
int worstReadAccess (void) const
 Compute the worst read access latency. More...
 
int worstWriteAccess (void) const
 Compute the worst read access latency. More...
 

Static Public Member Functions

static Memoryload (const elm::system::Path &path) throw (LoadException)
 Load a memory configuration from an XML file. More...
 
static Memoryload (xom::Element *element) throw (LoadException)
 Load a memory configuration from the given element. More...
 

Static Public Attributes

static const Memory null
 Default null memory. More...
 
static const Memory full
 Full memory: all memory is occupied by big RAM bank. More...
 

Private Member Functions

 SERIALIZABLE (Memory, field("banks", _banks)&field("buses", _buses))
 

Private Attributes

AllocatedTable< const Bank * > _banks
 
AllocatedTable< const Bus * > _buses
 

Detailed Description

Class to represent the whole memory of the platform.

Author
H. Cassé casse.nosp@m.@iri.nosp@m.t.fr

Constructor & Destructor Documentation

otawa::hard::Memory::Memory ( bool  full = false)

Memory constructor.

References _banks, and otawa::hard::Bank::full.

otawa::hard::Memory::~Memory ( void  )
virtual

Member Function Documentation

const Table< const Bank * > & otawa::hard::Memory::banks ( void  ) const
inline
const Table< const Bus * > & otawa::hard::Memory::buses ( void  ) const
inline

Get the list of buses connected to memory banks.

Returns
List of memory buses.
const Bank * otawa::hard::Memory::get ( Address  address) const
Memory * otawa::hard::Memory::load ( const elm::system::Path &  path)
throw (LoadException
)
static

Load a memory configuration from an XML file.

Parameters
pathPath to the file.
Returns
Built cache configuration.

References _, and elm::Exception::message().

Referenced by otawa::hard::Platform::loadMemory().

Memory * otawa::hard::Memory::load ( xom::Element element)
throw (LoadException
)
static

Load a memory configuration from the given element.

Parameters
elementElement to load from.
Returns
Built cache configuration.

References _, and elm::Exception::message().

otawa::hard::Memory::SERIALIZABLE ( Memory  ,
field("banks", _banks)&field("buses", _buses)   
)
private
int otawa::hard::Memory::worstAccess ( void  ) const

Compute the worst access latency.

Returns
Worst access latency.

References otawa::clp::max(), worstReadAccess(), and worstWriteAccess().

int otawa::hard::Memory::worstReadAccess ( void  ) const

Compute the worst read access latency.

Returns
Worst read access latency.

References _banks, and otawa::clp::max().

Referenced by otawa::etime::StandardEventBuilder::processBB(), otawa::dcache::WCETFunctionBuilder::setup(), and worstAccess().

int otawa::hard::Memory::worstWriteAccess ( void  ) const

Compute the worst read access latency.

Returns
Worst read access latency.

References _banks, and otawa::clp::max().

Referenced by otawa::etime::StandardEventBuilder::processBB(), otawa::dcache::WCETFunctionBuilder::setup(), and worstAccess().

Member Data Documentation

AllocatedTable<const Bank *> otawa::hard::Memory::_banks
private
AllocatedTable<const Bus *> otawa::hard::Memory::_buses
private
const Memory otawa::hard::Memory::full
static

Full memory: all memory is occupied by big RAM bank.

const Memory otawa::hard::Memory::null
static

Default null memory.


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