add more examples

This commit is contained in:
NotAFile 2022-04-07 12:53:34 +02:00
parent af2e22aaad
commit 7411ad59ad
2 changed files with 11 additions and 0 deletions

5
doc/examples/counter.fut Normal file
View File

@ -0,0 +1,5 @@
proc counter() -> Logic<8> {
reg count = 8'0;
count = count + 1;
count
}

6
doc/examples/match.fut Normal file
View File

@ -0,0 +1,6 @@
comb match_not(a: Logic<1>) -> Logic<8> {
match (a) {
1'1 => 8'10,
1'0 => 8'5
}
}