Skip to content

Commit

Permalink
[difftest] suffix all dpi module with -emu
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 Oct 14, 2024
1 parent 59047d8 commit 0fb34e3
Show file tree
Hide file tree
Showing 21 changed files with 22 additions and 22 deletions.
8 changes: 4 additions & 4 deletions difftest/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
resolver = "2"
members = [
"spike_rs",
"offline_t1",
"offline_t1rocket",
"dpi_t1",
"dpi_t1rocket",
"offline_t1emu",
"offline_t1rocketemu",
"dpi_t1emu",
"dpi_t1rocketemu",
"dpi_common",
]
exclude = [
Expand Down
10 changes: 5 additions & 5 deletions difftest/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
}:

assert let
available = [ "dpi_t1" "dpi_t1rocket" "offline_t1" "offline_t1rocket" ];
available = [ "dpi_t1emu" "dpi_t1rocketemu" "offline_t1emu" "offline_t1rocketemu" ];
in
lib.assertMsg (lib.elem moduleType available) "emuType is not in ${lib.concatStringsSep ", " available}";
# if emuType is empty, then moduleType must be offline-*, or user should give valid emuType
Expand All @@ -25,11 +25,11 @@ rustPlatform.buildRustPackage {
root = ./.;
fileset = unions [
./spike_rs
./offline_t1
./offline_t1rocket
./offline_t1emu
./offline_t1rocketemu
./dpi_common
./dpi_t1
./dpi_t1rocket
./dpi_t1emu
./dpi_t1rocketemu
./Cargo.lock
./Cargo.toml
./.rustfmt.toml
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "dpi_t1"
name = "dpi_t1emu"
edition = "2021"
version.workspace = true

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "dpi_t1rocket"
name = "dpi_t1rocketemu"
edition = "2021"
version.workspace = true

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "offline_t1"
name = "offline_t1emu"
version = "0.1.0"
edition = "2021"

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "offline_t1rocket"
name = "offline_t1rocketemu"
version = "0.1.0"
edition = "2021"

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
18 changes: 9 additions & 9 deletions nix/t1/t1.nix
Original file line number Diff line number Diff line change
Expand Up @@ -72,25 +72,25 @@ lib.mapAttrs
verilator-dpi-lib = mostInnerScope.makeDifftest {
outputName = "${shortName}-verilator-dpi-lib";
emuType = "verilator";
moduleType = "dpi_t1";
moduleType = "dpi_${shortName}";
};
verilator-dpi-lib-trace = mostInnerScope.makeDifftest {
outputName = "${shortName}-verilator-trace-dpi-lib";
emuType = "verilator";
moduleType = "dpi_t1";
moduleType = "dpi_${shortName}";
enableTrace = true;
};

verilator-emu = t1Scope.sv-to-verilator-emulator {
mainProgram = "${shortName}-verilated-simulator";
rtl = mostInnerScope.rtl;
extraVerilatorArgs = [ "${mostInnerScope.verilator-dpi-lib}/lib/libdpi_t1.a" ];
extraVerilatorArgs = [ "${mostInnerScope.verilator-dpi-lib}/lib/libdpi_${shortName}.a" ];
};
verilator-emu-trace = t1Scope.sv-to-verilator-emulator {
mainProgram = "${shortName}-verilated-trace-simulator";
rtl = mostInnerScope.rtl;
enableTrace = true;
extraVerilatorArgs = [ "${mostInnerScope.verilator-dpi-lib-trace}/lib/libdpi_t1.a" ];
extraVerilatorArgs = [ "${mostInnerScope.verilator-dpi-lib-trace}/lib/libdpi_${shortName}.a" ];
};

# ---------------------------------------------------------------------------------
Expand All @@ -99,30 +99,30 @@ lib.mapAttrs
vcs-dpi-lib = mostInnerScope.makeDifftest {
outputName = "${shortName}-vcs-dpi-lib";
emuType = "vcs";
moduleType = "dpi_t1";
moduleType = "dpi_${shortName}";
};
vcs-dpi-lib-trace = mostInnerScope.makeDifftest {
outputName = "${shortName}-vcs-dpi-trace-lib";
emuType = "vcs";
enableTrace = true;
moduleType = "dpi_t1";
moduleType = "dpi_${shortName}";
};

offline-checker = mostInnerScope.makeDifftest {
outputName = "${shortName}-offline-checker";
moduleType = "offline_t1";
moduleType = "offline_${shortName}";
};

vcs-emu = t1Scope.sv-to-vcs-simulator {
mainProgram = "${shortName}-vcs-simulator";
rtl = mostInnerScope.rtl;
vcsLinkLibs = [ "${mostInnerScope.vcs-dpi-lib}/lib/libdpi_t1.a" ];
vcsLinkLibs = [ "${mostInnerScope.vcs-dpi-lib}/lib/libdpi_${shortName}.a" ];
};
vcs-emu-trace = t1Scope.sv-to-vcs-simulator {
mainProgram = "${shortName}-vcs-trace-simulator";
rtl = mostInnerScope.rtl;
enableTrace = true;
vcsLinkLibs = [ "${mostInnerScope.vcs-dpi-lib-trace}/lib/libdpi_t1.a" ];
vcsLinkLibs = [ "${mostInnerScope.vcs-dpi-lib-trace}/lib/libdpi_${shortName}.a" ];
};

run = mostInnerScope.callPackage ./run { };
Expand Down

0 comments on commit 0fb34e3

Please sign in to comment.