From 3e6f17ff2cd8f0725e79392e494108f417483c29 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Thu, 13 Aug 2020 22:44:29 +0100 Subject: [PATCH] fix dmi reg read --- src/soc/simple/issuer.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/soc/simple/issuer.py b/src/soc/simple/issuer.py index 42bb5977..bf28f86f 100644 --- a/src/soc/simple/issuer.py +++ b/src/soc/simple/issuer.py @@ -65,7 +65,8 @@ class TestIssuer(Elaboratable): self.state_r_msr = self.core.regs.rf['state'].r_ports['msr'] # MSR rd # DMI interface access - self.int_r = self.core.regs.rf['int'].r_ports['dmi'] # INT read + intrf = self.core.regs.rf['int'] + self.int_r = intrf.r_ports['dmi'] # INT read # hack method of keeping an eye on whether branch/trap set the PC self.state_nia = self.core.regs.rf['state'].w_ports['nia'] @@ -82,6 +83,7 @@ class TestIssuer(Elaboratable): # convenience dmi = dbg.dmi d_reg = dbg.dbg_gpr + intrf = self.core.regs.rf['int'] # clock delay power-on reset cd_por = ClockDomain(reset_less=True) @@ -229,11 +231,11 @@ class TestIssuer(Elaboratable): with m.If(d_reg.req): # request for regfile access being made # TODO: error-check this # XXX should this be combinatorial? sync better? - if hasattr(self.int_r, "ren"): + if intrf.unary: comb += self.int_r.ren.eq(1<