Moving test_cam_entry
[soc.git] / TLB / TLB.py
index 7c68e4a8f0f60d69c805b86b39d17cb712018699..b11e49e361fb6c8d6db86a07f249f0875669ec29 100644 (file)
@@ -1,14 +1,19 @@
 from nmigen import Memory, Module, Signal
 from nmigen.cli import main
+
 from PermissionValidator import PermissionValidator
 
+# The expected form of the data is
+# Item (Bits)
+# Tag (N - 79) / ASID (78 - 64) / PTE (63 - 0)
+
 class TLB():
     def __init__(self):
         # Inputs
-        self.xwr = Signal(3) # Execute, Write, Read
         self.super = Signal(1) # Supervisor Mode
         self.super_access = Signal(1) # Supervisor Access
         self.command = Signal(2) # 00=None, 01=Search, 10=Write PTE, 11=Reset
+        self.xwr = Signal(3) # Execute, Write, Read
         self.mode = Signal(4) # 4 bits for access to Sv48 on Rv64
         self.asid = Signal(15) # Address Space IDentifier (ASID)
         self.vma = Signal(36) # Virtual Memory Address (VMA)
@@ -60,6 +65,8 @@ class TLB():
                        ]
                 })
             ]
+            return m
         
 thing = TLB()
 print("Gottem")
+