Skip to content

aiprit/MemorySim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Parit Burintrathikul

Java Simulation of Cache Memory Functions

main memory is my memorysim
block is a block class
hex to bi has the calculations
the file input has an no automatic .txt added so if the file has a .txt or something add appropriate endings

Testcase1:
args: test2.txt 1024 4 32
store 0x1a25bb 4 c77eaabb
load 0x1a25bb 4
load 0x1a25bb 4

output
store 0x1a25bb miss
load 0x1a25bb miss c77eaabb
load 0x1a25bb hit c77eaabb

TEST2:
args: test2.txt 1 512 2
store 0x1a25bb 1 c77e
store 0x0 1 123456
load 0x0 1
load 0x0 1
load 0x1a25bb 1

store 0x1a25bb miss
store 0x0 miss
load 0x0 miss 12
load 0x0 hit 12
load 0x1a25bb miss c7


Test3:
args: test2.txt 1024 4 32
store 0x1a25bb 1 c77e
load 0x1a25bb 1
store 0x1a25bb 1 45
load 0x1a25bb 1

store 0x1a25bb miss
load 0x1a25bb miss c7
store 0x1a25bb hit
load 0x1a25bb hit 45



Test case4 :

rgs: tracefile.txt 1024 4 32
store 0x1a25bb 4 c77eaabb
store 0xFA25A0 4 abcdef90
store 0xC225A0 4 12345678
load 0x1a25bb 4
load 0xFA25A0 4
load 0xFA25A0 4
load 0xC225A0 4
load 0x1a25bb 4
load 0xC225A0 4
load 0xFA25A0 4

output
store 0x1a25bb miss
store 0xFA25A0 miss
store 0xC225A0 miss
load 0x1a25bb miss c77eaabb
load 0xFA25A0 miss abcdef90
load 0xFA25A0 hit abcdef90
load 0xC225A0 miss 12345678
load 0x1a25bb miss c77eaabb
load 0xC225A0 hit 12345678
load 0xFA25A0 miss abcdef90

About

Cache Simulation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages