Copyright | (c) 2011 National Institute of Aerospace / Galois Inc. |
---|---|
Safe Haskell | Safe |
Language | Haskell2010 |
This library generates new clocks based on a base period and phase.
Example Usage
Also see Examples/ClockExamples.hs
in the
Copilot repository.
clk
(period
3 ) (phase
1 )
is equivalent to a stream of values like:
cycle [False, True, False]
that generates a stream of values
False True False False True False False True False ... 0 1 2 3 4 5 6 7 8
That is true every 3 ticks (the period) starting on the 1st tick (the phase).
Documentation
Generate a clock that counts every n
ticks, starting at tick m
, by
using an array of size n
.
This follows the same convention as clk
, but uses a counter variable of
integral type a rather than an array.