Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data Reg t
- class IvoryBits a => IvoryIOReg a
- mkReg :: forall t. IvoryIOReg t => Integer -> Reg t
- readReg :: IvoryIOReg a => Reg a -> Ivory eff a
- writeReg :: IvoryIOReg a => Reg a -> a -> Ivory eff ()
- data BitDataReg d
- mkBitDataReg :: IvoryIOReg (BitDataRep d) => Integer -> BitDataReg d
- mkBitDataRegNamed :: IvoryIOReg (BitDataRep d) => Integer -> String -> BitDataReg d
- getReg :: (BitData d, IvoryIOReg (BitDataRep d)) => BitDataReg d -> Ivory eff d
- setReg :: (BitData d, IvoryIOReg (BitDataRep d)) => BitDataReg d -> BitDataM d a -> Ivory eff a
- modifyReg :: (BitData d, IvoryIOReg (BitDataRep d)) => BitDataReg d -> BitDataM d a -> Ivory eff a
- hw_moduledef :: ModuleDef
- hw_artifacts :: [Located Artifact]
I/O Registers
An I/O register containing a value of type "t". Define registers using the "mkReg" functions.
class IvoryBits a => IvoryIOReg a Source #
ioRegSize, ioRegRead, ioRegWrite
Instances
IvoryIOReg Uint8 Source # | |
IvoryIOReg Uint16 Source # | |
IvoryIOReg Uint32 Source # | |
mkReg :: forall t. IvoryIOReg t => Integer -> Reg t Source #
Previously, this was a smart constructor to raise an error if the address is invalid, but we didn't find a way to parameterize the valid address space by the platform, so now mkReg accepts all addresses.
readReg :: IvoryIOReg a => Reg a -> Ivory eff a Source #
Read an I/O register, returning an Ivory value.
writeReg :: IvoryIOReg a => Reg a -> a -> Ivory eff () Source #
Write an I/O register from an Ivory value.
Bit Data I/O registers
data BitDataReg d Source #
A register associated with a bit data type.
mkBitDataReg :: IvoryIOReg (BitDataRep d) => Integer -> BitDataReg d Source #
Create a bit data register given its address.
mkBitDataRegNamed :: IvoryIOReg (BitDataRep d) => Integer -> String -> BitDataReg d Source #
Create a bit data register given its address and name.
getReg :: (BitData d, IvoryIOReg (BitDataRep d)) => BitDataReg d -> Ivory eff d Source #
setReg :: (BitData d, IvoryIOReg (BitDataRep d)) => BitDataReg d -> BitDataM d a -> Ivory eff a Source #
Set a register to a value taken from a block of bit modifications. The previous value is discarded.
modifyReg :: (BitData d, IvoryIOReg (BitDataRep d)) => BitDataReg d -> BitDataM d a -> Ivory eff a Source #
Modify a register by a set of bit modification actions.
Dependency Capture
hw_artifacts :: [Located Artifact] Source #