Changelog for clash-prelude-0.99.2
Changelog for clash-prelude package
0.99.1 May 12th 2018
- Support for
ghc-typelits-natnormalise-0.6.1 Liftinstances forTopEntityandPortNameInlinePrimitivesupport: specify HDL primitives inline with Haskell code
0.99 March 31st 2018
- Major API overhaul: check the migration guide at the end of
Clash.Tutorial - New features:
- Explicit clock and reset arguments
- Rename
CLaSHtoClash - Implicit/
Hiddenclock and reset arguments using a combination ofreflectionandImplicitParams. - Large overhaul of
TopEntityannotations - PLL and other clock sources can now be instantiated using regular functions:
Clash.Intel.ClockGenandClash.Xilinx.ClockGen. - DDR registers:
- Generic/ASIC:
Clash.Explicit.DDR - Intel:
Clash.Intel.DDR - Xilinx:
Clash.Intel.Xilinx
- Generic/ASIC:
Bitis now anewtypeinstead of atypesynonym and will be mapped to a HDL scalar instead of an array of one (e.gstd_logicinstead ofstd_logic_vector(0 downto 0))
0.11.2
- New features:
- Add
riseEvery: Give a pulse every @n@ clock cycles. (Thanks to @thoughtpolice) - Add
oscillate: Oscillate a @'Bool'@ with a given half-period of cycles. (Thanks to @thoughtpolice)
- Add
- Fixes bugs:
- Eagerness bug in
regEn#104 (Thanks to @cbiffle)
- Eagerness bug in
0.11.1
- Changes:
- Bundle instance for
()behaves like a product-type instance #96
- Bundle instance for
- Fixes bugs:
- Ensure that
foldgets correctly type-applied inVec.==#202
- Ensure that
0.11
- New features:
CLaSH.XException: a module defining an exception representing uninitialised values. Additionally adds theShowXclass which has methods that prints values as "X" where they would normally raise anXExceptionexception.- Add
BNat(and supporting functions) toCLaSH.Promoted.Nat: base-2 encoded natural numbers. - Add
divSNatandlogBaseSNattoCLaSH.Promoted.Nat: division and logarithm for singleton natural numbers. - Add
predUNatandsubUNattoCLaSH.Promoted.Nat: predecessor and subtraction for unary-encoded natural numbers. - Add
dtfoldtoCLaSH.Sized.Vector: a dependently-typed tree-fold overVec. - Add the perfect-depth binary trees module
CLaSH.Sized.RTree - Synthesisable definitions of
countLeadingZerosandcountTrailingZerosfor:BitVector,Signed,Unsigned, andFixed - Add the
(:::)type alias inCLaSH.NamedTypeswhich allows you to annotate types with documentation
- Changes:
asyncRam,blockRam,blockRamFilehave aMaybe (addr,a)as write input instead of three separateBool,addr, andainputs.asyncFIFOSynchronizerhas aMaybe aas write-request instead of a separateBoolandainputbundle'andunbundle'are removed;bundlenow has typeUnbundled' clk a -> Signal' clk a,unbundlenow has typeSignal' clk a -> Unbundled' clk asubSNatnow has the typeSNat (a+b) -> SNat b -> SNat a(where it used to beSNat a -> SNat b -> SNat (a-b))- Renamed
multUNattomulUNatto be in sync withmulSNatandmulBNat. - The function argument of
vfoldinCLaSH.Sized.Vectoris 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)) Consconstructor ofVecis no longer visible;(:>)and(:<)are now listed as constructors ofVec- Simulation speed improvements for numeric types
0.10.12
- Fixes bugs:
Vecsunbundleis too strict, i.e.register (undefined :: Vec 2 Int)/=bundle . unbundle . register (undefined :: Vec 2 Int)
0.10.11 August 3rd 2016
- New features:
- Add strict version of:
sample,sampleN,fromList, andsimulate - Make
Signals<*>slightly stricter:- Feedback loops still work with this new implementation
- No more space-leaks when used in combination with the strict version of
sample,sampleN, andsimulate
- Add
NFDatainstances for the numeric types
- Add strict version of:
- Speed up arithmetic operations of
Signed,UnsignedandBitVector - Fixes bugs:
- CLaSH compiler sees internals of numeric types in their
Liftfunctions
- CLaSH compiler sees internals of numeric types in their
0.10.10 July 15th 2016
- Fixes bugs:
shrinkfunctions for numeric types throw exceptions #153- CLaSH compiler sees internals of numeric types in their Show functions
0.10.9 June 9th 2016
- Fixes bugs:
Eqinstance ofVecsometimes not synthesisable
0.10.8 June 7th 2016
- New features:
- Instances of
Datafor numeric types. - Instances of
Readfor {Index, Signed, Unsigned, Fixed} - Instances of
BitPackfor 3-8 tuples
- Instances of
0.10.7 April 7th 2016
- Support doctest-0.11.0
0.10.6 February 10th 2016
- Fixes bugs:
CLaSH.Prelude.DataFlow.parNDFis not lazy enough
0.10.5 January 13th 2016
- New features:
- Add
readNewtoCLaSH.Prelude.BlockRam: create a read-after-write blockRAM from a read-before-write blockRAM. popCountfunctions forBitVector,Signed, andUnsignedare now synthesisable.- Add
parNDFtoCLaSH.Prelude.DataFlow: compose N dataflow circuits in parallel. - Add and instance
Vec n aforLockStepinCLaSH.Prelude.DataFlow: have N dataflow circuits operate in lock-step.
- Add
0.10.4 December 11th 2015
- New features:
- Add
pureDFtoCLaSH.Prelude.DataFlow: lift combinational circuits toDataFlowcircuits. - Add
fifoDFtoCLaSH.Prelude.DataFlow: a simple FIFO buffer adhering to theDataFlowprotocol. loopDFno longer uses thelockStepandstepLockautomatically, and now includes a FIFO buffer on the feedback path.- Add
loopDF_nobuftoCLaSH.Prelude.DataFlow: a version ofloopDFwith no FIFO buffer on the feedback path. - Add
boolToBVtoCLaSH.CLass.BitPack: convertBooleans ton-bitBitVectors. ClockSourceinCLaSH.Annotations.TopEntitycan now have multiple clock inputs #33
- Add
- Bug fixes:
asyncRomFilereads file multiple times.
0.10.3 October 24th 2015
- Disable CPR analysis (See https://github.com/clash-lang/clash-compiler/commit/721fcfa9198925661cd836668705f817bddaae3c):
- GHC < 7.11: In all modules using
-fcpr-off - GHC >= 7.11: In
CLaSH.Signal.InternalandCLaSH.Prelude.RAMusing-fno-cpr-anal
- GHC < 7.11: In all modules using
0.10.2 October 21st 2015
- New features:
ExtendingNum,BitPack, andResizeinstance forIndex- Add
bv2i: convertBitVector ntoIndex (2^n) - Export type-level operations from ghc-typelits-extra
0.10.1 October 16th 2015
- New features:
- The
findfold p f, now has anSNat linstead of aProxy las its first argument. - Add
bv2vandv2bvfunctions that convert betweenVec n BitandBitVector n. - Add
smap: apply a function to every element of a vector and the element's position (as an 'SNat' value) in the vector.
- The
0.10 October 3rd 2015
- New features:
- The Vec constructor
:>is now an explicitly bidirectional pattern synonym (the actual constructor has been renamed to Cons). As a result, pattern matching on:>is now synthesisable by the CLaSH compiler. - The function
<:is replaced by the the explicitly bidirectional pattern synonym:<. This allows you to pattern match on: "all but the last element of a vector" and "the last element" of the vector. Because it is a bidirectional pattern,:<can also be used as an expression that appends an element to the tail of a vector. - Add a
transposefunction inCLaSH.Sized.Vector. - Add
stencil1dandstensil2dstencil computation functions inCLaSH.Sized.Vector. - Add
permute,backpermute,scatter, andgatherpermutation functions inCLaSH.Sized.Vector. - Add specialised permutation functions
interleave,rotateLeft, androtateRightinCLaSH.Sized.Vector. sscanlandsscanrinCLaSH.Sized.Vectorare renamed topostscanland postscanrto be more in line with existing Haskell packages such asvectorandaccelerate`.- The
FoldableandTraversableinstances ofVecnow only works for non-empty vectors. - Where possible, members of the
Foldableinstance ofVecare described in terms offold, which builds a tree (of depthlog(n)) of computations, instead offoldrwhich had depthncomputations. This reduces the critical path length in your circuits when using these functions. maxIndexandlengthinCLaSH.Sized.Vectorreturn anIntinstead of anInteger.- Add functions that involve an index into a vector to the
CLaSH.Sized.Vectormodule:indices,indicesI,imap,izipWith,ifoldr,ifoldl,findIndex,elemIndex. CLaSH.Sized.Vector'sfold,dfold,vfold, andtoListare now synthesisable by the CLaSH compiler.
- The Vec constructor
0.9.3 September 21st 2015
- Fixes bugs:
- Cannot build against singletons-0.2
- Numerous documentation fixes
0.9.2 August 2nd 2015
- Disable strictness analysis in
CLaSH.Signal.Internal, this allows turning on strictness analysis in the GHC front-end of the CLaSH compiler.
0.9.1 June 26th 2015
- Updated documentation on data-file support on Altera/Quartus
0.9 June 25th 2015
- New features:
- Add operations on singleton natural numbers:
addSNat,subSNat,mulSNat, andpowSNat. - Add asynchronous RAM functions in
CLaSH.Prelude.RAM, which have an asynchronous/combinational read port. - Add ROM functions in modules
CLaSH.Prelude.ROMandCLaSH.Prelude.ROM.File, where the latter module contains functions that instantiate a ROM from the content specified in an external data-file. - Add BlockRam functions, in the
CLaSH.Prelude.BlockRam.Filemodule, whose content can be initialised with the content specified in an external data-file. assertnow takes an extraStringargument so you can distinguish oneassertfrom the others. Additionally,assert'is added which takes an additionalSClockargument. This is needed, becauseassertnow reports the clock cycle, and clock domain, when an assertion fails.defClkAlteraanddefClkXilinxare replaced by,altpllandalteraPllfor Altera clock sources, andclockWizardfor Xilinx clock sources. These names correspond to the names of the generator utilities in Quartus and ISE/Vivado.- Add Safe versions of the prelude modules:
CLaSH.Prelude.SafeandCLaSH.Prelude.Explicit.Safe - Add synchronizers in the
CLaSH.Prelude.Synchronizermodule
- Add operations on singleton natural numbers:
0.8 June 3rd 2015
- New features:
-
Make the (Bit)Vector argument the last argument for the following functions:
slice,setSlice,replaceBit,replace. The signatures for the above functions are now:slice :: BitPack a => SNat m -> SNat n -> a -> BitVector (m + 1 - n) setSlice :: BitPack a => SNat m -> SNat n -> BitVector (m + 1 - n) -> a -> a replaceBit :: Integral i => i -> Bit -> a -> a replace :: Integral i => i -> a -> Vec n a -> Vec n aThis allows for easier chaining, e.g.:
replaceBit 0 1 $ repleceBit 4 0 $ replaceBit 6 1 bv -
Until version 0.7.5, given
x :: Vec 8 Bitandy :: BitVector 8, it used to belast x == msb y. This is quite confusing when printing converted values. Until version 0.7.5 we would get:> 0x0F :: BitVector 8 0000_1111 > unpack 0x0F :: Vec 8 Bit <1,1,1,1,0,0,0,0>As of version 0.8, we have
head x == msb y:> 0x0F :: BitVector 8 0000_1111 > unpack 0x0F :: Vec 8 Bit <0,0,0,0,1,1,1,1>So converting for
Vectors ofBits toBitVectors is no longer index-preserving, but it is order-preserving. -
Add QuickCheck
ArbitaryandCoArbitaryinstances for all data types -
Add lens
Ixedinstances forBitVector,Signed,Unsigned, andVec
-
0.7.5 May 7th 2015
- New features:
- Moore machine combinators
0.7.4 *May 5th 2015
- New features:
- Add
TopEntityannotations
- Add
0.7.3 April 22nd 2015
- New features:
- Add the vector functions:
zip3,unzip3, andzipWith3 - Use version 0.2 of the
ghc-typelits-natnormalisepackage
- Add the vector functions:
0.7.2 April 20th 2015
- New features:
- Support for GHC 7.10 => only works with GHC 7.10 and higher
- Use http://hackage.haskell.org/package/ghc-typelits-natnormalise typechecker plugin for better type-level natural number handling
0.7.1 March 25th 2015
- Fixes bugs:
- Fix laziness bug in Vector.(!!) and Vector.replace
0.7 March 13th 2015
-
New features:
- Switch types of
bundleandbundle', andunbundleandunbundle'. - Rename all explicitly clocked versions of Signal functions, to the primed
name of the implicitly clocked Signal functions. E.g.
cregisteris now calledregister'(where the implicitly clocked function is callledregister) - Add new instances for
DSignal - Add experimental
antiDelayfunction forDSignal - Generalize lifted functions over Signals (e.g. (.==.))
- Switch types of
-
Fixes bugs:
- Faster versions of Vector.(!!) and Vector.replace
0.6.0.1 November 17th 2014
- Fixes bugs:
- Add missing 'CLaSH.Sized.BitVector' module to .cabal file.
0.6 November 17th 2014
-
New features:
- Add
Fractionalinstance forFixed#9 - Make indexing/subscript of
Vecascending #4 - Add separate
BitVectortype, which has a descending index. - Add bit indexing operators, including the index/subscript operator
(!). - Add bit reduction operators:
reduceOr,reduceAnd,reduceOr. - Rename
BitVectorclass toBitPackwithpackandunpackclass methods. - Rename
Packclass toBundlewithbundleandunbundleclass methods. - Strip all
Vecfunctions from theirvprefix, i.e.vmap->map. - Rename
Vecindexing operator from(!)to(!!). - Combine
AddandMultclass intoExtendingNumclass. - Add extend and truncate methods to the
Resizeclass. - Add
SaturatingNumclass with saturating numeric operators. - Add multitude of lifted
Signaloperators, i.e.(.==.) :: Eq a => Signal a -> Signal a -> Signal Bool - Add
CLaSH.Signal.Delayedwith functions and data types for delay-annotated signals to support safe synchronisation. - Add
CLASH.Prelude.DataFlowwith functions and data types to create self-synchronising circuits based on data-flow principles.
- Add
-
Fixes bugs:
- Remove deprecated 'Arrow' instance for and related functions for
Comp#5
- Remove deprecated 'Arrow' instance for and related functions for
0.5.1 June 5th 2014
-
New features:
-
Fixes bugs:
0.5 April 3rd 2014
- Add explicitly clocked synchronous signals for multi-clock circuits
0.4.1 March 27th 2014
- Add saturation to fixed-point operators
- Finalize most documentation
0.4 March 20th 2014
- Add fixed-point integers
- Extend documentation
- 'bit' and 'testBit' functions give run-time errors on out-of-bound positions
0.3 March 14th 2014
- Add Documentation
- Easy SNat literals for 0..1024, e.g. d4 = snat :: SNat 4
- Fix blockRamPow2
0.2 March 5th 2014
- Initial release