summaryrefslogtreecommitdiff
path: root/test/ocaml/pattern1/pattern.sail
blob: 3c28d46eea516d3ffb315d04d1569466806571eb (plain)
1
2
3
4
5
6
7
8
9
val main : unit -> unit

function main () = {
  vec = 0x4F;
  match vec {
    0b01 @ x : bits(2) @ 0xF => if x == 0b00 then print("pass") else print("x is incorrect"),
    _ => print("pattern fail")
  }
}