-
Notifications
You must be signed in to change notification settings - Fork 0
/
CacheInterface.bsv
42 lines (32 loc) · 962 Bytes
/
CacheInterface.bsv
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
// SINGLE CORE CACHE INTERFACE WITH NO PPP
import MainMem::*;
import MemTypes::*;
import Cache32::*;
import Cache512::*;
// import FIFOF::*;
interface CacheInterface;
method Action sendReqData(CacheReq req);
method ActionValue#(Word) getRespData();
method Action sendReqInstr(CacheReq req);
method ActionValue#(Word) getRespInstr();
endinterface
module mkCacheInterface(CacheInterface);
let verbose = True;
MainMem mainMem <- mkMainMem();
Cache512 cacheL2 <- mkCache;
Cache32 cacheI <- mkCache32;
Cache32 cacheD <- mkCache32;
// You need to add rules and/or state elements.
method Action sendReqData(CacheReq req);
noAction;
endmethod
method ActionValue#(Word) getRespData() ;
return unpack(0);
endmethod
method Action sendReqInstr(CacheReq req);
noAction;
endmethod
method ActionValue#(Word) getRespInstr();
return unpack(0);
endmethod
endmodule