Skip to content

Commit 5b055fb

Browse files
Fix alteraPll qsys generation (#2587)
PR #2417 caused a bug in the generation of the `qsys` file: it generated a spurious extra output clock which was completely unused otherwise.
1 parent 0f6af4e commit 5b055fb

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
FIXED: Fix `alteraPll` `qsys` generation. PR [#2417](https://github.com/clash-lang/clash-compiler/pull/2417) (included in Clash v1.6.5) caused a bug in the generation of the `qsys` file: it generated a spurious extra output clock which was completely unused otherwise.

clash-lib/src/Clash/Primitives/Intel/ClockGen.hs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -297,14 +297,9 @@ alteraPllQsysTemplate
297297
alteraPllQsysTemplate bbCtx
298298
| _clocksClass
299299
: (_,stripVoid -> kdIn,_)
300-
: (_,stripVoid -> kdOutsProd,_)
300+
: (_,stripVoid -> Product _ _ (init -> kdOuts),_)
301301
: _ <- bbInputs bbCtx
302302
= let
303-
kdOuts = case kdOutsProd of
304-
Product _ _ ps -> ps
305-
KnownDomain {} -> [kdOutsProd]
306-
_ -> error "internal error: not a Product or KnownDomain"
307-
308303
cklFreq (KnownDomain _ p _ _ _ _)
309304
= periodToHz (fromIntegral p) / 1e6 :: Double
310305
cklFreq _ = error "internal error: not a KnownDomain"

0 commit comments

Comments
 (0)