clash-prelude-0.7: 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

CLaSH.Sized.Index

Description

 

Synopsis

Documentation

data Index n Source

Arbitrary-bounded unsigned integer represented by ceil(log_2(n)) bits.

Given an upper bound n, an Index n number has a range of: [0 .. n-1]

Instances

KnownNat n => Bounded (Index n) 
KnownNat n => Enum (Index n)

The functions: enumFrom, enumFromThen, enumFromTo, and enumFromThenTo, are not synthesisable.

Eq (Index n) 
KnownNat n => Integral (Index n) 
KnownNat n => Num (Index n)

Operators report an error on overflow and underflow

Ord (Index n) 
KnownNat n => Real (Index n) 
Show (Index n) 
KnownNat n => Default (Index n) 
KnownNat n => Lift (Index n) 
Bundle (Index n) 
Typeable (Nat -> *) Index 
type Unbundled' clk (Index n) = Signal' clk (Index n)