Skip to content

Commit

Permalink
Remove vestiges of legacy RVV SLEN parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
aswaterman committed Sep 30, 2021
1 parent 583bd1e commit 1355e73
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 13 deletions.
4 changes: 2 additions & 2 deletions configure
Expand Up @@ -1393,7 +1393,7 @@ Optional Packages:
--with-boost-regex=boost_regex-gcc-mt-d-1_33_1
--with-isa=RV64IMAFDC Sets the default RISC-V ISA
--with-priv=MSU Sets the default RISC-V privilege modes supported
--with-varch=vlen:128,elen:64,slen:128
--with-varch=vlen:128,elen:64
Sets the default vector config
--with-target=riscv64-unknown-elf
Sets the default target config
Expand Down Expand Up @@ -5920,7 +5920,7 @@ _ACEOF
else
cat >>confdefs.h <<_ACEOF
#define DEFAULT_VARCH "vlen:128,elen:64,slen:128"
#define DEFAULT_VARCH "vlen:128,elen:64"
_ACEOF
fi
Expand Down
10 changes: 1 addition & 9 deletions riscv/processor.cc
Expand Up @@ -127,7 +127,6 @@ void processor_t::parse_varch_string(const char* s)
size_t len = str.length();
int vlen = 0;
int elen = 0;
int slen = 0;
int vstart_alu = 1;

while (pos < len) {
Expand All @@ -137,8 +136,6 @@ void processor_t::parse_varch_string(const char* s)

if (attr == "vlen")
vlen = get_int_token(str, ',', pos);
else if (attr == "slen")
slen = get_int_token(str, ',', pos);
else if (attr == "elen")
elen = get_int_token(str, ',', pos);
else if (attr == "vstartalu")
Expand All @@ -150,18 +147,13 @@ void processor_t::parse_varch_string(const char* s)
}

// The integer should be the power of 2
if (!check_pow2(vlen) || !check_pow2(elen) || !check_pow2(slen)){
if (!check_pow2(vlen) || !check_pow2(elen)){
bad_varch_string(s, "The integer value should be the power of 2");
}

if (slen == 0)
slen = vlen;

/* Vector spec requirements. */
if (vlen < elen)
bad_varch_string(s, "vlen must be >= elen");
if (vlen != slen)
bad_varch_string(s, "vlen must be == slen for current limitation");

/* spike requirements. */
if (vlen > 4096)
Expand Down
4 changes: 2 additions & 2 deletions riscv/riscv.ac
Expand Up @@ -21,10 +21,10 @@ AC_ARG_WITH(priv,
AC_DEFINE_UNQUOTED([DEFAULT_PRIV], "MSU", [Default value for --priv switch]))

AC_ARG_WITH(varch,
[AS_HELP_STRING([--with-varch=vlen:128,elen:64,slen:128],
[AS_HELP_STRING([--with-varch=vlen:128,elen:64],
[Sets the default vector config])],
AC_DEFINE_UNQUOTED([DEFAULT_VARCH], "$withval", [Default value for --varch switch]),
AC_DEFINE_UNQUOTED([DEFAULT_VARCH], ["vlen:128,elen:64,slen:128"], [Default value for --varch switch]))
AC_DEFINE_UNQUOTED([DEFAULT_VARCH], ["vlen:128,elen:64"], [Default value for --varch switch]))

AC_ARG_WITH(target,
[AS_HELP_STRING([--with-target=riscv64-unknown-elf],
Expand Down

0 comments on commit 1355e73

Please sign in to comment.