Skip to content

Releases: clash-lang/clash-compiler

v1.4.7

30 Jan 13:37
fa01fd9
Compare
Choose a tag to compare

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. #2031
  • Clash.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 other asyncRam 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. #2031
  • Clash.Explicit.BlockRam.blockRam# and Clash.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 other blockRam 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 and Hashable Type #1986
  • Added structural equality on Term (Clash.Core.Subst.eqTerm) and Type (Clash.Core.Subst.eqType)

Internal fixes:

  • Enable used to be a Bool in the Blackbox DSL, so we could use boolToBit. 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

26 Oct 12:01
Compare
Choose a tag to compare

Fixed:

  • Clash tries to cast-specialize non-"global binders" resulting in "specialisation of non-work-free cast" warning #1933
  • More consistently render bare untyped and unsized literals for ~LIT tags. This fixes #1934

v1.4.5

13 Oct 19:55
a89b074
Compare
Choose a tag to compare

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

11 Oct 18:50
1e41237
Compare
Choose a tag to compare

Fixed:

  • Dont' loop on recursive data types hiding behind type families #1921
  • Recognize enableGen as workfree and don't duplicate registers #1935

v1.4.3

12 Aug 10:50
Compare
Choose a tag to compare

Fixed:

  • Clash no longer generates calls to {shift,rotate}_{left,right} in VHDL where the count is a negative number #1810.
  • Clash no longer incurs unnecessary compile-time complexity while compiling Vector indexing operator #1557

v1.4.2

19 May 06:27
Compare
Choose a tag to compare

Fixed:

  • Erroneous examples in 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.
  • 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

06 Apr 12:15
483d8e1
Compare
Choose a tag to compare

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 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.
  • Annotate attributes cannot use type families #1742

Changed:

  • Clash.Prelude.ROM.File.romFile now takes an Enum addr => addr as address argument, making it actually useful. #407

v1.4.0

12 Mar 10:25
Compare
Choose a tag to compare

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: 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.
  • 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 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.

v1.2.5

09 Nov 16:56
ce0723d
Compare
Choose a tag to compare

Fixed:

  • The normalizeType function now fully normalizes types which require calls to
    reduceTypeFamily #1469
  • flogBaseSNat, clogBaseSNat and logBaseSNat 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 as Index 1.
  • msb no longer fails on values larger than 64 bits
  • undefined can now be used as a reset value of autoReg@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

28 Jul 19:33
4f58720
Compare
Choose a tag to compare
  • Changed:
    • Relaxed upper bound versions of aeson and dlist, 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.