futilehdl/doc/examples/halfadd.fut

9 lines
106 B
Plaintext
Raw Normal View History

2022-01-04 00:41:09 +00:00
module halfadd (
2022-02-02 00:13:33 +00:00
a: Logic,
b: Logic
) -> (Logic, Logic)
2022-01-04 00:41:09 +00:00
{
2022-01-17 18:20:51 +00:00
assign sum = a ^ b;
assign carry = a & b;
2022-01-04 00:41:09 +00:00
}