diff options
author | rsnikhil <nikhil@acm.org> | 2019-09-13 23:29:36 -0400 |
---|---|---|
committer | rsnikhil <nikhil@acm.org> | 2019-09-13 23:29:36 -0400 |
commit | ecb29cb115c9661cc29f2d9493c820e654ca1771 (patch) | |
tree | 80f2f781a6f855b40345bd0dfbca78db491f862e /model/riscv_flen_D.sail | |
parent | 86ff4e00905f1202bffb7e2be3709030d2cba1c2 (diff) | |
download | sail-riscv-ecb29cb115c9661cc29f2d9493c820e654ca1771.zip sail-riscv-ecb29cb115c9661cc29f2d9493c820e654ca1771.tar.gz sail-riscv-ecb29cb115c9661cc29f2d9493c820e654ca1771.tar.bz2 |
First commit with code for F and D extensions (detail follows)
>----------------
Modified existing file: riscv_sys_regs.sail
Added predicates 'haveFExt()' and 'haveDExt()'
Similar to existing 'haveNExt()', 'haveAtomics()', etc.
>----------------
New files: riscv_flen_F.sail and riscv_flen_D.sail
These are analogous to existing: riscv_xlen32.sail and riscv_xlen64.sail
>----------------
New file: riscv_freg_type.sail
This is analogous to existing: riscv_reg_type.sail
>----------------
New file: riscv_fdext_regs.sail
This is the definition of the floating-point reg file, analogous to
existing: riscv_regs.sail
>----------------
New file: riscv_insts_fdext.sail
This is the spec of F and D instructions.
The file has a section separated by /* **** */ lines
for each related group of instructions.
Each section contains:
union clause ast ...
mapping clause encdec ...
function clause execute ...
mapping clause assembly ...
Finished all the ast, encdec, and assembly sections.
For the execute sections:
- Finished LOAD_FP and STORE_FP
- For FADD_S/FSUB_S/FMUL_S/FDIV_S: done, assuming certain primitives
for the actual arithmetic, which have to be linked into Berkeley
softloat.
- Rest of them have placeholders that treat them as illegal instrs.
Todo:
- Finish 'function clause execute' for remaining instructions,
and collect list of primitives needed (based on softfloat)
- Fix up Makefile to include these new files, make sure everything compiles.
- Connect softfloat, and run ISA tests.
Diffstat (limited to 'model/riscv_flen_D.sail')
-rw-r--r-- | model/riscv_flen_D.sail | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/model/riscv_flen_D.sail b/model/riscv_flen_D.sail new file mode 100644 index 0000000..f093c9f --- /dev/null +++ b/model/riscv_flen_D.sail @@ -0,0 +1,5 @@ +/* Define the FLEN value for the 'D' extension. */ + +type flen : Int = 64 +type flen_bytes : Int = 8 +type flenbits = bits(xlen) |