Bug 261 - power_enums.py to read SPRs from sprs.csv
Summary: power_enums.py to read SPRs from sprs.csv
Status: RESOLVED FIXED
Alias: None
Product: Libre-SOC's first SoC
Classification: Unclassified
Component: Specification (show other bugs)
Version: unspecified
Hardware: PC Linux
: --- enhancement
Assignee: Luke Kenneth Casson Leighton
URL:
Depends on:
Blocks: 186
  Show dependency treegraph
 
Reported: 2020-03-18 12:11 GMT by Luke Kenneth Casson Leighton
Modified: 2020-03-18 15:46 GMT (History)
2 users (show)

See Also:
NLnet milestone: NLnet.2019.02.012
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 2020-03-18 12:11:55 GMT
power_enums.py SPRs Enum to read from this:
http://libre-riscv.org/openpower/isatables/sprs.csv
Comment 1 Michael Nolan 2020-03-18 13:31:48 GMT
Done: 474eb33c
Comment 2 Luke Kenneth Casson Leighton 2020-03-18 13:59:09 GMT
(In reply to Michael Nolan from comment #1)
> Done: 474eb33c

ah magic that was quick! :)
Comment 3 Luke Kenneth Casson Leighton 2020-03-18 14:31:33 GMT
oops i'd forgotten to put in the extra fields (length, priv yes/no), added them to the csv file and *then* discovered you'd learned that the key-names aren't unique.  had a lovely time re-introducing the suffixes you added, michael :)
Comment 4 Michael Nolan 2020-03-18 14:40:34 GMT
(In reply to Luke Kenneth Casson Leighton from comment #3)
> oops i'd forgotten to put in the extra fields (length, priv yes/no), added
> them to the csv file and *then* discovered you'd learned that the key-names
> aren't unique.  had a lovely time re-introducing the suffixes you added,
> michael :)

Oh no! 
I'm thinking I could either make the enum value a namedstruct/SPR object that contains the length/privelages, or make a separate dict of structs/objects for that information. Thoughts on which way to go?

Side note, why would they make them duplicate anyhow? That seems somewhat nutty.
Comment 5 Luke Kenneth Casson Leighton 2020-03-18 15:46:25 GMT
(In reply to Michael Nolan from comment #4)

> Oh no!

:) ehh it was fiiine

> I'm thinking I could either make the enum value a namedstruct/SPR object
> that contains the length/privelages, or make a separate dict of
> structs/objects for that information. Thoughts on which way to go?

hmmm... separate doesn't make a lot of sense, people might think they're
somehow not related.

> Side note, why would they make them duplicate anyhow? That seems somewhat
> nutty.

sigh i know, welcome to an "organically-grown" ISA.  they should have put a prefix "H" or "S" in front of them, with "U" for "userspace".