summaryrefslogtreecommitdiff
path: root/util
AgeCommit message (Collapse)Author
2017-10-17util: Filter out the For-Upstream commit message tagAndreas Sandberg
Some internal review flows, e.g. the flow used by ARM Research, uses the For-Upstream tag to indicate that a change has been approved for upstream. This tag isn't meaningful outside of the internal review system. Remove it automatically when running the maintainer script to prepare patches to be posted upstream. Change-Id: Ie3745d0e8ad7a1bfddc5ec68ff3e6ff3f91ca8d8 Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Curtis Dunham <curtis.dunham@arm.com> Reviewed-on: https://gem5-review.googlesource.com/5141 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Jason Lowe-Power <jason@lowepower.com>
2017-10-05misc: Use a Makefile to ensure util/packet_pb2.py is up to date.Gabe Black
Rather than just ensuring that packet_pb2.py is available in general, use a Makefile to ensure that it's also up to date in case packet.proto has changed. Also, remove a check that ensures that the protobuf module is available, since python will complain if it needs it and can't find it. Finally, remove a comment which talks about manually regenerating the packet_pb2.py module, something that hasn't been necessary for a while, even with the old version of this code. Change-Id: I40c5c1f577e6d7ad1af9a209309a1eb92f073317 Reviewed-on: https://gem5-review.googlesource.com/5005 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
2017-10-05misc: When building packet_pb2.py, don't assume a particular CWD.Gabe Black
Allow the script to be run from anywhere, and compute the paths relative to where the script is. The script is assumed to be in util. Change-Id: I8500ef959f2ff8119540c956f2b27789c96de60e Reviewed-on: https://gem5-review.googlesource.com/5004 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
2017-10-05misc: Make decode_packet_trace.py print the new master ID fields.Gabe Black
Those fields are "repeated" which means they can appear zero times, which they will in older style traces. Change-Id: Ib6ff4aab521332cf1405549d0d6e922c51c12f32 Reviewed-on: https://gem5-review.googlesource.com/5003 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
2017-10-05misc: Small style fix in _EncodeVarint32.Gabe Black
Added spaces around the '|' operator. Change-Id: I5cb82b98e7d2769605cde141f76a62a6e3c6570d Reviewed-on: https://gem5-review.googlesource.com/5002 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
2017-10-05misc: Rename the (De|En)codeVarint function _(De|En)codeVarint32.Gabe Black
DecodeVarint implicitly truncates its inputs to 32 bits, and that should be obvious from its name, and so not a surprise to the caller. EncodeVarint also has the suffix added for consistency. Both functions are only used in protolib.py, so add a _ to make it private (in the python sense) to the module. Change-Id: I835295717bb51672351b963fe1227ed619836f22 Reviewed-on: https://gem5-review.googlesource.com/5001 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
2017-10-05misc: Fix the indentation in DecodeVarint in util/protolib.py.Gabe Black
The DecodeVarint was, as a comment describes, lifted from google.protobuf.internal.decoder. Unfortunately, the relative indentation of some lines was changed, changing what scope they fell under. This changed the behavior of the function, breaking it for multibyte and negative values. This change restores the correct indentation and fixes the function's behavior. Change-Id: If645649506b0fe5a617b37a8202c9ca1c57aaf15 Reviewed-on: https://gem5-review.googlesource.com/5000 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
2017-10-04tlm: Elastic Trace Example with L2 Cache AddedMatthias Jung
The SystemC TLM examples already include an example setup for elastic traces. However, in the provided examples the L2 cache is omitted. This patch provides an additionall example, which also includes an L2 cache on the gem5 side. Change-Id: I49e9fa074b60007694abff37663f0400caf72099 Reviewed-on: https://gem5-review.googlesource.com/4900 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Reviewed-by: Christian Menard <christian.menard@tu-dresden.de> Maintainer: Jason Lowe-Power <jason@lowepower.com>
2017-09-26misc: Make the m5 utilities writefile command accept a host path.Gabe Black
When the writefile command is given one command line argument, it's treated as the name of the file in the simulation and on the host. When there are two arguments, the first is the filename in the simulation, and the second is the name on the host. Change-Id: I402925a9ff89665bee9910fb18b7f8b06b8f7d35 Reviewed-on: https://gem5-review.googlesource.com/4850 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Gabe Black <gabeblack@google.com>
2017-09-11tlm: Don't set SystemC time resolutionMatthias Jung
Some simulators already set the time resolution of SystemC. By coupling gem5 by means of SystemC with an other tool this can lead to problems: When the resolution is set twice the simulation will not work. Therefore, the line is changed to an assertion that checks if the time resolution of the SystemC simulation is set to gem5's value of 1ps. Change-Id: I8aafab9dd593eb4697a3c7f69ce181fd9cdd05c4 Reviewed-on: https://gem5-review.googlesource.com/4520 Reviewed-by: Paul Rosenfeld <prosenfeld@micron.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Jason Lowe-Power <jason@lowepower.com>
2017-08-01style: Add shared gem5 headers to the style checkerAndreas Sandberg
Teach the style checker about common headers living in gem5/. These should be included after any global library headers (e.g., C headers or STL headers), but before the normal gem5 headers. Change-Id: I322f841420e361c16314be8fa4cbd1e86d2bfa9f Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-on: https://gem5-review.googlesource.com/4300 Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
2017-08-01util: Move m5op.h to the shared include directoryAndreas Sandberg
The header file with C declarations for m5ops is sometimes needed by code outside of the util/m5 directory. Move this file to the shared include directory and factor out flags to a generic asm header. Note that applications that need to call m5ops still need to link with libm5.a or implement their own trampolines. Change-Id: I36a3f459ed71593e38b869dc2b1302c810f92276 Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Jose Marinho <jose.marinho@arm.com> Reviewed-on: https://gem5-review.googlesource.com/4265 Reviewed-by: Gabe Black <gabeblack@google.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
2017-08-01util, m5: Use consistent naming for m5op C symbolsAndreas Sandberg
Rename m5op C symbols to be prefixed all lower case, separated by underscore, and prefixed by m5. This avoids potential name clashes for short names such as arm. Change-Id: Ic42f94d8a722661ef96c151d627e31eeb2e51490 Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Jose Marinho <jose.marinho@arm.com> Reviewed-on: https://gem5-review.googlesource.com/4264 Reviewed-by: Gabe Black <gabeblack@google.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
2017-08-01util: Move the m5ops.h file to a shared directoryAndreas Sandberg
The header file m5ops.h contains a list of constants that should be shared between the simulator and utilities. Move this header file to a new top-level directory for shared files and rename constants to make them suitable for inclusion in the main simulator. The structure of the shared include directory is as follows: include/gem5: Files that can be included from C code. include/gem5/asm: Files that can be included from assembly code. asm/generic/: Files that aren't guest ISA specific asm/${isa}/: Files that are guest ISA specific Change-Id: I1aa511057bcaa80cc2d566109ff26581558c4a41 Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Jose Marinho <jose.marinho@arm.com> Reviewed-on: https://gem5-review.googlesource.com/4261 Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
2017-07-12util,arch-arm: Added python script to generate ARM FS binariesPau Cabre
This python script builds the bootloaders, kernels and DTBs for the VExpress_GEM5_V1 (aarch32/aarch64), VExpress_EMM and VExpress_EMM64 platforms (it checkouts some linux kernel repositories when needed). This is the result of this e-mail thread in gem5-dev mailing list: http://www.mail-archive.com/gem5-dev@gem5.org/msg22406.html Change-Id: Ida8f9b974f7188f48be8f84f14828a1973d6d256 Signed-off-by: Pau Cabre <pau.cabre@metempsy.com> Reviewed-on: https://gem5-review.googlesource.com/3945 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
2017-06-03misc: Fix building the m5tap utility.Gabe Black
Use printf instead of cprintf to avoid having to have .o files from gem5. Stop disabling optimization. Placate the style checker by rearranging the header include order. Include some missing standard headers. Switch from the deprecated -I- gcc option to using -iquote. Make the "program" variable a const char *. When checking the return value of getopt, don't check against the char c which may mask the -1 return value. Instead, store the return value in an int, and then later cast it to a char when it's actually consumed. Change-Id: Ibec51927d0cdbd98db8e53081be2c4931e20333c Reviewed-on: https://gem5-review.googlesource.com/3600 Reviewed-by: Nathan Binkert <nate@binkert.org> Maintainer: Nathan Binkert <nate@binkert.org>
2017-05-30misc: check address range in the SystemC exampleChristian Menard
Using a wrong offset or memory size may lead to segmentation faults. This patch adds an address range check and produces an error message. Change-Id: I79a72c05879266daf61a83367fe4ae386d1958a4 Reviewed-on: https://gem5-review.googlesource.com/3482 Maintainer: Jason Lowe-Power <jason@lowepower.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Reviewed-by: Matthias Jung <jungma@eit.uni-kl.de>
2017-05-30misc: Reorder sources in util/tlm and rewrite build scriptsChristian Menard
* Use one SConstruct to build everything instead of one SConstruct for each example. * Introduce SConscripts for sub-directories. * Build in 'build' instead of the source tree. * Build and link to SystemC from the ext/systemc directory. This ensures that SystemC does not need to be installed on the host and avoids possible issues caused by an incompatible SystemC build. * Update the README and add some minor fixes Change-Id: I641ed94f542626864fb7af499ad1be8fd4ad929f Reviewed-on: https://gem5-review.googlesource.com/3480 Reviewed-by: Matthias Jung <jungma@eit.uni-kl.de> Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Jason Lowe-Power <jason@lowepower.com>
2017-05-24util: generate fully qualified paths for cscopeGedare Bloom
Change-Id: I318c185b117b9608110544526fbaaa3fdcdeb8bc Signed-off-by: Gedare Bloom <gedare@rtems.org> Reviewed-on: https://gem5-review.googlesource.com/3260 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Jason Lowe-Power <jason@lowepower.com>
2017-05-15style: fix line lengths and include orderingBrandon Potter
The style checker complains about line length and ordering for these files. This fix should make these two files kosher. Change-Id: I822a0518a98d9e379a543d2017e90c4e9666a58d Reviewed-on: https://gem5-review.googlesource.com/3380 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Brandon Potter <Brandon.Potter@amd.com>
2017-05-09style: Treat PyBind headers as Python headersAndreas Sandberg
Some PyBind11 headers need to include Python.h. This means that we need to include PyBind11 headers before any standard library headers. Enforce this by applying the Python.hh rules for anything in pybind11/. Change-Id: Id175a4f613960a17f84f98b81bfd02806e905d5a Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Reviewed-by: Curtis Dunham <curtis.dunham@arm.com> Reviewed-on: https://gem5-review.googlesource.com/3120 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Reviewed-by: Tony Gutierrez <anthony.gutierrez@amd.com>
2017-05-09util, arm: Support mmapped m5ops on aarch64Andreas Sandberg
Add support for memory-mapped m5ops in the aarch64 version of the m5 utility. To enable support for memory-mapped m5ops, compile the tool with the define M5OP_ADDR set to the base of the m5op PA range. Change-Id: I13e21e48536b9849bf4081411b66b2f350f7a8ac Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Curtis Dunham <curtis.dunham@arm.com> Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Reviewed-on: https://gem5-review.googlesource.com/2966
2017-05-09util: Correctly handle short writes in m5 (read|exec)fileAndreas Sandberg
The m5 tool has subcommands that writes a file to the simulated file system. The implementation of this command currently doesn't check the return value from write, which leads to compiler warnings and potentially incorrect behavior. Add the necessary checks. Change-Id: If558534d3245aa24cf15edf06bd0af4c6ba3908c Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Reviewed-on: https://gem5-review.googlesource.com/2962 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Reviewed-by: Gabe Black <gabeblack@google.com>
2017-05-09util: Add the m5_loadsymbol pseudo op to the m5 toolAndreas Sandberg
Change-Id: Ib8bf4eac77170db8b2bf44796fd9d46b02217d03 Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-on: https://gem5-review.googlesource.com/3122 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Reviewed-by: Gabe Black <gabeblack@google.com>
2017-05-09util: Fix incorrect use of m5_loadsymbolAndreas Sandberg
It seems like the m5 utility incorrectly called m5_loadsymbol instead of m5_addsymbol. Judging by the signature of the loadsymbol command, the expected behavior is to add a new symbol to gem5's symbol table. This is behavior is implemented by m5_addsymbol. Change-Id: I83b61c48d6f8d7b1e8b57d884dfca00481c83c3a Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Curtis Dunham <curtis.dunham@arm.com> Reviewed-on: https://gem5-review.googlesource.com/2961 Reviewed-by: Gabe Black <gabeblack@google.com>
2017-05-09misc: fix build failure in cxx_config examplePaul Rosenfeld
Fix a missing header in the cxx_config example which is used as a simple example of using libgem5.so without python. Change-Id: I758bfe42ba735ce0c7eaedd49b94a130e3bd21e3 Reviewed-on: https://gem5-review.googlesource.com/3000 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Reviewed-by: Curtis Dunham <curtis.dunham@arm.com> Reviewed-by: Matthias Jung <jungma@eit.uni-kl.de> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
2017-05-08util: Fix incorrect return type in m5 writefileAndreas Sandberg
Change-Id: Ic24a1c3c1488e970ed27bb6b99262d201f535384 Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Curtis Dunham <curtis.dunham@arm.com> Reviewed-on: https://gem5-review.googlesource.com/2960 Reviewed-by: Gabe Black <gabeblack@google.com>
2017-04-11misc: minor fix for the gem5-SystemC/TLM coupling.Éder F. Zulian
This patch has a minor fix for the coupling between gem5 and SystemC-TLM. It also fixes some typos in the related documentation. Change-Id: I894568729b8ebdacc5b81c9f46e8f9d137da210f Reviewed-on: https://gem5-review.googlesource.com/2480 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Jason Lowe-Power <jason@lowepower.com>
2017-04-03arm, dev: refactor GIC Pl390 GICD_ITARGETSRn handlingCurtis Dunham
The aforementioned registers (Interrupt Processor Targets Registers) are banked per-CPU, but are read-only. This patch eliminates the per-CPU storage of these values that are simply computed. Change-Id: I52cafc2f58e87dd54239a71326c01f4923544689 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-on: https://gem5-review.googlesource.com/2442 Maintainer: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Weiping Liao <weipingliao@google.com>
2017-03-21util: Add a tool to list outgoing/incoming changesAndreas Sandberg
Add a small Python script that uses Gerrit's Change-Id: tags to list incoming and outgoing changes. Change-Id: Iea1757b2d64a57a4c7b4e47718cfcaa725a99615 Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Sascha Bischoff <sascha.bischoff@arm.com> Reviewed-on: https://gem5-review.googlesource.com/2329 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Jason Lowe-Power <jason@lowepower.com>
2017-02-14sim: allow forward dependencies in checkpoint upgradersCurtis Dunham
The notion of forward dependencies is just expressing the same dependency but at the other end of the dependency edge, i.e. at the dependee rather than the depender. As there is no more 'power' here, it's strictly a convenience feature for handling dependencies with tags that are not in the upstream repository. Change-Id: Ic7c68de6aff4094aaa12de62cdf690a5dc65ccb5 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
2017-02-14sim: add support for checkpoint downgradingCurtis Dunham
This commit supports the use case of transitioning tags and their associated checkpoint rewrites out of use for whatever reason. Just replace the upgrader() method with a downgrader() method that performs the appropriate inverse operation. The tag name is still used, but only in this negative, 'zombie' state, as it will be removed from the tags in the checkpoint and gem5 binary. Change-Id: If9d26cccfe8449e026762b1a72f0c2ae5a9cf2d7 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
2017-02-13misc: Clean up and complete the gem5<->SystemC-TLM bridge [6/10]Christian Menard
The current TLM bridge only provides a Slave Port that allows the gem5 world to send request to the SystemC world. This patch series refractors and cleans up the existing code, and adds a Master Port that allows the SystemC world to send requests to the gem5 world. This patch: * Update the README
2017-02-10misc: Update #!env calls for python to explicit versionJason Lowe-Power
In some newer Linux distributions, env python default to Python 3.0. This patch explicitly uses "python2" instead of just "python" for all scripts that use #! Reported-by: Sanchayan Maity <maitysanchayan@gmail.com> Signed-off-by: Jason Lowe-Power <jason@lowepower.com>
2017-02-09misc: Clean up and complete the gem5<->SystemC-TLM bridge [10/10]Christian Menard
The current TLM bridge only provides a Slave Port that allows the gem5 world to send request to the SystemC world. This patch series refractors and cleans up the existing code, and adds a Master Port that allows the SystemC world to send requests to the gem5 world. This patch: * Add callbacks for the Gem5SimControl that are called at before and * after simulate() Reviewed at http://reviews.gem5.org/r/3799/ Signed-off-by: Jason Lowe-Power <jason@lowepower.com>
2017-02-09misc: Clean up and complete the gem5<->SystemC-TLM bridge [9/10]Christian Menard
The current TLM bridge only provides a Slave Port that allows the gem5 world to send request to the SystemC world. This patch series refractors and cleans up the existing code, and adds a Master Port that allows the SystemC world to send requests to the gem5 world. This patch: * Pay for the header delay that the gem5 XBar annotates to packets. Reviewed at http://reviews.gem5.org/r/3798/ Signed-off-by: Jason Lowe-Power <jason@lowepower.com>
2017-02-09misc: Clean up and complete the gem5<->SystemC-TLM bridge [8/10]Christian Menard
The current TLM bridge only provides a Slave Port that allows the gem5 world to send request to the SystemC world. This patch series refractors and cleans up the existing code, and adds a Master Port that allows the SystemC world to send requests to the gem5 world. This patch: * bugfix: The BEGIN_RESP also needs to be handled when END_REQ was * skipped and '&trans == blockingRequest && phase == tlm::BEGIN_RESP' evaluates to true. Reviewed at http://reviews.gem5.org/r/3797/ Signed-off-by: Jason Lowe-Power <jason@lowepower.com>
2017-02-09misc: Clean up and complete the gem5<->SystemC-TLM bridge [7/10]Christian Menard
The current TLM bridge only provides a Slave Port that allows the gem5 world to send request to the SystemC world. This patch series refractors and cleans up the existing code, and adds a Master Port that allows the SystemC world to send requests to the gem5 world. This patch: * Implement 'pipe through' for gem5 Packets (see explanation below) Basically, this patch ensures that all transactions that originated in the gem5 world are converted back to the original packet when entering the gem5 world. So far, this only worked for packets that are responded to by a SyctemC component (e.g. when a gem5 CPU sends a request to a SystemC memory). By implementing the 'pipe through' this patch ensures, that packets that are responded to by a gem5 component (e.g. when a gem5 CPU sends a request to a gem5 memory via a SystemC interconnect) are handled properly. Reviewed at http://reviews.gem5.org/r/3796/ Signed-off-by: Jason Lowe-Power <jason@lowepower.com>
2017-02-09misc: Clean up and complete the gem5<->SystemC-TLM bridge [5/10]Christian Menard
Changeset 11798:3a490c57058d --------------------------- misc: Clean up and complete the gem5<->SystemC-TLM bridge [5/10] The current TLM bridge only provides a Slave Port that allows the gem5 world to send request to the SystemC world. This patch series refractors and cleans up the existing code, and adds a Master Port that allows the SystemC world to send requests to the gem5 world. This patch: * Introduce transactor modules that represent the gem5 ports in the * SystemC world. * Update the SimControl module and let it keep track of the gem5 ports. Reviewed at http://reviews.gem5.org/r/3775/ Signed-off-by: Jason Lowe-Power <jason@lowepower.com>
2017-02-09misc: Clean up and complete the gem5<->SystemC-TLM bridge [4/10]Christian Menard
The current TLM bridge only provides a Slave Port that allows the gem5 world to send request to the SystemC world. This patch series refractors and cleans up the existing code, and adds a Master Port that allows the SystemC world to send requests to the gem5 world. This patch: * Move common code of the example to a common directory. Move the cli * parsing from the SimControl module to a separate example object. Add * comments describing the Gem5SimControl module. Testing Done: Examples compile and run. Reviewed at http://reviews.gem5.org/r/3695/ Signed-off-by: Jason Lowe-Power <jason@lowepower.com>
2017-02-09misc: Clean up and complete the gem5<->SystemC-TLM bridge [3/10]Christian Menard
The current TLM bridge only provides a Slave Port that allows the gem5 world to send request to the SystemC world. This patch series refractors and cleans up the existing code, and adds a Master Port that allows the SystemC world to send requests to the gem5 world. This patch: * Simplify the Slave Port by using a simple_initiator_socket. Testing Done: Example applications are still running. Reviewed at http://reviews.gem5.org/r/3686/ Signed-off-by: Jason Lowe-Power <jason@lowepower.com>
2017-02-09misc: Clean up and complete the gem5<->SystemC-TLM bridge [2/10]Christian Menard
The current TLM bridge only provides a Slave Port that allows the gem5 world to send request to the SystemC world. This patch series refractors and cleans up the existing code, and adds a Master Port that allows the SystemC world to send requests to the gem5 world. This patch: * Add the Master Port. Add an example application that isslustrates its * use. Testing Done: A simple example application consisting of a TLM traffic generator and a gem5 memory is part of the patch. Reviewed at http://reviews.gem5.org/r/3528/ Signed-off-by: Jason Lowe-Power <jason@lowepower.com>
2017-02-09misc: Clean up and complete the gem5<->SystemC-TLM bridge [1/10]Christian Menard
The current TLM bridge only provides a Slave Port that allows the gem5 world to send request to the SystemC world. This patch series refractors and cleans up the existing code, and adds a Master Port that allows the SystemC world to send requests to the gem5 world. This patch: * Restructure the existing sources in preparation of the addition of the * new Master Port. * Refractor names to allow for distinction of the slave and master port. * Replace the Makefile by a SConstruct. Testing Done: The examples provided in util/tlm (now util/tlm/examples/slave_port) still compile and run error free. Reviewed at http://reviews.gem5.org/r/3527/ Signed-off-by: Jason Lowe-Power <jason@lowepower.com>
2017-02-09misc: fix includes in util/systemcChristian Menard
This fixes compilation errors with clang on OS X. Reviewed at http://reviews.gem5.org/r/3807/ Signed-off-by: Jason Lowe-Power <jason@lowepower.com>
2017-02-09misc: Implement the Base SystemC Module as an sc_channel.Christian Menard
Implementing the Module as an sc_channel allows derived classes to provide SystemC interfaces. Other SystemC modules can connect to these interfaces. This meachanism can be used to control gem5 and acces gem5 components from within arbitrary SystemC moduels. Since sc_channel is derived from sc_module, this patch does not break compatibility with existing code. Signed-off-by: Jason Lowe-Power <jason@lowepower.com>
2017-02-07style: Force Python.h to be included before main headerAndreas Sandberg
Python's header files set various compiler macros (e.g., _XOPEN_SOURCE) unconditionally. This triggers preprocessor warnings that end up being treated as errors. The Python integration manual [1] strongly recommends that Python.h is included before any system header. The style guide used to mandate that Python.h is included first in any file that needs it. This requirement was changed to always include a source file's main header first, which ended up triggering these errors. This change updates the style checker to always include Python.h before the main header file. [1] https://docs.python.org/2/extending/extending.html Change-Id: Id6a4f7fc64a336a8fd26691a0ca682abeb1d1579 Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Reviewed-by: Pierre-Yves Péneau <pierre-yves.peneau@lirmm.fr>
2017-01-27misc: Add support for switching multiple cores in SystemCPaul Rosenfeld
This patch adds a '-n' flag to the gem5 SystemC driver which allows multiple CPUs to be switched out to a new CPU. Primarily this involves appending CPU numbers to the objects searched for in the config manager if there are multiple CPUs in the system. Note that an equivalent change should be made to the util/cxx_config driver, but I wanted to get input on this first before making the same change over there Signed-off-by: Jason Lowe-Power <jason@lowepower.com>
2017-01-09misc: fixes deprecated sc_time function for SystemC 2.3.1Matthias Jung
The non-standard sc_time constructors - sc_time( uint64, bool scale ) - sc_time( double, bool scale ) have been deprecated in SystemC 2.3.1 and a warning is issued when being used. Insted the new 'sc_time::from_value' function is used to omit the warning message. Signed-off-by: Jason Lowe-Power <jason@lowepower.com>
2017-01-09misc: Documentation UpdateMatthias Jung
Updates for READMEs of /util/cxx_config, /util/systemc, /util/tlm. Some minor corrections, mostly with respect to MAC/OSX Signed-off-by: Jason Lowe-Power <jason@lowepower.com>
2017-01-03util: Add maintainer tools to create upstream patchesAndreas Sandberg
This changeset adds a maintainer script, create_patches.sh, that can be used to prepare for upstream from a git repository. The script can be used to generate patches in Mercurial or git format. The commit messages in the exported patches are all filtered, see upstream_msg_filter.sed, to ensure that irrelevant meta data isn't included in the upstream commit. Kudos to Curtis Dunham and Nikos Nikoleris for reviews and usability enhancements for earlier versions of this patch. Change-Id: Ia4cd089a32834b5e046ef58c0a173ca285b77bca Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Curtis Dunham <curtis.dunham@arm.com> Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com>