summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-08-24cpu: Stream/SubstreamID support in TrafficGenGiacomo Travaglini
This patch is adding support for generating memory requests which set the StreamID/SubstreamID field, so that is possible to emulate devices attached to an external IOMMU/SMMU with a Traffic generator. Change-Id: Iea068de581ae7125a9d49314124a08c045c75b49 Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Reviewed-on: https://gem5-review.googlesource.com/12188
2018-08-24cpu: Turn BaseTrafficGen numSuppressed into a statMichiel W. van Tol
This is changing numSuppressed from being a warn only variable into a Stat so that it is visible at the end of simulation. Change-Id: I934782e796c898bfc0e773cc88c597a68e403272 Reviewed-on: https://gem5-review.googlesource.com/11849 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
2018-08-22mem: Add StreamID and SubstreamIDStanislaw Czerniawski
This patch adds StreamID and SubstreamID to Request. These fields can be used by a SMMU/IOMMU model to pick up the correct translation context for each request and they correspond to an ASID in a device. For this reason they have been merged together with the request asid in a union, so that a cpu will set the asid and a device will set the Stream and Substream ID. Change-Id: Iac2b5a1ba9c6598ee7635c30845dc68ba6787c34 Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Reviewed-on: https://gem5-review.googlesource.com/12187 Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Jason Lowe-Power <jason@lowepower.com>
2018-08-22systemc: Add deprecated default time unit management functions.Gabe Black
Having default time units is deprecated, and so are the functions that manage them. Change-Id: Ie21f9a5fca9868dd4f0adcd9f32c568fbec1fa72 Reviewed-on: https://gem5-review.googlesource.com/11270 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
2018-08-22systemc: Add deprecated notify_delayed functions.Gabe Black
Change-Id: I8ec68920b35f9207b6856a0b1ddfdf7545b7148a Reviewed-on: https://gem5-review.googlesource.com/11269 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
2018-08-22systemc: Add some nonstandard cthread related sc_module functions.Gabe Black
Change-Id: I73f9868b80f9b75e7bd90df6e894daea60a203a1 Reviewed-on: https://gem5-review.googlesource.com/11268 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
2018-08-22systemc: Add the deprecated sc_trace_delta_cycles function.Gabe Black
This function enables or disables tracing of delta cycles in a particular trace file. Change-Id: I53164a792856d071de1fefc76977cca8eb5fd735 Reviewed-on: https://gem5-review.googlesource.com/11267 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
2018-08-22systemc: Add a nonstandard sc_signal constructor.Gabe Black
This constructor takes an initial value to set the sc_signal to, and is used in the tests. Change-Id: I197218846d9a79f9237238c78b1bbd8a7f55443f Reviewed-on: https://gem5-review.googlesource.com/11266 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
2018-08-22systemc: Add some nonstandard (get|set)_catch_actions functions.Gabe Black
These are used by the tests. Change-Id: I09bbe81854f0faa524a4c6aa0ef31d80e4a8de24 Reviewed-on: https://gem5-review.googlesource.com/11265 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
2018-08-22systemc: Exclude another test which exercises sc_string.Gabe Black
Change-Id: Ic05fe3d34ef403dd6ad9348478f73c6ed50cc7bc Reviewed-on: https://gem5-review.googlesource.com/11264 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
2018-08-22systemc: Add the nonstandard, undocumented halt function.Gabe Black
Used in the tests. Change-Id: I9b4f10600a50e0def1b5d55428cb4ad49e401295 Reviewed-on: https://gem5-review.googlesource.com/11263 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
2018-08-22systemc: Define the nonstandard sc_event_queue_port typedef.Gabe Black
Used in the tests. Change-Id: Ic4b4a313b2bd02e5cb3ec07c4f7ee79219728881 Reviewed-on: https://gem5-review.googlesource.com/11262 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
2018-08-22systemc: Add some nonstandard SC_WAIT* macros.Gabe Black
These are not in the standard, but are defined by Accellera and used in the tests. Change-Id: I4cbddac4eb75c58d8ae3eb77d1f291dac3c51cd6 Reviewed-on: https://gem5-review.googlesource.com/11261 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
2018-08-22systemc: Exclude a test which probably could never compile?Gabe Black
Part of this test just seems to be missing, so I'm not sure how it would ever actually work. Change-Id: I5350fea1dfd288e34e01afcd3780b2ffc3312344 Reviewed-on: https://gem5-review.googlesource.com/11260 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
2018-08-22systemc: Add nonstandard sc_trace-s for sc_event and sc_time.Gabe Black
These are not in the standard but are defined by Accellera and are used in the regression tests. Change-Id: Idb8358530b1135526c52733e628461a17308e216 Reviewed-on: https://gem5-review.googlesource.com/11259 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
2018-08-22systemc: Add a filter file for the tests which are expected to work.Gabe Black
Not all of the tests this filter accepts actually work, but we haven't yet explicitly decided not to try to make them tests work yet. Recording this in a file makes test runs more repeateable, and creates a place to record why certain tests or groups of tests are being excluded. Change-Id: I91d44b6500a3e8ff5d5808222ce03f138374cf8b Reviewed-on: https://gem5-review.googlesource.com/11258 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
2018-08-22systemc: Add a filter-file option.Gabe Black
The --filter option is very useful, but can get to be long and complex and a bit too cumbersome to use from the command line. This change adds a --filter-file option which is mutually exclusive with --filter and which reads the filter expression from a file instead of accepting it on the command line. Change-Id: I381c92ddf0d9fe62acd20432fa4868e2121405b8 Reviewed-on: https://gem5-review.googlesource.com/11257 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
2018-08-22systemc: Add support for deprecated integer report handler ids.Gabe Black
These are deprecated but still used in the regression tests. Change-Id: Id59cf950fbe0530a6cdce20a256d450b243f12d3 Reviewed-on: https://gem5-review.googlesource.com/11256 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
2018-08-22systemc: Add the nonstandard macro SC_NEW.Gabe Black
This is in the Accellera implementation and in the regression tests. The implementation here is a bit different than theirs in that it uses std::unique_ptrs. Change-Id: Id3d1ad82482b94a5d99f27e02d1e447ca1944797 Reviewed-on: https://gem5-review.googlesource.com/11255 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
2018-08-22systemc: Add the nonstandard triggered function sc_event.Gabe Black
The Accellera implementation of sc_event has a non-standard triggered function which returns whether or not that particular event has been triggered in the current delta cycle. The tests call it, so we probably need to have it. Change-Id: I675099b65d00e09536618d4d2d707bf3c25e3bde Reviewed-on: https://gem5-review.googlesource.com/11187 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
2018-08-22systemc: Add the nonstandard variable sc_allow_process_control_corners.Gabe Black
This variable controls what happens in some situations which are left as undefined in the spec. It's behavior is explained in a big comment in the Accellera implementation. Since it's used in the regression tests, we need to at least have that variable so they'll compile and link properly. Change-Id: I1ac4592641be3d9dd10e7bf6144704a6fac1b2d4 Reviewed-on: https://gem5-review.googlesource.com/11186 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
2018-08-22systemc: Add some "implementation defined" stuff to sc_attr_cltn.Gabe Black
These "impelementation defined" methods are tested by the regression tests, so we need to have them. We might as well have the same general interface as the Accellera implementation since nothing there seems overly specialized for that environment. Change-Id: Ief6567fcd9d99d3a0f526cfa3b65043b2c828efa Reviewed-on: https://gem5-review.googlesource.com/11185 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
2018-08-22systemc: Fix a small bug in verify.py.Gabe Black
The src_dir method of the Test class was using the wrong attribute of the test from the json file. It should use path, but was using src_dir. Change-Id: Iaaaf31c31b11b68ecd7dd98807e6b78597cebb99 Reviewed-on: https://gem5-review.googlesource.com/12029 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
2018-08-21dev, arm: Fix incorrect GIC address range sizesAndreas Sandberg
The GICv2 specifies that 8KiB of the memory map is allocated to the CPU interface and 4KiB is allocated to the distributor. The current distributor size is off by 1 and the CPU interface is completely off by a lot. Change-Id: I90a9f669a46a37d79c6cc542087cf91f2044f104 Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Ciro Santilli <ciro.santilli@arm.com> Reviewed-by: Curtis Dunham <curtis.dunham@arm.com> Reviewed-on: https://gem5-review.googlesource.com/11769
2018-08-21misc: Appease GCC 8Jason Lowe-Power
GCC 8 adds a number of new warnings to -Wall which generate errors. - Fix memset to 0 for structs by adding casts. - Fix cast with const when the const was ignored. - Fix catch a polymorphic type by value We now compile with GCC 8! Change-Id: Iab70ce11190eee67608fc25c0bedff170152b153 Signed-off-by: Jason Lowe-Power <jason@lowepower.com> Reviewed-on: https://gem5-review.googlesource.com/11949 Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br> Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
2018-08-21ext: Cherry-pick pybind change to support GCC 8Jason Lowe-Power
GCC 8's -Wcast-function-type didn't like this line in pybind. Rather than updating pybind to the HEAD, we'll wait for a new release. The last release was in April and didn't include this change. See https://github.com/pybind/pybind11/pull/1396. Change-Id: I199c3023487d5a73a745396df8e7fcd6635a146c Reported-by: Thawra Kadeed <kadeed@ida.ing.tu-bs.de> Signed-off-by: Jason Lowe-Power <jason@lowepower.com> Reviewed-on: https://gem5-review.googlesource.com/11909 Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
2018-08-17util: add util/maint/show_changes_by_file.py toolBrandon Potter
The script diffs an upstream branch and a feature branch to find all files which have been changed between the branches. It then searches for all the corresponding changesets and binds them to the files in the output. The tool's output resembles the following: /path/to/file/ filename git-hash git-hash filename git-hash /path/to/file/ filename git-hash Change-Id: Icd67953748f38dad984488c5445313eaa56fa202 Reviewed-on: https://gem5-review.googlesource.com/7861 Reviewed-by: Brandon Potter <Brandon.Potter@amd.com> Maintainer: Brandon Potter <Brandon.Potter@amd.com>
2018-08-17scons,ruby: do not generate unnecessary filesBrandon Potter
Do not generate garnet tester file or Ruby debug headers without a Ruby protocol (i.e. PROTOCOL=None). It makes no sense to include these files into the build when there will be no protocol to utilize them. Change-Id: I8db4dd532f60008217a10c88a2e089f85df9d104 Reviewed-on: https://gem5-review.googlesource.com/8381 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Jason Lowe-Power <jason@lowepower.com>
2018-08-17tests: add a stack printer testBrandon Potter
Add a test to print out stack contents for SE mode programs. The test will print out argc, argv, envp, and some auxiliary vectors. Change-Id: I489d752ee40fde24c531d8918d0c050f4df936c5 Reviewed-on: https://gem5-review.googlesource.com/3440 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Jason Lowe-Power <jason@lowepower.com>
2018-08-17ruby: remove unused code inside '#if 0 ... #endif'Brandon Potter
The commented code contains bitrot. It is not clear how to fix the code so remove it. The code will not compile if the preprocessor defines are removed. The llocker and uulocker variables that are used as indices into the persistent_randomize array are undefined. It's not clear what they should be from the current code. 5ab13e2deb shows when the lines were last modified. The functionality contained in the comments probably have not been used since that time. (This is an example of why one should never add commented code that is enabled by removing defines. The code rots and sits in the source forever.) Change-Id: I3e0e7c9afc0b6088130e6f319075809fb6f16e5a Reviewed-on: https://gem5-review.googlesource.com/8481 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Jason Lowe-Power <jason@lowepower.com>
2018-08-17hsail-x86: fix gpu dynamic instruction errorBrandon Potter
The gpu_dyn_inst.hh file was missing a clone method from inherited classes. (The clone method is the way to implement the prototype design pattern.) Because the inherited clone method was declare as pure virtual, the method needed to be implemented. Otherwise, the compiler complains that the class is abstract. Change-Id: I38782d5f7379f32be886401f7c127fe60d2f8811 Reviewed-on: https://gem5-review.googlesource.com/12108 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com> Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>
2018-08-17hsail-x86: fix addr_range_map errorBrandon Potter
683f411dca introduced changes to the addr_range_map's "find" method. Nikos replaced the relevant code with a new "contains" method. Propagate the changes to the gpu-compute code. Change-Id: I8cfe3b15cbfb476685b0ed5ba423ea5a8f1000d8 Reviewed-on: https://gem5-review.googlesource.com/12107 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com> Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>
2018-08-17tests: Add explicit build testJason Lowe-Power
Change-Id: Ia613ab580b880a463c9cf0dd63f61497db31fe75 Signed-off-by: Jason Lowe-Power <jason@lowepower.com> Reviewed-on: https://gem5-review.googlesource.com/10121
2018-08-17tests: Add test for the m5-exit instruction.Sean Wilson
Change-Id: I92a589b267ce659b6fbcf710043436b84fcb1c63 Signed-off-by: Sean Wilson <spwilson2@wisc.edu> Reviewed-on: https://gem5-review.googlesource.com/4423 Maintainer: Jason Lowe-Power <jason@lowepower.com> Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com>
2018-08-17tests: Add a simple example testSean Wilson
Change-Id: I0753db61d6344b9ed95c0d90a1ab097de7e2af12 Signed-off-by: Sean Wilson <spwilson2@wisc.edu> Reviewed-on: https://gem5-review.googlesource.com/4422 Maintainer: Jason Lowe-Power <jason@lowepower.com> Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com>
2018-08-17tests: Add Makefiles for helloJason Lowe-Power
This adds Makefiles for hello for ARM and x86 by leveraging docker and dockcross. See https://github.com/dockcross/dockcross for more information. These Makefiles also allow for automatic uploading to the correct location for users to download when running the new tests. Change-Id: I7085000393cd5283502a7af362c85befda749181 Signed-off-by: Jason Lowe-Power <jason@lowepower.com> Reviewed-on: https://gem5-review.googlesource.com/4883
2018-08-17tests: Add documentation for new testing codeJason Lowe-Power
Change-Id: Id62ad8e452e640073079e76c9ce5898c8888edee Signed-off-by: Jason Lowe-Power <jason@lowepower.com> Signed-off-by: Sean Wilson <spwilson2@wisc.edu> Reviewed-on: https://gem5-review.googlesource.com/4882
2018-08-17tests,ext: Add a new testing library proposalSean Wilson
The new test library is split into two parts: The framework which resides in ext/, and the gem5 helping components in /tests/gem5. Change-Id: Ib4f3ae8d7eb96a7306335a3e739b7e8041aa99b9 Signed-off-by: Sean Wilson <spwilson2@wisc.edu> Reviewed-on: https://gem5-review.googlesource.com/4421 Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Maintainer: Jason Lowe-Power <jason@lowepower.com>
2018-08-17tests: Fix hello.c test programJason Lowe-Power
Update the hello test to have a sane return code. Change-Id: I9576b71ee995d8aa410c4ed19d44cc4e9fad10ee Signed-off-by: Jason Lowe-Power <jason@lowepower.com> Reviewed-on: https://gem5-review.googlesource.com/4881 Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com> Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
2018-08-17configs: Always exit with code 0Jason Lowe-Power
Update simulation.py to always exit with code 0 assuming the simulation exits normally. If the running application has a return code that is non zero, then print the return code before exiting. Change-Id: I1983985d50311627574d4364b32ee961ae88e003 Signed-off-by: Jason Lowe-Power <jason@lowepower.com> Reviewed-on: https://gem5-review.googlesource.com/4880
2018-08-15systemc: Partially implement SC_FORK and SC_JOIN.Gabe Black
These macros need to expand to some minimal amount of wrapping code to make the regression tests syntactically legal and compile. Change-Id: I0b5569704b129d9c315526fc3363ef846a1b5c65 Reviewed-on: https://gem5-review.googlesource.com/11184 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
2018-08-15systemc: Add some deprecated features to sc_clock.*.Gabe Black
Add in two deprecated typedefs, and a deprecated constructor. These are necessary to get the regressions to build. Change-Id: Id8320a67c680acbca0abaee9898158ffd2678d67 Reviewed-on: https://gem5-review.googlesource.com/11183 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
2018-08-15systemc: Add some non-standard sc_trace variants.Gabe Black
These overloads of sc_trace take the unsigned version of some primitive types. The compiler thought it was ambiguous how to convert an unsigned integer value into a signed one since there were several different functions which took signed integer parameters of various sizes. These versions of sc_trace aren't in the standard, but they are in the Accellera implementation and do fix building of the regression tests. Change-Id: I26fd06d90ae6bf5fc5aed24bc2ac826ad69eee31 Reviewed-on: https://gem5-review.googlesource.com/11182 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
2018-08-15systemc: Remove references to internal constants from the tests.Gabe Black
The tests were referring to constants defined in the Accellera systemc implementation which identified various log message types. This change replaces those (sometimes quite long) string constants with their actual value. This doesn't make that interface any more fragile since the constant value won't track between the Accellera version and this one, but it does make its fragility more explicit by using the value directly. If in the future we decide to hide the magical nature of those particular string constants, we could make them into our own constants in the implementation. Regardless, the tests shouldn't refer to internal details of the implementation. Change-Id: I116a7407fcac49367649b250683117f3ccf4f9ed Reviewed-on: https://gem5-review.googlesource.com/11181 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
2018-08-15systemc: Turn some macros into enums to fix regression test building.Gabe Black
The spec defines these constants to be macros, but the regression test refers to them using the sc_core namespace. That breaks things because the macros don't expand to an identifier, they expand to an expression. This change converts the macros into enums like in the Accellera implementation to get the regression tests to build. Change-Id: I3db7dc87a7a597907df658624a7343bc6ca1734e Reviewed-on: https://gem5-review.googlesource.com/11180 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
2018-08-15systemc: Remove more Accellera source specific include paths in tests.Gabe Black
Some more tests were including Accellera headers specifically, even after including systemc.h which would bring those headers in alongside all the others. Change-Id: Ib2db0a410e0ecea0035b636e8dd04c85045b8578 Reviewed-on: https://gem5-review.googlesource.com/11179 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
2018-08-15systemc: Include boost/bind.hpp in the systemc header.Gabe Black
The systemc spec says that sc_bind, sc_ref and sc_cref macros should expand to boost::bind, boost::ref, and boost::cref respectively, but that it's "use is not mandantory". Unfortunately, the regression tests use those macros without actually including the boost headers for themselves, and so they won't compile without dragging in these boost headers as a dependency. This should be mostly ok to include here since gem5 itself shouldn't include systemc, just the sub headers that systemc brings in. systemc code which includes systemc *will* have a dependency on boost, but that at least contains the new dependency somewhat. Change-Id: I1877a1b7dae2952f30a9d577d778739abbe7ac3b Reviewed-on: https://gem5-review.googlesource.com/11178 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
2018-08-15systemc: Fill out some of the sc_vector.hh classes.Gabe Black
The iterator class needs to have some operators, etc., defined so that tests written against it can compile correctly. The implementations were heavily influenced by the Accellera implementation. Also it should be noted that the systemc spec is incorrect where it defines these classes. When implemented like they are in the Accellera version, the versions of bind in sc_vector_assembly which take sc_vector<T>::iterator and iterator parameters are different, and so they can overload each other. If implemented as described by the spec however, those types are the same and the code won't compile. Change-Id: I62852adf7e6c0a2f3df076ba4e93d2501859c32d Reviewed-on: https://gem5-review.googlesource.com/11177 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
2018-08-15systemc: Make a test stop including an internal path for sc_vector.Gabe Black
The sc_vector class is available through systemc.h already, so there's no reason to include an internal path which is only there on Accellera by coincidence of the implementation. Change-Id: I41cab4711c0837cd9b20c21871b79be5165bf498 Reviewed-on: https://gem5-review.googlesource.com/11176 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
2018-08-15systemc: Add a script which automates building and running tests.Gabe Black
The only required option for the script is the path to a build directory, for instance build/ARM. It uses that when running scons and when referring to generated files (like the built versions of the tests). It uses the location of the script itself to find source files, like the "golden" version of outputs. This script runs tests in three phases, compilation, running, and then verification. By default, all three phases are run for all tests, but which phases run and how they work can be customized by specifying them explicitly on the command line with the --phase option. Each time the --phase option shows up on the command line, it should be followed by the name of the phase being specified. That both declares that that phase should be run, and also that any subsequent options apply to that phase, at least until the next --phase option. Currently, only the "compile" and "execute" phases are implemented, and only the "compile" phase has been tested at all or has any options defined. The "compile" phase simply takes all the options it was given and pass them on to scons. The "verify" phase simply prints a message which says what it would have verified. The script can list the available tests with the --list option, as determined by the json systemc test manifest file which scons can generate, and which the script can refresh if passed the --update-json option. You can also specify what "flavor" of build you want to do, ie opt, debug, fast, etc., with the --flavor option. Only one flavor can be tested at a time, but that should be the desired behavior most of the time. If multiple flavors need to be tested, the script can be invoked multiple times. Finally, there is a --filter option which accepts a python expression as a string. That expression is evaluated in the namespace of the properties of each test in the json file, and if it returns true then that test is run. For instance, to verify only compile_only tests, you would use: systemc/tests/verify.py build/ARM --filter 'compile_only' To test only compile_only tests named bob, you would run this: systemc/tests/verify.py build/ARM --filter \ 'compile_only && name ="bob"' Also included is a simple config.py which is the beginning of a config which will run the systemc regression tests. Right now, all it knows how to do is run sc_main. Change-Id: I62666be8b1622d1355153e623b4274a939507e44 Reviewed-on: https://gem5-review.googlesource.com/10975 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>