Skip to content

Add support for software write-once fields (w1 / rw1) - #212

Open
WRoenninger wants to merge 5 commits into
SystemRDL:mainfrom
WRoenninger:wroenninger/feat/support-rw1
Open

WRoenninger wants to merge 5 commits into
SystemRDL:mainfrom
WRoenninger:wroenninger/feat/support-rw1

Conversation

@WRoenninger

@WRoenninger WRoenninger commented Aug 11, 2026 •

Copy link
Copy Markdown

Description of change

This adds software write-once functionality to the field logic.

An additional flop write_once is added for fields with the w1 or rw1 properties.
This flop is hot when reset and blown on the first successful software write.

Documentation is updated to reflect the new functionality as well as a dedicated unit test.

Additionally fixes some lint issues involving types by allowing None in the type annotation.

Fixes #207

Checklist

  • I have reviewed this project's contribution guidelines
  • This change has been tested and does not break any of the existing unit tests. (if unable to run the tests, let us know)
    • Tests are included as part of this pull request.
  • If this change adds new features, I have added new unit tests that cover them.
    • New testcases have been added to test the write once-functionality. Tested locally with questasim.

For write once fields intruduce an additional flop bit write_once. Reset to 1 and moved to 0 on first sw access. Gates the sw write branch via an AND. Only truely written first swmod blows this bit. Only clearable via reset.

Signed-off-by: Wolfgang Roenninger <49239695+WRoenninger@users.noreply.github.com>
Signed-off-by: Wolfgang Roenninger <49239695+WRoenninger@users.noreply.github.com>
Was prviously iterating over the keys which are plain strings. This then results in breakage of the jinja template. Now it properly returns the object which has the name attribute which is used in the template.
@WRoenninger
WRoenninger force-pushed the wroenninger/feat/support-rw1 branch from f3c9041 to 4b8c12f Compare August 12, 2026 07:58

This branch has not been deployed

No deployments
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.

[FEATURE] Support for write-once software access modes sw = w1 / sw = rw1

1 participant