-from nmigen import Module, Signal
+from nmigen import Module, Signal, Elaboratable
from nmigen.lib.coding import Encoder, PriorityEncoder
-class AddressEncoder():
+class AddressEncoder(Elaboratable):
"""Address Encoder
The purpose of this module is to take in a vector and
-from nmigen import Array, Cat, Module, Signal
+from nmigen import Array, Cat, Module, Signal, Elaboratable
from nmigen.lib.coding import Decoder
from nmigen.cli import main #, verilog
from .AddressEncoder import AddressEncoder
-class Cam():
+class Cam(Elaboratable):
""" Content Addressable Memory (CAM)
The purpose of this module is to quickly look up whether an
-from nmigen import Module, Signal
+from nmigen import Module, Signal, Elaboratable
-class CamEntry:
+
+class CamEntry(Elaboratable):
""" Content Addressable Memory (CAM) Entry
The purpose of this module is to represent an entry within a CAM.
-from nmigen import Module, Signal
+from nmigen import Module, Signal, Elaboratable
from nmigen.cli import main
-from .PteEntry import PteEntry
+from TLB.PteEntry import PteEntry
-class PermissionValidator():
+
+class PermissionValidator(Elaboratable):
""" The purpose of this Module is to check the Permissions of a given PTE
against the requested access permissions.
-from nmigen import Module, Signal
+from nmigen import Module, Signal, Elaboratable
from nmigen.cli import main
-class PteEntry():
+
+class PteEntry(Elaboratable):
""" The purpose of this Module is to centralize the parsing of Page
Table Entries (PTE) into one module to prevent common mistakes
and duplication of code. The control bits are parsed out for
]
m.d.comb += self.asid.eq(self.i[self.asid_start:self.asid_end])
m.d.comb += self.pte.eq(self.i[0:self.asid_start])
- return m
\ No newline at end of file
+ return m