kansas-lava-cores-0.1.2.1: FPGA Cores Written in Kansas Lava.

Safe HaskellNone
LanguageHaskell2010

Hardware.KansasLava.Boards.Spartan3e

Contents

Synopsis

Class for the methods of the Spartan3e

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 Source

Arguments

:: Serial

port

-> Integer

baud rate

-> FabricPatch fabric (Seq (Enabled U8)) () (Seq Ack) () 

rs232_txP gives a patch level API for transmission of bytes over one of the serial links.

rs232_rxP Source

Arguments

:: Serial

port

-> Integer

baud rate

-> FabricPatch fabric () (Seq (Enabled U8)) () () 

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

board_init sets up the use of the clock. Always call board_init first. Required.

Initialization, and global settings.

clockRate :: Integer Source

The clock rate on the Spartan3e (50MHz), in hertz.

writeUCF :: FilePath -> KLEG -> IO () Source

show out a suggested UCF file for Spartan3e, for a specific circuit.

Data structures

data Serial Source

Constructors

DCE 
DTE 

Instances

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.

buttonsP :: Spartan3e fabric => fabric (Patch () (Matrix X4 (Seq Bool)) () (Matrix X4 ())) Source

buttonsP gives a patch-level API for the toggle switches.

ledsP :: Spartan3e fabric => Patch (Matrix X8 (Seq Bool)) (fabric ()) (Matrix X8 ()) () Source

ledP gives a patch-level API for the leds.