add examples to docs

main
notafile 2022-01-04 01:41:09 +01:00
parent 68306885d7
commit cabdfea643
2 changed files with 17 additions and 0 deletions

10
doc/examples/halfadd.fut Normal file
View File

@ -0,0 +1,10 @@
module halfadd (
input wire a,
input wire b,
output wire sum,
output wire carry
)
{
assign sum = xor(a, b);
assign carry = and(a, b);
}

View File

@ -0,0 +1,7 @@
module identity (
input wire a,
output wire x
)
{
assign x = a;
}