blob: 3344d7c5a18b6a28c9093acebc0d970170bf0c5d (
plain)
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
26
27
28
|
/*=======================================================================================*/
/* 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 */
/*=======================================================================================*/
function clause ext_is_CSR_defined (0x008) = true
function clause ext_is_CSR_defined (0xC20) = true
function clause ext_is_CSR_defined (0xC21) = true
function clause ext_is_CSR_defined (0xC22) = true
function clause ext_is_CSR_defined (0x009) = true
function clause ext_is_CSR_defined (0x00A) = true
function clause ext_is_CSR_defined (0x00F) = true
function clause ext_read_CSR (0x009) = Some (zero_extend(vcsr[vxsat]))
function clause ext_read_CSR (0x00A) = Some (zero_extend(vcsr[vxrm]))
function clause ext_read_CSR (0x00F) = Some (zero_extend(vcsr.bits))
function clause ext_read_CSR (0x009) = Some (zero_extend(vcsr[vxsat]))
function clause ext_read_CSR (0x00A) = Some (zero_extend(vcsr[vxrm]))
function clause ext_read_CSR (0x00F) = Some (zero_extend(vcsr.bits))
function clause ext_write_CSR (0x009, value) = { ext_write_vcsr (vcsr[vxrm], value[0 .. 0]); Some(zero_extend(vcsr[vxsat])) }
function clause ext_write_CSR (0x00A, value) = { ext_write_vcsr (value[1 .. 0], vcsr[vxsat]); Some(zero_extend(vcsr[vxrm])) }
function clause ext_write_CSR (0x00F, value) = { ext_write_vcsr (value [2 .. 1], value [0 .. 0]); Some(zero_extend(vcsr.bits)) }
|