| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Parent folder | |||
| README.md | 2026-09-05 | 10.2 kB | |
| v1.10.2 source code.tar.gz | 2026-09-05 | 2.0 MB | |
| v1.10.2 source code.zip | 2026-09-05 | 2.7 MB | |
| Totals: 3 Items | 4.7 MB | 1 | |
Highlights:
- On a large representative circuit, this release reduces total runtime by 80% compared to 1.10.0; smaller circuits also recover from some previous performance regressions. See the Clash benchmark results for the comparison.
Performance:
- The
clash-libcompile-time evaluator no longer projects the entire global binding map into a fresh heap on (virtually) every invocation. In the representative benchmark, this reduced runtime by about 27%. See #3323. - The
clash-ghccompile-time evaluator peels elements from a literalBitVectorviaunconcatBitVector#directly as literals, rather than leaving residualsplit#calls for later rewrite passes. This speeds up normalization of designs that convert largeBitVectorconstants to vectors. See #3323. - In
clash-lib, the Core-type-to-HWType translation used by representability queries during normalization is memoized across the rewrite session rather than recomputed for every query. This speeds up normalization of designs with large or deeply nested types. See #3323. - The conversion from GHC Core to Clash Core in
clash-ghcis faster on large designs: type-constructor annotations are pre-checked on the interned name, the accumulated TyCon map is no longer re-inserted at every occurrence, and global-variable types are converted once and cached. See #3323. - Identifier-only free-variable folds in
clash-libnow skip unnecessary type traversal, yielding about 2% faster normalization. See #3327. - In the
clash-ghc/clash-libblackbox compilation path, blackbox functions and Haskell template functions now share a single Hint (GHC) session, and each distinct function is compiled exactly once. In larger designs, this reduced load time by about 20% and end-to-end runtime by about 2%. See #3337. - In
clash-lib, alpha-equivalence checks onTermandTypeno longer compute free variables. Microbenchmarks show substantial speedups; end-to-end tests show a modest 2.5% improvement in normalization runtime. See #3335. - In
clash-lib, the cleanup phase that flattens the function hierarchy now runs the evaluator-backed transformations (reduceConst,reduceNonRepPrim) and the transformations that piggyback on their output as one bottom-up pass per flattening iteration, rather than during every settle round of the inner fixed-point loop. On larger designs, this produced about a 30% end-to-end improvement without changing generated HDL. See #3338. - In
clash-ghc, GHC-to-Clash type conversion is memoized by GHC type, with unchanged output. Types repeat extensively across binders, and converting one evaluates family-instance reductions and name conversions per node. On larger designs, this roughly halved loading time. See #3340. - In
clash-lib,reduceNonRepPrimdispatches on the primitive's name through aHashMapof handlers rather than walking a chain of string comparisons. On larger designs, this produced about a 6% end-to-end improvement. See #3339. - In
clash-lib, beta-reduction in theappProptransformation now uses a sharing-preserving substitution that leaves unchanged subterms untouched instead of rebuilding every visited node. Output is unchanged. See #3341. - In
clash-lib, the inlining transformations (inlineWorkFree,inlineSmall,bindConstantVar) now run cheap binder-only guards before computing type information, skip attempts at inner application-spine nodes, and stop measuring term size once it exceeds the inline limit. On larger designs, this reduced compiler runtime by about 8%. See #3356.
Added:
- Blackboxes
~SYMs can now be referenced by name
Instead of doing: ``` signal ~GENSYM[foo][3] : ..; signal ~GENSYM[bar][4] : ..;
.. <= ~SYM[3] - ~SYM[4];
```
You can now refer to SYMbols by name: ``` signal ~SYM[foo] : ..; signal ~SYM[bar] : ..;
.. <= ~SYM[foo] - ~SYM[bar];
```
The old behaviour with ~GENSYM and the numeric references is still fully supported.
See #3325, implemented in #3326.
clash-libnow providesHashable TermandHashable Typeinstances. These were removed in Clash 1.4.7 due to a faulty implementation, but are now back. They hash modulo alpha equivalence, and so agree withEq TermandEq Type: alpha-equivalent terms hash alike. See #3336.
Changed:
clash-cosimandclash-ffipackages have been removed from theclash-compilerrepository and moved to standalone archived repositories. See #3330.- The
clashcommand-line flag-fclash-debug-count-transformationsnow also reports how often each transformation was attempted (counters suffixed!try), next to the existing applied-rewrite counts. See #3356.
Fixed:
- In
clash-lib, alpha-equivalence on terms now compares theNameModandAttributesof a tick under the enclosing renaming environment, instead of in isolation. See #3335. - In
clash-lib,freshenTmnow renames inside of anAttributestick, added byClash.Annotations.SynthesisAttributes.annotateReg. See #3335. - In
clash-lib, alpha-equivalence and alpha-comparison on terms now compare the types ofReclet binders, which they previously ignored. ANonRecbinder's type is pinned down by its right-hand side, so it does not need comparing, but aRecbinder may occur in its own right-hand side, so its type is not determined by the right-hand side:let x = x in xis the same term whetherxis anIntor aBool.eqTermalready compared them, soEq TermandeqTermdisagreed on such terms. See #3335. - In
clash-lib,Ord TermandOrd Typenow behave lawfully. Comparison used to rename each pair of binders to a variable free in neither argument, preferring the left one, so which name an occurrence resolved to depended on which argument came first:compareonforall a. forall b. bandforall c. forall d. creturnedGTwhichever way round they were passed. See #3335. - In
clash-lib,reduceNonRepPrimnow pierces through type families,newtypes andSignalconstructors when determining a primitive's result type. See #3339. - In
clash-lib, the disjoint expression consolidation (DEC) transformation created non-exhaustive case-expressions when the consolidated function was not applied in every alternative. When constant propagation later reduced such a case-expression, compilation failed withClash error call: scrutinise: .... The argument-selecting case-expressions now carry a default alternative for the branches in which the consolidated function is not used #2770. See #3344. - In
clash-ghc, type family applications no longer get stuck when the top entity's module is loaded from an interface file and nothing else in the design causes the interfaces holding the needed family instances to be read. This made designs mentioning e.g.BitVector (BitSize Bool)behind another type family fail withCannot reduce to an integer. See #1534, fixed in #3343. - In
clash-lib,reduceNonRepPrimnow correctly accounts for non-work primitives returning a zero-lengthVecand under-applied ones. See #3348, fixed in #3349. - Name-shadowing warnings caused by blackboxes re-using identifiers has been fixed. See #3273, fixed in #3353.
- In
clash-ghc, Clash no longer enables-dynamic-toowhen the build is already dynamic, which made GHC emit an-Winconsistent-flagswarning. See #3354, fixed in #3358. - In
clash-lib, the SystemVerilog backend no longer emits out-of-bounds array indices when a nested modifier selects a half of anRTree. The size of a tree half was computed as(d-1)^2instead of2^(d-1), so for anRTree 3the right half was emitted as[4:8]on an array whose valid indices are0..7. See #3359, fixed in #3360. - In
clash-libandclash-ghc, structural equality and ordering now account for the names and types of variables, including ineqTermandeqType, instead of relying only on variable uniques. See #3361, fixed in #3362.