From 353d75c621c9e067ea0b142588e3b3a982f93ec1 Mon Sep 17 00:00:00 2001 From: Avimitin Date: Sat, 27 Jul 2024 16:53:32 +0800 Subject: [PATCH] [nix] feed spike isa string from build system Signed-off-by: Avimitin --- difftest/default.nix | 4 ++++ difftest/test_common/src/lib.rs | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) 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, }