Skip to content

Conversation

@drom
Copy link
Collaborator

@drom drom commented Oct 25, 2024

Added a small PoC JS tool to index instruction yaml files.

./index-unifieddb.js . > index.json

@drom drom requested a review from dhower-qc as a code owner October 25, 2024 20:17
@drom drom mentioned this pull request Oct 25, 2024
@dhower-qc
Copy link
Collaborator

Do you just need an index of the instructions? What about extensions/CSRs/profiles/...?

@drom
Copy link
Collaborator Author

drom commented Oct 25, 2024

good point. fixing

@drom
Copy link
Collaborator Author

drom commented Oct 25, 2024

what do I do with non-yaml files? idl, isa, adoc?

Skipping for now

./index-unifieddb.js ./arch > index.json

@drom
Copy link
Collaborator Author

drom commented Oct 25, 2024

should be reading all yaml, json files now

@drom
Copy link
Collaborator Author

drom commented Oct 28, 2024

Any other work need to be done for merging this PR

@dhower-qc
Copy link
Collaborator

How should this be used? A few options:

  1. We can have it generate the index as a file under Pages, so you would access it (for the tip of main) at, e.g., https://riscv-software-src.github.io/riscv-unified-db/artifacts/index.json
  2. We could add the generated index to the repository, along with a pre-commit hook to ensure it stays consistent.

I think 1. will be easier to manage (we don't have any required hooks yet), but has the obvious downside that you don't keep an index around with each commit.

Thoughts?

Copy link
Collaborator

@dhower-qc dhower-qc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file should be under the backends/ folder. I'd be ok adding it under backends/arch_gen, since that backend already creates something similar. A new subfolder would also be fine.

@dhower-qc
Copy link
Collaborator

How should this be used? A few options:

  1. We can have it generate the index as a file under Pages, so you would access it (for the tip of main) at, e.g., https://riscv-software-src.github.io/riscv-unified-db/artifacts/index.json
  2. We could add the generated index to the repository, along with a pre-commit hook to ensure it stays consistent.

I think 1. will be easier to manage (we don't have any required hooks yet), but has the obvious downside that you don't keep an index around with each commit.

Thoughts?

Actually, now that I look closer at the file, it seems like you don't even need the output saved. Is that right?

@drom
Copy link
Collaborator Author

drom commented Oct 29, 2024

Currently I am fetching yaml files from https://raw.githubusercontent.com/riscv-software-src/riscv-unified-db/refs/heads/main/ path. It would be convenient having index.json some where under the same hierarchy.
That would mean generating and committing it with every push to git. Maybe git hook.
Yes, please move script anywhere withing repo.

@dhower-qc
Copy link
Collaborator

I submitted a pull request on your fork. If you think that looks good, update this PR and we'll get it merged

@drom
Copy link
Collaborator Author

drom commented Oct 30, 2024

yes, it is good to merge

@dhower-qc dhower-qc merged commit 5f75f6a into riscv-software-src:main Nov 1, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants