Browse Source

add more examples

main
NotAFile 4 months ago
parent
commit
7411ad59ad
  1. 5
      doc/examples/counter.fut
  2. 6
      doc/examples/match.fut

5
doc/examples/counter.fut

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

6
doc/examples/match.fut

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