Skip to content

Releases: clash-lang/clash-compiler

v1.2.2

12 Jun 17:39
Compare
Choose a tag to compare

Bugfix release

  • Changed:

    • The hardwired functions to unroll primitive definitions for 'zipWith', 'map', 'foldr', and 'init' have been changed to only unroll a single step, whereas they would previously unroll the whole definition in one step. This allows Clash to take advantage of the lazy nature of these functions, in turn speeding up compilation speeds significantly in some cases. Part of PR 1354.
  • Added:

    • Support for GHC 8.10
    • Ability to load designs from precompiled modules (i.e., stored in a package database). See #1172
    • Support for '-main-is' when used with --vhdl, --verilog, or --systemverilog
    • A partial instance for NFDataX (Signal domain a)
  • Fixed:

    • Clash's evaluator now inlines work free definitions, preventing situations where it would otherwise get stuck in an infinite loop
    • caseCon doesn't apply type-substitution correctly #1340
    • Clash generates illegal SystemVerilog slice #1313
    • Fix result type of head and tail Verilog blackboxes #1351
    • Certain recursive let-expressions in side a alternatives of a case-expression throw the Clash compiler into an infinite loop #1316
    • Fixes issue with one of Clash's transformations, inlineCleanup, introducing free variables #1337
    • Fails to propagate type information of existential type #1310
    • Certain case-expressions throw the Clash compiler into an infinite loop #1320
    • Added blackbox implementation for 'Clash.Sized.Vector.iterateI', hence making it usable as a register reset value #1240
    • iterate and iterateI can now be used in reset values #1240
    • Prim evaluation fails on undefined arguments #1297
    • Missing re-indexing in (Un)Signed fromSLV conversion #1292
    • VHDL: generate a type qualification inside ~TOBV, fixes #1360

v1.2.1

23 Apr 19:57
Compare
Choose a tag to compare

Bug fix release

  • Changed:

    • Treat Signed 0, Unsigned 0, Index 1, BitVector 0 as unit. In effect this means that 'minBound' and 'maxBound' return 0, whereas previously they might crash #1183
    • Infix use of deepseqX is now right-associative
  • Added:

    • Add 'natToInteger', 'natToNatural', and 'natToNum'. Similar to 'snatTo*', but works solely on a type argument instead of an SNat.
    • Clash.Sized.Vector.unfoldr and Clash.Sized.Vector.unfoldrI to construct vectors from a seed value
    • Added NFDataX instances for Data.Monoid.{First,Last}
  • Fixed:

    • The Verilog backend can now deal with non-contiguous ranges in custom bit-representations.
    • Synthesizing BitPack instances for type with phantom parameter fails #1242
    • Synthesis of fromBNat (toBNat d5) failed due to unsafeCoerce coercing from Any
    • Memory leak in register primitives #1256
    • Illegal VHDL slice when projecting nested SOP type #1254
    • Vivado VHDL code path (-fclash-hdlsyn Vivado) generates illegal VHDL #1264

v1.2.0

05 Mar 13:10
345d5cf
Compare
Choose a tag to compare

As promised when releasing 1.0, we've tried our best to keep the API stable. We
think most designs will continue to compile with this new version, although special
care needs to be taken when using:

  • ..inline blackboxes. Instead of taking a single HDL, inline primitives now
    take multiple. For example, InlinePrimitive VHDL ".." must now be written
    as InlinePrimitive [VHDL] "..".

  • ..the Enum instance for BitVector, Index, Signed, or Unsigned, as
    they now respect their maxBound. See #1089.

On top of that, we've added a number of new features:

  • makeTopEntity: Template Haskell function for generating TopEntity annotations. See the documentation on Haddock for more information.

  • Clash.Explicit.SimIO: ((System)Verilog only) I/O actions that can be translated to HDL I/O. See the documentation on Haddock for more information.

  • Clash.Class.AutoReg: A smart register that improves the chances of synthesis tools inferring clock-gated registers. See the documentation on Haddock for more information.

View all the changes in the CHANGELOG. Happy hacking!

v1.0.1

17 Oct 09:32
Compare
Choose a tag to compare

