intel / rohd

The Rapid Open Hardware Development (ROHD) framework is a framework for describing and verifying hardware in the Dart programming language.
https://intel.github.io/rohd-website
BSD 3-Clause "New" or "Revised" License
374 stars 67 forks source link

Protect `Const` from having its value modified #486

Open mkorbel1 opened 4 months ago

mkorbel1 commented 4 months ago

Motivation

Currently, Const is just a Logic that initializes itself with a specific value. Technically, the value could be changed later via a put directly on the Const or on another Logic which shares an underlying _Wire. This can be confusing for debug, and worse, could cause synthesized outputs (e.g. SystemVerilog) to have constant values which do not match the requested value at the time of Const creation.

Desired solution

Some ideas:

Alternatives considered

No response

Additional details

Somewhat related to #429