update SVSTATE to 64 bit length (fortunately very easy)
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Wed, 14 Jul 2021 19:07:02 +0000 (20:07 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Wed, 14 Jul 2021 19:09:37 +0000 (20:09 +0100)
src/soc/fu/trap/pipe_data.py
src/soc/fu/trap/trap_input_record.py
src/soc/simple/issuer.py
src/soc/simple/test/test_runner.py

index 44c63654f6b01fdb080189f30bfdbe2ba460808d..93a135b81c3056292338bcd65f263897a5e468dc 100644 (file)
@@ -27,7 +27,7 @@ class TrapOutputData(FUBaseData):
                # ... however we *do* need to *write* MSR, NIA, SVSTATE (RFID)
                ('STATE', 'nia', '0:63'),  # NIA (Next PC)
                ('STATE', 'msr', '0:63'),  # MSR
-               ('STATE', 'svstate', '0:31')]  # SVSTATE
+               ('STATE', 'svstate', '0:63')]  # SVSTATE
     def __init__(self, pspec):
         super().__init__(pspec, True)
         # convenience
index 4d3d66e8d8980af2ea55b6a32ae7b80d90ba0aba..521ab590be1461051ea4ae9f4b265d00cd54ec82 100644 (file)
@@ -16,7 +16,7 @@ class CompTrapOpSubset(CompOpSubsetBase):
                   ('insn', 32),
                   ('msr', 64),     # from core.state
                   ('cia', 64),     # likewise
-                  ('svstate', 32), # likewise
+                  ('svstate', 64), # likewise
                   ('is_32bit', 1),
                   ('traptype', TT.size), # see trap main_stage.py, PowerDecoder2
                   ('trapaddr', 13),
index 465ade0e4c9abc2bd5326fa111bcfaebb298a767..feef6b62a24b6e27a7f5d601c3096a9d494378bd 100644 (file)
@@ -242,7 +242,7 @@ class TestIssuerInternal(Elaboratable):
         # instruction go/monitor
         self.pc_o = Signal(64, reset_less=True)
         self.pc_i = Data(64, "pc_i") # set "ok" to indicate "please change me"
-        self.svstate_i = Data(32, "svstate_i") # ditto
+        self.svstate_i = Data(64, "svstate_i") # ditto
         self.core_bigendian_i = Signal() # TODO: set based on MSR.LE
         self.busy_o = Signal(reset_less=True)
         self.memerr_o = Signal(reset_less=True)
index 85afa3092ac599eae6b93362070b1badffd36356..180474e123353ec2f5a3fa20735a65e75fb5c0a0 100644 (file)
@@ -134,7 +134,7 @@ class TestRunner(FHDLTestCase):
         m = Module()
         comb = m.d.comb
         pc_i = Signal(32)
-        svstate_i = Signal(32)
+        svstate_i = Signal(64)
 
         if self.microwatt_mmu:
             ldst_ifacetype = 'test_mmu_cache_wb'