aboutsummaryrefslogtreecommitdiff
path: root/model/riscv_csr_ext.sail
blob: f034460d66debbf957e22374ea65f05f4a9f556b (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
/*=======================================================================================*/
/*  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                                                */
/*=======================================================================================*/

mapping clause csr_name_map = reg <-> hex_bits_12(reg)
end csr_name_map

/* XXX due to an apparent Sail bug the definition of this function must appear
   after the last csr_name_map clause and not by the val spec as it was
   previously. */
function csr_name(csr) = csr_name_map(csr)

function clause ext_is_CSR_defined(_) = false
end ext_is_CSR_defined

function clause ext_read_CSR _ = None()
end ext_read_CSR

function clause ext_write_CSR (_, _) = None()
end ext_write_CSR