add fabric compatibility mode
[soc.git] / src / soc / experiment / icache.py
index 4e40ce403e94f1536b38e269867496619676293c..064f39b629e2388616a47be04726cd1c290b1853 100644 (file)
@@ -341,6 +341,9 @@ 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
@@ -352,7 +355,7 @@ class ICache(FetchUnitInterface, Elaboratable, ICacheConfig):
             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