#ifndef CMEMORY_H #define CMEMORY_H #include "block.h" #include "system.h" #define DEFAULT_SIZE 1024*1024*64/64 //64M of memory with 64K //blocks as a default class CMemory { public: CMemory::CMemory(void); CMemory::CMemory(long int MB, int BlockSize); void CMemory::GenerateMemory(int numpes); CBlock* Blocks; //an array of the blocks long int CMemory::getMemSizeMB(void); long int CMemory::getMemSizeBlocks(void); long int CMemory::getMemSizeWords(void); long int CMemory::getNumDataBlocks(void); int CMemory::getBlockSize(void); private: long int MemSizeMB; //the size of the memory in MB long int MemSizeBlocks; //the size of memory in Blocks long int MemSizeWords; //the size of memory in Words int BlockSize; //the size of the blocks in words int NumDataBlocks; //the number of blocks dedicated to DATA long int CMemory::genBranchAddress(long int curraddr); long int CMemory::genDataAddress(long int curraddr); }; #endif