gem5 v24.0.0.0
Loading...
Searching...
No Matches
SimpleAddressMap Class Reference

Simple address map implementation for the generic protocol. More...

#include <simpleAddressMap.h>

Public Member Functions

 SimpleAddressMap ()
 
void checkSanity ()
 Check for overlapping address ranges.
 
void dumpMap ()
 Print map.
 
unsigned int decode (sc_dt::uint64 address_)
 Decode slave address.
 
const sc_dt::uint64get_max ()
 
const sc_dt::uint64get_min ()
 
void insert (sc_dt::uint64 baseAddress_, sc_dt::uint64 highAddress_, unsigned int portNumber_)
 Insert a slave into the address map.
 

Private Types

typedef std::map< sc_dt::uint64, unsigned int > mapType
 
typedef std::map< sc_dt::uint64, unsignedint >::iterator addressMapIterator
 

Private Attributes

sc_dt::uint64 retval
 
mapType m_addressMap
 the address map
 

Detailed Description

Simple address map implementation for the generic protocol.

Definition at line 32 of file simpleAddressMap.h.

Member Typedef Documentation

◆ addressMapIterator

typedef std::map<sc_dt::uint64,unsignedint>::iterator SimpleAddressMap::addressMapIterator
private

Definition at line 35 of file simpleAddressMap.h.

◆ mapType

typedef std::map<sc_dt::uint64, unsigned int> SimpleAddressMap::mapType
private

Definition at line 34 of file simpleAddressMap.h.

Constructor & Destructor Documentation

◆ SimpleAddressMap()

SimpleAddressMap::SimpleAddressMap ( )
inline

Definition at line 38 of file simpleAddressMap.h.

Member Function Documentation

◆ checkSanity()

void SimpleAddressMap::checkSanity ( )
inline

Check for overlapping address ranges.

Definition at line 45 of file simpleAddressMap.h.

References m_addressMap, and SC_REPORT_ERROR.

◆ decode()

unsigned int SimpleAddressMap::decode ( sc_dt::uint64 address_)
inline

Decode slave address.

Parameters
address_A slave address.
Returns
The decoded slave port number. On error, the value 255 is returned.

Definition at line 85 of file simpleAddressMap.h.

References m_addressMap, and SC_REPORT_ERROR.

Referenced by MultiSocketSimpleSwitchAT::decode().

◆ dumpMap()

void SimpleAddressMap::dumpMap ( )
inline

Print map.

Definition at line 65 of file simpleAddressMap.h.

References m_addressMap.

Referenced by MultiSocketSimpleSwitchAT::dump_status().

◆ get_max()

const sc_dt::uint64 & SimpleAddressMap::get_max ( )
inline

Definition at line 99 of file simpleAddressMap.h.

References m_addressMap, retval, and SC_REPORT_ERROR.

◆ get_min()

const sc_dt::uint64 & SimpleAddressMap::get_min ( )
inline

Definition at line 112 of file simpleAddressMap.h.

References m_addressMap, retval, and SC_REPORT_ERROR.

◆ insert()

void SimpleAddressMap::insert ( sc_dt::uint64 baseAddress_,
sc_dt::uint64 highAddress_,
unsigned int portNumber_ )
inline

Insert a slave into the address map.

Definition at line 129 of file simpleAddressMap.h.

References m_addressMap, and SC_REPORT_ERROR.

Referenced by MultiSocketSimpleSwitchAT::bindTargetSocket().

Member Data Documentation

◆ m_addressMap

mapType SimpleAddressMap::m_addressMap
private

the address map

Definition at line 142 of file simpleAddressMap.h.

Referenced by checkSanity(), decode(), dumpMap(), get_max(), get_min(), and insert().

◆ retval

sc_dt::uint64 SimpleAddressMap::retval
private

Definition at line 140 of file simpleAddressMap.h.

Referenced by get_max(), and get_min().


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

Generated on Tue Jun 18 2024 16:24:09 for gem5 by doxygen 1.11.0