projects
/
soc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8a14a47
)
more comments
author
Luke Kenneth Casson Leighton
<lkcl@lkcl.net>
Fri, 5 Jun 2020 15:21:05 +0000
(16:21 +0100)
committer
Luke Kenneth Casson Leighton
<lkcl@lkcl.net>
Fri, 5 Jun 2020 15:21:05 +0000
(16:21 +0100)
src/soc/fu/trap/main_stage.py
patch
|
blob
|
history
diff --git
a/src/soc/fu/trap/main_stage.py
b/src/soc/fu/trap/main_stage.py
index fc862e18bfcd455fe11a080697525802a72fb1b1..81cbe8c83eae34e1c4b3f5bef83ba0c7b1bc0bf7 100644
(file)
--- a/
src/soc/fu/trap/main_stage.py
+++ b/
src/soc/fu/trap/main_stage.py
@@
-139,11
+139,14
@@
class TrapMainStage(PipeModBase):
ctrl_tmp.srr1(63 - 46) <= '1';
"""
with m.If(should_trap):
+ # change the PC to trap address 0x700
comb += nia_o.data.eq(0x700) # trap address
comb += nia_o.ok.eq(1)
+ # take a copy of the current MSR in SRR1
comb += msr_copy(srr1_o.data, msr_i) # old MSR
comb += srr1_o.data[63-46].eq(1) # XXX which bit?
comb += srr1_o.ok.eq(1)
+ # take a copy of the current PC in SRR0
comb += srr0_o.data.eq(cia_i) # old PC
comb += srr0_o.ok.eq(1)