cse378
Class MemorySystem
java.lang.Object
cse378.MemorySystem
public class MemorySystem
- extends java.lang.Object
Method Summary |
java.util.LinkedList<Status> |
fetch(cse378.address.VirtualAddress vaddr)
Send a request to fetch an instruction |
java.lang.String |
getStats()
|
void |
initDCache(int lines,
int sets,
int blockSize)
|
void |
initDTLB(int lines,
int sets)
|
void |
initICache(int lines,
int sets,
int blockSize)
|
void |
initITLB(int lines,
int sets)
|
void |
initPageTable(int pages)
|
java.util.LinkedList<Status> |
read(cse378.address.VirtualAddress vaddr)
Send a request to read from memory |
cse378.address.PhysicalPage |
translate(TLB tlb,
cse378.address.VirtualAddress vaddr,
java.util.LinkedList<Status> statusList,
boolean isStore)
Perform address translatio |
java.util.LinkedList<Status> |
write(cse378.address.VirtualAddress vaddr)
Send a request to write to memory |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ICache
static AbstractCache ICache
DCache
static AbstractCache DCache
ITLB
static TLB ITLB
DTLB
static TLB DTLB
pageTable
static PageTable pageTable
MemorySystem
MemorySystem()
initPageTable
public void initPageTable(int pages)
initICache
public void initICache(int lines,
int sets,
int blockSize)
initDCache
public void initDCache(int lines,
int sets,
int blockSize)
initITLB
public void initITLB(int lines,
int sets)
initDTLB
public void initDTLB(int lines,
int sets)
translate
public cse378.address.PhysicalPage translate(TLB tlb,
cse378.address.VirtualAddress vaddr,
java.util.LinkedList<Status> statusList,
boolean isStore)
- Perform address translatio
- Parameters:
tlb
- TLB to use (ITLB or DTLB)vaddr
- VirtualAddress to translatestatusList
- List of the statuses of your accessesisStore
- If a write is occurring on this address
- Returns:
- PhysicalPage for vaddr
fetch
public java.util.LinkedList<Status> fetch(cse378.address.VirtualAddress vaddr)
- Send a request to fetch an instruction
- Parameters:
vaddr
- virtual address of the instruction
- Returns:
- Status of this attempt
read
public java.util.LinkedList<Status> read(cse378.address.VirtualAddress vaddr)
- Send a request to read from memory
- Parameters:
vaddr
- virtual address of the instruction
- Returns:
- Status of this attempt
write
public java.util.LinkedList<Status> write(cse378.address.VirtualAddress vaddr)
- Send a request to write to memory
- Parameters:
vaddr
- virtual address of the instruction
- Returns:
- Status of this attempt
getStats
public java.lang.String getStats()