super is a keyword: replace with "supermode" in TLB and PermValidator
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Wed, 13 Mar 2019 07:33:46 +0000 (07:33 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Wed, 13 Mar 2019 07:33:46 +0000 (07:33 +0000)
TLB/src/PermissionValidator.py
TLB/src/TLB.py

index 6e8bee894ca661043954b79fe7225ec333e7ffc3..0808ab256c5e654419d494aa6929e63406e164f8 100644 (file)
@@ -20,7 +20,7 @@ class PermissionValidator():
         # Input
         self.data = Signal(data_size);
         self.xwr = Signal(3) # Execute, Write, Read
-        self.super = Signal(1) # Supervisor Mode
+        self.supermode = Signal(1) # Supervisor Mode
         self.super_access = Signal(1) # Supervisor Access
         self.asid = Signal(15) # Address Space IDentifier (ASID)
 
@@ -36,7 +36,7 @@ class PermissionValidator():
                       & data[2] == self.xwr[1] \
                       & data[1] == self.xwr[0]):
                 # Supervisor Logic
-                with m.If(self.super):
+                with m.If(self.supermode):
                     # Valid if entry is not in user mode or supervisor
                     # has Supervisor User Memory (SUM) access via the
                     # SUM bit in the sstatus register
@@ -48,4 +48,4 @@ class PermissionValidator():
             with m.Else():
                 m.comb += self.valid.eq(0)
         with m.Else():
-            m.comb += self.valid.eq(0)
\ No newline at end of file
+            m.comb += self.valid.eq(0)
index 473813642294290ee15f34dddaa6f01d55139d23..c1e8815e69d989d176ecd0d1f987bfdb0e9d4adf 100644 (file)
@@ -35,7 +35,7 @@ class TLB():
         self.perm_validator = PermissionValidator(asid_size + pte_size)
 
         # Inputs
-        self.super = Signal(1) # Supervisor Mode
+        self.supermode = Signal(1) # Supervisor Mode
         self.super_access = Signal(1) # Supervisor Access
         self.command = Signal(2) # 00=None, 01=Search, 10=Write L1, 11=Write L2
         self.xwr = Signal(3) # Execute, Write, Read
@@ -109,7 +109,7 @@ class TLB():
                         # Execute, Read, Write
                         self.perm_validator.xwr.eq(self.xwr),
                         # Supervisor Mode
-                        self.perm_validator.super.eq(self.super),
+                        self.perm_validator.supermode.eq(self.supermode),
                         # Supverisor Access
                         self.perm_validator.super_access.eq(self.super_access),
                         # Address Space IDentifier (ASID)