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

Register duplication #1935

Closed
leonschoorl opened this issue Sep 28, 2021 · 0 comments · Fixed by #1936
Closed

Register duplication #1935

leonschoorl opened this issue Sep 28, 2021 · 0 comments · Fixed by #1936
Assignees
Labels

Comments

@leonschoorl
Copy link
Member

-- one register
f
    :: Clock System
    -> Reset System
    -> Signal System (Unsigned 8)
f clk rst = x
  where
    x :: Signal System (Unsigned 8)
    x = withClockResetEnable clk rst enableGen register 4 (x+1)


-- two registers
g
    :: Clock System
    -> Reset System
    -> Signal System (Unsigned 8)
g clk rst = withClockResetEnable clk rst enableGen x
  where
    x :: SystemClockResetEnable => Signal System (Unsigned 8)
    x = register 4 (x+1)

f work normally.
But the register in g duplicated in the HDL.

@leonschoorl leonschoorl self-assigned this Sep 28, 2021
leonschoorl added a commit that referenced this issue Sep 28, 2021
isWorkFreeClockOrResetOrEnable tried to detect constant enable signals,
but we forgot to update this when we changed the representation
of Enable in #1368.

This fixes the register duplication issue seen in #1935
leonschoorl added a commit that referenced this issue Sep 28, 2021
isWorkFreeClockOrResetOrEnable tried to detect constant enable signals,
but we forgot to update this when we changed the representation
of Enable in #1368.

This fixes the register duplication issue seen in #1935
leonschoorl added a commit that referenced this issue Sep 29, 2021
isWorkFreeClockOrResetOrEnable tried to detect constant enable signals,
but we forgot to update this when we changed the representation
of Enable in #1368.

This fixes the register duplication issue seen in #1935
mergify bot pushed a commit that referenced this issue Sep 29, 2021
isWorkFreeClockOrResetOrEnable tried to detect constant enable signals,
but we forgot to update this when we changed the representation
of Enable in #1368.

This fixes the register duplication issue seen in #1935

(cherry picked from commit 0415bcf)

# Conflicts:
#	tests/Main.hs
leonschoorl added a commit that referenced this issue Sep 29, 2021
isWorkFreeClockOrResetOrEnable tried to detect constant enable signals,
but we forgot to update this when we changed the representation
of Enable in #1368.

This fixes the register duplication issue seen in #1935

(cherry picked from commit 0415bcf)
leonschoorl added a commit that referenced this issue Oct 4, 2021
isWorkFreeClockOrResetOrEnable tried to detect constant enable signals,
but we forgot to update this when we changed the representation
of Enable in #1368.

This fixes the register duplication issue seen in #1935

(cherry picked from commit 0415bcf)
leonschoorl added a commit that referenced this issue Oct 4, 2021
isWorkFreeClockOrResetOrEnable tried to detect constant enable signals,
but we forgot to update this when we changed the representation
of Enable in #1368.

This fixes the register duplication issue seen in #1935

(cherry picked from commit 0415bcf)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant