Releases: clash-lang/clash-compiler
v1.4.7
1.4.7 Jan 30th 2022
Fixed:
- Clash now shows days in time strings for compile runs which take longer than a day #1989.
- Types defined in the package head are no longer qualified in the package body when rendering VHDL #1996.
asyncRam
with different read and write clocks no longer produce the wrong results in Haskell simulation. #2031Clash.Explicit.RAM.asyncRam#
Haskell simulation incorrectly treated an undefined write enable as asserted. It now causes an undefined value to be written instead. This problem did not propagate to the otherasyncRam
functions, where the same condition would simultaneously lead to an undefined write address, which would be handled correctly. This problem also only affects Haskell simulation, not the generated HDL. #2031Clash.Explicit.BlockRam.blockRam#
andClash.Explicit.BlockRam.File.blockRamFile#
Haskell simulation incorrectly treated an undefined write enable as asserted. It now causes an undefined value to be written instead. This problem did not propagate to the otherblockRam
functions, where the same condition would simultaneously lead to an undefined write address, which would be handled correctly. This problem also only affects Haskell simulation, not the generated HDL.(#2054)
Internal changes:
- Removed instances of
Hashable Term
andHashable Type
#1986 - Added structural equality on
Term
(Clash.Core.Subst.eqTerm
) andType
(Clash.Core.Subst.eqType
)
Internal fixes:
- Enable used to be a
Bool
in the Blackbox DSL, so we could useboolToBit
. However it now has its own type in the DSL (Enable domainName
), so we've added a new conversion function in order to convert it to a Bool.
v1.4.6
v1.4.5
Changed:
clash-lib
now supports prettyprinter 1.7
Documentation:
- The documentation on hidden clocks, resets, and enables has been corrected and extended in
Clash.Signal
.
v1.4.4
v1.4.3
v1.4.2
Fixed:
- Erroneous examples in
Clash.Annotation.TopEntity
documentation #646 and #654 unconcat
cannot be used as initial/reset value for aregister
#1756showX
now doesn't crash if a spine of aVec
is undefined~ISACTIVEENABLE
in blackboxes works again, and now acts onSignal dom Bool
in addition toEnable dom
. Since #1368, enable lines were always generated even if they were known to be always enabled. Fixes #1786.- clash --show-options now shows -fclash-* options in GHC 9.0 #1787
makeRecursiveGroups
now correctly identifies mutual recursion between global binders (#1796).
v1.4.1
Fixed:
- Broken VHDL primitive template for setSlice# #1715
- Unable to reduce nested type families #1721
- DEC transformation fails for functions applied to more than 62 arguments #1669
- Erroneous examples in BlockRam.File and ROM.File documentation #1608
- Blackboxes of
Clash.Sized.Vector
functions error on vectors containingClocks
,Reset
, orEnable
#1606 Clash.Signal.Delayed.delayI
cannot be reset, theHiddenReset
constraint was unintentional. Asserting its reset has never worked. Removed the constraint #1739.- Annotate attributes cannot use type families #1742
Changed:
Clash.Prelude.ROM.File.romFile
now takes anEnum addr => addr
as address argument, making it actually useful. #407
v1.4.0
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:
- Clash starters is now hosted in its own repository. It now has built-in support for Stack, allowing users to start a new project with a single command.
- Clash protocols is an experimental project making it easier to write Clash circuits with bidirectional communication.
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 no longer disables the monomorphism restriction. See #1270, and mentioned issues, as to why. This can cause, among other things, certain eta-reduced descriptions of sequential circuits to no longer type-check. See #1349 for code hints on what kind of changes to make to your own code in case it no longer type-checks due to this change.
- Type arguments of
Clash.Sized.Vector.fold
swapped: beforeforall a n . (a -> a -> a) -> Vec (n+1) a -> a
, afterforall n a . (a -> a -> a) -> Vec (n+1) a
. This makes it easier to usefold
in a1 <= n
context so you can "simply" dofold @(n-1)
Fixed
now obeys the laws forEnum
as set out in the Haskell Report, and it is now consistent with the documentation for theEnum
class on Hackage. AsFixed
is alsoBounded
, the rule in the Report thatsucc maxBound
andpred minBound
should result in a runtime error is interpreted as meaning thatsucc
andpred
result in a runtime error whenever the result cannot be represented, not merely forminBound
andmaxBound
alone.- To ease integration with external tools, Clash will now create a separate directory for each top entity under their fully qualified name. For example, a single module
A
containing two top entitiesfoo
andbar
will produce an HDL folder with two folders in it:A.foo
andA.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.
v1.2.5
Fixed:
- The normalizeType function now fully normalizes types which require calls to
reduceTypeFamily #1469 flogBaseSNat
,clogBaseSNat
andlogBaseSNat
primitives are now implemented correctly.Previously these primitives would be left unevaluated causing issues as demonstrated in #1479- Specializing on functions with type family arguments no longer fails #1477
satSucc
,satPred
correctly handle "small types" such asIndex 1
.msb
no longer fails on values larger than 64 bitsundefined
can now be used as a reset value ofautoReg@Maybe
#1507- Signal's
fmap
is now less strict, preventing infinite loops in very specific situations. See #1521 - Clash now uses correct function names in manifest and sdc files #1533
- Clash no longer produces erroneous HDL in very specific cases #1536
- Usage of
fold
inside other HO primitives (e.g.,map
) no longer fails #1524
v1.2.4
- Changed:
- Relaxed upper bound versions of
aeson
anddlist
, in preparation for the new Stack LTS. - Reverted changes to primitive definitions for 'zipWith', 'map', 'foldr', and 'init' introduced in 1.2.2. They have shown to cause problems in very specific circumstances.
- Relaxed upper bound versions of