class RAM

Simulated RAM

Inheritance:


Public Methods

[more] RAM( ID newID = 0, string newName = "RAM", double mb = 128, PERCENT newCacheHitRate=0.0, TIME newCacheAccess=0, TIME newRamAccess=0)
Default constructor
[more]MEMAMT getSize() const
Get capacity of RAM (in Megabytes)
[more]PERCENT getCacheHitRate(void) const
[more]TIME getCacheAccessTime(void) const
[more]TIME getRamAccess(void) const
[more]TIME getTransferTime(void) const
[more]void setSize(const MEMAMT newSize)
Set the size of the memory module (in MB)
[more]void setCacheHitRate(PERCENT rate)
[more]void setCacheAccessTime(TIME time)
[more]void setRamAccessTime(TIME time)
[more]string toString(void) const
returns a string representation of the memory
[more]TIME calcAvgAccess(void)


Inherited from SimObj:

Public Methods

ostring getName(void) const
oID getID(void) const
ovoid setName(const string newName)
ovoid setID(const ID newID)
ovirtual void clear(void)
ovirtual bool activate(void)


Documentation

This class simulates RAM in a computer. It has a certain capacity and takes a certain (short) amount of time to read and write data.

IMPORTANT NOTE: currently, the simulator disregards the amount of time it takes to read something from RAM. Instead, it simply assumes N RAM accesses per CPU second (a parameter set in the config file). So most of this object is going unused at the moment.

o RAM( ID newID = 0, string newName = "RAM", double mb = 128, PERCENT newCacheHitRate=0.0, TIME newCacheAccess=0, TIME newRamAccess=0)

oMEMAMT getSize() const

oPERCENT getCacheHitRate(void) const

oTIME getCacheAccessTime(void) const

oTIME getRamAccess(void) const

oTIME getTransferTime(void) const

ovoid setSize(const MEMAMT newSize)

ovoid setCacheHitRate(PERCENT rate)

ovoid setCacheAccessTime(TIME time)

ovoid setRamAccessTime(TIME time)

ostring toString(void) const

oTIME calcAvgAccess(void)


This class has no child classes.
Author:
John Oleszkiewicz

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.