Skip to content

Commit

Permalink
Added documentation to AsyncResetSynchronizer (#230)
Browse files Browse the repository at this point in the history
  • Loading branch information
Wardstein authored Dec 17, 2020
1 parent 11a297f commit 9a37a58
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion migen/genlib/resetsync.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,24 @@

__all__ = ["AsyncResetSynchronizer"]


class AsyncResetSynchronizer(Special):
"""AsyncResetSynchronizer
Connects a synchronized reset signal to the provided ClockDomain. Synchronizing is done with two
D-Flip-Flops in the provided ClockDomain. The output of the second flip-flop is directly connected
to the reset signal of the provided ClockDomain.
Asynchronous rising edge of the async_reset signal propagates directly to the output. Clearing the
async_reset signal is synchronized by the two flip-flops.
Needs to be added to the specials list: self.specials += AsyncResetSynchronizer(cd, async_reset)
cd : in
ClockDomain the reset signal shall be connected to
async_reset : in
Reset signal (potentially) asynchronous to the ClockDomain provided in parameter "cd".
Synchronized instance of the reset signal is connected to the ClockDomains "rst" signal.
async_reset is high active.
"""
def __init__(self, cd, async_reset):
Special.__init__(self)
self.cd = cd
Expand Down

0 comments on commit 9a37a58

Please sign in to comment.