add enable MMU option to issuer_verilog.py
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 20 Apr 2021 16:10:39 +0000 (17:10 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 20 Apr 2021 16:10:39 +0000 (17:10 +0100)
src/soc/fu/compunits/compunits.py
src/soc/simple/issuer_verilog.py

index d2a0e54684f5b0514cf6df16ce70ea13ce757cf4..a33801b08cd027697bc19061a9cea12e0df3ae5b 100644 (file)
@@ -274,9 +274,9 @@ class AllFunctionUnits(Elaboratable):
         if microwatt_mmu:
             print("cut here ==============================")
             alu = self.fus["mmu0"].alu
-            print("alu",alu)
+            print("alu", alu)
             pi = alu.pi
-            print("pi",pi)
+            print("pi", pi)
             pilist = [pi]
         if pilist is None:
             return
index 446b7f419731773df6c6a754174773213cd56613..3632d0e65749e73549292a74497948ada4cddf89 100644 (file)
@@ -32,6 +32,12 @@ if __name__ == '__main__':
     parser.add_argument("--disable-core", dest='core', action="store_false",
                         help="disable main core",
                         default=False)
+    parser.add_argument("--enable-mmu", dest='mmu', action="store_true",
+                        help="Enable mmu",
+                        default=False)
+    parser.add_argument("--disable-mmu", dest='mmu', action="store_false",
+                        help="Disable mmu",
+                        default=False)
     parser.add_argument("--enable-pll", dest='pll', action="store_true",
                         help="Enable pll",
                         default=False)
@@ -65,6 +71,8 @@ if __name__ == '__main__':
              'mul': 1,
              'shiftrot': 1
             }
+    if args.mmu:
+        units['mmu'] = 1 # enable MMU
 
     pspec = TestMemPspec(ldst_ifacetype='bare_wb',
                          imem_ifacetype='bare_wb',
@@ -84,8 +92,10 @@ if __name__ == '__main__':
                          sram4x4kblock=args.enable_sram4x4kblock, # add SRAMs
                          debug=args.debug,      # set to jtag or dmi
                          svp64=args.svp64,      # enable SVP64
+                         mmu=args.mmu,          # enable MMU
                          units=units)
 
+    print("mmu", pspec.__dict__["mmu"])
     print("nocore", pspec.__dict__["nocore"])
     print("regreduce", pspec.__dict__["regreduce"])
     print("gpio", pspec.__dict__["gpio"])