Loading files
This file is pinned to the selected release. Download the original to open it in your design tool.
import Lava
halfAdd :: Bit -> Bit -> (Bit, Bit)
halfAdd a b = (sum, carry)
where
sum = a <#> b
carry = a <&> b
main :: IO ()
main = do print $ halfAdd low high
writeVerilog "HalfAdd"
(halfAdd (name "a") (name "b"))
(name "sum", name "carry")
1753a4cb4This file is pinned to the selected release. Download the original to open it in your design tool.