gem5-dev@gem5.org

The gem5 Developer List

View all threads

[S] Change in gem5/gem5[develop]: fastmodel: add src include path by default

YW
Yu-hsin Wang (Gerrit)
Wed, May 31, 2023 3:45 AM

Yu-hsin Wang has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/71118?usp=email )

Change subject: fastmodel: add src include path by default
......................................................................

fastmodel: add src include path by default

We have some customized protocols in gem5 repository and they require
the include path from src directory. It causes the users of those
protocols need to handle the include path correctly by theirselve. This
is tedious and unstable. We should add the default include path in
SIMGEN command line to prevent issues.

Change-Id: I2a3748646567635d131a8fb4099e02e332691e97

M src/arch/arm/fastmodel/CortexA76/x1/x1.sgproj
M src/arch/arm/fastmodel/CortexA76/x2/x2.sgproj
M src/arch/arm/fastmodel/CortexA76/x3/x3.sgproj
M src/arch/arm/fastmodel/CortexA76/x4/x4.sgproj
M src/arch/arm/fastmodel/CortexR52/x1/x1.sgproj
M src/arch/arm/fastmodel/CortexR52/x2/x2.sgproj
M src/arch/arm/fastmodel/CortexR52/x3/x3.sgproj
M src/arch/arm/fastmodel/CortexR52/x4/x4.sgproj
M src/arch/arm/fastmodel/GIC/GIC.sgproj
M src/arch/arm/fastmodel/PL330_DMAC/PL330.sgproj
M src/arch/arm/fastmodel/SConscript
11 files changed, 4 insertions(+), 19 deletions(-)

diff --git a/src/arch/arm/fastmodel/CortexA76/x1/x1.sgproj
b/src/arch/arm/fastmodel/CortexA76/x1/x1.sgproj
index f3fd0db..7101b49 100644
--- a/src/arch/arm/fastmodel/CortexA76/x1/x1.sgproj
+++ b/src/arch/arm/fastmodel/CortexA76/x1/x1.sgproj
@@ -16,8 +16,6 @@
SIMGEN_COMMAND_LINE = "--num-comps-file 50";
TARGET_SYSTEMC = "1";
TARGET_SYSTEMC_AUTO = "1";

  • INCLUDE_DIRS="../../../../../";
    }
    files
    {
    diff --git a/src/arch/arm/fastmodel/CortexA76/x2/x2.sgproj
    b/src/arch/arm/fastmodel/CortexA76/x2/x2.sgproj
    index abec8ad..54327dc 100644
    --- a/src/arch/arm/fastmodel/CortexA76/x2/x2.sgproj
    +++ b/src/arch/arm/fastmodel/CortexA76/x2/x2.sgproj
    @@ -16,8 +16,6 @@
    SIMGEN_COMMAND_LINE = "--num-comps-file 50";
    TARGET_SYSTEMC = "1";
    TARGET_SYSTEMC_AUTO = "1";
  • INCLUDE_DIRS="../../../../../";
    }
    files
    {
    diff --git a/src/arch/arm/fastmodel/CortexA76/x3/x3.sgproj
    b/src/arch/arm/fastmodel/CortexA76/x3/x3.sgproj
    index 666b1dc..5809b31 100644
    --- a/src/arch/arm/fastmodel/CortexA76/x3/x3.sgproj
    +++ b/src/arch/arm/fastmodel/CortexA76/x3/x3.sgproj
    @@ -16,8 +16,6 @@
    SIMGEN_COMMAND_LINE = "--num-comps-file 50";
    TARGET_SYSTEMC = "1";
    TARGET_SYSTEMC_AUTO = "1";
  • INCLUDE_DIRS="../../../../../";
    }
    files
    {
    diff --git a/src/arch/arm/fastmodel/CortexA76/x4/x4.sgproj
    b/src/arch/arm/fastmodel/CortexA76/x4/x4.sgproj
    index e3c9063..1866c98 100644
    --- a/src/arch/arm/fastmodel/CortexA76/x4/x4.sgproj
    +++ b/src/arch/arm/fastmodel/CortexA76/x4/x4.sgproj
    @@ -16,8 +16,6 @@
    SIMGEN_COMMAND_LINE = "--num-comps-file 50";
    TARGET_SYSTEMC = "1";
    TARGET_SYSTEMC_AUTO = "1";
  • INCLUDE_DIRS="../../../../../";
    }
    files
    {
    diff --git a/src/arch/arm/fastmodel/CortexR52/x1/x1.sgproj
    b/src/arch/arm/fastmodel/CortexR52/x1/x1.sgproj
    index 9d2a574..83c0584 100644
    --- a/src/arch/arm/fastmodel/CortexR52/x1/x1.sgproj
    +++ b/src/arch/arm/fastmodel/CortexR52/x1/x1.sgproj
    @@ -16,8 +16,6 @@
    SIMGEN_COMMAND_LINE = "--num-comps-file 50";
    TARGET_SYSTEMC = "1";
    TARGET_SYSTEMC_AUTO = "1";
  • INCLUDE_DIRS="../../../../../";
    }
    files
    {
    diff --git a/src/arch/arm/fastmodel/CortexR52/x2/x2.sgproj
    b/src/arch/arm/fastmodel/CortexR52/x2/x2.sgproj
    index e103170..ab8399a 100644
    --- a/src/arch/arm/fastmodel/CortexR52/x2/x2.sgproj
    +++ b/src/arch/arm/fastmodel/CortexR52/x2/x2.sgproj
    @@ -16,8 +16,6 @@
    SIMGEN_COMMAND_LINE = "--num-comps-file 50";
    TARGET_SYSTEMC = "1";
    TARGET_SYSTEMC_AUTO = "1";
  • INCLUDE_DIRS="../../../../../";
    }
    files
    {
    diff --git a/src/arch/arm/fastmodel/CortexR52/x3/x3.sgproj
    b/src/arch/arm/fastmodel/CortexR52/x3/x3.sgproj
    index 0c92809..a9bfa3f 100644
    --- a/src/arch/arm/fastmodel/CortexR52/x3/x3.sgproj
    +++ b/src/arch/arm/fastmodel/CortexR52/x3/x3.sgproj
    @@ -16,8 +16,6 @@
    SIMGEN_COMMAND_LINE = "--num-comps-file 50";
    TARGET_SYSTEMC = "1";
    TARGET_SYSTEMC_AUTO = "1";
  • INCLUDE_DIRS="../../../../../";
    }
    files
    {
    diff --git a/src/arch/arm/fastmodel/CortexR52/x4/x4.sgproj
    b/src/arch/arm/fastmodel/CortexR52/x4/x4.sgproj
    index 6a145fd..dc33376 100644
    --- a/src/arch/arm/fastmodel/CortexR52/x4/x4.sgproj
    +++ b/src/arch/arm/fastmodel/CortexR52/x4/x4.sgproj
    @@ -16,8 +16,6 @@
    SIMGEN_COMMAND_LINE = "--num-comps-file 50";
    TARGET_SYSTEMC = "1";
    TARGET_SYSTEMC_AUTO = "1";
  • INCLUDE_DIRS="../../../../../";
    }
    files
    {
    diff --git a/src/arch/arm/fastmodel/GIC/GIC.sgproj
    b/src/arch/arm/fastmodel/GIC/GIC.sgproj
    index aa5e6ae..fd5c04a 100644
    --- a/src/arch/arm/fastmodel/GIC/GIC.sgproj
    +++ b/src/arch/arm/fastmodel/GIC/GIC.sgproj
    @@ -5,7 +5,7 @@
    ACTIVE_CONFIG_WINDOWS  = "Win64-Release-VC2015";
    config "gcc"
    {
  • ADDITIONAL_COMPILER_SETTINGS = "-O3 -Wall -std=c++14 -Wno-deprecated
    -Wno-unused-function -I../../../../../";
  • ADDITIONAL_COMPILER_SETTINGS = "-O3 -Wall -std=c++14 -Wno-deprecated
    -Wno-unused-function";
    ADDITIONAL_LINKER_SETTINGS = "-Wl,--no-undefined";
    BUILD_DIR = "./gcc";
    COMPILER = "gcc-7.3";
    diff --git a/src/arch/arm/fastmodel/PL330_DMAC/PL330.sgproj
    b/src/arch/arm/fastmodel/PL330_DMAC/PL330.sgproj
    index d59849c..c972ad7 100644
    --- a/src/arch/arm/fastmodel/PL330_DMAC/PL330.sgproj
    +++ b/src/arch/arm/fastmodel/PL330_DMAC/PL330.sgproj
    @@ -5,7 +5,7 @@
    ACTIVE_CONFIG_WINDOWS  = "Win64-Release-VC2015";
    config "gcc"
    {
  • ADDITIONAL_COMPILER_SETTINGS = "-O3 -Wall -std=c++14 -Wno-deprecated
    -Wno-unused-function -I../../../../../";
  • ADDITIONAL_COMPILER_SETTINGS = "-O3 -Wall -std=c++14 -Wno-deprecated
    -Wno-unused-function";
    ADDITIONAL_LINKER_SETTINGS = "-Wl,--no-undefined";
    BUILD_DIR = "./gcc";
    COMPILER = "gcc-7.3";
    diff --git a/src/arch/arm/fastmodel/SConscript
    b/src/arch/arm/fastmodel/SConscript
    index 0a81e9e..7c6019e 100644
    --- a/src/arch/arm/fastmodel/SConscript
    +++ b/src/arch/arm/fastmodel/SConscript
    @@ -376,11 +376,12 @@
    self.rpaths = [simgen_dir, project_file_dir]
    self.log = gen_dir.File('build_%s.log' % tlc)
    self.simgen_cmd = env.subst('${CONF["SIMGEN"]} -p %s '
  •        '--configuration %s -b --verbose off --num-build-cpus %d %s '
    
  •        '--configuration %s -b --verbose off --num-build-cpus %d  
    

-I %s %s '
'--build-dir %s >%s') %
(shlex.quote(project_file.srcnode().abspath),
shlex.quote(config_name),
GetOption('num_jobs'),

  •         shlex.quote(Dir('#/src').srcnode().abspath),
             simgen_command_line,
             shlex.quote(simgen_dir.abspath),
             shlex.quote(self.log.abspath))
    

--
To view, visit
https://gem5-review.googlesource.com/c/public/gem5/+/71118?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings?usp=email

Gerrit-MessageType: newchange
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I2a3748646567635d131a8fb4099e02e332691e97
Gerrit-Change-Number: 71118
Gerrit-PatchSet: 1
Gerrit-Owner: Yu-hsin Wang yuhsingw@google.com

Yu-hsin Wang has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/71118?usp=email ) Change subject: fastmodel: add src include path by default ...................................................................... fastmodel: add src include path by default We have some customized protocols in gem5 repository and they require the include path from src directory. It causes the users of those protocols need to handle the include path correctly by theirselve. This is tedious and unstable. We should add the default include path in SIMGEN command line to prevent issues. Change-Id: I2a3748646567635d131a8fb4099e02e332691e97 --- M src/arch/arm/fastmodel/CortexA76/x1/x1.sgproj M src/arch/arm/fastmodel/CortexA76/x2/x2.sgproj M src/arch/arm/fastmodel/CortexA76/x3/x3.sgproj M src/arch/arm/fastmodel/CortexA76/x4/x4.sgproj M src/arch/arm/fastmodel/CortexR52/x1/x1.sgproj M src/arch/arm/fastmodel/CortexR52/x2/x2.sgproj M src/arch/arm/fastmodel/CortexR52/x3/x3.sgproj M src/arch/arm/fastmodel/CortexR52/x4/x4.sgproj M src/arch/arm/fastmodel/GIC/GIC.sgproj M src/arch/arm/fastmodel/PL330_DMAC/PL330.sgproj M src/arch/arm/fastmodel/SConscript 11 files changed, 4 insertions(+), 19 deletions(-) diff --git a/src/arch/arm/fastmodel/CortexA76/x1/x1.sgproj b/src/arch/arm/fastmodel/CortexA76/x1/x1.sgproj index f3fd0db..7101b49 100644 --- a/src/arch/arm/fastmodel/CortexA76/x1/x1.sgproj +++ b/src/arch/arm/fastmodel/CortexA76/x1/x1.sgproj @@ -16,8 +16,6 @@ SIMGEN_COMMAND_LINE = "--num-comps-file 50"; TARGET_SYSTEMC = "1"; TARGET_SYSTEMC_AUTO = "1"; - - INCLUDE_DIRS="../../../../../"; } files { diff --git a/src/arch/arm/fastmodel/CortexA76/x2/x2.sgproj b/src/arch/arm/fastmodel/CortexA76/x2/x2.sgproj index abec8ad..54327dc 100644 --- a/src/arch/arm/fastmodel/CortexA76/x2/x2.sgproj +++ b/src/arch/arm/fastmodel/CortexA76/x2/x2.sgproj @@ -16,8 +16,6 @@ SIMGEN_COMMAND_LINE = "--num-comps-file 50"; TARGET_SYSTEMC = "1"; TARGET_SYSTEMC_AUTO = "1"; - - INCLUDE_DIRS="../../../../../"; } files { diff --git a/src/arch/arm/fastmodel/CortexA76/x3/x3.sgproj b/src/arch/arm/fastmodel/CortexA76/x3/x3.sgproj index 666b1dc..5809b31 100644 --- a/src/arch/arm/fastmodel/CortexA76/x3/x3.sgproj +++ b/src/arch/arm/fastmodel/CortexA76/x3/x3.sgproj @@ -16,8 +16,6 @@ SIMGEN_COMMAND_LINE = "--num-comps-file 50"; TARGET_SYSTEMC = "1"; TARGET_SYSTEMC_AUTO = "1"; - - INCLUDE_DIRS="../../../../../"; } files { diff --git a/src/arch/arm/fastmodel/CortexA76/x4/x4.sgproj b/src/arch/arm/fastmodel/CortexA76/x4/x4.sgproj index e3c9063..1866c98 100644 --- a/src/arch/arm/fastmodel/CortexA76/x4/x4.sgproj +++ b/src/arch/arm/fastmodel/CortexA76/x4/x4.sgproj @@ -16,8 +16,6 @@ SIMGEN_COMMAND_LINE = "--num-comps-file 50"; TARGET_SYSTEMC = "1"; TARGET_SYSTEMC_AUTO = "1"; - - INCLUDE_DIRS="../../../../../"; } files { diff --git a/src/arch/arm/fastmodel/CortexR52/x1/x1.sgproj b/src/arch/arm/fastmodel/CortexR52/x1/x1.sgproj index 9d2a574..83c0584 100644 --- a/src/arch/arm/fastmodel/CortexR52/x1/x1.sgproj +++ b/src/arch/arm/fastmodel/CortexR52/x1/x1.sgproj @@ -16,8 +16,6 @@ SIMGEN_COMMAND_LINE = "--num-comps-file 50"; TARGET_SYSTEMC = "1"; TARGET_SYSTEMC_AUTO = "1"; - - INCLUDE_DIRS="../../../../../"; } files { diff --git a/src/arch/arm/fastmodel/CortexR52/x2/x2.sgproj b/src/arch/arm/fastmodel/CortexR52/x2/x2.sgproj index e103170..ab8399a 100644 --- a/src/arch/arm/fastmodel/CortexR52/x2/x2.sgproj +++ b/src/arch/arm/fastmodel/CortexR52/x2/x2.sgproj @@ -16,8 +16,6 @@ SIMGEN_COMMAND_LINE = "--num-comps-file 50"; TARGET_SYSTEMC = "1"; TARGET_SYSTEMC_AUTO = "1"; - - INCLUDE_DIRS="../../../../../"; } files { diff --git a/src/arch/arm/fastmodel/CortexR52/x3/x3.sgproj b/src/arch/arm/fastmodel/CortexR52/x3/x3.sgproj index 0c92809..a9bfa3f 100644 --- a/src/arch/arm/fastmodel/CortexR52/x3/x3.sgproj +++ b/src/arch/arm/fastmodel/CortexR52/x3/x3.sgproj @@ -16,8 +16,6 @@ SIMGEN_COMMAND_LINE = "--num-comps-file 50"; TARGET_SYSTEMC = "1"; TARGET_SYSTEMC_AUTO = "1"; - - INCLUDE_DIRS="../../../../../"; } files { diff --git a/src/arch/arm/fastmodel/CortexR52/x4/x4.sgproj b/src/arch/arm/fastmodel/CortexR52/x4/x4.sgproj index 6a145fd..dc33376 100644 --- a/src/arch/arm/fastmodel/CortexR52/x4/x4.sgproj +++ b/src/arch/arm/fastmodel/CortexR52/x4/x4.sgproj @@ -16,8 +16,6 @@ SIMGEN_COMMAND_LINE = "--num-comps-file 50"; TARGET_SYSTEMC = "1"; TARGET_SYSTEMC_AUTO = "1"; - - INCLUDE_DIRS="../../../../../"; } files { diff --git a/src/arch/arm/fastmodel/GIC/GIC.sgproj b/src/arch/arm/fastmodel/GIC/GIC.sgproj index aa5e6ae..fd5c04a 100644 --- a/src/arch/arm/fastmodel/GIC/GIC.sgproj +++ b/src/arch/arm/fastmodel/GIC/GIC.sgproj @@ -5,7 +5,7 @@ ACTIVE_CONFIG_WINDOWS = "Win64-Release-VC2015"; config "gcc" { - ADDITIONAL_COMPILER_SETTINGS = "-O3 -Wall -std=c++14 -Wno-deprecated -Wno-unused-function -I../../../../../"; + ADDITIONAL_COMPILER_SETTINGS = "-O3 -Wall -std=c++14 -Wno-deprecated -Wno-unused-function"; ADDITIONAL_LINKER_SETTINGS = "-Wl,--no-undefined"; BUILD_DIR = "./gcc"; COMPILER = "gcc-7.3"; diff --git a/src/arch/arm/fastmodel/PL330_DMAC/PL330.sgproj b/src/arch/arm/fastmodel/PL330_DMAC/PL330.sgproj index d59849c..c972ad7 100644 --- a/src/arch/arm/fastmodel/PL330_DMAC/PL330.sgproj +++ b/src/arch/arm/fastmodel/PL330_DMAC/PL330.sgproj @@ -5,7 +5,7 @@ ACTIVE_CONFIG_WINDOWS = "Win64-Release-VC2015"; config "gcc" { - ADDITIONAL_COMPILER_SETTINGS = "-O3 -Wall -std=c++14 -Wno-deprecated -Wno-unused-function -I../../../../../"; + ADDITIONAL_COMPILER_SETTINGS = "-O3 -Wall -std=c++14 -Wno-deprecated -Wno-unused-function"; ADDITIONAL_LINKER_SETTINGS = "-Wl,--no-undefined"; BUILD_DIR = "./gcc"; COMPILER = "gcc-7.3"; diff --git a/src/arch/arm/fastmodel/SConscript b/src/arch/arm/fastmodel/SConscript index 0a81e9e..7c6019e 100644 --- a/src/arch/arm/fastmodel/SConscript +++ b/src/arch/arm/fastmodel/SConscript @@ -376,11 +376,12 @@ self.rpaths = [simgen_dir, project_file_dir] self.log = gen_dir.File('build_%s.log' % tlc) self.simgen_cmd = env.subst('${CONF["SIMGEN"]} -p %s ' - '--configuration %s -b --verbose off --num-build-cpus %d %s ' + '--configuration %s -b --verbose off --num-build-cpus %d -I %s %s ' '--build-dir %s >%s') % \ (shlex.quote(project_file.srcnode().abspath), shlex.quote(config_name), GetOption('num_jobs'), + shlex.quote(Dir('#/src').srcnode().abspath), simgen_command_line, shlex.quote(simgen_dir.abspath), shlex.quote(self.log.abspath)) -- To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/71118?usp=email To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: public/gem5 Gerrit-Branch: develop Gerrit-Change-Id: I2a3748646567635d131a8fb4099e02e332691e97 Gerrit-Change-Number: 71118 Gerrit-PatchSet: 1 Gerrit-Owner: Yu-hsin Wang <yuhsingw@google.com>