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

Conversation

mergify[bot]
Copy link

@mergify mergify bot commented Feb 9, 2023

This is an automatic copy of pull request #2417 done by Mergify.
Cherry-pick of c60353e has failed:

On branch mergify/copy/1.6/pr-2417
Your branch is up to date with 'origin/1.6'.

You are currently cherry-picking commit c60353ef2.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	new file:   changelog/2023-02-05T12_23_02+01_00_clocks-lock
	modified:   clash-prelude/clash-prelude.cabal
	new file:   clash-prelude/tests/Clash/Tests/Clocks.hs
	modified:   clash-prelude/tests/unittests.hs

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   clash-prelude/src/Clash/Clocks/Deriving.hs

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/github/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally


Mergify commands and options

More conditions and actions can be found in the documentation.

You can also trigger Mergify actions by commenting on this pull request:

  • @Mergifyio refresh will re-evaluate the rules
  • @Mergifyio rebase will rebase this PR on its base branch
  • @Mergifyio update will merge the base branch into this PR
  • @Mergifyio backport <destination> will backport this PR on <destination> branch

Additionally, on Mergify dashboard you can:

  • look at your merge queues
  • generate the Mergify configuration with the config editor.

Finally, you can contact us on https://mergify.com

@mergify mergify bot added the conflicts label Feb 9, 2023
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 DigitalBrains1 enabled auto-merge (squash) February 10, 2023 09:29
@DigitalBrains1 DigitalBrains1 merged commit fbd1d32 into 1.6 Feb 10, 2023
@DigitalBrains1 DigitalBrains1 deleted the mergify/copy/1.6/pr-2417 branch February 10, 2023 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant