From 780f2980e8ec2687fb96e0dde88e3cf977118bf5 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Tue, 4 Aug 2020 15:15:52 +0100 Subject: [PATCH] cycle through INT regs, read and debug in litex sim --- src/soc/litex/florent/sim.py | 55 ++++++++++++++++++++++++++++-------- 1 file changed, 44 insertions(+), 11 deletions(-) diff --git a/src/soc/litex/florent/sim.py b/src/soc/litex/florent/sim.py index 54db6113..7d883b91 100755 --- a/src/soc/litex/florent/sim.py +++ b/src/soc/litex/florent/sim.py @@ -104,9 +104,17 @@ class LibreSoCSim(SoCCore): # debug messages out self.sync += If(dbg_msg, - (Display("[%06x] dbg: %1x, %016x", uptime, dbg_addr, dbg_dout), - dbg_msg.eq(0) - ) + (If(dbg_addr == 0b10, # PC + Display("pc : %016x", dbg_dout), + ), + If(dbg_addr == 0b11, # PC + Display(" msr: %016x", dbg_dout), + ), + If(dbg_addr == 0b101, # GPR + Display(" gpr: %016x", dbg_dout), + ), + dbg_msg.eq(0) + ) ) # kick off a "stop" @@ -119,10 +127,18 @@ class LibreSoCSim(SoCCore): ) # loop every 1<