Copyright | (C) 2012-2016 University of Twente 2017 Myrtle Software Ltd 2017-2018 Google Inc. 2020-2022 QBayLogic B.V. 2022 Google Inc. |
---|---|
License | BSD2 (see the file LICENSE) |
Maintainer | QBayLogic B.V. <devops@qbaylogic.com> |
Safe Haskell | None |
Language | Haskell2010 |
Functions for expression manipulation
Documentation
bits :: HasCallStack => Size -> Expr -> Either Expr (Tree [Bool]) Source #
Turns a constant expression of known bitsize into their corresponding bitstream representation, arranged as a tree that corresponds to the structure of the expression.
NOTE: This conversion serves as a best effort approach and can be considered a hack. Fully featured constant expression evaluation is not available in clash yet and will replace this implementation once it is officially supported.