| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Hardware.KansasLava.Simulators.Spartan3e
Description
This API mirrors Spartan3e via a class
abstaction. The other API also contains some Board specific utilties
that can also be used for simulation.
Documentation
class MonadFix fabric => Spartan3e fabric where Source
Methods
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
Instances
| Spartan3e Fabric | |
| Spartan3e Polyester |
|