This repository has been archived on 2025-06-25. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
riscv-bluespec-classic/bs/Uart/Uart.bs
2025-04-20 15:22:14 -04:00

26 lines
No EOL
773 B
Haskell

package Uart(
mkUartPhy,
UartPhy(..)
) where
import Serializer
import Deserializer
import BusTypes
import Util
-- Out is out from the FPGA and In is in to the FPGA
interface (UartPhy :: # -> # -> *) clkFreq baudRate =
bitOut :: Bit 1
bitIn :: Bit 1 -> Action
mkUartPhy :: (BusTypes.BusServer inFlightTransactions numClients)
-> Module (UartPhy clkFreq baudRate)
mkUartPhy dedicatedServerInterface = do
fileHandle :: Handle <- openFile "mkUartPhy.log" WriteMode
deserializer :: Deserializer clkFreq baudRate <- mkDeserialize fileHandle
serializer :: Serializer clkFreq baudRate <- mkSerialize fileHandle
return |>
interface UartPhy
bitOut = 1
bitIn bitVal = do
action {}