Bug fix release

  • Fixes issues:

    • #810: Verilog backend now correctly specifies type of BitVector 1
    • #811: Improve module load behavior in clashi
    • #439: Template Haskell splices and TopEntity annotations can now be used in clashi
    • #818: Fixed various mistakes in tutorial
    • #662: Clash will now constant specialize partially constant constructs
    • #700: Check work content of expression in cast before warning users. Should eliminate a lot of (superfluous) warnings about "specializing on non work-free cast"s.
    • #837: Blackboxes will now report clearer error messages if they're given unexpected arguments.
  • Small fixes without issue reports:

    • Fix bug in rnfX defined for Down (814fd52)
    • Report blackbox name when encountering an error in 'setSym' (#858)

10 years going

03 Sep 20:32
Compare
Choose a tag to compare

10 year anniversary release!

0.7.2

25 Apr 08:46
Compare
Choose a tag to compare
  • New features:
    • Sum-of-product types: unused bits now "don't-care" #212
  • Fixes bugs:

v0.7.1

11 Apr 11:33
Compare
Choose a tag to compare
  • New features:
    • Support distribution of primitive templates with Cabal/Hackage packages commit
    • Find memory data files and primitive files relative to import dirs (-i<DIR>)
    • Add 'clashi' program and 'clash-ghc' package #208, thanks to @thoughtpolice
  • Fixes bugs:
    • case (EmptyCase ty) of ty' { ... } -> EmptyCase ty' #198
    • BitVector.split# apply the correct type arguments
    • SystemVerilog: Incorrect unsigned->signed wrap-around and conversion
    • SystemVerilog: Use unpacked array syntax in array literals
    • SystemVerilog: Add braces when converting unpacked to packed arrays
    • SystemVerilog: Fixed rotateLeftS systemverilog template
    • SystemVerilog: Do not generate null-slices
    • Verilog: Incorrect unsigned->signed wrap-around and conversion
    • VHDL: resize Integer multiplication result

v0.7

16 Jan 22:38
Compare
Choose a tag to compare
  • New features:
    • CLaSH.XException: a module defining an exception representing uninitialised values. Additionally adds the ShowX class which has methods that prints values as "X" where they would normally raise an XException exception.
    • Add BNat (and supporting functions) to CLaSH.Promoted.Nat: base-2 encoded natural numbers.
    • Add divSNat and logBaseSNat to CLaSH.Promoted.Nat: division and logarithm for singleton natural numbers.
    • Add predUNat and subUNat to CLaSH.Promoted.Nat: predecessor and subtraction for unary-encoded natural numbers.
    • Add dtfold to CLaSH.Sized.Vector: a dependently-typed tree-fold over Vec.
    • Add the perfect-depth binary trees module CLaSH.Sized.RTree
    • Synthesisable definitions of countLeadingZeros and countTrailingZeros for: BitVector, Signed, Unsigned, and Fixed
    • Add the (:::) type alias in CLaSH.NamedTypes which allows you to annotate types with documentation
  • Changes:
    • asyncRam, blockRam, blockRamFile have a Maybe (addr,a) as write input instead of three separate Bool, addr, and a inputs.
    • asyncFIFOSynchronizer has a Maybe a as write-request instead of a separate Bool and a input
    • bundle' and unbundle' are removed; bundle now has type Unbundled' clk a -> Signal' clk a, unbundle now has type Signal' clk a -> Unbundled' clk a
    • subSNat now has the type SNat (a+b) -> SNat b -> SNat a (where it used to be SNat a -> SNat b -> SNat (a-b))
    • Renamed multUNat to mulUNat to be in sync with mulSNat and mulBNat.
    • The function argument of vfold in CLaSH.Sized.Vector is now (forall l . SNat l -> a -> Vec l b -> Vec (l + 1) b) (where it used to be (forall l . a -> Vec l b -> Vec (l + 1) b))
    • Cons constructor of Vec is no longer visible; (:>) and (:<) are now listed as constructors of Vec
    • Simulation speed improvements for numeric types

v0.6.24

17 Oct 13:39
Compare
Choose a tag to compare
  • Call generatePrimMap after loadModules #175
  • Fixes bugs:
    • (System)Verilog: CLaSH.Sized.Vector.imap primitive gets indices in reverse order
    • Template Haskell splices are run twice
    • CLaSH errors out when observing the constructor for Signal #174

v0.6.22

03 Aug 09:02
Compare
Choose a tag to compare
  • Fixes bugs:
    • Bug in DEC transformation overwrites case-alternatives
    • Bug in DEC transformation creates non-representable let-binders
    • VHDL: Incorrect primitive for Integers ltInteger# and geInteger#
    • (System)Verilog: Fix primitive for CLaSH.Sized.Internal.Signed.mod# and GHC.Type.Integer.modInteger #164