-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
64 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import Sail.sail | ||
|
||
structure My_struct where | ||
structure My_struct where | ||
field1 : Int | ||
field2 : Int | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import Sail.sail | ||
|
||
def foo (n : Int) : BitVec 4 := | ||
(0xF : BitVec 4) | ||
|
||
def bar (x : BitVec k_n) : BitVec k_n := | ||
x | ||
|
||
def initialize_registers : Unit := | ||
() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
default Order dec | ||
|
||
$include <prelude.sail> | ||
|
||
val foo : forall 'n. int('n) -> bits(4) | ||
|
||
function foo(n) = { | ||
0xF | ||
} | ||
|
||
val bar : forall 'n. bits('n) -> bits('n) | ||
|
||
function bar(x) = { | ||
x | ||
} |