Skip to content

Commit

Permalink
[nix] feed spike isa string from build system
Browse files Browse the repository at this point in the history
Signed-off-by: Avimitin <[email protected]>
  • Loading branch information
Avimitin authored and sequencer committed Jul 27, 2024
1 parent 85614a3 commit 353d75c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions difftest/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
Expand Down
2 changes: 1 addition & 1 deletion difftest/test_common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}

Expand Down

0 comments on commit 353d75c

Please sign in to comment.