openhwgroup / core-v-verif

Functional verification project for the CORE-V family of RISC-V cores.

Home Page:https://docs.openhwgroup.org/projects/core-v-verif/en/latest/index.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Merge Script Improvements

silabs-robin opened this issue · comments

Task Outcome

Merge script gets additional features and tweaks (as per list below).

Background information

We have started using the new script for doing S->X merges, and ideas for improvements are appearing.

Location Information

https://github.com/openhwgroup/core-v-verif/blob/cv32e40s/dev/bin/merge.sh

Completion Criteria

All feature suggestions are either implemented or rejected.

Additional context

New suggestions:

  • Abort if merge is Already up to date.
    • Rationale: Otherwise the script will look like it did a merge, and confusion ensues.
  • git branch --unset-upstream after cloning/branching operations.
    • Rationale: The default tracking is the upstream repo, and it is slightly impractical.
  • Generated branch names should be PR-title'able.
    • Rationale: Github defaults the PR title to the merge commit description, no need to manually come up with a title.
  • "Press any key to continue" before major operations.
    • Rationale: Sometimes one would like more control and monitoring of what the script is about to do.
    • Comment: Could be an option to enable it (default is off).

Implemented suggestions:

  • Don't require clonetb to be run manually beforehand.
    • Rationale: It makes it less easy to use, it has caused confusion, and it might be unnecessary.
    • Comment: Could do git init instead?
    • #2282
  • Option to generate "rejection diff".

Rejected suggestions:

  • Echo what command is run ("set -x").
    • Rationale: It is not easy to understand what the script does when it runs.
    • (It prints to much, substitutions and everything.)
  • Checkout cv32e40x-dv to a folder not called cv32e40x.
    • Rationale: Preserve work-in-progress that may be present in the cv32e40x folder.
    • Comment: Relates do the "don't require clonetb" suggestion.
    • (There is no reason to multitask like that. Do a fresh clone of cvverif, run the script, be done.)

Agree with all the suggustions!

Also agreeing with another suggestion from @silabs-hfegran: The script executes instructions that require no prior setup. If there is already a setup, the instructions that are executed may give warnings or error messages. It can be confusing and should be avoided.

Another suggestion: perhaps checkout the cv32e40x-dv repo into a folder not called cv32e40x, this is to preserve any possible work-in-progress files or repo changes that may be present in the cv32e40x folder.

The script executes instructions that require no prior setup. If there is already a setup, the instructions that are executed may give warnings or error messages. It can be confusing and should be avoided.

I struggle to understand.

  1. Does the script today give warnings, and the warnings are confusing?
  2. Or is it confusing that the script today does not give warnings, and we want to add warnings?

Further:

  • Should the script stop when it encounters reason to give warnings?
  • What kind of warnings are we talking about?

Another suggestion: perhaps checkout the cv32e40x-dv repo into a folder not called cv32e40x, this is to preserve any possible work-in-progress files or repo changes that may be present in the cv32e40x folder.

I added this to the list.