allow logging function to be overridden for Mem.log_fancy
authorJacob Lifshay <programmerjake@gmail.com>
Fri, 30 Sep 2022 01:44:23 +0000 (18:44 -0700)
committerJacob Lifshay <programmerjake@gmail.com>
Fri, 30 Sep 2022 01:44:23 +0000 (18:44 -0700)
src/openpower/decoder/isa/mem.py

index 6e2226272635c95f4ea6f00b219e2dc3c5530e3b..9132c3574818d0bfabc9a8a796d19681028dd89a 100644 (file)
@@ -153,7 +153,7 @@ class Mem:
         return res
 
     def log_fancy(self, *, kind=LogKind.Default, name="Memory",
-                  log2_line_size=4, log2_column_chunk_size=3):
+                  log2_line_size=4, log2_column_chunk_size=3, log=log):
         line_size = 1 << log2_line_size
         subline_mask = line_size - 1
         column_chunk_size = 1 << log2_column_chunk_size