Can assign registers from different clock domain
See original GitHub issueIt’s possible to assign a register in a different clock domain than the one it was created in, but the assignment still happens on the register instantiation clock. For example:
val a = Reg(...)
withClock (someDifferentClock) {
a := somethingElse
}
But a still updates on the enclosing clock, not someDifferentClock
.
The register assignment in a different clock domain should probably be an error, as the results are not what would be expected from reading the code.
Type of issue: other enhancement
Impact: API modification
Development Phase: proposal
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
register read/write from/to different clock domains
Hello, what is the best approach to read/write register from different clock domains. Lets say i have an ip with an axi-lite interface...
Read more >Automatic Handling of Register Clock Domain Crossings
Control and status registers (CSRs) are one part of many designs where asynchronous clocks are often used and metastability is a very real ......
Read more >Register Transformations with Multiple Clock Domains*
a wide range of register transformations relating to the multiple clock domains. For example, we can perform pipelining, phase abstraction, and retiming ...
Read more >How to change reg in two different always blocks?
It's not possible to drive one output from two always blocks, and it's especially not possible to drive one output from two different...
Read more >Transferring Data between Clock Domains Using Registers - NI
Before completing this task, verify that registers are the best data storage and transfer option for your application.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Please don’t change this - we rely upon it extensively. The documentation and scaladoc should just be very clear that the register gets its clock at declaration time, not at assignment time.
Resolution from the dev meeting today was “working as intended”.
There is also a proposed feature to check unsafe clock domain crossings in FIRRTL (with safe crossings as an annotation), though it not really the same issue (since reconstructing lexical scope information like withClock scopes in FIRRTL is iffy at best).