clash-prelude-0.7.4: CAES Language for Synchronous Hardware - Prelude library

Copyright(C) 2013-2015, University of Twente
LicenseBSD2 (see the file LICENSE)
MaintainerChristiaan Baaij <christiaan.baaij@gmail.com>
Safe HaskellNone
LanguageHaskell2010
Extensions
  • UndecidableInstances
  • MonoLocalBinds
  • TemplateHaskell
  • TypeFamilies
  • DataKinds
  • FlexibleContexts
  • MultiParamTypeClasses
  • MagicHash
  • KindSignatures
  • TypeOperators
  • ExplicitNamespaces

CLaSH.Sized.Internal.Unsigned

Contents

Description

 

Synopsis

Datatypes

newtype Unsigned n Source

Arbitrary-width unsigned integer represented by n bits

Given n bits, an Unsigned n number has a range of: [0 .. 2^n-1]

NB: The Num operators perform wrap-around on overflow. If you want saturation on overflow, check out the SaturatingNum class.

Constructors

U

The constructor, U, and the field, unsafeToBitVector, are not synthesisable.

Accessors

Length information

Type classes

BitConvert

Eq

Ord

Enum (not synthesisable)

Bounded

Num

ExtendingNum

plus# :: KnownNat (1 + Max m n) => Unsigned m -> Unsigned n -> Unsigned (1 + Max m n) Source

minus# :: KnownNat (1 + Max m n) => Unsigned m -> Unsigned n -> Unsigned (1 + Max m n) Source

times# :: KnownNat (m + n) => Unsigned m -> Unsigned n -> Unsigned (m + n) Source

Integral

Bits

Resize