Safe Haskell | None |
---|---|
Language | Haskell2010 |
- class MonadFix fabric => Spartan3e fabric where
- board_init :: fabric ()
- rot_as_reset :: fabric ()
- mm_lcdP :: FabricPatch fabric (Seq (Enabled ((X2, X16), U8))) () (Seq Ack) ()
- rs232_txP :: Serial -> Integer -> FabricPatch fabric (Seq (Enabled U8)) () (Seq Ack) ()
- rs232_rxP :: Serial -> Integer -> FabricPatch fabric () (Seq (Enabled U8)) () ()
- tickTock :: Size w => Witness w -> Integer -> fabric (Seq Bool)
- switches :: fabric (Matrix X4 (Seq Bool))
- buttons :: fabric (Matrix X4 (Seq Bool))
- leds :: Matrix X8 (Seq Bool) -> fabric ()
- dial_button :: fabric (Seq Bool)
- dial_rot :: fabric (Seq (Enabled Bool))
- clockRate :: Integer
- writeUCF :: FilePath -> KLEG -> IO ()
- data Serial
- switchesP :: Spartan3e fabric => fabric (Patch () (Matrix X4 (Seq Bool)) () (Matrix X4 ()))
- buttonsP :: Spartan3e fabric => fabric (Patch () (Matrix X4 (Seq Bool)) () (Matrix X4 ()))
- ledsP :: Spartan3e fabric => Patch (Matrix X8 (Seq Bool)) (fabric ()) (Matrix X8 ()) ()
Class for the methods of the Spartan3e
class MonadFix fabric => Spartan3e fabric where Source
board_init :: fabric () Source
board_init
sets up the use of the clock.
Always call board_init
first. [Required].
rot_as_reset :: fabric () Source
rot_as_reset
sets up the rotary dial as a reset switch.
mm_lcdP :: FabricPatch fabric (Seq (Enabled ((X2, X16), U8))) () (Seq Ack) () Source
mm_lcdP
gives a memory mappped (mm) API to the LCD.
Disables the StrataFlash (for now).
rs232_txP
gives a patch level API for transmission of bytes
over one of the serial links.
rs232_rxP
gives a patch level API for reception of bytes
over one of the serial links. Note there is no hand-shaking
because the (implied) UART does no buffering; you better be
ready.
tickTock :: Size w => Witness w -> Integer -> fabric (Seq Bool) Source
tickTock
generates n
pulses per second,
based on the expected simulation, or clockrate on the board.
The purpose is for controlling real-time sampling, or for animations.
switches :: fabric (Matrix X4 (Seq Bool)) Source
switches
gives raw access to the position of the toggle switches.
buttons :: fabric (Matrix X4 (Seq Bool)) Source
buttons
gives raw access to the state of the buttons.
leds :: Matrix X8 (Seq Bool) -> fabric () Source
leds
drives the leds
dial_button :: fabric (Seq Bool) Source
dial_button
gives raw access to the state of the dial button
dial_rot :: fabric (Seq (Enabled Bool)) Source
dial_rot
gives Enabled packets when dial is rotated,
and if the rotation was clockwise
Spartan3e Fabric | |
Spartan3e Polyester |
|
Initialization, and global settings.
writeUCF :: FilePath -> KLEG -> IO () Source
show out a suggested UCF file for Spartan3e, for a specific circuit.
Data structures
Utilities for Board and Simulation use
switchesP :: Spartan3e fabric => fabric (Patch () (Matrix X4 (Seq Bool)) () (Matrix X4 ())) Source
switchesP
gives a patch-level API for the toggle switches.