revamp hwacha; now runs in physical mode
authorYunsup Lee <yunsup@cs.berkeley.edu>
Wed, 16 Oct 2013 21:11:18 +0000 (14:11 -0700)
committerYunsup Lee <yunsup@cs.berkeley.edu>
Wed, 16 Oct 2013 21:11:25 +0000 (14:11 -0700)
253 files changed:
configure
configure.ac
hwacha/README
hwacha/decode_hwacha.h [new file with mode: 0644]
hwacha/decode_hwacha_ut.h [new file with mode: 0644]
hwacha/disasm.cc [deleted file]
hwacha/hwacha.ac [new file with mode: 0644]
hwacha/hwacha.cc [new file with mode: 0644]
hwacha/hwacha.h
hwacha/hwacha.mk.in [new file with mode: 0644]
hwacha/insn_template_hwacha.cc [new file with mode: 0644]
hwacha/insn_template_hwacha_ut.cc [new file with mode: 0644]
hwacha/insns/fmovn.h [deleted file]
hwacha/insns/fmovz.h [deleted file]
hwacha/insns/movn.h [deleted file]
hwacha/insns/movz.h [deleted file]
hwacha/insns/stop.h [deleted file]
hwacha/insns/utidx.h [deleted file]
hwacha/insns/venqcmd.h [deleted file]
hwacha/insns/venqcnt.h [deleted file]
hwacha/insns/venqimm1.h [deleted file]
hwacha/insns/venqimm2.h [deleted file]
hwacha/insns/vf.h
hwacha/insns/vfld.h [deleted file]
hwacha/insns/vflsegd.h
hwacha/insns/vflsegstd.h
hwacha/insns/vflsegstw.h
hwacha/insns/vflsegw.h
hwacha/insns/vflstd.h [deleted file]
hwacha/insns/vflstw.h [deleted file]
hwacha/insns/vflw.h [deleted file]
hwacha/insns/vfmst.h [deleted file]
hwacha/insns/vfmsv.h [deleted file]
hwacha/insns/vfmts.h [deleted file]
hwacha/insns/vfmvv.h [deleted file]
hwacha/insns/vfsd.h [deleted file]
hwacha/insns/vfssegd.h
hwacha/insns/vfssegstd.h
hwacha/insns/vfssegstw.h
hwacha/insns/vfssegw.h
hwacha/insns/vfsstd.h [deleted file]
hwacha/insns/vfsstw.h [deleted file]
hwacha/insns/vfsw.h [deleted file]
hwacha/insns/vgetcfg.h [new file with mode: 0644]
hwacha/insns/vgetvl.h [new file with mode: 0644]
hwacha/insns/vlb.h [deleted file]
hwacha/insns/vlbu.h [deleted file]
hwacha/insns/vld.h [deleted file]
hwacha/insns/vlh.h [deleted file]
hwacha/insns/vlhu.h [deleted file]
hwacha/insns/vlsegb.h
hwacha/insns/vlsegbu.h
hwacha/insns/vlsegd.h
hwacha/insns/vlsegh.h
hwacha/insns/vlseghu.h
hwacha/insns/vlsegstb.h
hwacha/insns/vlsegstbu.h
hwacha/insns/vlsegstd.h
hwacha/insns/vlsegsth.h
hwacha/insns/vlsegsthu.h
hwacha/insns/vlsegstw.h
hwacha/insns/vlsegstwu.h
hwacha/insns/vlsegw.h
hwacha/insns/vlsegwu.h
hwacha/insns/vlstb.h [deleted file]
hwacha/insns/vlstbu.h [deleted file]
hwacha/insns/vlstd.h [deleted file]
hwacha/insns/vlsth.h [deleted file]
hwacha/insns/vlsthu.h [deleted file]
hwacha/insns/vlstw.h [deleted file]
hwacha/insns/vlstwu.h [deleted file]
hwacha/insns/vlw.h [deleted file]
hwacha/insns/vlwu.h [deleted file]
hwacha/insns/vmst.h [deleted file]
hwacha/insns/vmsv.h
hwacha/insns/vmts.h [deleted file]
hwacha/insns/vmvv.h
hwacha/insns/vsb.h [deleted file]
hwacha/insns/vsd.h [deleted file]
hwacha/insns/vsetcfg.h [new file with mode: 0644]
hwacha/insns/vsetvl.h
hwacha/insns/vsh.h [deleted file]
hwacha/insns/vssegb.h
hwacha/insns/vssegd.h
hwacha/insns/vssegh.h
hwacha/insns/vssegstb.h
hwacha/insns/vssegstd.h
hwacha/insns/vssegsth.h
hwacha/insns/vssegstw.h
hwacha/insns/vssegw.h
hwacha/insns/vsstb.h [deleted file]
hwacha/insns/vsstd.h [deleted file]
hwacha/insns/vssth.h [deleted file]
hwacha/insns/vsstw.h [deleted file]
hwacha/insns/vsw.h [deleted file]
hwacha/insns/vtcfg.h [deleted file]
hwacha/insns/vtcfgivl.h [deleted file]
hwacha/insns/vvcfg.h [deleted file]
hwacha/insns/vvcfgivl.h [deleted file]
hwacha/insns/vxcptevac.h [deleted file]
hwacha/insns/vxcpthold.h [deleted file]
hwacha/insns/vxcptwait.h [deleted file]
hwacha/insns_ut/ut_add.h [new symlink]
hwacha/insns_ut/ut_addi.h [new symlink]
hwacha/insns_ut/ut_addiw.h [new symlink]
hwacha/insns_ut/ut_addw.h [new symlink]
hwacha/insns_ut/ut_amoadd_d.h [new symlink]
hwacha/insns_ut/ut_amoadd_w.h [new symlink]
hwacha/insns_ut/ut_amoand_d.h [new symlink]
hwacha/insns_ut/ut_amoand_w.h [new symlink]
hwacha/insns_ut/ut_amomax_d.h [new symlink]
hwacha/insns_ut/ut_amomax_w.h [new symlink]
hwacha/insns_ut/ut_amomaxu_d.h [new symlink]
hwacha/insns_ut/ut_amomaxu_w.h [new symlink]
hwacha/insns_ut/ut_amomin_d.h [new symlink]
hwacha/insns_ut/ut_amomin_w.h [new symlink]
hwacha/insns_ut/ut_amominu_d.h [new symlink]
hwacha/insns_ut/ut_amominu_w.h [new symlink]
hwacha/insns_ut/ut_amoor_d.h [new symlink]
hwacha/insns_ut/ut_amoor_w.h [new symlink]
hwacha/insns_ut/ut_amoswap_d.h [new symlink]
hwacha/insns_ut/ut_amoswap_w.h [new symlink]
hwacha/insns_ut/ut_amoxor_d.h [new symlink]
hwacha/insns_ut/ut_amoxor_w.h [new symlink]
hwacha/insns_ut/ut_and.h [new symlink]
hwacha/insns_ut/ut_andi.h [new symlink]
hwacha/insns_ut/ut_auipc.h [new symlink]
hwacha/insns_ut/ut_div.h [new symlink]
hwacha/insns_ut/ut_divu.h [new symlink]
hwacha/insns_ut/ut_divuw.h [new symlink]
hwacha/insns_ut/ut_divw.h [new symlink]
hwacha/insns_ut/ut_fadd_d.h [new symlink]
hwacha/insns_ut/ut_fadd_s.h [new symlink]
hwacha/insns_ut/ut_fcvt_d_l.h [new symlink]
hwacha/insns_ut/ut_fcvt_d_lu.h [new symlink]
hwacha/insns_ut/ut_fcvt_d_s.h [new symlink]
hwacha/insns_ut/ut_fcvt_d_w.h [new symlink]
hwacha/insns_ut/ut_fcvt_d_wu.h [new symlink]
hwacha/insns_ut/ut_fcvt_l_d.h [new symlink]
hwacha/insns_ut/ut_fcvt_l_s.h [new symlink]
hwacha/insns_ut/ut_fcvt_lu_d.h [new symlink]
hwacha/insns_ut/ut_fcvt_lu_s.h [new symlink]
hwacha/insns_ut/ut_fcvt_s_d.h [new symlink]
hwacha/insns_ut/ut_fcvt_s_l.h [new symlink]
hwacha/insns_ut/ut_fcvt_s_lu.h [new symlink]
hwacha/insns_ut/ut_fcvt_s_w.h [new symlink]
hwacha/insns_ut/ut_fcvt_s_wu.h [new symlink]
hwacha/insns_ut/ut_fcvt_w_d.h [new symlink]
hwacha/insns_ut/ut_fcvt_w_s.h [new symlink]
hwacha/insns_ut/ut_fcvt_wu_d.h [new symlink]
hwacha/insns_ut/ut_fcvt_wu_s.h [new symlink]
hwacha/insns_ut/ut_fdiv_d.h [new symlink]
hwacha/insns_ut/ut_fdiv_s.h [new symlink]
hwacha/insns_ut/ut_fence.h [new symlink]
hwacha/insns_ut/ut_feq_d.h [new symlink]
hwacha/insns_ut/ut_feq_s.h [new symlink]
hwacha/insns_ut/ut_fld.h [new symlink]
hwacha/insns_ut/ut_fle_d.h [new symlink]
hwacha/insns_ut/ut_fle_s.h [new symlink]
hwacha/insns_ut/ut_flt_d.h [new symlink]
hwacha/insns_ut/ut_flt_s.h [new symlink]
hwacha/insns_ut/ut_flw.h [new symlink]
hwacha/insns_ut/ut_fmadd_d.h [new symlink]
hwacha/insns_ut/ut_fmadd_s.h [new symlink]
hwacha/insns_ut/ut_fmax_d.h [new symlink]
hwacha/insns_ut/ut_fmax_s.h [new symlink]
hwacha/insns_ut/ut_fmin_d.h [new symlink]
hwacha/insns_ut/ut_fmin_s.h [new symlink]
hwacha/insns_ut/ut_fmovn.h [new file with mode: 0644]
hwacha/insns_ut/ut_fmovz.h [new file with mode: 0644]
hwacha/insns_ut/ut_fmsub_d.h [new symlink]
hwacha/insns_ut/ut_fmsub_s.h [new symlink]
hwacha/insns_ut/ut_fmul_d.h [new symlink]
hwacha/insns_ut/ut_fmul_s.h [new symlink]
hwacha/insns_ut/ut_fmv_d_x.h [new symlink]
hwacha/insns_ut/ut_fmv_s_x.h [new symlink]
hwacha/insns_ut/ut_fmv_x_d.h [new symlink]
hwacha/insns_ut/ut_fmv_x_s.h [new symlink]
hwacha/insns_ut/ut_fnmadd_d.h [new symlink]
hwacha/insns_ut/ut_fnmadd_s.h [new symlink]
hwacha/insns_ut/ut_fnmsub_d.h [new symlink]
hwacha/insns_ut/ut_fnmsub_s.h [new symlink]
hwacha/insns_ut/ut_frsr.h [new symlink]
hwacha/insns_ut/ut_fsd.h [new symlink]
hwacha/insns_ut/ut_fsgnj_d.h [new symlink]
hwacha/insns_ut/ut_fsgnj_s.h [new symlink]
hwacha/insns_ut/ut_fsgnjn_d.h [new symlink]
hwacha/insns_ut/ut_fsgnjn_s.h [new symlink]
hwacha/insns_ut/ut_fsgnjx_d.h [new symlink]
hwacha/insns_ut/ut_fsgnjx_s.h [new symlink]
hwacha/insns_ut/ut_fsqrt_d.h [new symlink]
hwacha/insns_ut/ut_fsqrt_s.h [new symlink]
hwacha/insns_ut/ut_fssr.h [new symlink]
hwacha/insns_ut/ut_fsub_d.h [new symlink]
hwacha/insns_ut/ut_fsub_s.h [new symlink]
hwacha/insns_ut/ut_fsw.h [new symlink]
hwacha/insns_ut/ut_lb.h [new symlink]
hwacha/insns_ut/ut_lbu.h [new symlink]
hwacha/insns_ut/ut_ld.h [new symlink]
hwacha/insns_ut/ut_lh.h [new symlink]
hwacha/insns_ut/ut_lhu.h [new symlink]
hwacha/insns_ut/ut_lui.h [new symlink]
hwacha/insns_ut/ut_lw.h [new symlink]
hwacha/insns_ut/ut_lwu.h [new symlink]
hwacha/insns_ut/ut_movn.h [new file with mode: 0644]
hwacha/insns_ut/ut_movz.h [new file with mode: 0644]
hwacha/insns_ut/ut_mul.h [new symlink]
hwacha/insns_ut/ut_mulh.h [new symlink]
hwacha/insns_ut/ut_mulhsu.h [new symlink]
hwacha/insns_ut/ut_mulhu.h [new symlink]
hwacha/insns_ut/ut_mulw.h [new symlink]
hwacha/insns_ut/ut_or.h [new symlink]
hwacha/insns_ut/ut_ori.h [new symlink]
hwacha/insns_ut/ut_rem.h [new symlink]
hwacha/insns_ut/ut_remu.h [new symlink]
hwacha/insns_ut/ut_remuw.h [new symlink]
hwacha/insns_ut/ut_remw.h [new symlink]
hwacha/insns_ut/ut_sb.h [new symlink]
hwacha/insns_ut/ut_sd.h [new symlink]
hwacha/insns_ut/ut_sh.h [new symlink]
hwacha/insns_ut/ut_sll.h [new symlink]
hwacha/insns_ut/ut_slli.h [new symlink]
hwacha/insns_ut/ut_slliw.h [new symlink]
hwacha/insns_ut/ut_sllw.h [new symlink]
hwacha/insns_ut/ut_slt.h [new symlink]
hwacha/insns_ut/ut_slti.h [new symlink]
hwacha/insns_ut/ut_sltiu.h [new symlink]
hwacha/insns_ut/ut_sltu.h [new symlink]
hwacha/insns_ut/ut_sra.h [new symlink]
hwacha/insns_ut/ut_srai.h [new symlink]
hwacha/insns_ut/ut_sraiw.h [new symlink]
hwacha/insns_ut/ut_sraw.h [new symlink]
hwacha/insns_ut/ut_srl.h [new symlink]
hwacha/insns_ut/ut_srli.h [new symlink]
hwacha/insns_ut/ut_srliw.h [new symlink]
hwacha/insns_ut/ut_srlw.h [new symlink]
hwacha/insns_ut/ut_stop.h [new file with mode: 0644]
hwacha/insns_ut/ut_sub.h [new symlink]
hwacha/insns_ut/ut_subw.h [new symlink]
hwacha/insns_ut/ut_sw.h [new symlink]
hwacha/insns_ut/ut_utidx.h [new file with mode: 0644]
hwacha/insns_ut/ut_xor.h [new symlink]
hwacha/insns_ut/ut_xori.h [new symlink]
hwacha/opcodes_hwacha.h [new file with mode: 0644]
hwacha/opcodes_hwacha_ut.h [new file with mode: 0644]
riscv/extension.cc
riscv/insns/cflush.h [deleted file]
riscv/insns/fence_v_g.h [deleted file]
riscv/insns/fence_v_l.h [deleted file]
riscv/riscv.mk.in
riscv/rocc.cc
riscv/rocc.h
riscv/spike.cc

