blob: ec81778a9e4d0a4cbc6af9e1f277d3b53048eaaf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
package CPU where
import GetPut
-- | The interface the CPU exposes.
interface CPU =
-- UART
uart_tx :: Get (Bit 8)
uart_rx :: Put (Bit 8)
mkCPU :: Module CPU
mkCPU = module
byte :: Wire (Bit 8) <- mkWire
interface CPU
uart_tx = toGet byte
uart_rx = toPut $ \b -> do
byte := b
-- vim: set ft=haskell :
|