@@ -25,6 +25,12 @@ def new_memory(logger):
2525 return Memory (block_size = 2 ** 20 , logger = logger )
2626
2727
28+ def get_printable_location (pc , core , coreid , opcode ):
29+ hex_pc = pad_hex (pc )
30+ mnemonic , _ = decode (opcode )
31+ return 'Core ID: 0x%x PC: %s Instruction: %s' % (coreid , hex_pc , mnemonic )
32+
33+
2834class Revelation (Sim ):
2935
3036 def __init__ (self ):
@@ -35,17 +41,12 @@ def __init__(self):
3541 self .arch_name = self .arch_name_human .lower ()
3642 self .jit_enabled = True
3743 if self .jit_enabled :
38- self .jitdriver = JitDriver (greens = ['pc' , 'core' , 'coreid' , 'opcode' ],
39- reds = ['tick_counter' ,
40- 'halted_cores' ,
41- 'idle_cores' ,
42- 'old_pcs' ,
43- 'memory' ,
44- 'sim' ,
45- 'state' ,
46- 'start_time' ],
47- virtualizables = ['state' ],
48- get_printable_location = self .get_location )
44+ self .jitdriver = JitDriver (
45+ greens = ['pc' , 'core' , 'coreid' , 'opcode' ],
46+ reds = ['tick_counter' , 'halted_cores' , 'idle_cores' ,
47+ 'old_pcs' , 'memory' , 'sim' , 'state' , 'start_time' ],
48+ virtualizables = ['state' ],
49+ get_printable_location = get_printable_location )
4950 self .default_trace_limit = 400000
5051 self .max_insts = 0
5152 self .logger = None
@@ -73,11 +74,6 @@ def __init__(self):
7374 9 : 0x24 , # Software-generate user interrupt.
7475 }
7576
76- @staticmethod
77- def get_location (pc , core , coreid , opcode ):
78- mnemonic , _ = decode (opcode )
79- return 'Core ID: %x PC: %x Instruction: %s' % (coreid , pc , mnemonic )
80-
8177 @elidable
8278 def next_core (self , core ):
8379 return (core + 1 ) % (self .rows * self .cols )
0 commit comments