-
Notifications
You must be signed in to change notification settings - Fork 648
Description
Type of issue: feature request
Impact: API addition (no impact on existing code)
Development Phase: proposal
For a PnR friendly RTL, I think we should start to consider how to add Clock-domain-checking library.
Here are my simple ideas to this problem.
for registers in the circuit, they have 4 types:
- under a clock
- under a clock and correspond synchronous reset
- under a clock and full asynchronous reset
- under a clock and asynchronous reset synchronous deassertion reset.
RTL of "full asynchronous" and "asynchronous reset synchronous deassertion" are same:
https://scastie.scala-lang.org/6HKMD9YbSxGeZxP0oroEtw
However a synchronizer should be implemented like this.
https://scastie.scala-lang.org/gAUzcR5iQXSCXVXwGgEATA
These two asynchronous reset have two types of reset, but a same chisel type.
Basically, my idea is annotate clock and reset and let FIRRTL transform to resolve and check them.
I wanna RFC for some comments on what to annotate, and what to check.
Here are something I can come up with:
- annotate clock frequency.
- annotate clock - synchronous reset relationship
- annotate reset generation IO or Module.
- annotate asynchronous type.
- annotate false path(from register to register?)
- annotate safe cross clock domain Module.(AsyncQueue, RationalQueue etc.)
- check register under different clock are not crossing.
- check register under same clock - synchronous reset pair are not crossing to other clock - synchronous reset pair.
- check asynchronous resets are from a reset generation IO without passing any combinational path.
Output should be a set of annotations and can have a vendor specific Transform to generate SDC files.