Clash Compiler Versions Save

Haskell to VHDL/Verilog/SystemVerilog compiler

v1.4.6

2 years ago

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

2 years ago

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

2 years ago

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

2 years ago

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

3 years ago

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

3 years ago

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

3 years ago

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

3 years ago

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

3 years ago
  • 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.

v1.2.3

3 years ago
  • Changed:

    • Upgrade to nixos 20.03. Nix and snap users will now use packages present in 20.03.
  • 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:

      • IEEE.STD_LOGIC_1164.all
      • IEEE.NUMERIC_STD.all
      • IEEE.MATH_REAL.all
      • std.textio.all

      when generating VHDL. See https://github.com/clash-lang/clash-compiler/issues/1439.