[gem5-dev] Change in gem5/gem5[develop]: scons: Get rid of special handling of the _m5 package.

2021-08-27 Thread Gabe Black (Gerrit) via gem5-dev
Gabe Black has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/48362 )




4 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the  
submitted one.

Change subject: scons: Get rid of special handling of the _m5 package.
..

scons: Get rid of special handling of the _m5 package.

This package is handled specially by the DictImporter used during the
build, and an assert shows that that code is never actually used. That
makes sense, since _m5 won't be added to gem5 using the PySource
mechanism.

Change-Id: I36a39f1ebb94a7620c8ba296e0fe856bd33285f9
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48362
Tested-by: kokoro 
Reviewed-by: Bobby R. Bruce 
Reviewed-by: Jason Lowe-Power 
Maintainer: Gabe Black 
---
M src/SConscript
1 file changed, 0 insertions(+), 3 deletions(-)

Approvals:
  Jason Lowe-Power: Looks good to me, but someone else must approve
  Bobby R. Bruce: Looks good to me, approved
  Gabe Black: Looks good to me, approved
  kokoro: Regressions pass




diff --git a/src/SConscript b/src/SConscript
index a99f2a1..c518b36 100644
--- a/src/SConscript
+++ b/src/SConscript
@@ -769,9 +769,6 @@
 if fullname == 'm5.objects':
 return self

-if fullname.startswith('_m5'):
-return None
-
 source = self.modules.get(fullname, None)
 if source is not None and fullname.startswith('m5.objects'):
 return self

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/48362
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: I36a39f1ebb94a7620c8ba296e0fe856bd33285f9
Gerrit-Change-Number: 48362
Gerrit-PatchSet: 6
Gerrit-Owner: Gabe Black 
Gerrit-Reviewer: Andreas Sandberg 
Gerrit-Reviewer: Bobby Bruce 
Gerrit-Reviewer: Bobby R. Bruce 
Gerrit-Reviewer: Daniel Carvalho 
Gerrit-Reviewer: Gabe Black 
Gerrit-Reviewer: Giacomo Travaglini 
Gerrit-Reviewer: Jason Lowe-Power 
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
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

[gem5-dev] Change in gem5/gem5[develop]: scons: Turn the Blob method into a builder.

2021-08-27 Thread Gabe Black (Gerrit) via gem5-dev
Gabe Black has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/48136 )




5 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the  
submitted one.

Change subject: scons: Turn the Blob method into a builder.
..

scons: Turn the Blob method into a builder.

Build the blob .cc and .hh files in the same directory as the file
they're based off of. Move the GDB XML files into the arch directories
they go with.

Change-Id: I12fe48873312c3aba5910989d6e3049ebd5e5bbf
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48136
Reviewed-by: Gabe Black 
Reviewed-by: Bobby R. Bruce 
Maintainer: Gabe Black 
Tested-by: kokoro 
---
M SConstruct
M src/SConscript
M src/arch/arm/SConscript
A src/arch/arm/gdb-xml/SConscript
R src/arch/arm/gdb-xml/aarch64-core.xml
R src/arch/arm/gdb-xml/aarch64-fpu.xml
R src/arch/arm/gdb-xml/aarch64.xml
R src/arch/arm/gdb-xml/arm-core.xml
R src/arch/arm/gdb-xml/arm-vfpv3.xml
R src/arch/arm/gdb-xml/arm-with-neon.xml
M src/arch/arm/remote_gdb.cc
M src/arch/mips/SConscript
A src/arch/mips/gdb-xml/SConscript
R src/arch/mips/gdb-xml/mips.xml
M src/arch/mips/remote_gdb.cc
M src/arch/power/SConscript
A src/arch/power/gdb-xml/SConscript
R src/arch/power/gdb-xml/power-core.xml
R src/arch/power/gdb-xml/power-fpu.xml
R src/arch/power/gdb-xml/power64-core.xml
R src/arch/power/gdb-xml/powerpc-32.xml
R src/arch/power/gdb-xml/powerpc-64.xml
M src/arch/power/remote_gdb.cc
M src/arch/riscv/SConscript
A src/arch/riscv/gdb-xml/SConscript
R src/arch/riscv/gdb-xml/riscv-64bit-cpu.xml
R src/arch/riscv/gdb-xml/riscv-64bit-csr.xml
R src/arch/riscv/gdb-xml/riscv-64bit-fpu.xml
R src/arch/riscv/gdb-xml/riscv.xml
M src/arch/riscv/remote_gdb.cc
30 files changed, 229 insertions(+), 85 deletions(-)

Approvals:
  Gabe Black: Looks good to me, but someone else must approve; Looks good  
to me, approved

  Bobby R. Bruce: Looks good to me, approved
  kokoro: Regressions pass




diff --git a/SConstruct b/SConstruct
index 4091d4b..396dc59 100755
--- a/SConstruct
+++ b/SConstruct
@@ -619,9 +619,6 @@
 main.SConscript(os.path.join(root, 'SConscript'),
 variant_dir=os.path.join(build_root, build_dir))

-gdb_xml_dir = os.path.join(ext_dir, 'gdb-xml')
-Export('gdb_xml_dir')
-

 
 #
diff --git a/src/SConscript b/src/SConscript
index a92dd17..a99f2a1 100644
--- a/src/SConscript
+++ b/src/SConscript
@@ -287,71 +287,69 @@
 code.dedent()
 code('};')