index 448b9f565c7234abc01e1d4cd7de18bee461ba11..424e82c7bb6025cda06b3aeab5e418affedd7cb2 100755 (executable)
--- a/configure
+++ b/configure
@@ -4241,6 +4241,51 @@ fi
 
 
 
+    # Add subproject to our running list
+
+    subprojects="$subprojects hwacha"
+
+    # Process the subproject appropriately. If enabled add it to the
+    # $enabled_subprojects running shell variable, set a
+    # SUBPROJECT_ENABLED C define, and include the appropriate
+    # 'subproject.ac'.
+
+
+      { $as_echo "$as_me:${as_lineno-$LINENO}: configuring default subproject : hwacha" >&5
+$as_echo "$as_me: configuring default subproject : hwacha" >&6;}
+      ac_config_files="$ac_config_files hwacha.mk:hwacha/hwacha.mk.in"
+
+      enable_hwacha_sproj="yes"
+      subprojects_enabled="$subprojects_enabled hwacha"
+
+$as_echo "#define HWACHA_ENABLED /**/" >>confdefs.h
+
+
+
+
+
+
+    # Determine if this is a required or an optional subproject
+
+
+
+    # Determine if there is a group with the same name
+
+
+
+    # Create variations of the subproject name suitable for use as a CPP
+    # enabled define, a shell enabled variable, and a shell function
+
+
+
+
+
+
+
+
+
+
+
     # Add subproject to our running list
 
     subprojects="$subprojects softfloat"
@@ -5039,6 +5084,7 @@ for ac_config_target in $ac_config_targets
 do
   case $ac_config_target in
     "riscv.mk") CONFIG_FILES="$CONFIG_FILES riscv.mk:riscv/riscv.mk.in" ;;
+    "hwacha.mk") CONFIG_FILES="$CONFIG_FILES hwacha.mk:hwacha/hwacha.mk.in" ;;
     "softfloat.mk") CONFIG_FILES="$CONFIG_FILES softfloat.mk:softfloat/softfloat.mk.in" ;;
     "softfloat_riscv.mk") CONFIG_FILES="$CONFIG_FILES softfloat_riscv.mk:softfloat_riscv/softfloat_riscv.mk.in" ;;
     "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
index 335100bc78f596da344750aeb45af7b08af0bbc8..44fd31a183f7e760c5f3332b697edec53fab1535 100644 (file)
@@ -81,7 +81,7 @@ AC_SUBST([CXXFLAGS],["-Wall -O2 -std=c++0x"])
 # The '*' suffix indicates an optional subproject. The '**' suffix
 # indicates an optional subproject which is also the name of a group.
 
-MCPPBS_SUBPROJECTS([ riscv, softfloat, softfloat_riscv ])
+MCPPBS_SUBPROJECTS([ riscv, hwacha, softfloat, softfloat_riscv ])
 
 #-------------------------------------------------------------------------
 # MCPPBS subproject groups
index be5a97cb618182efdf8786c6ce06c364d95766be..4e87c554c1b1cf88ba7e7b89c0bd58e56f911d77 100644 (file)
@@ -1,2 +1,2 @@
 This directory contains work in progress on Hwacha, a data-parallel
