lowRISC / lowRISC/opentitan

regtool: reg_top triggers write error when not writing to a permitted byte, instead of when writing to a forbidden byte

Open
#22,911 10 comments 0 reactions 1 assignee View on GitHub

@rswarbrick is already working on this.

Since May 2, 2024.

Component:Doc Tool:reggen
Dominant language
SystemVerilog
Stars
3.6k
Forks
1.1k
Avg merge
2d 22h
Merged PRs (30d)
141

Description

https://github.com/lowRISC/opentitan/blob/e9925bdf1464e9cec8ab8931c108cee4acb2709b/util/reggen/reg_top.sv.tpl#L655-L659

Shouldn't this code check |(reg_be & ~PERMIT[i]), not |(PERMIT[i] & ~reg_be)?
I.e., "if a byte is being written (reg_be[j] = 1) and it is not permitted (PERMIT[i][j] = 0, or ~PERMIT[i][j] = 1), then there's an error."

Currently the error signal seems to be activated when any of the permitted bytes is not being written, instead of when any of the non-permitted bytes is being written.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.