add fabric compatibility mode
[soc.git] / src / soc / experiment / icache.py
index ff45332d8fd9a5460464468fcefbffd9e808306f..064f39b629e2388616a47be04726cd1c290b1853 100644 (file)
@@ -341,18 +341,21 @@ class ICache(FetchUnitInterface, Elaboratable, ICacheConfig):
         # test if microwatt compatibility to be enabled
         self.microwatt_compat = (hasattr(pspec, "microwatt_compat") and
                                  (pspec.microwatt_compat == True))
+        # test if fabric compatibility is to be enabled
+        self.fabric_compat = (hasattr(pspec, "fabric_compat") and
+                                 (pspec.fabric_compat == True))
 
         XLEN = pspec.XLEN
         LINE_SIZE = 64
-        TLB_SIZE = 16
-        NUM_LINES = 16
+        TLB_SIZE = 8
+        NUM_LINES = 8
         NUM_WAYS = 2
         if self.small_cache:
             # reduce way sizes and num lines to ridiculously small
             NUM_LINES = 2
             NUM_WAYS = 1
             TLB_SIZE = 2
-        if self.microwatt_compat:
+        if self.microwatt_compat or self.fabric_compat:
             # reduce way sizes
             NUM_WAYS = 1