Haskell to VHDL/Verilog/SystemVerilog compiler
Changed:
clash-lib
now supports prettyprinter 1.7Documentation:
Clash.Signal
.Fixed:
Clash.Annotation.TopEntity
documentation #646 and #654
unconcat
cannot be used as initial/reset value for a register
#1756
showX
now doesn't crash if a spine of a Vec
is undefined~ISACTIVEENABLE
in blackboxes works again, and now acts on Signal dom Bool
in addition to Enable dom
. Since #1368, enable lines were always generated even if they were known to be always enabled. Fixes #1786.makeRecursiveGroups
now correctly identifies mutual recursion between global binders (#1796).Fixed:
Clash.Sized.Vector
functions error on vectors containing Clocks
, Reset
, or Enable
#1606
Clash.Signal.Delayed.delayI
cannot be reset, the HiddenReset
constraint was unintentional. Asserting its reset has never worked. Removed the constraint #1739.Changed:
Clash.Prelude.ROM.File.romFile
now takes an Enum addr => addr
as address argument, making it actually useful. #407
Although this release includes many small bug fixes and a few API changes, it mostly consists of internal changes to Clash. As promised when releasing v1.2.2 we've put a lot of effort in laying the groundwork for a partial evaluator. We believe this would make Clash an order of magnitude faster as well as more reliable when released. We've also refactored the way Clash generates unique identifiers which works around a number of issues with EDA tools our users have observed. Sadly, we haven't been able to make progress with Shake rules for Clash, promised in the same blog post.
Apart from changes to Clash itself, we've continued to build the ecosystem itself:
As said, most changes in this release have been internal to Clash - setting the stage for a faster and even more reliable Clash. Still, we expect a number of issues to impact users upgrading to 1.4:
Clash.Sized.Vector.fold
swapped: before forall a n . (a -> a -> a) -> Vec (n+1) a -> a
, after forall n a . (a -> a -> a) -> Vec (n+1) a
. This makes it easier to use fold
in a 1 <= n
context so you can "simply" do fold @(n-1)
Fixed
now obeys the laws for Enum
as set out in the Haskell Report, and it is now consistent with the documentation for the Enum
class on Hackage. As Fixed
is also Bounded
, the rule in the Report that succ maxBound
and pred minBound
should result in a runtime error is interpreted as meaning that succ
and pred
result in a runtime error whenever the result cannot be represented, not merely for minBound
and maxBound
alone.A
containing two top entities foo
and bar
will produce an HDL folder with two folders in it: A.foo
and A.bar
. Fully qualified names are not influenced by top entity annotations; instead, the Haskell name of the function is used. Files within their respective directories will be affected by names set in annotations.Thanks to all our contributors, issue reporters, and mailing list users - you make this possible.
View all the changes in the CHANGELOG.
Fixed:
flogBaseSNat
, clogBaseSNat
and logBaseSNat
primitives are now implemented correctly.Previously these primitives would be left unevaluated causing issues as demonstrated in #1479
satSucc
, satPred
correctly handle "small types" such as Index 1
.msb
no longer fails on values larger than 64 bitsundefined
can now be used as a reset value of autoReg@Maybe
#1507
fmap
is now less strict, preventing infinite loops in very specific situations. See #1521
fold
inside other HO primitives (e.g., map
) no longer fails #1524
aeson
and dlist
, in preparation for the new Stack LTS.Changed:
Added:
instance Monoid a => Monoid (Vec n a)
instance Text.Printf(Index)
instance Text.Printf(Signed)
instance Text.Printf(Unsigned)
Fixed:
Clash renders incorrect VHDL when GHCs Worker/Wrapper transformation is enabled #1402
Minor faults in generated HDL when using annotations from Clash.Annotations.SynthesisAttributes
Cabal installed through Snap (clash.cabal
) can now access the internet to fetch pacakges. #1411
Generated QSys file for altpll
incompatible with Quartus CLI (did work in Quartus GUI)
Clash no longer uses component names that clash with identifiers imported from:
when generating VHDL. See https://github.com/clash-lang/clash-compiler/issues/1439.