[gem5-dev] [S] Change in gem5/gem5[develop]: cpu-o3: Resolve the skid buffer overflow issue at decode stage

2023-01-05 Thread Hanhwi Jang (Gerrit) via gem5-dev
Hanhwi Jang has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/67231?usp=email )


Change subject: cpu-o3: Resolve the skid buffer overflow issue at decode  
stage

..

cpu-o3: Resolve the skid buffer overflow issue at decode stage

When decode width is larger than fetch width, the skid buffer
overflow happens at decode stage. The decode stage assumes
that fetch stage sends instructions as many as the fetch width,
but it sends them at decode width rate.

This patch makes the decode stage set its skid buffer size
according to the decode width.

Change-Id: I90ee43d16c59a4c9305c77bbfad7e4cdb2b9cffa
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/67231
Maintainer: Jason Lowe-Power 
Reviewed-by: Jason Lowe-Power 
Reviewed-by: Hanhwi Jang 
Reviewed-by: Tom Rollet 
Tested-by: kokoro 
---
M src/cpu/o3/decode.cc
1 file changed, 24 insertions(+), 1 deletion(-)

Approvals:
  Tom Rollet: Looks good to me, but someone else must approve
  Jason Lowe-Power: Looks good to me, but someone else must approve; Looks  
good to me, approved

  kokoro: Regressions pass
  Hanhwi Jang: Looks good to me, approved




diff --git a/src/cpu/o3/decode.cc b/src/cpu/o3/decode.cc
index 9555e32..ac728a2 100644
--- a/src/cpu/o3/decode.cc
+++ b/src/cpu/o3/decode.cc
@@ -77,7 +77,7 @@
  decodeWidth, static_cast(MaxWidth));

 // @todo: Make into a parameter
-skidBufferMax = (fetchToDecodeDelay + 1) *  params.fetchWidth;
+skidBufferMax = (fetchToDecodeDelay + 1) *  params.decodeWidth;
 for (int tid = 0; tid < MaxThreads; tid++) {
 stalls[tid] = {false};
 decodeStatus[tid] = Idle;

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


Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I90ee43d16c59a4c9305c77bbfad7e4cdb2b9cffa
Gerrit-Change-Number: 67231
Gerrit-PatchSet: 2
Gerrit-Owner: Hanhwi Jang 
Gerrit-Reviewer: Hanhwi Jang 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: Tom Rollet 
Gerrit-Reviewer: kokoro 
Gerrit-MessageType: merged
___
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org


[gem5-dev] [S] Change in gem5/gem5[develop]: cpu-o3: Resolve the skid buffer overflow issue at decode stage

2023-01-04 Thread Hanhwi Jang (Gerrit) via gem5-dev
Hanhwi Jang has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/67231?usp=email )



Change subject: cpu-o3: Resolve the skid buffer overflow issue at decode  
stage

..

cpu-o3: Resolve the skid buffer overflow issue at decode stage

When decode width is larger than fetch width, the skid buffer
overflow happens at decode stage. The decode stage assumes
that fetch stage sends instructions as many as the fetch width,
but it sends them at decode width rate.

This patch makes the decode stage set its skid buffer size
according to the decode width.

Change-Id: I90ee43d16c59a4c9305c77bbfad7e4cdb2b9cffa
---
M src/cpu/o3/decode.cc
1 file changed, 18 insertions(+), 1 deletion(-)



diff --git a/src/cpu/o3/decode.cc b/src/cpu/o3/decode.cc
index 9555e32..ac728a2 100644
--- a/src/cpu/o3/decode.cc
+++ b/src/cpu/o3/decode.cc
@@ -77,7 +77,7 @@
  decodeWidth, static_cast(MaxWidth));

 // @todo: Make into a parameter
-skidBufferMax = (fetchToDecodeDelay + 1) *  params.fetchWidth;
+skidBufferMax = (fetchToDecodeDelay + 1) *  params.decodeWidth;
 for (int tid = 0; tid < MaxThreads; tid++) {
 stalls[tid] = {false};
 decodeStatus[tid] = Idle;

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


Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I90ee43d16c59a4c9305c77bbfad7e4cdb2b9cffa
Gerrit-Change-Number: 67231
Gerrit-PatchSet: 1
Gerrit-Owner: Hanhwi Jang 
Gerrit-MessageType: newchange
___
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org


[gem5-dev] Change in gem5/gem5[develop]: scons: Rerun configuration tests with "config=force"

2021-04-07 Thread Hanhwi Jang (Gerrit) via gem5-dev
Hanhwi Jang has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/44265 )



Change subject: scons: Rerun configuration tests with "config=force"
..

scons: Rerun configuration tests with "config=force"

Scons uses cached results for configuration tests, which leads to
compilation issues by the stale result use.
This patch allows users to rerun configuration tests using the
"config=force" option without deleting cache manually.

