retroclash-lib-0.1.2.1: Code shared across the code samples in the book "Retrocomputing with Clash"
Safe HaskellNone
LanguageHaskell2010

RetroClash.Clock

Documentation

type HzToPeriod (rate :: Nat) = Seconds 1 `Div` rate Source #

type Seconds (s :: Nat) = Milliseconds (1000 * s) Source #

type Milliseconds (ms :: Nat) = Microseconds (1000 * ms) Source #

type Microseconds (us :: Nat) = Nanoseconds (1000 * us) Source #

type Nanoseconds (ns :: Nat) = Picoseconds (1000 * ns) Source #

type Picoseconds (ps :: Nat) = ps Source #

type ClockDivider dom ps = ps `Div` DomainPeriod dom Source #

risePeriod :: forall ps dom. (HiddenClockResetEnable dom, _) => SNat ps -> Signal dom Bool Source #

riseRate :: forall rate dom. (HiddenClockResetEnable dom, _) => SNat rate -> Signal dom Bool Source #