Skip to content

Commit

Permalink
Added support for mesif protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
Yisong Yue committed May 12, 2016
1 parent c21caec commit 85ce66e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ LD = g++
LDFLAGS = -std=c++0x
EXENAME = wicked test

wicked : main.o cache.o snoop.o memops.o protocol.o
wicked : clean main.o cache.o snoop.o memops.o protocol.o
$(LD) $(LDFLAGS) main.o cache.o snoop.o memops.o protocol.o -o wicked

all : wicked test
Expand Down
2 changes: 1 addition & 1 deletion mat-mult.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
for j in range(col * N/2, col * N/2 + N/2):
for k in range(N):
print "10 1 %x" %(addrA + data_size * (i * N + k))
print "5 1 %x" %(addrB + data_size * (j * N + k))
print "5 1 %x" %(addrB + data_size * (k * N + j))
print "8 1 %x" %(addrC + data_size * (i * N + j))
print "20 2 %x" %(addrC + data_size * (i * N + j))
4 changes: 2 additions & 2 deletions mesif.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class mesif: public Protocol{
~mesif(){
cerr<<"MESIF destructor"<<endl;
}
tuple<char, bool, bool> next_state(int operation, char curr_state){
tuple<char, bool, bool> next_state(int operation, char curr_state, bool exclusive){
char output;
bool write_back = false;
bool respond = false;
Expand Down Expand Up @@ -54,7 +54,7 @@ class mesif: public Protocol{
case 'i' :{
switch (operation){
case PROC_READ_FROM_CACHE: output = 'f'; break;
case PROC_READ_FROM_MEM: output = 'e'; break;
case PROC_READ_FROM_MEM: output = exclusive ? 'e' : 'f'; break;
case PROC_WRITE: output = 'm'; break;
case BUS_READ: output = 'i'; write_back = false; respond = false; break;
case BUS_WRITE: output = 'i'; write_back = false; respond = false; break;
Expand Down
4 changes: 2 additions & 2 deletions snoop_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ typedef msi PROTOCOL_TYPE;

// cache specifications
typedef LRU CACHE_TYPE;
#define CACHE_SIZE 8
#define CACHE_SIZE 32
#define CACHE_NUM_WAYS 4
#define CACHE_BLOCK_SIZE 16
#define CACHE_BLOCK_SIZE 32

// system specifications
#define NUM_PROCESSORS 4
Expand Down

0 comments on commit 85ce66e

Please sign in to comment.