From 30285c2bc5e47477a582eb2fac4c537b9ae94a16 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Wed, 22 Dec 2021 03:53:13 +0000 Subject: [PATCH] use correct X-Form L field in OP_MTMSRD --- src/soc/fu/trap/main_stage.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/soc/fu/trap/main_stage.py b/src/soc/fu/trap/main_stage.py index 4ed4e6ad..116be81a 100644 --- a/src/soc/fu/trap/main_stage.py +++ b/src/soc/fu/trap/main_stage.py @@ -233,7 +233,8 @@ class TrapMainStage(PipeModBase): # MTMSR/D. v3.0B p TODO - move to MSR with m.Case(MicrOp.OP_MTMSRD, MicrOp.OP_MTMSR): - L = self.fields.FormX.L[0:-1] # X-Form field L + # L => bit 16 in LSB0, bit 15 in MSB0 order + L = self.fields.FormX.L1[0:1] # X-Form field L1 # start with copy of msr comb += msr_o.eq(msr_i) with m.If(L): -- 2.30.2