Skip to content
This repository has been archived by the owner on Sep 7, 2018. It is now read-only.

DDR primitive documentation #119

Open
christiaanb opened this issue Aug 17, 2017 · 0 comments
Open

DDR primitive documentation #119

christiaanb opened this issue Aug 17, 2017 · 0 comments

Comments

@christiaanb
Copy link
Member

Add example of a sequence of inputs and outputs for:

-- | DDR input primitive
--
-- Consumes a DDR input signal and produces a regular signal containing a pair
-- of values.
ddrIn
:: ( HasCallStack
, fast ~ 'Dom n pFast
, slow ~ 'Dom n (2*pFast))
=> Clock slow gated
-- ^ clock
-> Reset slow synchronous
-- ^ reset
-> (a, a, a)
-- ^ reset values
-> Signal fast a
-- ^ DDR input signal
-> Signal slow (a,a)
-- ^ normal speed output pairs

and

-- | DDR output primitive
--
-- Produces a DDR output signal from a normal signal of pairs of input.
ddrOut :: ( HasCallStack
, fast ~ 'Dom n pFast
, slow ~ 'Dom n (2*pFast))
=> Clock slow gated -- ^ clock
-> Reset slow synchronous -- ^ reset
-> a -- ^ reset value
-> Signal slow (a,a) -- ^ normal speed input pairs
-> Signal fast a -- ^ DDR output signal
ddrOut clk rst i0 = uncurry (withFrozenCallStack $ ddrOut# clk rst i0) . unbundle

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant