Copyright | (C) 2013-2015, University of Twente |
---|---|
License | BSD2 (see the file LICENSE) |
Maintainer | Christiaan Baaij <christiaan.baaij@gmail.com> |
Safe Haskell | Safe |
Language | Haskell2010 |
- blockRam :: (KnownNat n, KnownNat m) => Vec n a -> Signal (Unsigned m) -> Signal (Unsigned m) -> Signal Bool -> Signal a -> Signal a
- blockRamPow2 :: (KnownNat (2 ^ n), KnownNat n) => Vec (2 ^ n) a -> Signal (Unsigned n) -> Signal (Unsigned n) -> Signal Bool -> Signal a -> Signal a
- blockRam' :: (KnownNat n, KnownNat m) => SClock clk -> Vec n a -> Signal' clk (Unsigned m) -> Signal' clk (Unsigned m) -> Signal' clk Bool -> Signal' clk a -> Signal' clk a
- blockRamPow2' :: (KnownNat n, KnownNat (2 ^ n)) => SClock clk -> Vec (2 ^ n) a -> Signal' clk (Unsigned n) -> Signal' clk (Unsigned n) -> Signal' clk Bool -> Signal' clk a -> Signal' clk a
Documentation
:: (KnownNat n, KnownNat m) | |
=> Vec n a | Initial content of the BRAM, also
determines the size, NB: MUST be a constant. |
-> Signal (Unsigned m) | Write address |
-> Signal (Unsigned m) | Read address |
-> Signal Bool | Write enable |
-> Signal a | Value to write (at address |
-> Signal a | Value of the |
:: (KnownNat (2 ^ n), KnownNat n) | |
=> Vec (2 ^ n) a | Initial content of the BRAM, also
determines the size, NB: MUST be a constant. |
-> Signal (Unsigned n) | Write address |
-> Signal (Unsigned n) | Read address |
-> Signal Bool | Write enable |
-> Signal a | Value to write (at address |
-> Signal a | Value of the |
:: (KnownNat n, KnownNat m) | |
=> SClock clk |
|
-> Vec n a | Initial content of the BRAM, also
determines the size, NB: MUST be a constant. |
-> Signal' clk (Unsigned m) | Write address |
-> Signal' clk (Unsigned m) | Read address |
-> Signal' clk Bool | Write enable |
-> Signal' clk a | Value to write (at address |
-> Signal' clk a | Value of the |
Create a blockRAM with space for n
elements
- NB: Read value is delayed by 1 cycle
- NB: Initial output value is
undefined
type ClkA = Clk "A" 100 clkA100 :: SClock ClkA clkA100 =sclock
bram40 ::Signal'
ClkA (Unsigned
6) ->Signal'
ClkA (Unsigned
6) ->Signal'
ClkA Bool ->Signal'
ClkABit
-> ClkASignal'
Bit
bram40 =blockRam'
clkA100 (replicate
d40 1)
:: (KnownNat n, KnownNat (2 ^ n)) | |
=> SClock clk |
|
-> Vec (2 ^ n) a | Initial content of the BRAM, also
determines the size, NB: MUST be a constant. |
-> Signal' clk (Unsigned n) | Write address |
-> Signal' clk (Unsigned n) | Read address |
-> Signal' clk Bool | Write enable |
-> Signal' clk a | Value to write (at address |
-> Signal' clk a | Value of the |
Create a blockRAM with space for 2^n
elements
- NB: Read value is delayed by 1 cycle
- NB: Initial output value is
undefined
type ClkA = Clk "A" 100 clkA100 :: SClock ClkA clkA100 =sclock
bram32 ::Signal'
ClkA (Unsigned
5) -> Signal' ClkA (Unsigned
5) ->Signal'
ClkA Bool ->Signal'
ClkABit
-> Signal' ClkABit
bram32 =blockRamPow2'
clkA100 (replicate
d32 1)