clash-lang / clash-compiler

Haskell to VHDL/Verilog/SystemVerilog compiler
https://clash-lang.org/
Other
1.43k stars 151 forks source link

`convertReset`: filter synchronous reset glitches #2553

Closed DigitalBrains1 closed 1 year ago

DigitalBrains1 commented 1 year ago

If convertReset is used to convert a synchronous reset into an asynchronous reset, a flip-flop in the source domain is inserted to filter glitches from the source reset.

A synchronous reset can safely be driven from combinatorial logic: the logic might glitch while the signals propagate, but timing analysis verified that the signals have fully propagated by the time the clock edge comes.

Asynchronous resets generally need to come from a glitch free source because glitches have a high chance of accidentally resetting logic.

Still TODO: