1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25// ======================================================================================= // This Sail RISC-V architecture model, comprising all files and // directories except where otherwise noted is subject the BSD // two-clause license in the LICENSE file. // // SPDX-License-Identifier: BSD-2-Clause // ======================================================================================= // default register type type regtype = xlenbits // default zero register let zero_reg : regtype = zeros() // default register printer val RegStr : regtype -> string function RegStr(r) = bits_str(r) // conversions val regval_from_reg : regtype -> xlenbits function regval_from_reg(r) = r val regval_into_reg : xlenbits -> regtype function regval_into_reg(v) = v