lowRISC / lowRISC/opentitan

Reggen with named single field (homogeneous) patch

Open
#16,938 1 comment 0 reactions 0 assignees View on GitHub
Earlgrey-PROD Candidate
Dominant language
SystemVerilog
Stars
3.6k
Forks
1.1k
Avg merge
2d 22h
Merged PRs (30d)
141

Description

Sometimes registers may have only single field with "name".
Reggen will ignore the field and generating different structure of register. (treating it as homogeneous).
It is unstable if we added a field or remove it. The struct is total different if field length shrinked from 2 to 1.

following is patch for the util/reggen:
Treating register with named field as a hierarchical structure:
[unified-reg-struct.patch](https://github.com/lowRISC/opentitan/files/10296500/unified-reg-struct.patch)

Some tpl to patch against 6 months ago..
[unified-reg-struct-tpl.patch.gz](https://github.com/lowRISC/opentitan/files/10296542/unified-reg-struct-tpl.patch.gz)

Contributor guide

Open the contributing guide

Research direction

Start by reviewing util/reggen and the attached unified-reg-struct.patch, then compare the older template patch for context. The change is complete when a register with one named field is generated as a hierarchical structure consistently, including when fields are added or removed.

Written by the indexing model from the issue text.

Assessment

Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.