-def blobToCpp(data, symbol, cpp_code, hpp_code, namespace):
+def build_blob(target, source, env):
 '''
-Convert bytes data into C++ .cpp and .hh uint8_t byte array
-code containing that binary data.
+Embed an arbitrary blob into the gem5 executable,
+and make it accessible to C++ as a byte array.
+'''

-:param data: binary data to be converted to C++
-:param symbol: name of the symbol
-:param cpp_code: append the generated cpp_code to this object
-:param hpp_code: append the generated hpp_code to this object
- Also include it in the .cpp file.
-:param namespace: namespace to put the symbol into.
-'''
-hpp_code('''\
+with open(str(source[0]), 'rb') as f:
+data = f.read()
+symbol = str(source[1])
+cc, hh = target
+
+hh_code = code_formatter()
+hh_code('''\
 #include 
 #include 

-namespace ${namespace}
+namespace gem5
+{
+namespace Blobs
 {

 extern const std::size_t ${symbol}_len;
 extern const std::uint8_t ${symbol}[];

-}
+} // namespace Blobs
+} // namespace gem5
 ''')
+hh_code.write(str(hh))

-cpp_code('''\
-#include "blobs/${symbol}.hh"
+include_path = os.path.relpath(hh.abspath, env['BUILDDIR'])

-namespace ${namespace}
+cc_code = code_formatter()
+cc_code('''\
+#include "${include_path}"
+
+namespace gem5
+{
+namespace Blobs
 {

 const std::size_t ${symbol}_len = ${{len(data)}};
 ''')
-bytesToCppArray(cpp_code, symbol, data)
-cpp_code('} // namespace ${namespace}')
+bytesToCppArray(cc_code, symbol, data)
+cc_code('''
+} // namespace Blobs
+} // namespace gem5
+''')
+cc_code.write(str(cc))

-def Blob(blob_path, symbol):
-'''
-Embed an arbitrary blob into the gem5 executable,
-and make it accessible to C++ as a byte array.
-'''
-blob_path = os.path.abspath(blob_path)
-blob_out_dir = os.path.join(env['BUILDDIR'], 'blobs')
-path_noext = os.path.join(blob_out_dir, symbol)
-cpp_path = path_noext + '.cc'
-hpp_path = path_noext + '.hh'
-def embedBlob(target, source, env):
-with open(str(source[0]), 'rb') as f:
-data = f.read()
-cpp_code = code_formatter()
-hpp_code = code_formatter()
-blobToCpp(data, symbol, cpp_code, hpp_code, namespace='Blobs')
-cpp_path = str(target[0])
-hpp_path = 

[gem5-dev] Change in gem5/gem5[develop]: systemc: Stop including mem/port.hh from the systemc headers.

2021-08-27 Thread Gabe Black (Gerrit) via gem5-dev
Gabe Black has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/49618 )


Change subject: systemc: Stop including mem/port.hh from the systemc  
headers.

..

systemc: Stop including mem/port.hh from the systemc headers.

The systemc headers are supposed to be hermetic, so that they can be
included from generic systemc code without any dependency on the gem5
code base, at least when the systemc components are compiled, outside
of those header files themselves. It should be possible to copy the
"ext" directory out of the tree and make it available to systemc code,
and that code should be compileable.

Change-Id: Iec16a534ac04c7895cd8a30940b0acf64c257dde
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49618
Maintainer: Bobby R. Bruce 
Tested-by: kokoro 
Reviewed-by: Gabe Black 
---
M src/systemc/ext/core/sc_module.hh
1 file changed, 5 insertions(+), 2 deletions(-)

Approvals:
  Gabe Black: Looks good to me, approved
  Bobby R. Bruce: Looks good to me, approved
  kokoro: Regressions pass




diff --git a/src/systemc/ext/core/sc_module.hh  
b/src/systemc/ext/core/sc_module.hh

index e92b681..ea3af78 100644
--- a/src/systemc/ext/core/sc_module.hh
+++ b/src/systemc/ext/core/sc_module.hh
@@ -31,7 +31,6 @@
 #include 
 #include 

-#include "mem/port.hh"
 #include "sc_object.hh"
 #include "sc_process_handle.hh"
 #include "sc_sensitive.hh"
@@ -58,9 +57,13 @@

 } // namespace sc_gem5

-// Gem5 prototype
+namespace gem5
+{
+
 class Port;

+} // namespace gem5
+
 namespace sc_core
 {


--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/49618
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: Iec16a534ac04c7895cd8a30940b0acf64c257dde
Gerrit-Change-Number: 49618
Gerrit-PatchSet: 2
Gerrit-Owner: Gabe Black 
Gerrit-Reviewer: Andreas Sandberg 
Gerrit-Reviewer: Bobby R. Bruce 
Gerrit-Reviewer: Gabe Black 
Gerrit-Reviewer: Jui-min Lee 
Gerrit-Reviewer: Yu-hsin Wang 
Gerrit-Reviewer: kokoro 
Gerrit-CC: Gabe Black 
Gerrit-MessageType: merged
___
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

[gem5-dev] Change in gem5/gem5[develop]: mem,base: Fix signed/unsigned comparison warnings/errors.

2021-08-27 Thread Gabe Black (Gerrit) via gem5-dev
Gabe Black has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/49616 )


Change subject: mem,base: Fix signed/unsigned comparison warnings/errors.
..

mem,base: Fix signed/unsigned comparison warnings/errors.

Change-Id: Icf477f4b0c162f0174216e511960d0e76db313ae
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49616
Reviewed-by: Bobby R. Bruce 
Maintainer: Bobby R. Bruce 
Tested-by: kokoro 
---
M src/base/addr_range.hh
M src/mem/packet.hh
2 files changed, 8 insertions(+), 8 deletions(-)

Approvals:
  Bobby R. Bruce: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass




diff --git a/src/base/addr_range.hh b/src/base/addr_range.hh
index 640f692..04dc8ec 100644
--- a/src/base/addr_range.hh
+++ b/src/base/addr_range.hh
@@ -334,7 +334,7 @@
 {
 if (interleaved()) {
 std::string str;
-for (int i = 0; i < masks.size(); i++) {
+for (unsigned int i = 0; i < masks.size(); i++) {
 str += " ";
 Addr mask = masks[i];
 while (mask) {
@@ -443,7 +443,7 @@
 bool in_range = a >= _start && a < _end;
 if (in_range) {
 auto sel = 0;
-for (int i = 0; i < masks.size(); i++) {
+for (unsigned int i = 0; i < masks.size(); i++) {
 Addr masked = a & masks[i];
 // The result of an xor operation is 1 if the number
 // of bits set is odd or 0 othersize, thefore it
@@ -490,7 +490,7 @@

 // Get the LSB set from each mask
 int masks_lsb[masks.size()];
-for (int i = 0; i < masks.size(); i++) {
+for (unsigned int i = 0; i < masks.size(); i++) {
 masks_lsb[i] = ctz64(masks[i]);
 }

@@ -498,7 +498,7 @@
 // discard them one by one starting.
 std::sort(masks_lsb, masks_lsb + masks.size());

-for (int i = 0; i < masks.size(); i++) {
+for (unsigned int i = 0; i < masks.size(); i++) {
 const int intlv_bit = masks_lsb[i];
 if (intlv_bit > 0) {
 // on every iteration we remove one bit from the input
@@ -528,13 +528,13 @@

 // Get the LSB set from each mask
 int masks_lsb[masks.size()];
-for (int i = 0; i < masks.size(); i++) {
+for (unsigned int i = 0; i < masks.size(); i++) {
 masks_lsb[i] = ctz64(masks[i]);
 }

 // Add bits one-by-one from the LSB side.
 std::sort(masks_lsb, masks_lsb + masks.size());
-for (int i = 0; i < masks.size(); i++) {
+for (unsigned int i = 0; i < masks.size(); i++) {
 const int intlv_bit = masks_lsb[i];
 if (intlv_bit > 0) {
 // on every iteration we add one bit from the input
@@ -547,7 +547,7 @@
 }
 }

-for (int i = 0; i < masks.size(); i++) {
+for (unsigned int i = 0; i < masks.size(); i++) {
 const int lsb = ctz64(masks[i]);
 const Addr intlv_bit = bits(intlvMatch, i);
 // Calculate the mask ignoring the LSB
diff --git a/src/mem/packet.hh b/src/mem/packet.hh
index 1283ac9..88995f1 100644
--- a/src/mem/packet.hh
+++ b/src/mem/packet.hh
@@ -1286,7 +1286,7 @@
 assert(req->getByteEnable().size() == getSize());
 // Write only the enabled bytes
 const uint8_t *base = getConstPtr();
-for (int i = 0; i < getSize(); i++) {
+for (unsigned int i = 0; i < getSize(); i++) {
 if (req->getByteEnable()[i]) {
 p[i] = *(base + i);
 }

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/49616
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: Icf477f4b0c162f0174216e511960d0e76db313ae
Gerrit-Change-Number: 49616
Gerrit-PatchSet: 2
Gerrit-Owner: Gabe Black 
Gerrit-Reviewer: Andreas Sandberg 
Gerrit-Reviewer: Bobby Bruce 
Gerrit-Reviewer: Bobby R. Bruce 
Gerrit-Reviewer: Daniel Carvalho 
Gerrit-Reviewer: Gabe Black 
Gerrit-Reviewer: Jui-min Lee 
Gerrit-Reviewer: Nikos Nikoleris 
Gerrit-Reviewer: Yu-hsin Wang 
Gerrit-Reviewer: kokoro 
Gerrit-CC: Gabe Black 
Gerrit-MessageType: merged
___
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

[gem5-dev] Change in gem5/gem5[develop]: sim: Explicitly specify the namespace of serialization helpers.

2021-08-27 Thread Gabe Black (Gerrit) via gem5-dev
Gabe Black has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/49619 )


Change subject: sim: Explicitly specify the namespace of serialization  
helpers.

..

sim: Explicitly specify the namespace of serialization helpers.

That makes them work when not calling from the gem5 namespace.

Change-Id: If238d837f91d2c1b8ca58c9c3e08aed8cb0af28a
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49619
Reviewed-by: Jason Lowe-Power 
Maintainer: Jason Lowe-Power 
Tested-by: kokoro 
---
M src/sim/serialize.hh
1 file changed, 7 insertions(+), 7 deletions(-)

Approvals:
  Jason Lowe-Power: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass




diff --git a/src/sim/serialize.hh b/src/sim/serialize.hh
index 9687423..15be41f 100644
--- a/src/sim/serialize.hh
+++ b/src/sim/serialize.hh
@@ -598,7 +598,7 @@
 #define UNSERIALIZE_ENUM(scalar)\
 do {\
 int tmp;\
-paramIn(cp, #scalar, tmp);  \
+::gem5::paramIn(cp, #scalar, tmp);  \
 scalar = static_cast(tmp);\
 } while (0)

@@ -608,7 +608,7 @@
  * @ingroup api_serialize
  */
 #define SERIALIZE_ARRAY(member, size)   \
-arrayParamOut(cp, #member, member, size)
+::gem5::arrayParamOut(cp, #member, member, size)

 /**
  * \def UNSERIALIZE_ARRAY(member, size)
@@ -616,7 +616,7 @@
  * @ingroup api_serialize
  */
 #define UNSERIALIZE_ARRAY(member, size) \
-arrayParamIn(cp, #member, member, size)
+::gem5::arrayParamIn(cp, #member, member, size)

 /**
  * \def SERIALIZE_CONTAINER(member)
@@ -624,7 +624,7 @@
  * @ingroup api_serialize
  */
 #define SERIALIZE_CONTAINER(member) \
-arrayParamOut(cp, #member, member)
+::gem5::arrayParamOut(cp, #member, member)

 /**
  * \def UNSERIALIZE_CONTAINER(member)
@@ -632,7 +632,7 @@
  * @ingroup api_serialize
  */
 #define UNSERIALIZE_CONTAINER(member)   \
-arrayParamIn(cp, #member, member)
+::gem5::arrayParamIn(cp, #member, member)

 /**
  * \def SERIALIZE_OBJ(obj)
@@ -658,13 +658,13 @@
  * \def SERIALIZE_MAPPING(member, names, size)
  */
 #define SERIALIZE_MAPPING(member, names, size) \
-mappingParamOut(cp, #member, names, member, size)
+::gem5::mappingParamOut(cp, #member, names, member, size)

 /**
  * \def UNSERIALIZE_MAPPING(member, names, size)
  */
 #define UNSERIALIZE_MAPPING(member, names, size) \
-mappingParamIn(cp, #member, names, member, size)
+::gem5::mappingParamIn(cp, #member, names, member, size)

 } // namespace gem5


--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/49619
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: If238d837f91d2c1b8ca58c9c3e08aed8cb0af28a
Gerrit-Change-Number: 49619
Gerrit-PatchSet: 2
Gerrit-Owner: Gabe Black 
Gerrit-Reviewer: Andreas Sandberg 
Gerrit-Reviewer: Bobby Bruce 
Gerrit-Reviewer: Gabe Black 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: Jui-min Lee 
Gerrit-Reviewer: Yu-hsin Wang 
Gerrit-Reviewer: kokoro 
Gerrit-CC: Gabe Black 
Gerrit-MessageType: merged
___
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

[gem5-dev] Change in gem5/gem5[develop]: fastmodel: Fix for the new gem5 namespace.

2021-08-27 Thread Gabe Black (Gerrit) via gem5-dev
Gabe Black has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/49617 )


Change subject: fastmodel: Fix for the new gem5 namespace.
..

fastmodel: Fix for the new gem5 namespace.

Change-Id: Iacb6291e6ee93aecf5208d283eab9c1b5938bb2b
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49617
Reviewed-by: Bobby R. Bruce 
Maintainer: Bobby R. Bruce 
Tested-by: kokoro 
---
M src/arch/arm/fastmodel/CortexA76/FastModelCortexA76.py
M src/arch/arm/fastmodel/CortexR52/FastModelCortexR52.py
M src/arch/arm/fastmodel/PL330_DMAC/pl330.cc
M src/arch/arm/fastmodel/protocol/ExportedClockRateControlProtocol.lisa
M src/arch/arm/fastmodel/protocol/SignalInterruptProtocol.lisa
5 files changed, 21 insertions(+), 21 deletions(-)

Approvals:
  Bobby R. Bruce: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass




diff --git a/src/arch/arm/fastmodel/CortexA76/FastModelCortexA76.py  
b/src/arch/arm/fastmodel/CortexA76/FastModelCortexA76.py

index 8ce0a52..c7d46ff 100644
--- a/src/arch/arm/fastmodel/CortexA76/FastModelCortexA76.py
+++ b/src/arch/arm/fastmodel/CortexA76/FastModelCortexA76.py
@@ -366,8 +366,8 @@

 class FastModelScxEvsCortexA76x1(SystemC_ScModule):
 type = 'FastModelScxEvsCortexA76x1'
-cxx_class = \
-'gem5::fastmodel::ScxEvsCortexA76'
+cxx_class = 'gem5::fastmodel::ScxEvsCortexA76<' \
+'gem5::fastmodel::ScxEvsCortexA76x1Types>'
 cxx_template_params = [ 'class Types' ]
 cxx_header = 'arch/arm/fastmodel/CortexA76/evs.hh'

@@ -378,8 +378,8 @@

 class FastModelScxEvsCortexA76x2(SystemC_ScModule):
 type = 'FastModelScxEvsCortexA76x2'
-cxx_class = \
-'gem5::fastmodel::ScxEvsCortexA76'
+cxx_class = 'gem5::fastmodel::ScxEvsCortexA76<' \
+'gem5::fastmodel::ScxEvsCortexA76x2Types>'
 cxx_template_params = [ 'class Types' ]
 cxx_header = 'arch/arm/fastmodel/CortexA76/evs.hh'

@@ -391,8 +391,8 @@

 class FastModelScxEvsCortexA76x3(SystemC_ScModule):
 type = 'FastModelScxEvsCortexA76x3'
-cxx_class = \
-'gem5::fastmodel::ScxEvsCortexA76'
+cxx_class = 'gem5::fastmodel::ScxEvsCortexA76<' \
+'gem5::fastmodel::ScxEvsCortexA76x3Types>'
 cxx_template_params = [ 'class Types' ]
 cxx_header = 'arch/arm/fastmodel/CortexA76/evs.hh'

@@ -405,8 +405,8 @@

 class FastModelScxEvsCortexA76x4(SystemC_ScModule):
 type = 'FastModelScxEvsCortexA76x4'
-cxx_class = \
-'gem5::fastmodel::ScxEvsCortexA76'
+cxx_class = 'gem5::fastmodel::ScxEvsCortexA76<' \
+'gem5::fastmodel::ScxEvsCortexA76x4Types>'
 cxx_template_params = [ 'class Types' ]
 cxx_header = 'arch/arm/fastmodel/CortexA76/evs.hh'

diff --git a/src/arch/arm/fastmodel/CortexR52/FastModelCortexR52.py  
b/src/arch/arm/fastmodel/CortexR52/FastModelCortexR52.py

index 7c8a0fa..9404edf 100644
--- a/src/arch/arm/fastmodel/CortexR52/FastModelCortexR52.py
+++ b/src/arch/arm/fastmodel/CortexR52/FastModelCortexR52.py
@@ -171,8 +171,8 @@

 class FastModelScxEvsCortexR52x1(SystemC_ScModule):
 type = 'FastModelScxEvsCortexR52x1'
-cxx_class = \
-'gem5::fastmodel::ScxEvsCortexR52'
+cxx_class = 'gem5::fastmodel::ScxEvsCortexR52<' \
+'gem5::fastmodel::ScxEvsCortexR52x1Types>'
 cxx_template_params = [ 'class Types' ]
 cxx_header = 'arch/arm/fastmodel/CortexR52/evs.hh'

@@ -183,8 +183,8 @@

 class FastModelScxEvsCortexR52x2(SystemC_ScModule):
 type = 'FastModelScxEvsCortexR52x2'
-cxx_class = \
-'gem5::fastmodel::ScxEvsCortexR52'
+cxx_class = 'gem5::fastmodel::ScxEvsCortexR52<' \
+'gem5::fastmodel::ScxEvsCortexR52x2Types>'
 cxx_template_params = [ 'class Types' ]
 cxx_header = 'arch/arm/fastmodel/CortexR52/evs.hh'

@@ -196,8 +196,8 @@

 class FastModelScxEvsCortexR52x3(SystemC_ScModule):
 type = 'FastModelScxEvsCortexR52x3'
-cxx_class = \
-'gem5::fastmodel::ScxEvsCortexR52'
+cxx_class = 'gem5::fastmodel::ScxEvsCortexR52<' \
+'gem5::fastmodel::ScxEvsCortexR52x3Types>'
 cxx_template_params = [ 'class Types' ]
 cxx_header = 'arch/arm/fastmodel/CortexR52/evs.hh'

@@ -210,8 +210,8 @@

 class FastModelScxEvsCortexR52x4(SystemC_ScModule):
 type = 'FastModelScxEvsCortexR52x4'
-cxx_class = \
-'gem5::fastmodel::ScxEvsCortexR52'
+cxx_class = 'gem5::fastmodel::ScxEvsCortexR52<' \
+'gem5::fastmodel::ScxEvsCortexR52x4Types>'
 cxx_template_params = [ 'class Types' ]
 cxx_header = 'arch/arm/fastmodel/CortexR52/evs.hh'

diff --git a/src/arch/arm/fastmodel/PL330_DMAC/pl330.cc  
b/src/arch/arm/fastmodel/PL330_DMAC/pl330.cc

index 6fe843d..dc3f9ec 100644
--- a/src/arch/arm/fastmodel/PL330_DMAC/pl330.cc
+++ b/src/arch/arm/fastmodel/PL330_DMAC/pl330.cc
@@ -223,7 +223,7 @@
 }
 }

-::Port &
+gem5::Port &
 

[gem5-dev] Change in gem5/gem5[develop]: fastmodel: Fix for the new gem5 namespace.

2021-08-27 Thread Gabe Black (Gerrit) via gem5-dev
Gabe Black has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/49617 )



Change subject: fastmodel: Fix for the new gem5 namespace.
..

fastmodel: Fix for the new gem5 namespace.

Change-Id: Iacb6291e6ee93aecf5208d283eab9c1b5938bb2b
---
M src/arch/arm/fastmodel/CortexA76/FastModelCortexA76.py
M src/arch/arm/fastmodel/CortexR52/FastModelCortexR52.py
M src/arch/arm/fastmodel/PL330_DMAC/pl330.cc
M src/arch/arm/fastmodel/protocol/ExportedClockRateControlProtocol.lisa
M src/arch/arm/fastmodel/protocol/SignalInterruptProtocol.lisa
5 files changed, 21 insertions(+), 21 deletions(-)



diff --git a/src/arch/arm/fastmodel/CortexA76/FastModelCortexA76.py  
b/src/arch/arm/fastmodel/CortexA76/FastModelCortexA76.py

index 8ce0a52..c7d46ff 100644
--- a/src/arch/arm/fastmodel/CortexA76/FastModelCortexA76.py
+++ b/src/arch/arm/fastmodel/CortexA76/FastModelCortexA76.py
@@ -366,8 +366,8 @@

 class FastModelScxEvsCortexA76x1(SystemC_ScModule):
 type = 'FastModelScxEvsCortexA76x1'
-cxx_class = \
-'gem5::fastmodel::ScxEvsCortexA76'
+cxx_class = 'gem5::fastmodel::ScxEvsCortexA76<' \
+'gem5::fastmodel::ScxEvsCortexA76x1Types>'
 cxx_template_params = [ 'class Types' ]
 cxx_header = 'arch/arm/fastmodel/CortexA76/evs.hh'

@@ -378,8 +378,8 @@

 class FastModelScxEvsCortexA76x2(SystemC_ScModule):
 type = 'FastModelScxEvsCortexA76x2'
-cxx_class = \
-'gem5::fastmodel::ScxEvsCortexA76'
+cxx_class = 'gem5::fastmodel::ScxEvsCortexA76<' \
+'gem5::fastmodel::ScxEvsCortexA76x2Types>'
 cxx_template_params = [ 'class Types' ]
 cxx_header = 'arch/arm/fastmodel/CortexA76/evs.hh'

@@ -391,8 +391,8 @@

 class FastModelScxEvsCortexA76x3(SystemC_ScModule):
 type = 'FastModelScxEvsCortexA76x3'
-cxx_class = \
-'gem5::fastmodel::ScxEvsCortexA76'
+cxx_class = 'gem5::fastmodel::ScxEvsCortexA76<' \
+'gem5::fastmodel::ScxEvsCortexA76x3Types>'
 cxx_template_params = [ 'class Types' ]
 cxx_header = 'arch/arm/fastmodel/CortexA76/evs.hh'

@@ -405,8 +405,8 @@

 class FastModelScxEvsCortexA76x4(SystemC_ScModule):
 type = 'FastModelScxEvsCortexA76x4'
-cxx_class = \
-'gem5::fastmodel::ScxEvsCortexA76'
+cxx_class = 'gem5::fastmodel::ScxEvsCortexA76<' \
+'gem5::fastmodel::ScxEvsCortexA76x4Types>'
 cxx_template_params = [ 'class Types' ]
 cxx_header = 'arch/arm/fastmodel/CortexA76/evs.hh'

diff --git a/src/arch/arm/fastmodel/CortexR52/FastModelCortexR52.py  
b/src/arch/arm/fastmodel/CortexR52/FastModelCortexR52.py

index 7c8a0fa..9404edf 100644
--- a/src/arch/arm/fastmodel/CortexR52/FastModelCortexR52.py
+++ b/src/arch/arm/fastmodel/CortexR52/FastModelCortexR52.py
@@ -171,8 +171,8 @@

 class FastModelScxEvsCortexR52x1(SystemC_ScModule):
 type = 'FastModelScxEvsCortexR52x1'
-cxx_class = \
-'gem5::fastmodel::ScxEvsCortexR52'
+cxx_class = 'gem5::fastmodel::ScxEvsCortexR52<' \
+'gem5::fastmodel::ScxEvsCortexR52x1Types>'
 cxx_template_params = [ 'class Types' ]
 cxx_header = 'arch/arm/fastmodel/CortexR52/evs.hh'

@@ -183,8 +183,8 @@

 class FastModelScxEvsCortexR52x2(SystemC_ScModule):
 type = 'FastModelScxEvsCortexR52x2'
-cxx_class = \
-'gem5::fastmodel::ScxEvsCortexR52'
+cxx_class = 'gem5::fastmodel::ScxEvsCortexR52<' \
+'gem5::fastmodel::ScxEvsCortexR52x2Types>'
 cxx_template_params = [ 'class Types' ]
 cxx_header = 'arch/arm/fastmodel/CortexR52/evs.hh'

@@ -196,8 +196,8 @@

 class FastModelScxEvsCortexR52x3(SystemC_ScModule):
 type = 'FastModelScxEvsCortexR52x3'
-cxx_class = \
-'gem5::fastmodel::ScxEvsCortexR52'
+cxx_class = 'gem5::fastmodel::ScxEvsCortexR52<' \
+'gem5::fastmodel::ScxEvsCortexR52x3Types>'
 cxx_template_params = [ 'class Types' ]
 cxx_header = 'arch/arm/fastmodel/CortexR52/evs.hh'

@@ -210,8 +210,8 @@

 class FastModelScxEvsCortexR52x4(SystemC_ScModule):
 type = 'FastModelScxEvsCortexR52x4'
-cxx_class = \
-'gem5::fastmodel::ScxEvsCortexR52'
+cxx_class = 'gem5::fastmodel::ScxEvsCortexR52<' \
+'gem5::fastmodel::ScxEvsCortexR52x4Types>'
 cxx_template_params = [ 'class Types' ]
 cxx_header = 'arch/arm/fastmodel/CortexR52/evs.hh'

diff --git a/src/arch/arm/fastmodel/PL330_DMAC/pl330.cc  
b/src/arch/arm/fastmodel/PL330_DMAC/pl330.cc

index 6fe843d..dc3f9ec 100644
--- a/src/arch/arm/fastmodel/PL330_DMAC/pl330.cc
+++ b/src/arch/arm/fastmodel/PL330_DMAC/pl330.cc
@@ -223,7 +223,7 @@
 }
 }

-::Port &
+gem5::Port &
 PL330::gem5_getPort(const std::string _name, int idx)
 {
 if (if_name == "dma") {
diff --git  
a/src/arch/arm/fastmodel/protocol/ExportedClockRateControlProtocol.lisa  
b/src/arch/arm/fastmodel/protocol/ExportedClockRateControlProtocol.lisa

index 

[gem5-dev] Change in gem5/gem5[develop]: systemc: Stop including mem/port.hh from the systemc headers.

2021-08-27 Thread Gabe Black (Gerrit) via gem5-dev
Gabe Black has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/49618 )



Change subject: systemc: Stop including mem/port.hh from the systemc  
headers.

..

systemc: Stop including mem/port.hh from the systemc headers.

The systemc headers are supposed to be hermetic, so that they can be
included from generic systemc code without any dependency on the gem5
code base, at least when the systemc components are compiled, outside
of those header files themselves. It should be possible to copy the
"ext" directory out of the tree and make it available to systemc code,
and that code should be compileable.

Change-Id: Iec16a534ac04c7895cd8a30940b0acf64c257dde
---
M src/systemc/ext/core/sc_module.hh
1 file changed, 5 insertions(+), 2 deletions(-)



diff --git a/src/systemc/ext/core/sc_module.hh  
b/src/systemc/ext/core/sc_module.hh

index e92b681..ea3af78 100644
--- a/src/systemc/ext/core/sc_module.hh
+++ b/src/systemc/ext/core/sc_module.hh
@@ -31,7 +31,6 @@
 #include 
 #include 

-#include "mem/port.hh"
 #include "sc_object.hh"
 #include "sc_process_handle.hh"
 #include "sc_sensitive.hh"
@@ -58,9 +57,13 @@

 } // namespace sc_gem5

-// Gem5 prototype
+namespace gem5
+{
+
 class Port;

+} // namespace gem5
+
 namespace sc_core
 {


--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/49618
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: Iec16a534ac04c7895cd8a30940b0acf64c257dde
Gerrit-Change-Number: 49618
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black 
Gerrit-CC: Gabe Black 
Gerrit-MessageType: newchange
___
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

[gem5-dev] Change in gem5/gem5[develop]: sim: Explicitly specify the namespace of serialization helpers.

2021-08-27 Thread Gabe Black (Gerrit) via gem5-dev
Gabe Black has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/49619 )



Change subject: sim: Explicitly specify the namespace of serialization  
helpers.

..

sim: Explicitly specify the namespace of serialization helpers.

That makes them work when not calling from the gem5 namespace.

Change-Id: If238d837f91d2c1b8ca58c9c3e08aed8cb0af28a
---
M src/sim/serialize.hh
1 file changed, 7 insertions(+), 7 deletions(-)



diff --git a/src/sim/serialize.hh b/src/sim/serialize.hh
index 9687423..15be41f 100644
--- a/src/sim/serialize.hh
+++ b/src/sim/serialize.hh
@@ -598,7 +598,7 @@
 #define UNSERIALIZE_ENUM(scalar)\
 do {\
 int tmp;\
-paramIn(cp, #scalar, tmp);  \
+::gem5::paramIn(cp, #scalar, tmp);  \
 scalar = static_cast(tmp);\
 } while (0)

@@ -608,7 +608,7 @@
  * @ingroup api_serialize
  */
 #define SERIALIZE_ARRAY(member, size)   \
-arrayParamOut(cp, #member, member, size)
+::gem5::arrayParamOut(cp, #member, member, size)

 /**
  * \def UNSERIALIZE_ARRAY(member, size)
@@ -616,7 +616,7 @@
  * @ingroup api_serialize
  */
 #define UNSERIALIZE_ARRAY(member, size) \
-arrayParamIn(cp, #member, member, size)
+::gem5::arrayParamIn(cp, #member, member, size)

 /**
  * \def SERIALIZE_CONTAINER(member)
@@ -624,7 +624,7 @@
  * @ingroup api_serialize
  */
 #define SERIALIZE_CONTAINER(member) \
-arrayParamOut(cp, #member, member)
+::gem5::arrayParamOut(cp, #member, member)

 /**
  * \def UNSERIALIZE_CONTAINER(member)
@@ -632,7 +632,7 @@
  * @ingroup api_serialize
  */
 #define UNSERIALIZE_CONTAINER(member)   \
-arrayParamIn(cp, #member, member)
+::gem5::arrayParamIn(cp, #member, member)

 /**
  * \def SERIALIZE_OBJ(obj)
@@ -658,13 +658,13 @@
  * \def SERIALIZE_MAPPING(member, names, size)
  */
 #define SERIALIZE_MAPPING(member, names, size) \
-mappingParamOut(cp, #member, names, member, size)
+::gem5::mappingParamOut(cp, #member, names, member, size)

 /**
  * \def UNSERIALIZE_MAPPING(member, names, size)
  */
 #define UNSERIALIZE_MAPPING(member, names, size) \
-mappingParamIn(cp, #member, names, member, size)
+::gem5::mappingParamIn(cp, #member, names, member, size)

 } // namespace gem5


--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/49619
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: If238d837f91d2c1b8ca58c9c3e08aed8cb0af28a
Gerrit-Change-Number: 49619
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black 
Gerrit-CC: Gabe Black 
Gerrit-MessageType: newchange
___
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

[gem5-dev] Change in gem5/gem5[develop]: mem,base: Fix signed/unsigned comparison warnings/errors.

2021-08-27 Thread Gabe Black (Gerrit) via gem5-dev
Gabe Black has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/49616 )



Change subject: mem,base: Fix signed/unsigned comparison warnings/errors.
..

mem,base: Fix signed/unsigned comparison warnings/errors.

Change-Id: Icf477f4b0c162f0174216e511960d0e76db313ae
---
M src/base/addr_range.hh
M src/mem/packet.hh
2 files changed, 8 insertions(+), 8 deletions(-)



diff --git a/src/base/addr_range.hh b/src/base/addr_range.hh
index 640f692..04dc8ec 100644
--- a/src/base/addr_range.hh
+++ b/src/base/addr_range.hh
@@ -334,7 +334,7 @@
 {
 if (interleaved()) {
 std::string str;
-for (int i = 0; i < masks.size(); i++) {
+for (unsigned int i = 0; i < masks.size(); i++) {
 str += " ";
 Addr mask = masks[i];
 while (mask) {
@@ -443,7 +443,7 @@
 bool in_range = a >= _start && a < _end;
 if (in_range) {
 auto sel = 0;
-for (int i = 0; i < masks.size(); i++) {
+for (unsigned int i = 0; i < masks.size(); i++) {
 Addr masked = a & masks[i];
 // The result of an xor operation is 1 if the number
 // of bits set is odd or 0 othersize, thefore it
@@ -490,7 +490,7 @@

 // Get the LSB set from each mask
 int masks_lsb[masks.size()];
-for (int i = 0; i < masks.size(); i++) {
+for (unsigned int i = 0; i < masks.size(); i++) {
 masks_lsb[i] = ctz64(masks[i]);
 }

@@ -498,7 +498,7 @@
 // discard them one by one starting.
 std::sort(masks_lsb, masks_lsb + masks.size());

-for (int i = 0; i < masks.size(); i++) {
+for (unsigned int i = 0; i < masks.size(); i++) {
 const int intlv_bit = masks_lsb[i];
 if (intlv_bit > 0) {
 // on every iteration we remove one bit from the input
@@ -528,13 +528,13 @@

 // Get the LSB set from each mask
 int masks_lsb[masks.size()];
-for (int i = 0; i < masks.size(); i++) {
+for (unsigned int i = 0; i < masks.size(); i++) {
 masks_lsb[i] = ctz64(masks[i]);
 }

 // Add bits one-by-one from the LSB side.
 std::sort(masks_lsb, masks_lsb + masks.size());
-for (int i = 0; i < masks.size(); i++) {
+for (unsigned int i = 0; i < masks.size(); i++) {
 const int intlv_bit = masks_lsb[i];
 if (intlv_bit > 0) {
 // on every iteration we add one bit from the input
@@ -547,7 +547,7 @@
 }
 }

-for (int i = 0; i < masks.size(); i++) {
+for (unsigned int i = 0; i < masks.size(); i++) {
 const int lsb = ctz64(masks[i]);
 const Addr intlv_bit = bits(intlvMatch, i);
 // Calculate the mask ignoring the LSB
diff --git a/src/mem/packet.hh b/src/mem/packet.hh
index 1283ac9..88995f1 100644
--- a/src/mem/packet.hh
+++ b/src/mem/packet.hh
@@ -1286,7 +1286,7 @@
 assert(req->getByteEnable().size() == getSize());
 // Write only the enabled bytes
 const uint8_t *base = getConstPtr();
-for (int i = 0; i < getSize(); i++) {
+for (unsigned int i = 0; i < getSize(); i++) {
 if (req->getByteEnable()[i]) {
 p[i] = *(base + i);
 }

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/49616
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: Icf477f4b0c162f0174216e511960d0e76db313ae
Gerrit-Change-Number: 49616
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black 
Gerrit-CC: Gabe Black 
Gerrit-MessageType: newchange
___
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

[gem5-dev] review help

2021-08-27 Thread Gabe Black via gem5-dev
Hi folks. I've uploaded many reviews recently, and there is another large
batch on the way. I really appreciate how there has been good engagement on
some of the reviews since I know everyone is busy, and few have a vested
interest in my projects.

To try to keep the reviews from piling up and never getting in, or getting
in with insufficient review, some of my colleagues (Yu-hsin and Jui-min)
from Google are going to help out. This will be a great opportunity for
them to get more involved with upstream and learn more about the guts of
gem5, and for us to be able to contribute more and more efficiently to
upstream.

This is of course not intended in *any way* to decrease the value of other
people's reviews, or diminish the importance of their feedback. If you want
to review a change or if you have concerns about something, please don't
hesitate to jump in and participate, this is just to help unload the
current choke point, which are the busy schedules of other volunteers.

One thing in particular that this may not help with are places where there
are requests for some sort of additional testing, for instance to make sure
we don't break our fairly new RISCV support which is being actively worked
on. I think the best way to address this is to have some sort of testing
criteria, either manual or automatic, so that changes aren't blocked
forever waiting for testing nobody either can or has time to do. If you can
at least *describe* what testing should be done, then that will enable
someone else to either perform the testing themselves, or even ideally
automate the testing and put it into our framework.

Anyway, I just wanted to let everyone know what's going on and what to
expect. Thanks!

Gabe
___
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s