Added prefix DCACHE_
This commit is contained in:
@@ -12,10 +12,10 @@
|
||||
// `define SYN 1
|
||||
`define ASIC 1
|
||||
|
||||
`define CACHE_NUM_BANKS 8
|
||||
`define DCACHE_NUM_BANKS 8
|
||||
|
||||
`define NUMBER_BANKS 8
|
||||
`define NUM_WORDS_PER_BLOCK 4
|
||||
`define DCACHE_NUMBER_BANKS 8
|
||||
`define DCACHE_NUM_WORDS_PER_BLOCK 4
|
||||
|
||||
|
||||
`define NUM_BARRIERS 4
|
||||
@@ -121,46 +121,46 @@
|
||||
// `define PARAM
|
||||
|
||||
//Cache configurations
|
||||
`define CACHE_SIZE 4096 //Bytes
|
||||
`define DCACHE_SIZE 4096 //Bytes
|
||||
`ifdef SYN
|
||||
`define CACHE_WAYS 1
|
||||
`define DCACHE_WAYS 1
|
||||
`else
|
||||
`define CACHE_WAYS 2
|
||||
`define DCACHE_WAYS 2
|
||||
`endif
|
||||
`define CACHE_BLOCK 128 //Bytes
|
||||
`define CACHE_BANKS 8
|
||||
`define NUM_WORDS_PER_BLOCK 4
|
||||
`define NUM_REQ `NT
|
||||
`define DCACHE_BLOCK 128 //Bytes
|
||||
`define DCACHE_BANKS 8
|
||||
`define DCACHE_NUM_WORDS_PER_BLOCK 4
|
||||
`define DCACHE_NUM_REQ `NT
|
||||
|
||||
`define CACHE_WAY_INDEX $clog2(`CACHE_WAYS) //set this to 1 if CACHE_WAYS is 1
|
||||
//`define CACHE_WAY_INDEX 1
|
||||
`define CACHE_BLOCK_PER_BANK (`CACHE_BLOCK / `CACHE_BANKS)
|
||||
`define DCACHE_WAY_INDEX $clog2(`DCACHE_WAYS) //set this to 1 if CACHE_WAYS is 1
|
||||
//`define DCACHE_WAY_INDEX 1
|
||||
`define DCACHE_BLOCK_PER_BANK (`DCACHE_BLOCK / `DCACHE_BANKS)
|
||||
|
||||
// Offset
|
||||
`define CACHE_OFFSET_NB ($clog2(`NUM_WORDS_PER_BLOCK))
|
||||
`define DCACHE_OFFSET_NB ($clog2(`DCACHE_NUM_WORDS_PER_BLOCK))
|
||||
|
||||
`define CACHE_OFFSET_ST (2+$clog2(`NUMBER_BANKS))
|
||||
`define CACHE_OFFSET_ED (`CACHE_OFFSET_ST+(`CACHE_OFFSET_NB)-1)
|
||||
`define DCACHE_OFFSET_ST (2+$clog2(`DCACHE_NUMBER_BANKS))
|
||||
`define DCACHE_OFFSET_ED (`DCACHE_OFFSET_ST+(`DCACHE_OFFSET_NB)-1)
|
||||
|
||||
|
||||
`define CACHE_ADDR_OFFSET_RNG `CACHE_OFFSET_ED:`CACHE_OFFSET_ST
|
||||
`define CACHE_OFFSET_SIZE_RNG ($clog2(`NUM_WORDS_PER_BLOCK)-1):0
|
||||
`define DCACHE_ADDR_OFFSET_RNG `DCACHE_OFFSET_ED:`DCACHE_OFFSET_ST
|
||||
`define DCACHE_OFFSET_SIZE_RNG ($clog2(`DCACHE_NUM_WORDS_PER_BLOCK)-1):0
|
||||
|
||||
|
||||
// Index
|
||||
`define NUM_IND (`CACHE_SIZE / (`CACHE_WAYS * `CACHE_BLOCK_PER_BANK))
|
||||
`define CACHE_IND_NB ($clog2(`NUM_IND))
|
||||
`define DCACHE_NUM_IND (`DCACHE_SIZE / (`DCACHE_WAYS * `DCACHE_BLOCK_PER_BANK))
|
||||
`define DCACHE_IND_NB ($clog2(`DCACHE_NUM_IND))
|
||||
|
||||
`define CACHE_IND_ST (`CACHE_OFFSET_ED+1)
|
||||
`define CACHE_IND_ED (`CACHE_IND_ST+`CACHE_IND_NB-1)
|
||||
`define DCACHE_IND_ST (`DCACHE_OFFSET_ED+1)
|
||||
`define DCACHE_IND_ED (`DCACHE_IND_ST+`DCACHE_IND_NB-1)
|
||||
|
||||
`define CACHE_ADDR_IND_RNG `CACHE_IND_ED:`CACHE_IND_ST
|
||||
`define CACHE_IND_SIZE_RNG `CACHE_IND_NB-1:0
|
||||
`define DCACHE_ADDR_IND_RNG `DCACHE_IND_ED:`DCACHE_IND_ST
|
||||
`define DCACHE_IND_SIZE_RNG `DCACHE_IND_NB-1:0
|
||||
|
||||
|
||||
// Tag
|
||||
`define CACHE_ADDR_TAG_RNG 31:(`CACHE_IND_ED+1)
|
||||
`define CACHE_TAG_SIZE_RNG (32-(`CACHE_IND_ED+1)-1):0
|
||||
`define DCACHE_ADDR_TAG_RNG 31:(`DCACHE_IND_ED+1)
|
||||
`define DCACHE_TAG_SIZE_RNG (32-(`DCACHE_IND_ED+1)-1):0
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user