|
1 | 1 | {-|
|
2 | 2 | Copyright : (C) 2013-2016, University of Twente,
|
3 | 3 | 2016-2017, Myrtle Software Ltd,
|
4 |
| - 2021-2022 QBayLogic B.V., |
| 4 | + 2021-2023 QBayLogic B.V., |
5 | 5 | 2022, Google Inc.
|
6 | 6 | License : BSD2 (see the file LICENSE)
|
7 | 7 | Maintainer : QBayLogic B.V. <[email protected]>
|
@@ -79,6 +79,19 @@ import Clash.XException
|
79 | 79 | -- instances, as even if @a@ has a statically known size, the length of the
|
80 | 80 | -- list cannot be known in advance.
|
81 | 81 | --
|
| 82 | +-- It is not possible to give data a custom bit representation by providing a |
| 83 | +-- @BitPack@ instance. A @BitPack@ instance allows no creativity and should |
| 84 | +-- always accurately reflect the bit representation of the data in HDL. You |
| 85 | +-- should always @derive ('Generic', BitPack)@ unless you use a custom data |
| 86 | +-- representation, in which case you should use |
| 87 | +-- 'Clash.Annotations.BitRepresentation.Deriving.deriveBitPack'. Custom |
| 88 | +-- encodings can be created with "Clash.Annotations.BitRepresentation" and |
| 89 | +-- "Clash.Annotations.BitRepresentation.Deriving". |
| 90 | +-- |
| 91 | +-- If the @BitPack@ instance does not accurately match the bit representation of |
| 92 | +-- the data in HDL, Clash designs will exhibit incorrect behavior in various |
| 93 | +-- places. |
| 94 | +-- |
82 | 95 | -- Clash provides some generic functions on packable types in the prelude, such
|
83 | 96 | -- as indexing into packable stuctures (see "Clash.Class.BitPack.BitIndex") and
|
84 | 97 | -- bitwise reduction of packable data (see "Clash.Class.BitPack.BitReduction").
|
|
0 commit comments