riscv-software-src / riscv-unified-db

Machine-readable database of the RISC-V specification, and tools to generate various views
Other
23 stars 16 forks source link

Can "profiles" get a "kind" field, too? #317

Open ThinkOpenly opened 1 week ago

ThinkOpenly commented 1 week ago

Is your feature request related to a problem? Please describe. I wrote a short Python script to read in all of the YAML files in the project for the purposes of verifying content, like what extensions are referenced, but never defined. The specific YAML files that reference extensions are (at least) instructions, extensions, CSRs, and profiles. The first three have a "kind" field identifying what each YAML represents, but the latter, "profiles", does not. Current "kind" fields are:

$ find . -name '*.yaml' -exec grep 'kind:' {} \; | sort -u
kind: certificate class
kind: certificate model
kind: csr
kind: extension
kind: instruction

Describe the solution you'd like I'd like to see the YAML files describing profiles also have a kind field like:

kind: profile

Describe alternatives you've considered It's actually difficult to work around, because the top-level field is a profile name, so not a consistent key that can be checked for existence.

dhower-qc commented 21 hours ago

Yes, that's the plan. The only reason it isn't done now is because @dlweaver is working on RVA23; I didn't want to interfere with the schema until he is ready.

dlweaver commented 21 hours ago

If all it takes is adding a "kind: profile" field to RVB23 and RVA23, I can do that right away. Just let me know. (RVB23 is mostly done; probably won't start on RVA23 until early next week)