-accelerator.  It is not currently usable.
+accelerator.
diff --git a/hwacha/decode_hwacha.h b/hwacha/decode_hwacha.h
new file mode 100644 (file)
index 0000000..a99736e
--- /dev/null
@@ -0,0 +1,64 @@
+#ifndef _DECODE_HWACHA_H
+#define _DECODE_HWACHA_H
+
+#define XS1 (xs1)
+#define XS2 (xs2)
+#define WRITE_XRD(value) (xd = value)
+
+#define NXPR (h->get_ct_state()->nxpr)
+#define NFPR (h->get_ct_state()->nfpr)
+#define MAXVL (h->get_ct_state()->maxvl)
+#define VL (h->get_ct_state()->vl)
+#define WRITE_NXPR(nxprnext) (h->get_ct_state()->nxpr = (nxprnext))
+#define WRITE_NFPR(nfprnext) (h->get_ct_state()->nfpr = (nfprnext))
+#define WRITE_MAXVL(maxvlnext) (h->get_ct_state()->maxvl = (maxvlnext))
+#define WRITE_VL(vlnext) (h->get_ct_state()->vl = (vlnext))
+
+#define INSN_RS1 (insn.rs1())
+#define INSN_RS2 (insn.rs2())
+#define INSN_RS3 (insn.rs3())
+#define INSN_RD (insn.rd())
+#define INSN_SEG ((insn.i_imm() >> 9)+1)
+
+#define UT_READ_XPR(idx, src) (h->get_ut_state(idx)->XPR[src])
+#define UT_WRITE_XPR(idx, dst, value) (h->get_ut_state(idx)->XPR.write(dst, value))
+#define UT_RS1(idx) (UT_READ_XPR(idx, INSN_RS1))
+#define UT_RS2(idx) (UT_READ_XPR(idx, INSN_RS2))
+#define UT_WRITE_RD(idx, value) (UT_WRITE_XPR(idx, INSN_RD, value))
+
+#define UT_READ_FPR(idx, src) (h->get_ut_state(idx)->FPR[src])
+#define UT_WRITE_FPR(idx, dst, value) (h->get_ut_state(idx)->FPR.write(dst, value))
+#define UT_FRS1(idx) (UT_READ_FPR(idx, INSN_RS1))
+#define UT_FRS2(idx) (UT_READ_FPR(idx, INSN_RS2))
+#define UT_FRS3(idx) (UT_READ_FPR(idx, INSN_RS3))
+#define UT_WRITE_FRD(idx, value) (UT_WRITE_FPR(idx, INSN_RD, value))
+
+#define VEC_SEG_LOAD(dst, func, inc) \
+  VEC_SEG_ST_LOAD(dst, func, INSN_SEG*inc, inc)
+
+#define VEC_SEG_ST_LOAD(dst, func, stride, inc) \
+  reg_t seg_addr = XS1; \
+  for (uint32_t i=0; i<VL; i++) { \
+    reg_t addr = seg_addr; \
+    seg_addr += stride; \
+    for (uint32_t j=0; j<INSN_SEG; j++) { \
+      UT_WRITE_##dst(i, INSN_RD+j, p->get_mmu()->func(addr)); \
+      addr += inc; \
+    } \
+  }
+
+#define VEC_SEG_STORE(src, func, inc) \
+  VEC_SEG_ST_STORE(src, func, INSN_SEG*inc, inc)
+
+#define VEC_SEG_ST_STORE(src, func, stride, inc) \
+  reg_t seg_addr = XS1; \
+  for (uint32_t i=0; i<VL; i++) { \
+    reg_t addr = seg_addr; \
+    seg_addr += stride; \
+    for (uint32_t j=0; j<INSN_SEG; j++) { \
+      p->get_mmu()->func(addr, UT_READ_##src(i, INSN_RD+j)); \
+      addr += inc; \
+    } \
+  }
+
+#endif
diff --git a/hwacha/decode_hwacha_ut.h b/hwacha/decode_hwacha_ut.h
new file mode 100644 (file)
index 0000000..675f77c
--- /dev/null
@@ -0,0 +1,34 @@
+#ifndef _DECODE_HWACHA_UT_H
+#define _DECODE_HWACHA_UT_H
+
+#include "decode_hwacha.h"
+
+#define UTIDX (i)
+
+#undef RS1
+#undef RS2
+#undef WRITE_RD
+
+#define RS1 UT_RS1(UTIDX)
+#define RS2 UT_RS2(UTIDX)
+#define WRITE_RD(value) UT_WRITE_RD(UTIDX, value)
+
+#undef FRS1
+#undef FRS2
+#undef FRS3
+#undef WRITE_FRD
+
+#define FRS1 UT_FRS1(UTIDX)
+#define FRS2 UT_FRS2(UTIDX)
+#define FRS3 UT_FRS3(UTIDX)
+#define WRITE_FRD(value) UT_WRITE_FRD(UTIDX, value)
+
+// we assume the vector unit has floating-point alus
+#undef require_fp
+#define require_fp
+
+// YUNSUP FIXME
+#undef set_fp_exceptions
+#define set_fp_exceptions
+
+#endif
diff --git a/hwacha/disasm.cc b/hwacha/disasm.cc
deleted file mode 100644 (file)
index 086ec6c..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-hwacha_disassembler::hwacha_disassembler()
-{
-  #define DEFINE_RS1(code) DISASM_INSN(#code, code, 0, xrs1_reg)
-  #define DEFINE_RS1_RS2(code) DISASM_INSN(#code, code, 0, xrs1_reg, xrs2_reg)
-  #define DEFINE_VEC_XMEM(code) DISASM_INSN(#code, code, 0, vxrd_reg, xrs1_reg)
-  #define DEFINE_VEC_XMEMST(code) DISASM_INSN(#code, code, 0, vxrd_reg, xrs1_reg, xrs2_reg)
-  #define DEFINE_VEC_FMEM(code) DISASM_INSN(#code, code, 0, vfrd_reg, xrs1_reg)
-  #define DEFINE_VEC_FMEMST(code) DISASM_INSN(#code, code, 0, vfrd_reg, xrs1_reg, xrs2_reg)
-
-  DEFINE_RS1(vxcptsave);
-  DEFINE_RS1(vxcptrestore);
-  DEFINE_NOARG(vxcptkill);
-
-  DEFINE_RS1(vxcptevac);
-  DEFINE_NOARG(vxcpthold);
-  DEFINE_RS1_RS2(venqcmd);
-  DEFINE_RS1_RS2(venqimm1);
-  DEFINE_RS1_RS2(venqimm2);
-  DEFINE_RS1_RS2(venqcnt);
-
-  DEFINE_VEC_XMEM(vld);
-  DEFINE_VEC_XMEM(vlw);
-  DEFINE_VEC_XMEM(vlwu);
-  DEFINE_VEC_XMEM(vlh);
-  DEFINE_VEC_XMEM(vlhu);
-  DEFINE_VEC_XMEM(vlb);
-  DEFINE_VEC_XMEM(vlbu);
-  DEFINE_VEC_FMEM(vfld);
-  DEFINE_VEC_FMEM(vflw);
-  DEFINE_VEC_XMEMST(vlstd);
-  DEFINE_VEC_XMEMST(vlstw);
-  DEFINE_VEC_XMEMST(vlstwu);
-  DEFINE_VEC_XMEMST(vlsth);
-  DEFINE_VEC_XMEMST(vlsthu);
-  DEFINE_VEC_XMEMST(vlstb);
-  DEFINE_VEC_XMEMST(vlstbu);
-  DEFINE_VEC_FMEMST(vflstd);
-  DEFINE_VEC_FMEMST(vflstw);
-
-  DEFINE_VEC_XMEM(vsd);
-  DEFINE_VEC_XMEM(vsw);
-  DEFINE_VEC_XMEM(vsh);
-  DEFINE_VEC_XMEM(vsb);
-  DEFINE_VEC_FMEM(vfsd);
-  DEFINE_VEC_FMEM(vfsw);
-  DEFINE_VEC_XMEMST(vsstd);
-  DEFINE_VEC_XMEMST(vsstw);
-  DEFINE_VEC_XMEMST(vssth);
-  DEFINE_VEC_XMEMST(vsstb);
-  DEFINE_VEC_FMEMST(vfsstd);
-  DEFINE_VEC_FMEMST(vfsstw);
-
-  DISASM_INSN("vmvv", vmvv, 0, vxrd_reg, vxrs1_reg);
-  DISASM_INSN("vmsv", vmsv, 0, vxrd_reg, xrs1_reg);
-  DISASM_INSN("vmst", vmst, 0, vxrd_reg, xrs1_reg, xrs2_reg);
-  DISASM_INSN("vmts", vmts, 0, xrd_reg, vxrs1_reg, xrs2_reg);
-  DISASM_INSN("vfmvv", vfmvv, 0, vfrd_reg, vfrs1_reg);
-  DISASM_INSN("vfmsv", vfmsv, 0, vfrd_reg, frs1_reg);
-  DISASM_INSN("vfmst", vfmst, 0, vfrd_reg, frs1_reg, frs2_reg);
-  DISASM_INSN("vfmts", vfmts, 0, frd_reg, vfrs1_reg, frs2_reg);
-
-  DEFINE_RS1_RS2(vvcfg);
-  DEFINE_RS1_RS2(vtcfg);
-
-  DISASM_INSN("vvcfgivl", vvcfgivl, 0, xrd_reg, xrs1_reg, nxregs_reg, nfregs_reg);
-  DISASM_INSN("vtcfgivl", vtcfgivl, 0, xrd_reg, xrs1_reg, nxregs_reg, nfregs_reg);
-  DISASM_INSN("vsetvl", vsetvl, 0, xrd_reg, xrs1_reg);
-  DISASM_INSN("vf", vf, 0, xrs1_reg, imm);
-
-  DEFINE_NOARG(fence_v_l);
-  DEFINE_NOARG(fence_v_g);
-}
diff --git a/hwacha/hwacha.ac b/hwacha/hwacha.ac
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/hwacha/hwacha.cc b/hwacha/hwacha.cc
new file mode 100644 (file)
index 0000000..8eff59c
--- /dev/null
@@ -0,0 +1,46 @@
+#include "hwacha.h"
+
+void ct_state_t::reset()
+{
+  vl = 0;
+  maxvl = 32;
+  nxpr = 32;
+  nfpr = 32;
+
+  vf_pc = -1;
+}
+
+void ut_state_t::reset()
+{
+  run = false;
+  XPR.reset();
+  FPR.reset();
+}
+
+hwacha_t::hwacha_t()
+{
+  ct_state.reset();
+  for (int i=0; i<max_uts; i++)
+    ut_state[i].reset();
+}
+
+std::vector<insn_desc_t> hwacha_t::get_instructions()
+{
+  std::vector<insn_desc_t> insns;
+  #define DECLARE_INSN(name, match, mask) \
+    extern reg_t hwacha_##name(processor_t*, insn_t, reg_t); \
+    insns.push_back((insn_desc_t){match, mask, &::illegal_instruction, hwacha_##name});
+  #include "opcodes_hwacha.h"
+  #undef DECLARE_INSN
+  return insns;
+}
+
+bool hwacha_t::vf_active()
+{
+  for (int i=0; i<get_ct_state()->vl; i++) {
+    if (get_ut_state(i)->run)
+      return true;
+  }
+
+  return false;
+}
index a92ab4bdfe21b9e90547dc804f2282632742a723..ee8de86e4d85d661628d2d710d49600d80f49d3b 100644 (file)
@@ -1,49 +1,45 @@
 #ifndef _HWACHA_H
 #define _HWACHA_H
 
-// vector stuff
-#define VL vl
-
-#define UT_RS1(idx) uts[idx]->XPR[insn.rtype.rs1]
-#define UT_RS2(idx) uts[idx]->XPR[insn.rtype.rs2]
-#define UT_RD(idx) uts[idx]->XPR.write_port(insn.rtype.rd)
-#define UT_RA(idx) uts[idx]->XPR.write_port(1)
-#define UT_FRS1(idx) uts[idx]->FPR[insn.ftype.rs1]
-#define UT_FRS2(idx) uts[idx]->FPR[insn.ftype.rs2]
-#define UT_FRS3(idx) uts[idx]->FPR[insn.ftype.rs3]
-#define UT_FRD(idx) uts[idx]->FPR.write_port(insn.ftype.rd)
-#define UT_RM(idx) ((insn.ftype.rm != 7) ? insn.ftype.rm : \
-              ((uts[idx]->fsr & FSR_RD) >> FSR_RD_SHIFT))
-
-#define UT_LOOP_START for (int i=0;i<VL; i++) {
-#define UT_LOOP_END }
-#define UT_LOOP_RS1 UT_RS1(i)
-#define UT_LOOP_RS2 UT_RS2(i)
-#define UT_LOOP_RD UT_RD(i)
-#define UT_LOOP_RA UT_RA(i)
-#define UT_LOOP_FRS1 UT_FRS1(i)
-#define UT_LOOP_FRS2 UT_FRS2(i)
-#define UT_LOOP_FRS3 UT_FRS3(i)
-#define UT_LOOP_FRD UT_FRD(i)
-#define UT_LOOP_RM UT_RM(i)
-
-#define VEC_LOAD(dst, func, inc) \
-  reg_t addr = RS1; \
-  UT_LOOP_START \
-    UT_LOOP_##dst = mmu.func(addr); \
-    addr += inc; \
-  UT_LOOP_END
-
-#define VEC_STORE(src, func, inc) \
-  reg_t addr = RS1; \
-  UT_LOOP_START \
-    mmu.func(addr, UT_LOOP_##src); \
-    addr += inc; \
-  UT_LOOP_END
-
-enum vt_command_t
+#include "extension.h"
+
+struct ct_state_t
+{
+  void reset();
+
+  uint32_t nxpr;
+  uint32_t nfpr;
+  uint32_t maxvl;
+  uint32_t vl;
+
+  reg_t vf_pc;
+};
+
+struct ut_state_t
 {
-  vt_command_stop,
+  void reset();
+
+  bool run;
+  regfile_t<reg_t, 32, true> XPR;
+  regfile_t<reg_t, 32, false> FPR;
+};
+
+class hwacha_t : public extension_t
+{
+public:
+  hwacha_t();
+  const char* name() { return "hwacha"; }
+  std::vector<insn_desc_t> get_instructions();
+  ct_state_t* get_ct_state() { return &ct_state; }
+  ut_state_t* get_ut_state(int idx) { return &ut_state[idx]; }
+  bool vf_active();
+
+private:
+  static const int max_uts = 2048;
+  ct_state_t ct_state;
+  ut_state_t ut_state[max_uts];
 };
 
+REGISTER_EXTENSION(hwacha, []() { return new hwacha_t; })
+
 #endif
diff --git a/hwacha/hwacha.mk.in b/hwacha/hwacha.mk.in
new file mode 100644 (file)
index 0000000..cf698d3
--- /dev/null
@@ -0,0 +1,35 @@
+get_insn_list = $(shell cat $(1) | sed 's/DECLARE_INSN(\(.*\),.*,.*)/\1/')
+get_opcode = $(shell grep \\\<$(2)\\\> $(1) | sed 's/DECLARE_INSN(.*,\(.*\),.*)/\1/')
+
+hwacha_subproject_deps = \
+       riscv \
+       softfloat \
+
+hwacha_install_prog_srcs = \
+
+hwacha_hdrs = \
+       hwacha.h \
+       decode_hwacha.h \
+       decode_hwacha_ut.h \
+       opcodes_hwacha.h \
+       opcodes_hwacha_ut.h \
+
+hwacha_srcs = \
+       hwacha.cc \
+       $(hwacha_gen_srcs) \
+       $(hwacha_ut_gen_srcs) \
+
+hwacha_test_srcs =
+
+hwacha_gen_srcs = \
+       $(addsuffix .cc, $(call get_insn_list,$(src_dir)/hwacha/opcodes_hwacha.h))
+
+$(hwacha_gen_srcs): %.cc: insns/%.h insn_template_hwacha.cc
+       sed 's/NAME/$(subst .cc,,$@)/' $(src_dir)/hwacha/insn_template_hwacha.cc | sed 's/OPCODE/$(call get_opcode,$(src_dir)/hwacha/opcodes_hwacha.h,$(subst .cc,,$@))/' > $@
+
+hwacha_ut_gen_srcs = \
+       $(addsuffix .cc, $(call get_insn_list,$(src_dir)/hwacha/opcodes_hwacha_ut.h))
+
+$(hwacha_ut_gen_srcs): %.cc: insns_ut/%.h insn_template_hwacha_ut.cc
+       sed 's/NAME/$(subst .cc,,$@)/' $(src_dir)/hwacha/insn_template_hwacha_ut.cc | sed 's/OPCODE/$(call get_opcode,$(src_dir)/hwacha/opcodes_hwacha_ut.h,$(subst .cc,,$@))/' > $@
+
diff --git a/hwacha/insn_template_hwacha.cc b/hwacha/insn_template_hwacha.cc
new file mode 100644 (file)
index 0000000..6a1a51a
--- /dev/null
@@ -0,0 +1,24 @@
+// See LICENSE for license details.
+
+#include "config.h"
+#include "processor.h"
+#include "mmu.h"
+#include "hwacha.h"
+#include "decode_hwacha.h"
+#include "rocc.h"
+#include <assert.h>
+
+reg_t hwacha_NAME(processor_t* p, insn_t insn, reg_t pc)
+{
+  int xprlen = 64;
+  reg_t npc = sext_xprlen(pc + insn_length(OPCODE));
+  hwacha_t* h = static_cast<hwacha_t*>(p->get_extension());
+  rocc_insn_union_t u;
+  u.i = insn;
+  reg_t xs1 = u.r.xs1 ? RS1 : -1;
+  reg_t xs2 = u.r.xs2 ? RS2 : -1;
+  reg_t xd = -1;
+  #include "insns/NAME.h"
+  if (u.r.xd) WRITE_RD(xd);
+  return npc;
+}
diff --git a/hwacha/insn_template_hwacha_ut.cc b/hwacha/insn_template_hwacha_ut.cc
new file mode 100644 (file)
index 0000000..7dad75d
--- /dev/null
@@ -0,0 +1,22 @@
+// See LICENSE for license details.
+
+#include "config.h"
+#include "processor.h"
+#include "mmu.h"
+#include "softfloat.h"
+#include "platform.h" // softfloat isNaNF32UI, etc.
+#include "internals.h" // ditto
+#include "hwacha.h"
+#include "decode_hwacha_ut.h"
+#include <assert.h>
+
+reg_t hwacha_NAME(processor_t* p, insn_t insn, reg_t pc)
+{
+  int xprlen = 64;
+  reg_t npc = sext_xprlen(pc + insn_length(OPCODE));
+  hwacha_t* h = static_cast<hwacha_t*>(p->get_extension());
+  for (uint32_t i=0; i<VL; i++) {
+    #include "insns_ut/NAME.h"
+  }
+  return npc;
+}
diff --git a/hwacha/insns/fmovn.h b/hwacha/insns/fmovn.h
deleted file mode 100644 (file)
index 394b56c..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-require_vector;
-if (RS1 & 0x1) FRD = FRS2;
diff --git a/hwacha/insns/fmovz.h b/hwacha/insns/fmovz.h
deleted file mode 100644 (file)
index 7862216..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-require_vector;
-if (~RS1 & 0x1) FRD = FRS2;
diff --git a/hwacha/insns/movn.h b/hwacha/insns/movn.h
deleted file mode 100644 (file)
index 402d6d3..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-require_vector;
-if (RS1 & 0x1) RD = RS2;
diff --git a/hwacha/insns/movz.h b/hwacha/insns/movz.h
deleted file mode 100644 (file)
index 74cf8a9..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-require_vector;
-if (~RS1 & 0x1) RD = RS2;
diff --git a/hwacha/insns/stop.h b/hwacha/insns/stop.h
deleted file mode 100644 (file)
index 791a82c..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-require_vector;
-utmode = false;
-throw vt_command_stop;
diff --git a/hwacha/insns/utidx.h b/hwacha/insns/utidx.h
deleted file mode 100644 (file)
index b3c944c..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-require_vector;
-RD = utidx;
diff --git a/hwacha/insns/venqcmd.h b/hwacha/insns/venqcmd.h
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/hwacha/insns/venqcnt.h b/hwacha/insns/venqcnt.h
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/hwacha/insns/venqimm1.h b/hwacha/insns/venqimm1.h
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/hwacha/insns/venqimm2.h b/hwacha/insns/venqimm2.h
deleted file mode 100644 (file)
index e69de29..0000000
index 162cbe6da169b4af23c50ee5578779bc84bce3a5..1e5de3c0ad364a7258bf878dcce88e8fd58a65f7 100644 (file)
@@ -1,9 +1,28 @@
-require_vector;
-for (int i=0; i<VL; i++)
-{
-  uts[i]->pc = ITYPE_EADDR;
-  uts[i]->utmode = true;
-  uts[i]->run = true;
-  while (uts[i]->utmode)
-    uts[i]->step(100, false); // XXX
+if (VL) {
+  if (!h->vf_active()) {
+    h->get_ct_state()->vf_pc = XS1 + insn.s_imm();
+    for (uint32_t i=0; i<VL; i++)
+      h->get_ut_state(i)->run = true;
+  }
+
+  mmu_t::insn_fetch_t ut_fetch = p->get_mmu()->load_insn(h->get_ct_state()->vf_pc);
+  insn_t ut_insn = ut_fetch.insn.insn;
+
+  bool matched = false;
+
+  #define DECLARE_INSN(name, match, mask) \
+    extern reg_t hwacha_##name(processor_t*, insn_t, reg_t); \
+    if ((ut_insn.bits() & mask) == match) { \
+      h->get_ct_state()->vf_pc = hwacha_##name(p, ut_insn, h->get_ct_state()->vf_pc); \
+      matched = true; \
+    }
+  #include "opcodes_hwacha_ut.h"
+  #undef DECLARE_INSN
+
+  // YUNSUP FIXME
+  assert(matched);
+
+  // if vf is still running, rewind pc so that it will execute again
+  if (h->vf_active())
+    npc = pc;
 }
diff --git a/hwacha/insns/vfld.h b/hwacha/insns/vfld.h
deleted file mode 100644 (file)
index 9b40470..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-require_vector;
-require_fp;
-VEC_LOAD(FRD, load_int64, 8);
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..1e12ad25311438663538a1f83d463fd07950d021 100644 (file)
@@ -0,0 +1 @@
+VEC_SEG_LOAD(FPR, load_int64, 8);
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0d866c6acfee08c848baab15f8fc5102ed0958c0 100644 (file)
@@ -0,0 +1 @@
+VEC_SEG_ST_LOAD(FPR, load_int64, XS2, 8);
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..ee57575df7b0db64c196cc937578c3e0e6431899 100644 (file)
@@ -0,0 +1 @@
+VEC_SEG_ST_LOAD(FPR, load_int32, XS2, 4);
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..50dcb2b83464480880d6ea067c00c51a37f9f76d 100644 (file)
@@ -0,0 +1 @@
+VEC_SEG_LOAD(FPR, load_int32, 4);
diff --git a/hwacha/insns/vflstd.h b/hwacha/insns/vflstd.h
deleted file mode 100644 (file)
index fa9b32d..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-require_vector;
-require_fp;
-VEC_LOAD(FRD, load_int64, RS2);
diff --git a/hwacha/insns/vflstw.h b/hwacha/insns/vflstw.h
deleted file mode 100644 (file)
index 716c818..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-require_vector;
-require_fp;
-VEC_LOAD(FRD, load_int32, RS2);
diff --git a/hwacha/insns/vflw.h b/hwacha/insns/vflw.h
deleted file mode 100644 (file)
index 75fdd04..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-require_vector;
-require_fp;
-VEC_LOAD(FRD, load_int32, 4);
diff --git a/hwacha/insns/vfmst.h b/hwacha/insns/vfmst.h
deleted file mode 100644 (file)
index 686d7c5..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-require_vector;
-require_fp;
-assert(0 <= RS2 && RS2 < MAX_UTS);
-UT_FRD(RS2) = FRS1;
diff --git a/hwacha/insns/vfmsv.h b/hwacha/insns/vfmsv.h
deleted file mode 100644 (file)
index a9aa876..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-require_vector;
-require_fp;
-UT_LOOP_START
-  UT_LOOP_FRD = FRS1;
-UT_LOOP_END
diff --git a/hwacha/insns/vfmts.h b/hwacha/insns/vfmts.h
deleted file mode 100644 (file)
index a6da126..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-require_vector;
-require_fp;
-assert(0 <= RS2 && RS2 < MAX_UTS);
-FRD = UT_FRS1(RS2);
diff --git a/hwacha/insns/vfmvv.h b/hwacha/insns/vfmvv.h
deleted file mode 100644 (file)
index 279da21..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-require_vector;
-require_fp;
-UT_LOOP_START
-  UT_LOOP_FRD = UT_LOOP_FRS1;
-UT_LOOP_END
diff --git a/hwacha/insns/vfsd.h b/hwacha/insns/vfsd.h
deleted file mode 100644 (file)
index f619fc8..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-require_vector;
-require_fp;
-VEC_STORE(FRD, store_uint64, 8);
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..c09159bb732531b5ad21038c75b9f530912171ee 100644 (file)
@@ -0,0 +1 @@
+VEC_SEG_STORE(FPR, store_uint64, 8);
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..f3dc6da3a04b590a7810572b5aa3fa24b5fdd85e 100644 (file)
@@ -0,0 +1 @@
+VEC_SEG_ST_STORE(FPR, store_uint64, XS2, 8);
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..922cc3d5d6c233e8b3b06a687707002a5797931c 100644 (file)
@@ -0,0 +1 @@
+VEC_SEG_ST_STORE(FPR, store_uint32, XS2, 4);
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..efd162e3170c3ceae6ef19ae87179b5c161a8b71 100644 (file)
@@ -0,0 +1 @@
+VEC_SEG_STORE(FPR, store_uint32, 4);
diff --git a/hwacha/insns/vfsstd.h b/hwacha/insns/vfsstd.h
deleted file mode 100644 (file)
index b3bb260..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-require_vector;
-require_fp;
-VEC_STORE(FRD, store_uint64, RS2);
diff --git a/hwacha/insns/vfsstw.h b/hwacha/insns/vfsstw.h
deleted file mode 100644 (file)
index 9cef9b0..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-require_vector;
-require_fp;
-VEC_STORE(FRD, store_uint32, RS2);
diff --git a/hwacha/insns/vfsw.h b/hwacha/insns/vfsw.h
deleted file mode 100644 (file)
index 3fe3d3f..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-require_vector;
-require_fp;
-VEC_STORE(FRD, store_uint32, 4);
diff --git a/hwacha/insns/vgetcfg.h b/hwacha/insns/vgetcfg.h
new file mode 100644 (file)
index 0000000..7bd1765
--- /dev/null
@@ -0,0 +1 @@
+WRITE_XRD((NXPR & 0x3f) | ((NFPR & 0x3f) << 6));
diff --git a/hwacha/insns/vgetvl.h b/hwacha/insns/vgetvl.h
new file mode 100644 (file)
index 0000000..11df2f9
--- /dev/null
@@ -0,0 +1 @@
+WRITE_XRD(VL);
diff --git a/hwacha/insns/vlb.h b/hwacha/insns/vlb.h
deleted file mode 100644 (file)
index 618380a..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-require_vector;
-VEC_LOAD(RD, load_int8, 1);
diff --git a/hwacha/insns/vlbu.h b/hwacha/insns/vlbu.h
deleted file mode 100644 (file)
index f92c8b5..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-require_vector;
-VEC_LOAD(RD, load_uint8, 1);
diff --git a/hwacha/insns/vld.h b/hwacha/insns/vld.h
deleted file mode 100644 (file)
index fb7a3c5..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-require_vector;
-require_xpr64;
-VEC_LOAD(RD, load_int64, 8);
diff --git a/hwacha/insns/vlh.h b/hwacha/insns/vlh.h
deleted file mode 100644 (file)
index 269c2a8..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-require_vector;
-VEC_LOAD(RD, load_int16, 2);
diff --git a/hwacha/insns/vlhu.h b/hwacha/insns/vlhu.h
deleted file mode 100644 (file)
index 7a2019d..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-require_vector;
-VEC_LOAD(RD, load_uint16, 2);
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..6228b702b4258f622bc4dc86c07b7969aee7e3cb 100644 (file)
@@ -0,0 +1 @@
+VEC_SEG_LOAD(XPR, load_int8, 1);
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..aeee563af9b3bf960ec3fd88b4c5064f7dc139a6 100644 (file)
@@ -0,0 +1 @@
+VEC_SEG_LOAD(XPR, load_uint8, 1);
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..8e0006d5e65dbe02d9f6864246202c1f0e97a93c 100644 (file)
@@ -0,0 +1 @@
+VEC_SEG_LOAD(XPR, load_int64, 8);
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..057a296dfddf4925a58bbb16192feb62f8153d6d 100644 (file)
@@ -0,0 +1 @@
+VEC_SEG_LOAD(XPR, load_int16, 2);
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..6d00649711856f0650fb03e00b3034509f02c94d 100644 (file)
@@ -0,0 +1 @@
+VEC_SEG_LOAD(XPR, load_uint16, 2);
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..468c623d4ef76bfe4da6ab290db4e9f0498b5234 100644 (file)
@@ -0,0 +1 @@
+VEC_SEG_ST_LOAD(XPR, load_int8, XS2, 1);
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..ebc1bb0e4e59e4ee5000ea2c07b044b5e8d64af6 100644 (file)
@@ -0,0 +1 @@
+VEC_SEG_ST_LOAD(XPR, load_uint8, XS2, 1);
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..f4582b9d7f161ed20181b764b223b380f32ec425 100644 (file)
@@ -0,0 +1 @@
+VEC_SEG_ST_LOAD(XPR, load_int64, XS2, 8);
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..72d18e756c007e6b6e793d50cc6a8807483a9505 100644 (file)
@@ -0,0 +1 @@
+VEC_SEG_ST_LOAD(XPR, load_int16, XS2, 2);
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0ac9e985809d2b96bb442c5b355b143c0b993f86 100644 (file)
@@ -0,0 +1 @@
+VEC_SEG_ST_LOAD(XPR, load_uint16, XS2, 2);
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0269bfa1e72d9adeedf8ba0809ec7b697bcc9854 100644 (file)
@@ -0,0 +1 @@
+VEC_SEG_ST_LOAD(XPR, load_int32, XS2, 4);
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..f6b52aeba29a6d63d1f1015d6ac9e626ac493dc7 100644 (file)
@@ -0,0 +1 @@
+VEC_SEG_ST_LOAD(XPR, load_uint32, XS2, 4);
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..312056ad8df09d99b319c5c78086ff5803f35d20 100644 (file)
@@ -0,0 +1 @@
+VEC_SEG_LOAD(XPR, load_int32, 4);
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..7037aad1075582bf04218a90b5d6df37910a345a 100644 (file)
@@ -0,0 +1 @@
+VEC_SEG_LOAD(XPR, load_uint32, 4);
diff --git a/hwacha/insns/vlstb.h b/hwacha/insns/vlstb.h
deleted file mode 100644 (file)
index 219d90e..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-require_vector;
-VEC_LOAD(RD, load_int8, RS2);
diff --git a/hwacha/insns/vlstbu.h b/hwacha/insns/vlstbu.h
deleted file mode 100644 (file)
index 09faa29..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-require_vector;
-VEC_LOAD(RD, load_uint8, RS2);
diff --git a/hwacha/insns/vlstd.h b/hwacha/insns/vlstd.h
deleted file mode 100644 (file)
index 5e5de9c..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-require_vector;
-require_xpr64;
-VEC_LOAD(RD, load_int64, RS2);
diff --git a/hwacha/insns/vlsth.h b/hwacha/insns/vlsth.h
deleted file mode 100644 (file)
index af6b5b5..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-require_vector;
-VEC_LOAD(RD, load_int16, RS2);
diff --git a/hwacha/insns/vlsthu.h b/hwacha/insns/vlsthu.h
deleted file mode 100644 (file)
index 0fe8452..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-require_vector;
-VEC_LOAD(RD, load_uint16, RS2);
diff --git a/hwacha/insns/vlstw.h b/hwacha/insns/vlstw.h
deleted file mode 100644 (file)
index 5375dc0..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-require_vector;
-VEC_LOAD(RD, load_int32, RS2);
diff --git a/hwacha/insns/vlstwu.h b/hwacha/insns/vlstwu.h
deleted file mode 100644 (file)
index 328e23f..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-require_vector;
-VEC_LOAD(RD, load_uint32, RS2);
diff --git a/hwacha/insns/vlw.h b/hwacha/insns/vlw.h
deleted file mode 100644 (file)
index 6e35911..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-require_vector;
-VEC_LOAD(RD, load_int32, 4);
diff --git a/hwacha/insns/vlwu.h b/hwacha/insns/vlwu.h
deleted file mode 100644 (file)
index 4fa1489..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-require_vector;
-VEC_LOAD(RD, load_uint32, 4);
diff --git a/hwacha/insns/vmst.h b/hwacha/insns/vmst.h
deleted file mode 100644 (file)
index f4d03d9..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-require_vector;
-assert(0 <= RS2 && RS2 < MAX_UTS);
-UT_RD(RS2) = RS1;
index c6f4c2c89e9dbb3c97947a5ae3e35040072cd233..3995194a741f0f0229f481f018b92ed3670a5652 100644 (file)
@@ -1,4 +1,2 @@
-require_vector;
-UT_LOOP_START
-  UT_LOOP_RD = RS1;
-UT_LOOP_END
+for (uint32_t i=0; i<VL; i++)
+  UT_WRITE_RD(i, XS1);
diff --git a/hwacha/insns/vmts.h b/hwacha/insns/vmts.h
deleted file mode 100644 (file)
index 2d463bc..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-require_vector;
-assert(0 <= RS2 && RS2 < MAX_UTS);
-RD = UT_RS1(RS2);
index 91d63d400c9bace8551837cb655148b01bcabadc..831ed2c335d02ccdd03fd7b8ab9d5137c31dec3a 100644 (file)
@@ -1,4 +1,3 @@
-require_vector;
-UT_LOOP_START
-  UT_LOOP_RD = UT_LOOP_RS1;
-UT_LOOP_END
+for (uint32_t i=0; i<VL; i++) {
+  UT_WRITE_RD(i, UT_RS1(i));
+}
diff --git a/hwacha/insns/vsb.h b/hwacha/insns/vsb.h
deleted file mode 100644 (file)
index c3d5b9d..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-require_vector;
-VEC_STORE(RD, store_uint8, 1);
diff --git a/hwacha/insns/vsd.h b/hwacha/insns/vsd.h
deleted file mode 100644 (file)
index 9c02069..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-require_vector;
-require_xpr64;
-VEC_STORE(RD, store_uint64, 8);
diff --git a/hwacha/insns/vsetcfg.h b/hwacha/insns/vsetcfg.h
new file mode 100644 (file)
index 0000000..8ca408c
--- /dev/null
@@ -0,0 +1,9 @@
+uint32_t nxpr = (XS1 & 0x3f) + (insn.i_imm() & 0x3f);
+uint32_t nfpr = ((XS1 >> 6) & 0x3f) + ((insn.i_imm() >> 6) & 0x3f);
+// YUNSUP FIXME
+// raise trap when nxpr/nfpr is larger than possible
+WRITE_NXPR(nxpr);
+WRITE_NFPR(nfpr);
+uint32_t maxvl = 8 * (256 / (nxpr-1 + nfpr));
+WRITE_MAXVL(maxvl);
+WRITE_VL(0);
index c2212ff5ebd427735f6c0d125e73be6d664e4237..7c8db36c2bb256df3bbc414e0c012fa0acb884c2 100644 (file)
@@ -1,3 +1,3 @@
-require_vector;
-setvl(RS1);
-RD = VL;
+uint32_t vl = std::min(MAXVL, (uint32_t)XS1);
+WRITE_VL(vl);
+WRITE_XRD(vl);
diff --git a/hwacha/insns/vsh.h b/hwacha/insns/vsh.h
deleted file mode 100644 (file)
index 623eda8..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-require_vector;
-VEC_STORE(RD, store_uint16, 2);
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..2043661fdf4f92777926240805afeb90af05efbf 100644 (file)
@@ -0,0 +1 @@
+VEC_SEG_STORE(XPR, store_uint8, 1);
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..c3c6cbe059bcbc730a48dc95e018cff150e17ee6 100644 (file)
@@ -0,0 +1 @@
+VEC_SEG_STORE(XPR, store_uint64, 8);
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..16ddf20756648675256dab07fef162efcef4d9a0 100644 (file)
@@ -0,0 +1 @@
+VEC_SEG_STORE(XPR, store_uint16, 2);
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..bb8d85f212a42ccd509496dfaf2b434fa53130f9 100644 (file)
@@ -0,0 +1 @@
+VEC_SEG_ST_STORE(XPR, store_uint8, XS2, 1);
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..87bd4556840e6157dbcc4fe227485804144cbb1e 100644 (file)
@@ -0,0 +1 @@
+VEC_SEG_ST_STORE(XPR, store_uint64, XS2, 8);
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..02c1ff7b997e02331a4640abec941ea57a81a423 100644 (file)
@@ -0,0 +1 @@
+VEC_SEG_ST_STORE(XPR, store_uint16, XS2, 2);
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..71fa4a12e94d5800e1d832895be2ed413c48da17 100644 (file)
@@ -0,0 +1 @@
+VEC_SEG_ST_STORE(XPR, store_uint32, XS2, 4);
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..076ee5f4c9cec18c3cd1f5eb8055e62c6e68552e 100644 (file)
@@ -0,0 +1 @@
+VEC_SEG_STORE(XPR, store_uint32, 4);
diff --git a/hwacha/insns/vsstb.h b/hwacha/insns/vsstb.h
deleted file mode 100644 (file)
index b83cc50..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-require_vector;
-VEC_STORE(RD, store_uint8, RS2);
diff --git a/hwacha/insns/vsstd.h b/hwacha/insns/vsstd.h
deleted file mode 100644 (file)
index 26868d2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-require_vector;
-require_xpr64;
-VEC_STORE(RD, store_uint64, RS2);
diff --git a/hwacha/insns/vssth.h b/hwacha/insns/vssth.h
deleted file mode 100644 (file)
index 3904331..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-require_vector;
-VEC_STORE(RD, store_uint16, RS2);
diff --git a/hwacha/insns/vsstw.h b/hwacha/insns/vsstw.h
deleted file mode 100644 (file)
index 8f05953..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-require_vector;
-VEC_STORE(RD, store_uint32, RS2);
diff --git a/hwacha/insns/vsw.h b/hwacha/insns/vsw.h
deleted file mode 100644 (file)
index 662d4e3..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-require_vector;
-VEC_STORE(RD, store_uint32, 4);
diff --git a/hwacha/insns/vtcfg.h b/hwacha/insns/vtcfg.h
deleted file mode 100644 (file)
index 6e8cbd1..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-require_vector;
-nxpr_use = RS1 & 0x3f;
-nfpr_use = RS2 & 0x3f;
-vcfg();
-setvl(0);
diff --git a/hwacha/insns/vtcfgivl.h b/hwacha/insns/vtcfgivl.h
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/hwacha/insns/vvcfg.h b/hwacha/insns/vvcfg.h
deleted file mode 100644 (file)
index 6e8cbd1..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-require_vector;
-nxpr_use = RS1 & 0x3f;
-nfpr_use = RS2 & 0x3f;
-vcfg();
-setvl(0);
diff --git a/hwacha/insns/vvcfgivl.h b/hwacha/insns/vvcfgivl.h
deleted file mode 100644 (file)
index 0ded9f8..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-require_vector;
-nxpr_use = SIMM & 0x3f;
-nfpr_use = (SIMM >> 6) & 0x3f;
-vcfg();
-setvl(RS1);
-RD = VL;
diff --git a/hwacha/insns/vxcptevac.h b/hwacha/insns/vxcptevac.h
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/hwacha/insns/vxcpthold.h b/hwacha/insns/vxcpthold.h
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/hwacha/insns/vxcptwait.h b/hwacha/insns/vxcptwait.h
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/hwacha/insns_ut/ut_add.h b/hwacha/insns_ut/ut_add.h
new file mode 120000 (symlink)
index 0000000..c918484
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/add.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_addi.h b/hwacha/insns_ut/ut_addi.h
new file mode 120000 (symlink)
index 0000000..8c7cce2
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/addi.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_addiw.h b/hwacha/insns_ut/ut_addiw.h
new file mode 120000 (symlink)
index 0000000..5a1ffda
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/addiw.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_addw.h b/hwacha/insns_ut/ut_addw.h
new file mode 120000 (symlink)
index 0000000..e594986
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/addw.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_amoadd_d.h b/hwacha/insns_ut/ut_amoadd_d.h
new file mode 120000 (symlink)
index 0000000..3f08289
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/amoadd_d.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_amoadd_w.h b/hwacha/insns_ut/ut_amoadd_w.h
new file mode 120000 (symlink)
index 0000000..a45ed76
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/amoadd_w.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_amoand_d.h b/hwacha/insns_ut/ut_amoand_d.h
new file mode 120000 (symlink)
index 0000000..fc6c7d2
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/amoand_d.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_amoand_w.h b/hwacha/insns_ut/ut_amoand_w.h
new file mode 120000 (symlink)
index 0000000..c1a3433
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/amoand_w.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_amomax_d.h b/hwacha/insns_ut/ut_amomax_d.h
new file mode 120000 (symlink)
index 0000000..36d16e7
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/amomax_d.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_amomax_w.h b/hwacha/insns_ut/ut_amomax_w.h
new file mode 120000 (symlink)
index 0000000..c8033c0
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/amomax_w.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_amomaxu_d.h b/hwacha/insns_ut/ut_amomaxu_d.h
new file mode 120000 (symlink)
index 0000000..2a38c71
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/amomaxu_d.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_amomaxu_w.h b/hwacha/insns_ut/ut_amomaxu_w.h
new file mode 120000 (symlink)
index 0000000..b6d752e
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/amomaxu_w.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_amomin_d.h b/hwacha/insns_ut/ut_amomin_d.h
new file mode 120000 (symlink)
index 0000000..62b831f
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/amomin_d.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_amomin_w.h b/hwacha/insns_ut/ut_amomin_w.h
new file mode 120000 (symlink)
index 0000000..3af34f1
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/amomin_w.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_amominu_d.h b/hwacha/insns_ut/ut_amominu_d.h
new file mode 120000 (symlink)
index 0000000..b4b6fb8
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/amominu_d.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_amominu_w.h b/hwacha/insns_ut/ut_amominu_w.h
new file mode 120000 (symlink)
index 0000000..9f7f1b7
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/amominu_w.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_amoor_d.h b/hwacha/insns_ut/ut_amoor_d.h
new file mode 120000 (symlink)
index 0000000..c8cf47c
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/amoor_d.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_amoor_w.h b/hwacha/insns_ut/ut_amoor_w.h
new file mode 120000 (symlink)
index 0000000..0a85136
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/amoor_w.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_amoswap_d.h b/hwacha/insns_ut/ut_amoswap_d.h
new file mode 120000 (symlink)
index 0000000..97d4c3e
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/amoswap_d.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_amoswap_w.h b/hwacha/insns_ut/ut_amoswap_w.h
new file mode 120000 (symlink)
index 0000000..f97be68
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/amoswap_w.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_amoxor_d.h b/hwacha/insns_ut/ut_amoxor_d.h
new file mode 120000 (symlink)
index 0000000..684663f
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/amoxor_d.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_amoxor_w.h b/hwacha/insns_ut/ut_amoxor_w.h
new file mode 120000 (symlink)
index 0000000..553e587
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/amoxor_w.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_and.h b/hwacha/insns_ut/ut_and.h
new file mode 120000 (symlink)
index 0000000..270e31e
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/and.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_andi.h b/hwacha/insns_ut/ut_andi.h
new file mode 120000 (symlink)
index 0000000..c3a8424
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/andi.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_auipc.h b/hwacha/insns_ut/ut_auipc.h
new file mode 120000 (symlink)
index 0000000..2c0a9e5
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/auipc.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_div.h b/hwacha/insns_ut/ut_div.h
new file mode 120000 (symlink)
index 0000000..5e43e33
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/div.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_divu.h b/hwacha/insns_ut/ut_divu.h
new file mode 120000 (symlink)
index 0000000..9726ad2
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/divu.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_divuw.h b/hwacha/insns_ut/ut_divuw.h
new file mode 120000 (symlink)
index 0000000..a67a2e1
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/divuw.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_divw.h b/hwacha/insns_ut/ut_divw.h
new file mode 120000 (symlink)
index 0000000..5345781
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/divw.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_fadd_d.h b/hwacha/insns_ut/ut_fadd_d.h
new file mode 120000 (symlink)
index 0000000..90443b6
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/fadd_d.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_fadd_s.h b/hwacha/insns_ut/ut_fadd_s.h
new file mode 120000 (symlink)
index 0000000..a97aea9
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/fadd_s.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_fcvt_d_l.h b/hwacha/insns_ut/ut_fcvt_d_l.h
new file mode 120000 (symlink)
index 0000000..56a699e
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/fcvt_d_l.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_fcvt_d_lu.h b/hwacha/insns_ut/ut_fcvt_d_lu.h
new file mode 120000 (symlink)
index 0000000..9f1eefd
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/fcvt_d_lu.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_fcvt_d_s.h b/hwacha/insns_ut/ut_fcvt_d_s.h
new file mode 120000 (symlink)
index 0000000..0814b48
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/fcvt_d_s.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_fcvt_d_w.h b/hwacha/insns_ut/ut_fcvt_d_w.h
new file mode 120000 (symlink)
index 0000000..7006dc2
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/fcvt_d_w.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_fcvt_d_wu.h b/hwacha/insns_ut/ut_fcvt_d_wu.h
new file mode 120000 (symlink)
index 0000000..5b9a63c
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/fcvt_d_wu.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_fcvt_l_d.h b/hwacha/insns_ut/ut_fcvt_l_d.h
new file mode 120000 (symlink)
index 0000000..e738c00
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/fcvt_l_d.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_fcvt_l_s.h b/hwacha/insns_ut/ut_fcvt_l_s.h
new file mode 120000 (symlink)
index 0000000..087c5f7
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/fcvt_l_s.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_fcvt_lu_d.h b/hwacha/insns_ut/ut_fcvt_lu_d.h
new file mode 120000 (symlink)
index 0000000..14d02c0
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/fcvt_lu_d.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_fcvt_lu_s.h b/hwacha/insns_ut/ut_fcvt_lu_s.h
new file mode 120000 (symlink)
index 0000000..8cd7c72
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/fcvt_lu_s.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_fcvt_s_d.h b/hwacha/insns_ut/ut_fcvt_s_d.h
new file mode 120000 (symlink)
index 0000000..02ab869
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/fcvt_s_d.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_fcvt_s_l.h b/hwacha/insns_ut/ut_fcvt_s_l.h
new file mode 120000 (symlink)
index 0000000..1c37ef8
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/fcvt_s_l.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_fcvt_s_lu.h b/hwacha/insns_ut/ut_fcvt_s_lu.h
new file mode 120000 (symlink)
index 0000000..ee9e992
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/fcvt_s_lu.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_fcvt_s_w.h b/hwacha/insns_ut/ut_fcvt_s_w.h
new file mode 120000 (symlink)
index 0000000..f9492c4
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/fcvt_s_w.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_fcvt_s_wu.h b/hwacha/insns_ut/ut_fcvt_s_wu.h
new file mode 120000 (symlink)
index 0000000..b8cc0b3
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/fcvt_s_wu.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_fcvt_w_d.h b/hwacha/insns_ut/ut_fcvt_w_d.h
new file mode 120000 (symlink)
index 0000000..9be0029
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/fcvt_w_d.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_fcvt_w_s.h b/hwacha/insns_ut/ut_fcvt_w_s.h
new file mode 120000 (symlink)
index 0000000..66050c8
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/fcvt_w_s.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_fcvt_wu_d.h b/hwacha/insns_ut/ut_fcvt_wu_d.h
new file mode 120000 (symlink)
index 0000000..2f7807b
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/fcvt_wu_d.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_fcvt_wu_s.h b/hwacha/insns_ut/ut_fcvt_wu_s.h
new file mode 120000 (symlink)
index 0000000..aa141ac
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/fcvt_wu_s.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_fdiv_d.h b/hwacha/insns_ut/ut_fdiv_d.h
new file mode 120000 (symlink)
index 0000000..3e6c162
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/fdiv_d.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_fdiv_s.h b/hwacha/insns_ut/ut_fdiv_s.h
new file mode 120000 (symlink)
index 0000000..ab1f1f6
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/fdiv_s.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_fence.h b/hwacha/insns_ut/ut_fence.h
new file mode 120000 (symlink)
index 0000000..c3ebdd4
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/fence.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_feq_d.h b/hwacha/insns_ut/ut_feq_d.h
new file mode 120000 (symlink)
index 0000000..3c2b873
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/feq_d.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_feq_s.h b/hwacha/insns_ut/ut_feq_s.h
new file mode 120000 (symlink)
index 0000000..e3b0e29
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/feq_s.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_fld.h b/hwacha/insns_ut/ut_fld.h
new file mode 120000 (symlink)
index 0000000..4368897
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/fld.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_fle_d.h b/hwacha/insns_ut/ut_fle_d.h
new file mode 120000 (symlink)
index 0000000..8a6170a
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/fle_d.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_fle_s.h b/hwacha/insns_ut/ut_fle_s.h
new file mode 120000 (symlink)
index 0000000..46b1ac3
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/fle_s.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_flt_d.h b/hwacha/insns_ut/ut_flt_d.h
new file mode 120000 (symlink)
index 0000000..fd77b3b
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/flt_d.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_flt_s.h b/hwacha/insns_ut/ut_flt_s.h
new file mode 120000 (symlink)
index 0000000..3c665e5
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/flt_s.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_flw.h b/hwacha/insns_ut/ut_flw.h
new file mode 120000 (symlink)
index 0000000..056f569
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/flw.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_fmadd_d.h b/hwacha/insns_ut/ut_fmadd_d.h
new file mode 120000 (symlink)
index 0000000..1df086c
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/fmadd_d.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_fmadd_s.h b/hwacha/insns_ut/ut_fmadd_s.h
new file mode 120000 (symlink)
index 0000000..4283c41
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/fmadd_s.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_fmax_d.h b/hwacha/insns_ut/ut_fmax_d.h
new file mode 120000 (symlink)
index 0000000..e095874
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/fmax_d.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_fmax_s.h b/hwacha/insns_ut/ut_fmax_s.h
new file mode 120000 (symlink)
index 0000000..ec86ec5
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/fmax_s.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_fmin_d.h b/hwacha/insns_ut/ut_fmin_d.h
new file mode 120000 (symlink)
index 0000000..3df7a1c
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/fmin_d.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_fmin_s.h b/hwacha/insns_ut/ut_fmin_s.h
new file mode 120000 (symlink)
index 0000000..2950bb6
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/fmin_s.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_fmovn.h b/hwacha/insns_ut/ut_fmovn.h
new file mode 100644 (file)
index 0000000..6bd5e9d
--- /dev/null
@@ -0,0 +1 @@
+if (RS1 & 0x1) WRITE_FRD(FRS2);
diff --git a/hwacha/insns_ut/ut_fmovz.h b/hwacha/insns_ut/ut_fmovz.h
new file mode 100644 (file)
index 0000000..c070d2c
--- /dev/null
@@ -0,0 +1 @@
+if (~RS1 & 0x1) WRITE_FRD(FRS2);
diff --git a/hwacha/insns_ut/ut_fmsub_d.h b/hwacha/insns_ut/ut_fmsub_d.h
new file mode 120000 (symlink)
index 0000000..a1f5ba1
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/fmsub_d.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_fmsub_s.h b/hwacha/insns_ut/ut_fmsub_s.h
new file mode 120000 (symlink)
index 0000000..1e898cf
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/fmsub_s.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_fmul_d.h b/hwacha/insns_ut/ut_fmul_d.h
new file mode 120000 (symlink)
index 0000000..9147067
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/fmul_d.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_fmul_s.h b/hwacha/insns_ut/ut_fmul_s.h
new file mode 120000 (symlink)
index 0000000..7c98e0a
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/fmul_s.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_fmv_d_x.h b/hwacha/insns_ut/ut_fmv_d_x.h
new file mode 120000 (symlink)
index 0000000..9e43c93
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/fmv_d_x.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_fmv_s_x.h b/hwacha/insns_ut/ut_fmv_s_x.h
new file mode 120000 (symlink)
index 0000000..4106ef4
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/fmv_s_x.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_fmv_x_d.h b/hwacha/insns_ut/ut_fmv_x_d.h
new file mode 120000 (symlink)
index 0000000..6de3157
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/fmv_x_d.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_fmv_x_s.h b/hwacha/insns_ut/ut_fmv_x_s.h
new file mode 120000 (symlink)
index 0000000..4d26ecc
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/fmv_x_s.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_fnmadd_d.h b/hwacha/insns_ut/ut_fnmadd_d.h
new file mode 120000 (symlink)
index 0000000..439c088
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/fnmadd_d.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_fnmadd_s.h b/hwacha/insns_ut/ut_fnmadd_s.h
new file mode 120000 (symlink)
index 0000000..4b3d954
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/fnmadd_s.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_fnmsub_d.h b/hwacha/insns_ut/ut_fnmsub_d.h
new file mode 120000 (symlink)
index 0000000..5c33936
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/fnmsub_d.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_fnmsub_s.h b/hwacha/insns_ut/ut_fnmsub_s.h
new file mode 120000 (symlink)
index 0000000..ffd0f1d
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/fnmsub_s.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_frsr.h b/hwacha/insns_ut/ut_frsr.h
new file mode 120000 (symlink)
index 0000000..d7cf986
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/frsr.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_fsd.h b/hwacha/insns_ut/ut_fsd.h
new file mode 120000 (symlink)
index 0000000..0466f22
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/fsd.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_fsgnj_d.h b/hwacha/insns_ut/ut_fsgnj_d.h
new file mode 120000 (symlink)
index 0000000..39870ef
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/fsgnj_d.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_fsgnj_s.h b/hwacha/insns_ut/ut_fsgnj_s.h
new file mode 120000 (symlink)
index 0000000..b187302
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/fsgnj_s.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_fsgnjn_d.h b/hwacha/insns_ut/ut_fsgnjn_d.h
new file mode 120000 (symlink)
index 0000000..5e5af56
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/fsgnjn_d.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_fsgnjn_s.h b/hwacha/insns_ut/ut_fsgnjn_s.h
new file mode 120000 (symlink)
index 0000000..d833f76
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/fsgnjn_s.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_fsgnjx_d.h b/hwacha/insns_ut/ut_fsgnjx_d.h
new file mode 120000 (symlink)
index 0000000..6e53ea4
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/fsgnjx_d.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_fsgnjx_s.h b/hwacha/insns_ut/ut_fsgnjx_s.h
new file mode 120000 (symlink)
index 0000000..6792056
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/fsgnjx_s.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_fsqrt_d.h b/hwacha/insns_ut/ut_fsqrt_d.h
new file mode 120000 (symlink)
index 0000000..72bfaf4
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/fsqrt_d.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_fsqrt_s.h b/hwacha/insns_ut/ut_fsqrt_s.h
new file mode 120000 (symlink)
index 0000000..36eca16
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/fsqrt_s.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_fssr.h b/hwacha/insns_ut/ut_fssr.h
new file mode 120000 (symlink)
index 0000000..1ca6bea
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/fssr.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_fsub_d.h b/hwacha/insns_ut/ut_fsub_d.h
new file mode 120000 (symlink)
index 0000000..098fad0
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/fsub_d.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_fsub_s.h b/hwacha/insns_ut/ut_fsub_s.h
new file mode 120000 (symlink)
index 0000000..6b01668
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/fsub_s.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_fsw.h b/hwacha/insns_ut/ut_fsw.h
new file mode 120000 (symlink)
index 0000000..0079240
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/fsw.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_lb.h b/hwacha/insns_ut/ut_lb.h
new file mode 120000 (symlink)
index 0000000..0b0d8ef
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/lb.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_lbu.h b/hwacha/insns_ut/ut_lbu.h
new file mode 120000 (symlink)
index 0000000..857c658
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/lbu.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_ld.h b/hwacha/insns_ut/ut_ld.h
new file mode 120000 (symlink)
index 0000000..6da0f61
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/ld.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_lh.h b/hwacha/insns_ut/ut_lh.h
new file mode 120000 (symlink)
index 0000000..c12eb1d
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/lh.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_lhu.h b/hwacha/insns_ut/ut_lhu.h
new file mode 120000 (symlink)
index 0000000..1bde33f
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/lhu.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_lui.h b/hwacha/insns_ut/ut_lui.h
new file mode 120000 (symlink)
index 0000000..723da3d
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/lui.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_lw.h b/hwacha/insns_ut/ut_lw.h
new file mode 120000 (symlink)
index 0000000..05d6159
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/lw.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_lwu.h b/hwacha/insns_ut/ut_lwu.h
new file mode 120000 (symlink)
index 0000000..4f446ae
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/lwu.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_movn.h b/hwacha/insns_ut/ut_movn.h
new file mode 100644 (file)
index 0000000..90a6cd9
--- /dev/null
@@ -0,0 +1 @@
+if (RS1 & 0x1) WRITE_RD(RS2);
diff --git a/hwacha/insns_ut/ut_movz.h b/hwacha/insns_ut/ut_movz.h
new file mode 100644 (file)
index 0000000..ce14162
--- /dev/null
@@ -0,0 +1 @@
+if (~RS1 & 0x1) WRITE_RD(RS2);
diff --git a/hwacha/insns_ut/ut_mul.h b/hwacha/insns_ut/ut_mul.h
new file mode 120000 (symlink)
index 0000000..8b0ef35
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/mul.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_mulh.h b/hwacha/insns_ut/ut_mulh.h
new file mode 120000 (symlink)
index 0000000..b631d76
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/mulh.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_mulhsu.h b/hwacha/insns_ut/ut_mulhsu.h
new file mode 120000 (symlink)
index 0000000..50db4ea
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/mulhsu.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_mulhu.h b/hwacha/insns_ut/ut_mulhu.h
new file mode 120000 (symlink)
index 0000000..0551583
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/mulhu.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_mulw.h b/hwacha/insns_ut/ut_mulw.h
new file mode 120000 (symlink)
index 0000000..e23b6dd
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/mulw.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_or.h b/hwacha/insns_ut/ut_or.h
new file mode 120000 (symlink)
index 0000000..ec31003
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/or.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_ori.h b/hwacha/insns_ut/ut_ori.h
new file mode 120000 (symlink)
index 0000000..c816d3a
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/ori.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_rem.h b/hwacha/insns_ut/ut_rem.h
new file mode 120000 (symlink)
index 0000000..6ecd10d
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/rem.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_remu.h b/hwacha/insns_ut/ut_remu.h
new file mode 120000 (symlink)
index 0000000..a211846
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/remu.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_remuw.h b/hwacha/insns_ut/ut_remuw.h
new file mode 120000 (symlink)
index 0000000..62d0679
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/remuw.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_remw.h b/hwacha/insns_ut/ut_remw.h
new file mode 120000 (symlink)
index 0000000..af976fa
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/remw.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_sb.h b/hwacha/insns_ut/ut_sb.h
new file mode 120000 (symlink)
index 0000000..a86f0b1
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/sb.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_sd.h b/hwacha/insns_ut/ut_sd.h
new file mode 120000 (symlink)
index 0000000..3b7e0af
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/sd.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_sh.h b/hwacha/insns_ut/ut_sh.h
new file mode 120000 (symlink)
index 0000000..db646db
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/sh.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_sll.h b/hwacha/insns_ut/ut_sll.h
new file mode 120000 (symlink)
index 0000000..ef52f87
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/sll.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_slli.h b/hwacha/insns_ut/ut_slli.h
new file mode 120000 (symlink)
index 0000000..31e63d4
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/slli.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_slliw.h b/hwacha/insns_ut/ut_slliw.h
new file mode 120000 (symlink)
index 0000000..62565f3
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/slliw.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_sllw.h b/hwacha/insns_ut/ut_sllw.h
new file mode 120000 (symlink)
index 0000000..0977579
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/sllw.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_slt.h b/hwacha/insns_ut/ut_slt.h
new file mode 120000 (symlink)
index 0000000..5b36a82
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/slt.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_slti.h b/hwacha/insns_ut/ut_slti.h
new file mode 120000 (symlink)
index 0000000..a5eda3b
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/slti.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_sltiu.h b/hwacha/insns_ut/ut_sltiu.h
new file mode 120000 (symlink)
index 0000000..5ce2315
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/sltiu.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_sltu.h b/hwacha/insns_ut/ut_sltu.h
new file mode 120000 (symlink)
index 0000000..0d42166
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/sltu.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_sra.h b/hwacha/insns_ut/ut_sra.h
new file mode 120000 (symlink)
index 0000000..ff64ebb
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/sra.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_srai.h b/hwacha/insns_ut/ut_srai.h
new file mode 120000 (symlink)
index 0000000..458c697
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/srai.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_sraiw.h b/hwacha/insns_ut/ut_sraiw.h
new file mode 120000 (symlink)
index 0000000..652cc61
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/sraiw.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_sraw.h b/hwacha/insns_ut/ut_sraw.h
new file mode 120000 (symlink)
index 0000000..b1f279f
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/sraw.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_srl.h b/hwacha/insns_ut/ut_srl.h
new file mode 120000 (symlink)
index 0000000..0b7119c
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/srl.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_srli.h b/hwacha/insns_ut/ut_srli.h
new file mode 120000 (symlink)
index 0000000..477d500
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/srli.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_srliw.h b/hwacha/insns_ut/ut_srliw.h
new file mode 120000 (symlink)
index 0000000..0bf24cb
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/srliw.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_srlw.h b/hwacha/insns_ut/ut_srlw.h
new file mode 120000 (symlink)
index 0000000..000c061
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/srlw.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_stop.h b/hwacha/insns_ut/ut_stop.h
new file mode 100644 (file)
index 0000000..c8656cf
--- /dev/null
@@ -0,0 +1 @@
+h->get_ut_state(UTIDX)->run = false;
diff --git a/hwacha/insns_ut/ut_sub.h b/hwacha/insns_ut/ut_sub.h
new file mode 120000 (symlink)
index 0000000..9fcae83
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/sub.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_subw.h b/hwacha/insns_ut/ut_subw.h
new file mode 120000 (symlink)
index 0000000..c6da9f7
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/subw.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_sw.h b/hwacha/insns_ut/ut_sw.h
new file mode 120000 (symlink)
index 0000000..15db598
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/sw.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_utidx.h b/hwacha/insns_ut/ut_utidx.h
new file mode 100644 (file)
index 0000000..f7ee7f8
--- /dev/null
@@ -0,0 +1 @@
+WRITE_RD(UTIDX);
diff --git a/hwacha/insns_ut/ut_xor.h b/hwacha/insns_ut/ut_xor.h
new file mode 120000 (symlink)
index 0000000..f112aff
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/xor.h
\ No newline at end of file
diff --git a/hwacha/insns_ut/ut_xori.h b/hwacha/insns_ut/ut_xori.h
new file mode 120000 (symlink)
index 0000000..fc9d643
--- /dev/null
@@ -0,0 +1 @@
+../../riscv/insns/xori.h
\ No newline at end of file
diff --git a/hwacha/opcodes_hwacha.h b/hwacha/opcodes_hwacha.h
new file mode 100644 (file)
index 0000000..75cbfa6
--- /dev/null
@@ -0,0 +1,40 @@
+DECLARE_INSN(vf, 0x10202b, 0x1f0707f)
+DECLARE_INSN(vflsegd, 0x1600205b, 0x1ff0707f)
+DECLARE_INSN(vflsegstd, 0x1600305b, 0x1e00707f)
+DECLARE_INSN(vflsegstw, 0x1400305b, 0x1e00707f)
+DECLARE_INSN(vflsegw, 0x1400205b, 0x1ff0707f)
+DECLARE_INSN(vfssegd, 0x1600207b, 0x1ff0707f)
+DECLARE_INSN(vfssegstd, 0x1600307b, 0x1e00707f)
+DECLARE_INSN(vfssegstw, 0x1400307b, 0x1e00707f)
+DECLARE_INSN(vfssegw, 0x1400207b, 0x1ff0707f)
+DECLARE_INSN(vgetcfg, 0x400b, 0xfffff07f)
+DECLARE_INSN(vgetvl, 0x200400b, 0xfffff07f)
+DECLARE_INSN(vlsegb, 0x205b, 0x1ff0707f)
+DECLARE_INSN(vlsegbu, 0x800205b, 0x1ff0707f)
+DECLARE_INSN(vlsegd, 0x600205b, 0x1ff0707f)
+DECLARE_INSN(vlsegh, 0x200205b, 0x1ff0707f)
+DECLARE_INSN(vlseghu, 0xa00205b, 0x1ff0707f)
+DECLARE_INSN(vlsegstb, 0x305b, 0x1e00707f)
+DECLARE_INSN(vlsegstbu, 0x800305b, 0x1e00707f)
+DECLARE_INSN(vlsegstd, 0x600305b, 0x1e00707f)
+DECLARE_INSN(vlsegsth, 0x200305b, 0x1e00707f)
+DECLARE_INSN(vlsegsthu, 0xa00305b, 0x1e00707f)
+DECLARE_INSN(vlsegstw, 0x400305b, 0x1e00707f)
+DECLARE_INSN(vlsegstwu, 0xc00305b, 0x1e00707f)
+DECLARE_INSN(vlsegw, 0x400205b, 0x1ff0707f)
+DECLARE_INSN(vlsegwu, 0xc00205b, 0x1ff0707f)
+DECLARE_INSN(vmsv, 0x200202b, 0xfff0707f)
+DECLARE_INSN(vmvv, 0x200002b, 0xfff0707f)
+DECLARE_INSN(vsetcfg, 0x200b, 0x7fff)
+DECLARE_INSN(vsetvl, 0x600b, 0xfff0707f)
+DECLARE_INSN(vssegb, 0x207b, 0x1ff0707f)
+DECLARE_INSN(vssegd, 0x600207b, 0x1ff0707f)
+DECLARE_INSN(vssegh, 0x200207b, 0x1ff0707f)
+DECLARE_INSN(vssegstb, 0x307b, 0x1e00707f)
+DECLARE_INSN(vssegstd, 0x600307b, 0x1e00707f)
+DECLARE_INSN(vssegsth, 0x200307b, 0x1e00707f)
+DECLARE_INSN(vssegstw, 0x400307b, 0x1e00707f)
+DECLARE_INSN(vssegw, 0x400207b, 0x1ff0707f)
+DECLARE_INSN(vxcptkill, 0x400302b, 0xffffffff)
+DECLARE_INSN(vxcptrestore, 0x200302b, 0xfff07fff)
+DECLARE_INSN(vxcptsave, 0x302b, 0xfff07fff)
diff --git a/hwacha/opcodes_hwacha_ut.h b/hwacha/opcodes_hwacha_ut.h
new file mode 100644 (file)
index 0000000..bd9e8b9
--- /dev/null
@@ -0,0 +1,141 @@
+DECLARE_INSN(ut_movn, 0x2007077, 0xfe00707f)
+DECLARE_INSN(ut_movz, 0x7077, 0xfe00707f)
+DECLARE_INSN(ut_fmovn, 0x6007077, 0xfe00707f)
+DECLARE_INSN(ut_fmovz, 0x4007077, 0xfe00707f)
+DECLARE_INSN(ut_stop, 0x5077, 0xffffffff)
+DECLARE_INSN(ut_utidx, 0x6077, 0xfffff07f)
+DECLARE_INSN(ut_fmv_s_x, 0xf0000053, 0xfff0707f)
+DECLARE_INSN(ut_amoxor_w, 0x2000202f, 0xf800707f)
+DECLARE_INSN(ut_remuw, 0x200703b, 0xfe00707f)
+DECLARE_INSN(ut_fmin_d, 0xc2000053, 0xfe00707f)
+DECLARE_INSN(ut_amomax_d, 0xa000302f, 0xf800707f)
+DECLARE_INSN(ut_fmin_s, 0xc0000053, 0xfe00707f)
+DECLARE_INSN(ut_slliw, 0x4000101b, 0xfe00707f)
+DECLARE_INSN(ut_lb, 0x3, 0x707f)
+DECLARE_INSN(ut_fcvt_s_wu, 0x78000053, 0xfff0007f)
+DECLARE_INSN(ut_fcvt_d_l, 0x62000053, 0xfff0007f)
+DECLARE_INSN(ut_lh, 0x1003, 0x707f)
+DECLARE_INSN(ut_frsr, 0xe8000053, 0xfffff07f)
+DECLARE_INSN(ut_fcvt_d_w, 0x72000053, 0xfff0007f)
+DECLARE_INSN(ut_lw, 0x2003, 0x707f)
+DECLARE_INSN(ut_add, 0x33, 0xfe00707f)
+DECLARE_INSN(ut_fcvt_d_s, 0x82000053, 0xfff0007f)
+DECLARE_INSN(ut_fmax_d, 0xca000053, 0xfe00707f)
+DECLARE_INSN(ut_fcvt_s_d, 0x88000053, 0xfff0007f)
+DECLARE_INSN(ut_fadd_d, 0x2000053, 0xfe00007f)
+DECLARE_INSN(ut_sltiu, 0x3013, 0x707f)
+DECLARE_INSN(ut_fcvt_s_w, 0x70000053, 0xfff0007f)
+DECLARE_INSN(ut_mul, 0x2000033, 0xfe00707f)
+DECLARE_INSN(ut_amominu_d, 0xc000302f, 0xf800707f)
+DECLARE_INSN(ut_srli, 0x5013, 0xfc00707f)
+DECLARE_INSN(ut_amominu_w, 0xc000202f, 0xf800707f)
+DECLARE_INSN(ut_divuw, 0x200503b, 0xfe00707f)
+DECLARE_INSN(ut_mulw, 0x200003b, 0xfe00707f)
+DECLARE_INSN(ut_srlw, 0x503b, 0xfe00707f)
+DECLARE_INSN(ut_div, 0x2004033, 0xfe00707f)
+DECLARE_INSN(ut_fdiv_d, 0x1a000053, 0xfe00007f)
+DECLARE_INSN(ut_fence, 0xf, 0x707f)
+DECLARE_INSN(ut_fnmsub_s, 0x4b, 0x600007f)
+DECLARE_INSN(ut_fcvt_l_s, 0x40000053, 0xfff0007f)
+DECLARE_INSN(ut_fle_s, 0xb8000053, 0xfe00707f)
+DECLARE_INSN(ut_fdiv_s, 0x18000053, 0xfe00007f)
+DECLARE_INSN(ut_fle_d, 0xba000053, 0xfe00707f)
+DECLARE_INSN(ut_fnmsub_d, 0x200004b, 0x600007f)
+DECLARE_INSN(ut_addw, 0x3b, 0xfe00707f)
+DECLARE_INSN(ut_sll, 0x1033, 0xfe00707f)
+DECLARE_INSN(ut_xor, 0x4033, 0xfe00707f)
+DECLARE_INSN(ut_sub, 0x40000033, 0xfe00707f)
+DECLARE_INSN(ut_rem, 0x2006033, 0xfe00707f)
+DECLARE_INSN(ut_srliw, 0x501b, 0xfe00707f)
+DECLARE_INSN(ut_lui, 0x37, 0x7f)
+DECLARE_INSN(ut_fcvt_s_lu, 0x68000053, 0xfff0007f)
+DECLARE_INSN(ut_addi, 0x13, 0x707f)
+DECLARE_INSN(ut_mulh, 0x2001033, 0xfe00707f)
+DECLARE_INSN(ut_fmul_s, 0x10000053, 0xfe00007f)
+DECLARE_INSN(ut_srai, 0x40005013, 0xfc00707f)
+DECLARE_INSN(ut_amoand_d, 0x6000302f, 0xf800707f)
+DECLARE_INSN(ut_flt_d, 0xb2000053, 0xfe00707f)
+DECLARE_INSN(ut_sraw, 0x4000503b, 0xfe00707f)
+DECLARE_INSN(ut_fmul_d, 0x12000053, 0xfe00007f)
+DECLARE_INSN(ut_ld, 0x3003, 0x707f)
+DECLARE_INSN(ut_ori, 0x6013, 0x707f)
+DECLARE_INSN(ut_flt_s, 0xb0000053, 0xfe00707f)
+DECLARE_INSN(ut_addiw, 0x1b, 0x707f)
+DECLARE_INSN(ut_amoand_w, 0x6000202f, 0xf800707f)
+DECLARE_INSN(ut_feq_s, 0xa8000053, 0xfe00707f)
+DECLARE_INSN(ut_fsgnjx_d, 0x3a000053, 0xfe00707f)
+DECLARE_INSN(ut_sra, 0x40005033, 0xfe00707f)
+DECLARE_INSN(ut_sraiw, 0x4000501b, 0xfe00707f)
+DECLARE_INSN(ut_srl, 0x5033, 0xfe00707f)
+DECLARE_INSN(ut_fsub_d, 0xa000053, 0xfe00007f)
+DECLARE_INSN(ut_fsgnjx_s, 0x38000053, 0xfe00707f)
+DECLARE_INSN(ut_feq_d, 0xaa000053, 0xfe00707f)
+DECLARE_INSN(ut_fcvt_d_wu, 0x7a000053, 0xfff0007f)
+DECLARE_INSN(ut_or, 0x6033, 0xfe00707f)
+DECLARE_INSN(ut_fcvt_wu_d, 0x5a000053, 0xfff0007f)
+DECLARE_INSN(ut_subw, 0x4000003b, 0xfe00707f)
+DECLARE_INSN(ut_fmax_s, 0xc8000053, 0xfe00707f)
+DECLARE_INSN(ut_amomaxu_d, 0xe000302f, 0xf800707f)
+DECLARE_INSN(ut_xori, 0x4013, 0x707f)
+DECLARE_INSN(ut_amoxor_d, 0x2000302f, 0xf800707f)
+DECLARE_INSN(ut_amomaxu_w, 0xe000202f, 0xf800707f)
+DECLARE_INSN(ut_fcvt_wu_s, 0x58000053, 0xfff0007f)
+DECLARE_INSN(ut_andi, 0x7013, 0x707f)
+DECLARE_INSN(ut_fmv_x_s, 0xe0000053, 0xfff0707f)
+DECLARE_INSN(ut_fsgnjn_d, 0x32000053, 0xfe00707f)
+DECLARE_INSN(ut_fnmadd_s, 0x4f, 0x600007f)
+DECLARE_INSN(ut_lwu, 0x6003, 0x707f)
+DECLARE_INSN(ut_fmv_x_d, 0xe2000053, 0xfff0707f)
+DECLARE_INSN(ut_fnmadd_d, 0x200004f, 0x600007f)
+DECLARE_INSN(ut_amoadd_d, 0x302f, 0xf800707f)
+DECLARE_INSN(ut_fcvt_w_s, 0x50000053, 0xfff0007f)
+DECLARE_INSN(ut_mulhsu, 0x2002033, 0xfe00707f)
+DECLARE_INSN(ut_amoadd_w, 0x202f, 0xf800707f)
+DECLARE_INSN(ut_fcvt_d_lu, 0x6a000053, 0xfff0007f)
+DECLARE_INSN(ut_fcvt_w_d, 0x52000053, 0xfff0007f)
+DECLARE_INSN(ut_slt, 0x2033, 0xfe00707f)
+DECLARE_INSN(ut_sllw, 0x103b, 0xfe00707f)
+DECLARE_INSN(ut_amoor_d, 0x4000302f, 0xf800707f)
+DECLARE_INSN(ut_slti, 0x2013, 0x707f)
+DECLARE_INSN(ut_remu, 0x2007033, 0xfe00707f)
+DECLARE_INSN(ut_flw, 0x2007, 0x707f)
+DECLARE_INSN(ut_remw, 0x200603b, 0xfe00707f)
+DECLARE_INSN(ut_sltu, 0x3033, 0xfe00707f)
+DECLARE_INSN(ut_slli, 0x40001013, 0xfc00707f)
+DECLARE_INSN(ut_amoor_w, 0x4000202f, 0xf800707f)
+DECLARE_INSN(ut_fld, 0x3007, 0x707f)
+DECLARE_INSN(ut_fsub_s, 0x8000053, 0xfe00007f)
+DECLARE_INSN(ut_and, 0x7033, 0xfe00707f)
+DECLARE_INSN(ut_fmv_d_x, 0xf2000053, 0xfff0707f)
+DECLARE_INSN(ut_lbu, 0x4003, 0x707f)
+DECLARE_INSN(ut_fsgnj_s, 0x28000053, 0xfe00707f)
+DECLARE_INSN(ut_amomax_w, 0xa000202f, 0xf800707f)
+DECLARE_INSN(ut_fsgnj_d, 0x2a000053, 0xfe00707f)
+DECLARE_INSN(ut_mulhu, 0x2003033, 0xfe00707f)
+DECLARE_INSN(ut_fcvt_l_d, 0x42000053, 0xfff0007f)
+DECLARE_INSN(ut_fssr, 0xf8000053, 0xfff0707f)
+DECLARE_INSN(ut_fcvt_lu_s, 0x48000053, 0xfff0007f)
+DECLARE_INSN(ut_fcvt_s_l, 0x60000053, 0xfff0007f)
+DECLARE_INSN(ut_auipc, 0x17, 0x7f)
+DECLARE_INSN(ut_fcvt_lu_d, 0x4a000053, 0xfff0007f)
+DECLARE_INSN(ut_fmadd_s, 0x43, 0x600007f)
+DECLARE_INSN(ut_fsqrt_s, 0x20000053, 0xfff0007f)
+DECLARE_INSN(ut_amomin_w, 0x8000202f, 0xf800707f)
+DECLARE_INSN(ut_fsgnjn_s, 0x30000053, 0xfe00707f)
+DECLARE_INSN(ut_amoswap_d, 0x800302f, 0xf800707f)
+DECLARE_INSN(ut_fsqrt_d, 0x22000053, 0xfff0007f)
+DECLARE_INSN(ut_fmadd_d, 0x2000043, 0x600007f)
+DECLARE_INSN(ut_divw, 0x200403b, 0xfe00707f)
+DECLARE_INSN(ut_amomin_d, 0x8000302f, 0xf800707f)
+DECLARE_INSN(ut_divu, 0x2005033, 0xfe00707f)
+DECLARE_INSN(ut_amoswap_w, 0x800202f, 0xf800707f)
+DECLARE_INSN(ut_fadd_s, 0x53, 0xfe00007f)
+DECLARE_INSN(ut_fsd, 0x3027, 0x707f)
+DECLARE_INSN(ut_sw, 0x2023, 0x707f)
+DECLARE_INSN(ut_fmsub_s, 0x47, 0x600007f)
+DECLARE_INSN(ut_lhu, 0x5003, 0x707f)
+DECLARE_INSN(ut_sh, 0x1023, 0x707f)
+DECLARE_INSN(ut_fsw, 0x2027, 0x707f)
+DECLARE_INSN(ut_sb, 0x23, 0x707f)
+DECLARE_INSN(ut_fmsub_d, 0x2000047, 0x600007f)
+DECLARE_INSN(ut_sd, 0x3023, 0x707f)
index 718ef6d06a638e4ad83b62a112015e66586da853..c6e1ec39d275ffc73e684cef804a2781f7c23e8a 100644 (file)
@@ -1,6 +1,7 @@
 #include "extension.h"
 #include "trap.h"
 #include "dummy-rocc.h"
+#include "hwacha.h"
 
 std::map<std::string, std::function<extension_t*()>>& extensions()
 {
diff --git a/riscv/insns/cflush.h b/riscv/insns/cflush.h
deleted file mode 100644 (file)
index 5117ca0..0000000
+++ /dev/null
@@ -1 +0,0 @@
-require_supervisor;
diff --git a/riscv/insns/fence_v_g.h b/riscv/insns/fence_v_g.h
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/riscv/insns/fence_v_l.h b/riscv/insns/fence_v_l.h
deleted file mode 100644 (file)
index e69de29..0000000
index fc2982e5a87c7cdffffae0f53efeec1d4e38a168..3c4480a250821aba8f80a7e7679b52fc18545cd8 100644 (file)
@@ -4,6 +4,7 @@ get_opcode = $(shell grep \\\<$(2)\\\> $(1) | sed 's/DECLARE_INSN(.*,\(.*\),.*)/
 riscv_subproject_deps = \
        softfloat_riscv \
        softfloat \
+       hwacha \
 
 riscv_install_prog_srcs = \
        spike.cc \
index 2354f9fdda4ed76ac6b5d82691a2408321e95468..fe221ca37f1521d45ccc871c16c45fa02252238e 100644 (file)
@@ -2,12 +2,6 @@
 #include "trap.h"
 #include <cstdlib>
 
-union rocc_insn_union_t
-{
-  rocc_insn_t r;
-  insn_t i;
-};
-
 #define customX(n) \
   static reg_t c##n(processor_t* p, insn_t insn, reg_t pc) \
   { \
index 13980bb1b101261a28126cafc435a41609dd6a7b..e4148ec1509b7706d37db140a3d44797ae6d1c00 100644 (file)
@@ -15,6 +15,12 @@ struct rocc_insn_t
   unsigned funct : 7;
 };
 
+union rocc_insn_union_t
+{
+  rocc_insn_t r;
+  insn_t i;
+};
+
 class rocc_t : public extension_t
 {
  public:
index 0ab1616a9e131fb2e84825bac6f4ef052ed31d01..fb2b7da164fc50630cab9f14d34e45521239769c 100644 (file)
@@ -23,6 +23,7 @@ static void help()
   fprintf(stderr, "  --ic=<S>:<W>:<B>   Instantiate a cache model with S sets,\n");
   fprintf(stderr, "  --dc=<S>:<W>:<B>     W ways, and B-byte blocks (with S and\n");
   fprintf(stderr, "  --l2=<S>:<W>:<B>     B both powers of 2).\n");
+  fprintf(stderr, "  --extension=<name> Specify RoCC Extension\n");
   exit(1);
 }