Tue, 06 Apr 2010 18:27:55 +0100
Make cache 2-way associative
Switched from Direct Mapped to 2-Way Set Associative caches. Should boost speed
a bit.
lm32_include.v | file | annotate | diff | revisions |
1.1 diff -r a8e459b24c31 -r 0a26167af7e1 lm32_include.v 1.2 --- a/lm32_include.v Mon Apr 05 21:00:31 2010 +0100 1.3 +++ b/lm32_include.v Tue Apr 06 18:27:55 2010 +0100 1.4 @@ -52,14 +52,14 @@ 1.5 // CFG_ICACHE_ASSOCIATIVITY=1 => disaster, CPU will not work at all 1.6 // Works 100% OK with expensive synthesizers. 1.7 `define CFG_ICACHE_ENABLED 1.8 -`define CFG_ICACHE_ASSOCIATIVITY 1 1.9 +`define CFG_ICACHE_ASSOCIATIVITY 2 1.10 `define CFG_ICACHE_SETS 512 1.11 `define CFG_ICACHE_BYTES_PER_LINE 4 1.12 `define CFG_ICACHE_BASE_ADDRESS 32'h0 1.13 `define CFG_ICACHE_LIMIT 32'h7FFF_FFFF 1.14 1.15 `define CFG_DCACHE_ENABLED 1.16 -`define CFG_DCACHE_ASSOCIATIVITY 1 1.17 +`define CFG_DCACHE_ASSOCIATIVITY 2 1.18 `define CFG_DCACHE_SETS 512 1.19 `define CFG_DCACHE_BYTES_PER_LINE 4 1.20 `define CFG_DCACHE_BASE_ADDRESS 32'h0