diff --git a/difftest/default.nix b/difftest/default.nix index 6d6282958..44541b05a 100644 --- a/difftest/default.nix +++ b/difftest/default.nix @@ -48,6 +48,10 @@ let VERILATED_LIB_DIR = "${verilated}/lib"; SPIKE_LIB_DIR = "${libspike}/lib"; SPIKE_INTERFACES_LIB_DIR = "${libspike_interfaces}/lib"; + SPIKE_ISA_STRING = + "rv32gc" + + (builtins.concatStringsSep "_" elaborateConfig.parameter.extensions) + + "_Zvl${toString elaborateConfig.parameter.vLen}b"; DESIGN_VLEN = elaborateConfig.parameter.vLen; DESIGN_DLEN = elaborateConfig.parameter.dLen; }; diff --git a/difftest/test_common/src/lib.rs b/difftest/test_common/src/lib.rs index 5d8ac346b..e53d269cb 100644 --- a/difftest/test_common/src/lib.rs +++ b/difftest/test_common/src/lib.rs @@ -32,7 +32,7 @@ pub struct CommonArgs { pub dlen: u32, /// ISA config - #[arg(long, default_value = "rv32gcv")] + #[arg(long, default_value = env!("SPIKE_ISA_STRING"))] pub set: String, }