Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Clash.Clocks lock signal (copy #2417) #2420

Merged
merged 1 commit into from
Feb 10, 2023

Commits on Feb 10, 2023

  1. Fix Clash.Clocks lock signal (#2417)

    The lock signal is now `False` for the time that the input reset signal
    is asserted, and `True` when the input reset signal is not asserted.
    
    Before this commit, the lock signal output was defined in terms of the
    reset input as follows:
    
    ```
    rstIn :: Reset domIn
    lockOut :: Signal pllOut Bool
    lockOut = unsafeCoerce rstIn
    ```
    
    This is incorrect in three ways:
    
    * You can't coerce a `Reset` into a `Signal`, it segfaults.
    * The timebase is wrong: one input sample becomes one output sample even
      when the output clock has a different period than the input clock.
    * There is no handling of `ResetPolarity`; the simulation model is that
      lock is deasserted when reset is asserted.
    
    (cherry picked from commit c60353e)
    DigitalBrains1 committed Feb 10, 2023
    Configuration menu
    Copy the full SHA
    9de6ca4 View commit details
    Browse the repository at this point in the history