Bug 603

Summary: use SPR names/numbers from sprs.csv
Product: Libre-SOC's first SoC Reporter: Luke Kenneth Casson Leighton <lkcl>
Component: Source CodeAssignee: Tobias Platen <libre-soc>
Status: RESOLVED FIXED    
Severity: normal CC: libre-soc-bugs
Priority: High    
Version: unspecified   
Hardware: PC   
OS: Linux   
See Also: https://bugs.libre-soc.org/show_bug.cgi?id=580
https://bugs.libre-soc.org/show_bug.cgi?id=597
https://bugs.libre-soc.org/show_bug.cgi?id=607
NLnet milestone: --- total budget (EUR) for completion of task and all subtasks: 0
budget (EUR) for this task, excluding subtasks' budget: 0 parent task for budget allocation:
child tasks for budget allocation: The table of payments (in EUR) for this task; TOML format:

Description Luke Kenneth Casson Leighton 2021-02-20 21:50:28 GMT
Tobias, the SPR names/numbers are in sprs.csv.  you can find the appropriate
names from running soc/decoder/power_enums.py, it deliberately prints out
the SPRs after reading sprs.csv

also remember spaces, and also to use SPR.DSISR.value (etc)

        SPR_PID   = 48  # TODO read docs for POWER9
        # Microwatt doesn't implement the partition table
        # instead has PRTBL register (SPR) to point to process table
        SPR_PRTBL = 720 # see common.vhdl in microwatt, not in POWER9
        with m.If(((self.dec.op.internal_op == MicrOp.OP_MTSPR) |
                   (self.dec.op.internal_op == MicrOp.OP_MFSPR)) &
                  ((spr == SPR.DSISR) | (spr == SPR.DAR)
                   | (spr==SPR_PRTBL) | (spr==SPR_PID))):
            comb += self.do_copy("fn_unit", Function.MMU)
        with m.Else():
Comment 1 Luke Kenneth Casson Leighton 2021-02-28 00:01:46 GMT
tobias can you please action all of these cleanup bugs, rather than leave them unactioned for days and weeks at a time.
Comment 2 Tobias Platen 2021-02-28 11:14:53 GMT
fixed