GMemory Class Reference

#include <network.h>

Collaboration diagram for GMemory:

Collaboration graph
[legend]

Public Member Functions

 GMemory ()
 ~GMemory ()
uint032_t * getrealaddr (const uint064_t)
void read4b (const uint064_t, uint032_t *)
void write4b (const uint064_t, const uint032_t)
uint032_t * getpagerealaddr (const uint064_t addr)
int pagehit (const uint064_t addr)

Data Fields

struct list_head alist

Static Public Attributes

static const unsigned int GMEM_PAGE_BITS = 12
static const uint064_t GMEM_PAGE_SIZE = 1llu << GMEM_PAGE_BITS
static const uint064_t GMEM_PAGE_MASK = GMEM_PAGE_SIZE - 1
static const unsigned int PAGE_LATENCY = 80
static const unsigned int READ_LATENCY = 20

Data Structures

struct  page_t

Constructor & Destructor Documentation

GMemory::GMemory (  ) 

GMemory constructor

GMemory::~GMemory (  ) 

GMemory destructor


Member Function Documentation

uint032_t * GMemory::getrealaddr ( const uint064_t  addr  ) 

translate an address in the simulation to the real address

Parameters:
addr address
Returns:
real address

void GMemory::read4b ( const uint064_t  addr,
uint032_t *  data 
)

read 4 byte from the specified address

Parameters:
addr address
Returns:
data the pointer to be stored the data loaded from the memory

void GMemory::write4b ( const uint064_t  addr,
const  uint032_t 
)

write 4 byte to the specified address

Parameters:
addr address
Returns:
data the data to be stored to the memory

uint032_t * GMemory::getpagerealaddr ( const uint064_t  addr  ) 

get the real address of page address

Parameters:
addr address
Returns:
real address of the page

int GMemory::pagehit ( const uint064_t  addr  ) 

return whether the specified address is included in the current page buffer

Parameters:
addr address
Returns:
0: page fault, 1: page hit


Field Documentation

const unsigned int GMemory::GMEM_PAGE_BITS = 12 [static]

const uint064_t GMemory::GMEM_PAGE_SIZE = 1llu << GMEM_PAGE_BITS [static]

const uint064_t GMemory::GMEM_PAGE_MASK = GMEM_PAGE_SIZE - 1 [static]

const unsigned int GMemory::PAGE_LATENCY = 80 [static]

const unsigned int GMemory::READ_LATENCY = 20 [static]

struct list_head GMemory::alist [read]


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

Generated on Mon Mar 29 19:17:58 2010 for SimMc by  doxygen 1.5.6