refactoring (see #216 Comment 43)
authorTobias Platen <tplaten@posteo.de>
Mon, 25 May 2020 13:41:49 +0000 (15:41 +0200)
committerTobias Platen <tplaten@posteo.de>
Mon, 25 May 2020 13:41:49 +0000 (15:41 +0200)
src/soc/experiment/l0_cache.py

index eb4435abb444b7786580d603d78a4f58dfb23938..7dc1c260bb029c1d30af4b53ff3d6fafcbfc8e1e 100644 (file)
@@ -138,7 +138,7 @@ class DataMergerRecord(Record):
 
     def __init__(self, name=None):
         layout = (('data', 128),
-                  ('byte_enable', 16)
+                  ('en', 16)
                   )
 
         Record.__init__(self, Layout(layout), name=name)
@@ -163,15 +163,14 @@ class DataMerger(Elaboratable):
         """
         self.array_size = array_size
         ul = []
-        for i in range(0, array_size):
-            ul2 = []
-            for j in range(0, array_size):
-                ul2.append(Signal())
-            ul.append(ul2)
+        for i in range(array_size):
+            ul.append(Signal(array_size,
+                             reset_less=True,
+                             name="addr_match_%d" % i))
         self.addr_array_i = Array(ul)
 
         ul = []
-        for i in range(0, array_size):
+        for i in range(array_size):
             ul.append(DataMergerRecord())
         self.data_i = Array(ul)
         self.data_o = DataMergerRecord()