Skip to content

fix(data): fix field names to be closer to operands #872

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ThinkOpenly
Copy link
Collaborator

  • dret, mnret, and sctrclr take no operands.
  • sspush and sspopchk are each single mnemonics that take a very
    restricted set of operand values.
    Also include a bit of documentation.
  • vaeskf1.vi, vaeskf2.vi, vsm3c.vi, vsm4k.vi, vwsll.vi:
    renamed field to match operand.

@ThinkOpenly ThinkOpenly requested a review from dhower-qc as a code owner June 25, 2025 20:42
@ThinkOpenly ThinkOpenly force-pushed the assembly-fixes-plus branch from 799b45e to dde8bf8 Compare June 25, 2025 23:31
@ThinkOpenly
Copy link
Collaborator Author

@dhower-qc , any clue why the CI tests are failing? They fail without the updated instruction appendix commit as well, so just the first commit is a problem, but there's not a ton there... some deleted and created files causing issues?

BTW, the "prettier" pre-commit hook made me make the list of unacceptable values for sspush/sspopchk uglier. (I had them on a single line, but it didn't like that.)

@kbroch-rivosinc
Copy link
Collaborator

@dhower-qc , any clue why the CI tests are failing? They fail without the updated instruction appendix commit as well, so just the first commit is a problem, but there's not a ton there... some deleted and created files causing issues?

BTW, the "prettier" pre-commit hook made me make the list of unacceptable values for sspush/sspopchk uglier. (I had them on a single line, but it didn't like that.)

In this case might want to do this: https://prettier.io/docs/ignore#yaml

@ThinkOpenly
Copy link
Collaborator Author

@dhower-qc , any clue why the CI tests are failing? They fail without the updated instruction appendix commit as well, so just the first commit is a problem, but there's not a ton there... some deleted and created files causing issues?

BTW, the "prettier" pre-commit hook made me make the list of unacceptable values for sspush/sspopchk uglier. (I had them on a single line, but it didn't like that.)

Oddly, I can provoke the error by reverting everything, then just removing spec/std/isa/inst/Zicfiss/sspopchk.x1.yaml.

$ git switch main
$ rm spec/std/isa/inst/Zicfiss/sspopchk.x1.yaml
$ ./do clean
$ ./do test:inst_encodings
Using devcontainer environment
Running with 1 job(s)
Checking for conflicts in instruction encodings../workspace/riscv-unified-db/.home/.venv/bin/python3 /workspace/riscv-unified-db/tools/ruby-gems/udb/python/yaml_resolver.py merge /workspace/riscv-unified-db/spec/std/isa /does/not/exist /workspace/riscv-unified-db/gen/spec/_
Merging arch: 100%|####################################| 1712/1712 [00:00<00:00, 20619.71it/s]
[INFO] Merged architecture files written to /workspace/riscv-unified-db/gen/spec/_
/workspace/riscv-unified-db/.home/.venv/bin/python3 /workspace/riscv-unified-db/tools/ruby-gems/udb/python/yaml_resolver.py resolve /workspace/riscv-unified-db/gen/spec/_ /workspace/riscv-unified-db/gen/resolved_spec/_
Resolving arch: 100%|##################################| 1712/1712 [00:05<00:00, 327.40it/s]
Validating arch: 100%|#################################| 1712/1712 [00:06<00:00, 255.72it/s]
[INFO] Resolved architecture files written to /workspace/riscv-unified-db/gen/resolved_spec/_
/workspace/riscv-unified-db/.home/.gems/ruby/3.2.0/gems/sorbet-runtime-0.5.12157/lib/types/configuration.rb:296:in `call_validation_error_handler_default': Return value: Expected type Udb::DatabaseObject, got type NilClass (TypeError)
Caller: /workspace/riscv-unified-db/tools/ruby-gems/udb/lib/udb/obj/instruction.rb:1140
Definition: /workspace/riscv-unified-db/tools/ruby-gems/udb/lib/udb/architecture.rb:353 (Udb::Architecture#ref)

    raise TypeError.new(opts[:pretty_message])
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
	from /workspace/riscv-unified-db/.home/.gems/ruby/3.2.0/gems/sorbet-runtime-0.5.12157/lib/types/configuration.rb:303:in `call_validation_error_handler'
	from /workspace/riscv-unified-db/.home/.gems/ruby/3.2.0/gems/sorbet-runtime-0.5.12157/lib/types/private/methods/call_validation.rb:322:in `report_error'
	from /workspace/riscv-unified-db/.home/.gems/ruby/3.2.0/gems/sorbet-runtime-0.5.12157/lib/types/private/methods/call_validation_2_7.rb:112:in `block in create_validator_method_fast1'
	from /workspace/riscv-unified-db/tools/ruby-gems/udb/lib/udb/obj/instruction.rb:1140:in `block in hints'
	from /workspace/riscv-unified-db/tools/ruby-gems/udb/lib/udb/obj/instruction.rb:1140:in `map'
	from /workspace/riscv-unified-db/tools/ruby-gems/udb/lib/udb/obj/instruction.rb:1140:in `hints'
	from /workspace/riscv-unified-db/tools/ruby-gems/udb/lib/udb/obj/instruction.rb:998:in `bad_encoding_conflict?'
	from /workspace/riscv-unified-db/Rakefile:168:in `block (5 levels) in <top (required)>'
	from /workspace/riscv-unified-db/Rakefile:163:in `each'
	from /workspace/riscv-unified-db/Rakefile:163:in `block (4 levels) in <top (required)>'
	from /workspace/riscv-unified-db/Rakefile:160:in `each'
	from /workspace/riscv-unified-db/Rakefile:160:in `block (3 levels) in <top (required)>'
	from /workspace/riscv-unified-db/Rakefile:159:in `each'
	from /workspace/riscv-unified-db/Rakefile:159:in `each_with_index'
	from /workspace/riscv-unified-db/Rakefile:159:in `block (2 levels) in <top (required)>'
	from /workspace/riscv-unified-db/.home/.gems/ruby/3.2.0/gems/rake-13.3.0/lib/rake/task.rb:281:in `block in execute'
	from /workspace/riscv-unified-db/.home/.gems/ruby/3.2.0/gems/rake-13.3.0/lib/rake/task.rb:281:in `each'
	from /workspace/riscv-unified-db/.home/.gems/ruby/3.2.0/gems/rake-13.3.0/lib/rake/task.rb:281:in `execute'
	from /workspace/riscv-unified-db/.home/.gems/ruby/3.2.0/gems/rake-13.3.0/lib/rake/task.rb:219:in `block in invoke_with_call_chain'
	from /workspace/riscv-unified-db/.home/.gems/ruby/3.2.0/gems/rake-13.3.0/lib/rake/task.rb:199:in `synchronize'
	from /workspace/riscv-unified-db/.home/.gems/ruby/3.2.0/gems/rake-13.3.0/lib/rake/task.rb:199:in `invoke_with_call_chain'
	from /workspace/riscv-unified-db/.home/.gems/ruby/3.2.0/gems/rake-13.3.0/lib/rake/task.rb:188:in `invoke'
	from /workspace/riscv-unified-db/.home/.gems/ruby/3.2.0/gems/rake-13.3.0/lib/rake/application.rb:188:in `invoke_task'
	from /workspace/riscv-unified-db/.home/.gems/ruby/3.2.0/gems/rake-13.3.0/lib/rake/application.rb:138:in `block (2 levels) in top_level'
	from /workspace/riscv-unified-db/.home/.gems/ruby/3.2.0/gems/rake-13.3.0/lib/rake/application.rb:138:in `each'
	from /workspace/riscv-unified-db/.home/.gems/ruby/3.2.0/gems/rake-13.3.0/lib/rake/application.rb:138:in `block in top_level'
	from /workspace/riscv-unified-db/.home/.gems/ruby/3.2.0/gems/rake-13.3.0/lib/rake/application.rb:147:in `run_with_threads'
	from /workspace/riscv-unified-db/.home/.gems/ruby/3.2.0/gems/rake-13.3.0/lib/rake/application.rb:132:in `top_level'
	from -e:1:in `<main>'

Is there some sort of cache in play?

@ThinkOpenly ThinkOpenly force-pushed the assembly-fixes-plus branch from dde8bf8 to 604abde Compare June 26, 2025 01:44
@ThinkOpenly ThinkOpenly linked an issue Jun 26, 2025 that may be closed by this pull request
@dhower-qc
Copy link
Collaborator

dhower-qc commented Jul 9, 2025

The error message is a bit cryptic because it manifests as a Sorbet type error, but it's caused by the fact a $ref wasn't resolved. Presumably, that happens because you removed a file that was the target of a ref.

@dhower-qc
Copy link
Collaborator

Back to your changes, I suspect you are seeing this because the instructions you are changing are "hints" of may-be-ops. So there is going to be a reference in their definition that needs to be updated.

@ThinkOpenly ThinkOpenly force-pushed the assembly-fixes-plus branch 3 times, most recently from 27595ba to 5ff0704 Compare July 10, 2025 19:31
- `dret`, `mnret`, and `sctrclr` take no operands.
- `sspush` and `sspopchk` are each single mnemonics that take a very
  restricted set of operand values.
  Also include a bit of documentation.
- `vaeskf1.vi`, `vaeskf2.vi`, `vsm3c.vi`, `vsm4k.vi`, `vwsll.vi`:
  renamed field to match operand.
@ThinkOpenly ThinkOpenly force-pushed the assembly-fixes-plus branch from 5ff0704 to 2bd5246 Compare July 10, 2025 19:35
Copy link

codecov bot commented Jul 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 43.30%. Comparing base (b7f93d8) to head (2bd5246).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #872   +/-   ##
=======================================
  Coverage   43.30%   43.30%           
=======================================
  Files          10       10           
  Lines        4787     4787           
  Branches     1298     1298           
=======================================
  Hits         2073     2073           
  Misses       2714     2714           
Flag Coverage Δ
idlc 43.30% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

.vx RVV instructions refer to the GPR source as both xs1 and rs1
3 participants