Change-Id: I61244c1daf963272a4b5a3d0e72101afefa82491
---
M SConstruct
M ext/systemc/SConscript
M src/base/SConsopts
M src/base/stats/SConsopts
M src/cpu/kvm/SConsopts
M src/dev/net/SConsopts
M src/proto/SConsopts
M src/sim/SConsopts
8 files changed, 88 insertions(+), 84 deletions(-)



diff --git a/SConstruct b/SConstruct
index b99ecdb..c5aa384 100755
--- a/SConstruct
+++ b/SConstruct
@@ -291,49 +291,53 @@

 # Platform-specific configuration.  Note again that we assume that all
 # builds under a given build root run on the same host platform.
+# From this point, we use 'penv' instead of 'main' to isolate
+# the platform-specific environment updates.
+# main env. is updated at the end of this section with conf.Finish()
 conf = gem5_scons.Configure(main)
+penv = conf.env

-CXX_version = readCommand([main['CXX'], '--version'], exception=False)
+CXX_version = readCommand([penv['CXX'], '--version'], exception=False)

-main['GCC'] = CXX_version and CXX_version.find('g++') >= 0
-main['CLANG'] = CXX_version and CXX_version.find('clang') >= 0
-if main['GCC'] + main['CLANG'] > 1:
+penv['GCC'] = CXX_version and CXX_version.find('g++') >= 0
+penv['CLANG'] = CXX_version and CXX_version.find('clang') >= 0
+if penv['GCC'] + penv['CLANG'] > 1:
 error('Two compilers enabled at once?')

 # Set up default C++ compiler flags
-if main['GCC'] or main['CLANG']:
+if penv['GCC'] or penv['CLANG']:
 # As gcc and clang share many flags, do the common parts here
-main.Append(CCFLAGS=['-pipe'])
-main.Append(CCFLAGS=['-fno-strict-aliasing'])
+penv.Append(CCFLAGS=['-pipe'])
+penv.Append(CCFLAGS=['-fno-strict-aliasing'])

 # Enable -Wall and -Wextra and then disable the few warnings that
 # we consistently violate
-main.Append(CCFLAGS=['-Wall', '-Wundef', '-Wextra',
+penv.Append(CCFLAGS=['-Wall', '-Wundef', '-Wextra',
  '-Wno-sign-compare', '-Wno-unused-parameter'])

 # We always compile using C++14
-main.Append(CXXFLAGS=['-std=c++14'])
+penv.Append(CXXFLAGS=['-std=c++14'])

 if sys.platform.startswith('freebsd'):
-main.Append(CCFLAGS=['-I/usr/local/include'])
-main.Append(CXXFLAGS=['-I/usr/local/include'])
+penv.Append(CCFLAGS=['-I/usr/local/include'])
+penv.Append(CXXFLAGS=['-I/usr/local/include'])
 # On FreeBSD we need libthr.
-main.Append(LIBS=['thr'])
+penv.Append(LIBS=['thr'])

 conf.CheckLinkFlag('-Wl,--as-needed')
 if GetOption('gold_linker'):
-main.Append(LINKFLAGS='-fuse-ld=gold')
+penv.Append(LINKFLAGS='-fuse-ld=gold')

 # Treat warnings as errors but white list some warnings that we
 # want to allow (e.g., deprecation warnings).
-main.Append(CCFLAGS=['-Werror',
+penv.Append(CCFLAGS=['-Werror',
  '-Wno-error=deprecated-declarations',
  '-Wno-error=deprecated',
 ])
 else:
 error('\n'.join((
   "Don't know what compiler options to use for your compiler.",
-  "compiler: " + main['CXX'],
+  "compiler: " + penv['CXX'],
   "version: " + CXX_version.replace('\n', '') if
 CXX_version else 'COMMAND NOT FOUND!',
   "If you're trying to use a compiler other than GCC",
@@ -344,10 +348,10 @@
   "above you will need to ease fix SConstruct and ",
   "src/SConscript to support that compiler.")))

-if main['GCC']:
-if compareVersions(main['CXXVERSION'], "5") < 0:
+if penv['GCC']:
+if compareVersions(penv['CXXVERSION'], "5") < 0:
 error('gcc version 5 or newer required.\n'
-  'Installed version:', main['CXXVERSION'])
+  'Installed version:', penv['CXXVERSION'])

 # If not disabled, set the Link-Time Optimization (LTO) flags.
 if not GetOption('no_lto'):
@@ -355,7 +359,7 @@
 # the environment variable "MAKE", but we currently make no  
attempt to

 # plumb that variable through.
 parallelism = ''
-if main.Detect('make'):
+if penv.Detect('make'):
 parallelism = '=%d' % GetOption('num_jobs')
 else:
 warning('"make" not found, link time optimization will be '
@@ -363,32 +367,32 @@

 for var in 'LTO_CCFLAGS', 'LTO_LDFLAGS':
 # Use the same amount of jobs for LTO as we are running scons  
with.

-main[var] = ['-flto%s' % parallelism]
+