-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Df serializer #21
Comments
(I guess for the librarized version you wouldn't want to use |
Yes I agree this useful. But rather then living in clash-protocols it should live in clash-cores. Since clash-protocols is more foundational then clash-cores. Perhaps even in the uart module. |
Oh, I didn't realize Can you move this ticket to |
I think the wrapper is an excellent idea. [edit] |
I'd like to draw attention to https://github.com/bittide/bittide-hardware/blob/staging/bittide/src/Bittide/Wishbone.hs#L254-L504 where this already exists |
Right, this is where I lifted |
We can wrap
clash-cores
's UART as aDf
-to-CSignal
circuit:Since it has no internal concept of holding received bytes until consumed, we need to pair it with a buffer to be useful in the
Df
world:And now the nifty part: with these two components, we can make a general circuit-to-serial transformer:
And this is basically the Clash/UART equivalent of
Prelude.interact :: (String -> String) -> IO ()
!Would this make sense as an addition to
clash-protocols
? If yes, I'm happy to prepare a proper PR.The text was updated successfully, but these errors were encountered: