From 18a13a07c43b276a2081900c1eb592bbbe0f8ed5 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Wed, 17 Jun 2020 14:20:06 +0100 Subject: [PATCH] add "respect_pc" boolean to ISACaller --- src/soc/decoder/isa/caller.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/soc/decoder/isa/caller.py b/src/soc/decoder/isa/caller.py index 6f444339..4b850861 100644 --- a/src/soc/decoder/isa/caller.py +++ b/src/soc/decoder/isa/caller.py @@ -211,19 +211,19 @@ class ISACaller: # decoder2 - an instance of power_decoder2 # regfile - a list of initial values for the registers # initial_{etc} - initial values for SPRs, Condition Register, Mem, MSR + # respect_pc - tracks the program counter. requires initial_insns def __init__(self, decoder2, regfile, initial_sprs=None, initial_cr=0, initial_mem=None, initial_msr=0, - initial_insns=None): + initial_insns=None, respect_pc=False): + + self.respect_pc = respect_pc if initial_sprs is None: initial_sprs = {} if initial_mem is None: initial_mem = {} if initial_insns is None: initial_insns = {} - self.respect_pc = False - else: - # setup batch of instructions: we want to respect (follow) the PC - self.respect_pc = True + assert self.respect_pc == False, "instructions required to honor pc" self.gpr = GPR(decoder2, regfile) self.mem = Mem(row_bytes=8, initial_mem=initial_mem) -- 2.30.2