rewire-base-2.8: A Haskell-to-Verilog/VHDL compiler, shared base utilities
Safe HaskellTrustworthy
LanguageHaskell2010

ReWire.BitVector

Synopsis

Documentation

data BV #

Instances

Instances details
ToJSON BV 
Instance details

Defined in ReWire.Orphans

Methods

toJSON :: BV -> Value

toEncoding :: BV -> Encoding

toJSONList :: [BV] -> Value

toEncodingList :: [BV] -> Encoding

omitField :: BV -> Bool

Monoid BV 
Instance details

Defined in Data.BitVector

Methods

mempty :: BV #

mappend :: BV -> BV -> BV #

mconcat :: [BV] -> BV #

Semigroup BV 
Instance details

Defined in Data.BitVector

Methods

(<>) :: BV -> BV -> BV #

sconcat :: NonEmpty BV -> BV #

stimes :: Integral b => b -> BV -> BV #

Bits BV 
Instance details

Defined in Data.BitVector

Methods

(.&.) :: BV -> BV -> BV #

(.|.) :: BV -> BV -> BV #

xor :: BV -> BV -> BV #

complement :: BV -> BV #

shift :: BV -> Int -> BV #

rotate :: BV -> Int -> BV #

zeroBits :: BV #

bit :: Int -> BV #

setBit :: BV -> Int -> BV #

clearBit :: BV -> Int -> BV #

complementBit :: BV -> Int -> BV #

testBit :: BV -> Int -> Bool #

bitSizeMaybe :: BV -> Maybe Int #

bitSize :: BV -> Int #

isSigned :: BV -> Bool #

shiftL :: BV -> Int -> BV #

unsafeShiftL :: BV -> Int -> BV #

shiftR :: BV -> Int -> BV #

unsafeShiftR :: BV -> Int -> BV #

rotateL :: BV -> Int -> BV #

rotateR :: BV -> Int -> BV #

popCount :: BV -> Int #

Data BV 
Instance details

Defined in Data.BitVector

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> BV -> c BV #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c BV #

toConstr :: BV -> Constr #

dataTypeOf :: BV -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c BV) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c BV) #

gmapT :: (forall b. Data b => b -> b) -> BV -> BV #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> BV -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> BV -> r #

gmapQ :: (forall d. Data d => d -> u) -> BV -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> BV -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> BV -> m BV #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> BV -> m BV #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> BV -> m BV #

Enum BV 
Instance details

Defined in Data.BitVector

Methods

succ :: BV -> BV #

pred :: BV -> BV #

toEnum :: Int -> BV #

fromEnum :: BV -> Int #

enumFrom :: BV -> [BV] #

enumFromThen :: BV -> BV -> [BV] #

enumFromTo :: BV -> BV -> [BV] #

enumFromThenTo :: BV -> BV -> BV -> [BV] #

Num BV 
Instance details

Defined in Data.BitVector

Methods

(+) :: BV -> BV -> BV #

(-) :: BV -> BV -> BV #

(*) :: BV -> BV -> BV #

negate :: BV -> BV #

abs :: BV -> BV #

signum :: BV -> BV #

fromInteger :: Integer -> BV #

Read BV 
Instance details

Defined in Data.BitVector

Integral BV 
Instance details

Defined in Data.BitVector

Methods

quot :: BV -> BV -> BV #

rem :: BV -> BV -> BV #

div :: BV -> BV -> BV #

mod :: BV -> BV -> BV #

quotRem :: BV -> BV -> (BV, BV) #

divMod :: BV -> BV -> (BV, BV) #

toInteger :: BV -> Integer #

Real BV 
Instance details

Defined in Data.BitVector

Methods

toRational :: BV -> Rational #

Show BV 
Instance details

Defined in Data.BitVector

Methods

showsPrec :: Int -> BV -> ShowS #

show :: BV -> String #

showList :: [BV] -> ShowS #

Eq BV 
Instance details

Defined in Data.BitVector

Methods

(==) :: BV -> BV -> Bool #

(/=) :: BV -> BV -> Bool #

Ord BV 
Instance details

Defined in Data.BitVector

Methods

compare :: BV -> BV -> Ordering #

(<) :: BV -> BV -> Bool #

(<=) :: BV -> BV -> Bool #

(>) :: BV -> BV -> Bool #

(>=) :: BV -> BV -> Bool #

max :: BV -> BV -> BV #

min :: BV -> BV -> BV #

Hashable BV 
Instance details

Defined in ReWire.Orphans

Methods

hashWithSalt :: Int -> BV -> Int

hash :: BV -> Int

TextShow BV Source # 
Instance details

Defined in ReWire.Orphans

Methods

showbPrec :: Int -> BV -> Builder #

showb :: BV -> Builder #

showbList :: [BV] -> Builder

showtPrec :: Int -> BV -> Text

showt :: BV -> Text #

showtList :: [BV] -> Text

showtlPrec :: Int -> BV -> Text

showtl :: BV -> Text

showtlList :: [BV] -> Text

width :: BV -> Int #

ones :: Int -> BV #

zeros :: Int -> BV #

nil :: BV #

(@@) :: Integral ix => BV -> (ix, ix) -> BV #

bitVec :: Integral a => Int -> a -> BV #

(>>.) :: BV -> BV -> BV #

(<<.) :: BV -> BV -> BV #

(==.) :: BV -> BV -> Bool #

ashr :: BV -> BV -> BV #

replicate :: Integral size => size -> BV -> BV #

lsb1 :: BV -> Int #

(@.) :: Integral ix => BV -> ix -> Bool #

concat :: [BV] -> BV #

showHex :: BV -> Text Source #

Show the bitvec value in hex, with "0x" prefix, but no leading zeros.

showHex' :: BV -> Text Source #

Like showHex, but prefix with h instead of `0x`.

nbits :: Natural -> Natural Source #

Number of bits needed to encode n different values: exact integer ceil-log2 via clog2(n) = 1 + clog2(ceil(n/2)) (floating-point logBase mis-rounds near powers of two once n exceeds 2^29 or so).

szBitRep :: Natural -> Natural Source #

Number of bits in the binary representation of n (with no leading zeros).