Skip to content

Conversation

@jooyeon111
Copy link
Contributor

Add documentation for "Partially assigned register" design error.

Fixes #127

Introduction
------------

SpinalHDL will check that when a register is conditionally assigned, all bits of the register must be assigned in every execution path. If some bits of a register are left unassigned in certain conditions, it can lead to unintended hardware behavior such as latches or unpredictable values.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all bits of the register must be assigned in every execution path

I think it can be confusing, as some could understand it as :

when X
need to assign all bits of reg
else
need to assign all bits of reg

Instead maybe it can be :
"all bits of the register must at least be assigned once" ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the feedback! I agree the original wording is ambigous.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated! Changed to "all bits of the register must at least be assigned once" as suggested.

@jooyeon111 jooyeon111 force-pushed the docs/partially-assigned-register branch from 071e362 to de96364 Compare December 4, 2025 13:03
@Dolu1990 Dolu1990 merged commit 802a640 into SpinalHDL:master Dec 9, 2025
3 checks passed
@Dolu1990
Copy link
Member

Dolu1990 commented Dec 9, 2025

Thanks ^^

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.

Document design error: Partially assigned register

2 participants