diff --git a/Makefile b/Makefile index d72153579..4f3b63af5 100644 --- a/Makefile +++ b/Makefile @@ -17,6 +17,7 @@ endif SAIL_XLEN += riscv_xlen.sail SAIL_FLEN := riscv_flen_D.sail +SAIL_FLEN += riscv_flen.sail SAIL_VLEN := riscv_vlen.sail # Instruction sources, depending on target diff --git a/model/riscv_flen.sail b/model/riscv_flen.sail new file mode 100644 index 000000000..bed3f245e --- /dev/null +++ b/model/riscv_flen.sail @@ -0,0 +1,14 @@ +/*=======================================================================================*/ +/* 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 */ +/*=======================================================================================*/ + +type flenbits = bits(flen) + +// Variable versions of the above types. Variables and types +// are disjoint in Sail so they are allowed to have the same name. +// This saves typing `sizeof()` everywhere. +let flen = sizeof(flen) diff --git a/model/riscv_flen_D.sail b/model/riscv_flen_D.sail index 2f85ec5a2..385eb4943 100644 --- a/model/riscv_flen_D.sail +++ b/model/riscv_flen_D.sail @@ -8,10 +8,4 @@ /* Define the FLEN value for the 'D' extension. */ -type flen : Int = 64 -type flenbits = bits(flen) - -// Variable versions of the above types. Variables and types -// are disjoint in Sail so they are allowed to have the same name. -// This saves typing `sizeof()` everywhere. -let flen = sizeof(flen) +type flen : Int = 64 diff --git a/model/riscv_flen_F.sail b/model/riscv_flen_F.sail index fd329ee4b..b3475b943 100644 --- a/model/riscv_flen_F.sail +++ b/model/riscv_flen_F.sail @@ -8,10 +8,4 @@ /* Define the FLEN value for the 'F' extension. */ -type flen : Int = 32 -type flenbits = bits(flen) - -// Variable versions of the above types. Variables and types -// are disjoint in Sail so they are allowed to have the same name. -// This saves typing `sizeof()` everywhere. -let flen = sizeof(flen) +type flen : Int = 32