Bug 603 - use SPR names/numbers from sprs.csv
Summary: use SPR names/numbers from sprs.csv
Status: RESOLVED FIXED
Alias: None
Product: Libre-SOC's first SoC
Classification: Unclassified
Component: Source Code (show other bugs)
Version: unspecified
Hardware: PC Linux
: High normal
Assignee: Tobias Platen
URL:
Depends on:
Blocks:
 
Reported: 2021-02-20 21:50 GMT by Luke Kenneth Casson Leighton
Modified: 2021-02-28 11:38 GMT (History)
1 user (show)

See Also:
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:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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