blob: 80878a80358831e0a89d955dae91701c9f3126dc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
default Order dec
$include <prelude.sail>
function get_16((): unit) -> range(0, 16) = 16
function get_8((): unit) -> range(0, 16) = 8
function main((): unit) -> unit = {
let x = get_16();
let y = get_8();
let addr = 0x1234_ABCD;
let v1 = slice(addr, 16, x);
let v2 = slice(addr, 16, y);
print_bits("v1 = ", v1);
print_bits("v2 = ", v2);
}
|