14276:3fee93856d55 |
13-Sep-2019 |
Gabe Black <gabeblack@google.com> |
systemc: Make TLM port wrappers for tlm_base_(target|initiator)_socket.
These are useful if using TLM sockets without using the standard TLM protocol. For instance, when used with ARM's fast models, this can wrap sockets which carry the opaque GICv3Comms protocol.
Change-Id: I329a919068f958abbde2cb83683d3a3ae2e05a20 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/20860 Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Maintainer: Gabe Black <gabeblack@google.com> Tested-by: kokoro <noreply+kokoro@google.com> |
14275:89d888c589d9 |
28-Aug-2019 |
Gabe Black <gabeblack@google.com> |
systemc: Expose the utility functions for payload->packet conversion.
These can be used anywhere someone needs to turn a packet into a payload or vice-versa.
Change-Id: I26a1f134e6fbec81b230a2853cf79264e80bf2dc Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/20859 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Gabe Black <gabeblack@google.com> Tested-by: kokoro <noreply+kokoro@google.com> |
14189:a363edac6a12 |
16-Aug-2019 |
Gabe Black <gabeblack@google.com> |
mem, sim, systemc: Reorganize Port and co.s bind, unbind slightly.
The base Port class can keep track of its peer, and also whether it's connected. This is partially delegated away from the port subclasses which still keep track of a cast version of their peer pointer for their own conveneince, so that it can be used by generic code. Even with the Port mechanism's new flexibility, each port still has exactly one peer and is either connected or not based on whether there is a peer currently.
Change-Id: Id3228617dd1604d196814254a1aadeac5ade7cde Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/20232 Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Gabe Black <gabeblack@google.com> |
14126:cbb7113b701a |
23-Jul-2019 |
Chun-Chen TK Hsu <chunchenhsu@google.com> |
systemc: Provide Port wrapper classes for sc_port
Add Port wrappers for sc_port, sc_interface, and sc_export.
Change-Id: Ib70cb7466461c8d32e3a260bf2a2d60a6ded87c3 Signed-off-by: Chun-Chen TK Hsu <chunchenhsu@google.com> Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/19788 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> Tested-by: kokoro <noreply+kokoro@google.com> |
13901:b9329102b1d8 |
22-Apr-2019 |
Gabe Black <gabeblack@google.com> |
systemc: Add a distinct async_request_update mechanism.
This mechanism had just been plumbed into the regular request_update, but that doesn't have any thread safety which is the whole point of async_request_update. This new mechanism puts async update requests into their own list which is checked any time normal updates happen.
The delta cycle which triggers those updates must happen through some other means which will usually be ok. The exact timing of the update is undefined, so it would be legal for it to either not be recognized before the impending end of the simulation, or for it to get picked up by subsequent activity. If there isn't subsequent activity but the simulation also doesn't end, for instance if there are only gem5 events left, then that update could be lost. That is an unresolved issue.
It would be nice to schedule a "ready" event if async updates were added which would ensure they wouldn't starve. Unfortunately that requires the event queue lock, and in practice it's been found that a systemc process might block, effectively holding the event queue lock, while it waits for some asyncrhonous update to give it something to do. This effectively deadlocks the system since the update is blocked on the lock the main thread holds, and the main thread is blocked waiting for the update.
Change-Id: I580303db01673faafc2e63545b6a69b3327a521c Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/18288 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> Tested-by: kokoro <noreply+kokoro@google.com> |
13874:290caa906b75 |
15-Apr-2019 |
Gabe Black <gabeblack@google.com> |
systemc: Use the new TLM socket types in the TLM bridge SimObjects.
These are in the definition of the python version of the SimObjects.
Change-Id: Iadb143158815df68cf32cc254ad19f755ab4e78a Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/18173 Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Gabe Black <gabeblack@google.com> |
13873:9fd9b551f9d8 |
15-Apr-2019 |
Gabe Black <gabeblack@google.com> |
systemc: Add Port types for initiator and target sockets.
These make it clear that a port represents a TLM socket, what direction it faces, and what its width is.
Change-Id: Idcbea2b9b053f1e0685e011bc2c7de2468fb25b2 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/18172 Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Gabe Black <gabeblack@google.com> |
13846:af21c0a800fb |
21-Mar-2019 |
Gabe Black <gabeblack@google.com> |
systemc: Teach the TLM bridges how to use gem5's new backdoor mechanism.
This change teaches the TLM bridges to translate between TLM's DMI mechanism and gem5's backdoor mechanism.
Change-Id: I942a6cce4fb87f10e8173f4ee49b6c7b0ffa7e4a Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/17591 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13823:040971e0f728 |
14-Mar-2019 |
Gabe Black <gabeblack@google.com> |
systemc: Templatize the gem5/TLM bridge SimObjects.
The C++ side is templated, and there are python versions for each (currently two) width of bridge supported.
Change-Id: I4baa9f22d4c87629d45e9e1292eb66c65d25a655 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/17234 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13822:b33182487dd2 |
12-Mar-2019 |
Gabe Black <gabeblack@google.com> |
systemc: Delete extra code from src/systemc/tlm_bridge.
Much of the code in src/systemc/tlm_bridge has been absorbed into the TLM/gem5 bridge SimObjects and is no longer needed and redundant with the original version in util/.
Change-Id: I0fa7af67649987cf9f6fc5cd4783002dde2242ac Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/17233 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13821:f9252f27ded7 |
11-Mar-2019 |
Gabe Black <gabeblack@google.com> |
systemc: Create unified gem5/TLM bridge SimObjects.
These objects expose a standard TLM initiator or target socket with width 64, and a gem5 slave or master port. What goes in one type of port comes out the other with the appropriate conversion applied.
Change-Id: I65e07f746d46d3db0197968b78fffc5ddaede9bf Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/17232 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13820:006dabd9712c |
25-Feb-2019 |
Gabe Black <gabeblack@google.com> |
tlm: Initial import of tlm/gem5 bridge code.
This is a slightly mangled version of the existing bridge code in util/tlm/src/. The changes fix some small style issues, change to gem5 specific include paths, and removes the Gem5SimControl code. That code coordinates gem5 with the external systemc kernel, and in this usage there's no external kernel.
The code imported here compiles, but it isn't yet expected to work.
Change-Id: I9c593a52e2554534720d21cd31a03e543ad897ad Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/17231 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13819:3c0919b3b601 |
12-Mar-2019 |
Gabe Black <gabeblack@google.com> |
systemc: Provide a utility Port TLM socket wrapper class.
This class should make it easy to attach TLM sockets into the gem5 python Port config mechanism.
Change-Id: I3548c654d56bfc852f3fc98fe6433163b14f7fe3 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/17230 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13785:3280e13bf334 |
12-Mar-2019 |
Gabe Black <gabeblack@google.com> |
systemc: Hook up gem5_getPort to the gem5 getPort mechanism.
Change-Id: I771607c4436f4c1ca9d355d1da52924308cfc3b3 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/17229 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Gabe Black <gabeblack@google.com> |
13743:62e81e25d8d5 |
25-Feb-2019 |
Gabe Black <gabeblack@google.com> |
tlm: Add some includes to some tlm_utils header files.
These bring in some pieces that those headers use but were only coincidentally included by something else when they were used.
Change-Id: I5f119260d8f25d914d8545a60834f23f65f82d0c Reviewed-on: https://gem5-review.googlesource.com/c/16948 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Gabe Black <gabeblack@google.com> |
13737:78c21fae6047 |
27-Feb-2019 |
Gabe Black <gabeblack@google.com> |
systemc: Move systemc disabling checks to SConsopts.
This will ensure that the value of USE_SYSTEMC is consistent throughout the build. It also has the side effect that USE_SYSTEMC can be forced to a particular value if you're confident you know what you're doing and want to override these checks.
Change-Id: I0f2d1153245ff17ce4a828c6b7496cb9ded6bd5b Reviewed-on: https://gem5-review.googlesource.com/c/16810 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13729:8c67a3050a07 |
20-Feb-2019 |
Gabe Black <gabeblack@google.com> |
systemc: Remove _m5.systemc passthroughs from SystemC_Kernel.
These functions are now exposed through m5.systemc and m5.tlm.
Change-Id: I9f519debbe7380ee38594badcc1146e66e15f8a8 Reviewed-on: https://gem5-review.googlesource.com/c/16570 Maintainer: Gabe Black <gabeblack@google.com> Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> |
13726:88c80964fd93 |
20-Feb-2019 |
Gabe Black <gabeblack@google.com> |
systemc: Get rid of --working-dir in the test's config.py.
This option is no longer used and isn't needed.
Change-Id: Iec1e2799b4f8c9ea258614323d55941b55828d27 Reviewed-on: https://gem5-review.googlesource.com/c/16565 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Gabe Black <gabeblack@google.com> |
13725:2561f9828b95 |
20-Feb-2019 |
Gabe Black <gabeblack@google.com> |
systemc: Start using the m5.systemc module in the test config.py.
Start using sc_main and sc_main_result from the systemc module, and stop using the versions of those functions which are attached to the SystemC_Kernel SimObject.
Change-Id: I802898038c80ed36e6a9176211cffb7e0fde2d7e Reviewed-on: https://gem5-review.googlesource.com/c/16564 Maintainer: Gabe Black <gabeblack@google.com> Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> |
13724:63e550c8ffe2 |
20-Feb-2019 |
Gabe Black <gabeblack@google.com> |
systemc: Add m5.systemc and m5.tlm python modules.
These will be how systemc and tlm APIs which are not attached to SimObjects will be exposed. This avoids having to artificially attach them to wrapping SimObjects for instance, which is a bit awkward and non-obvious.
The python code which attaches the systemc and tlm modules to the m5 modules lives in src/python/m5/__init__.py, but the modules themselves live in src/systemc/python to keep all the systemc code grouped together. It might be a little confusing to have a small part of the glue that adds those modules in a separate place (__init__.py), but that is, as far as I can tell, unavoidable, and it's better in my opinion to keep the systemc code grouped together than to put it alongside the other python code and __init__.py.
Change-Id: Iecb218daec5e15772152b5ad22b51f43b86c3d4b Reviewed-on: https://gem5-review.googlesource.com/c/16563 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Gabe Black <gabeblack@google.com> |
13723:c4e71f81c09b |
15-Feb-2019 |
Gabe Black <gabeblack@google.com> |
systemc: Export the tlm::tlm_global_quantum class to python.
This way the python code can set up the global quantum without having an sc_main function to do it.
Change-Id: I96df4dea0f1bfe9e3e86d4784bbda8f5b6b74d0b Reviewed-on: https://gem5-review.googlesource.com/c/16503 Maintainer: Gabe Black <gabeblack@google.com> Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> |
13722:4f0de9b591df |
15-Feb-2019 |
Gabe Black <gabeblack@google.com> |
systemc: Export the sc_core::sc_time class to python.
This class isn't incredibly useful in python, but it's needed to call some other functions which are more useful.
Change-Id: I5c23cca0b50f0455423399db8b009bdf86a6ec41 Reviewed-on: https://gem5-review.googlesource.com/c/16502 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Gabe Black <gabeblack@google.com> |
13709:dd6b7ac5801f |
26-Jan-2019 |
Andreas Sandberg <andreas.sandberg@arm.com> |
python: Make iterator handling Python 3 compatible
Many functions that used to return lists (e.g., dict.items()) now return iterators and their iterator counterparts (e.g., dict.iteritems()) have been removed. Switch calls to the Python 2.7 iterator methods to use the Python 3 equivalent and add explicit list conversions where necessary.
Change-Id: I0c18114955af8f4932d81fb689a0adb939dafaba Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-on: https://gem5-review.googlesource.com/c/15992 Reviewed-by: Juha Jäykkä <juha.jaykka@arm.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com> |
13705:2a84d8051414 |
20-Feb-2019 |
Gabe Black <gabeblack@google.com> |
systemc: Make the verify.py script work when run from different dirs.
The verify.py script ran scons from the CWD, and that would fail if there wasn't a SConstruct in that directory, ie if it wasn't from the source of the checkout.
This change makes verify.py use scons' --directory option to run from where the SConstruct is, or at least the SConstruct which was checked out alongside that copy of verify.py. That location can be overridden using the new -C or --scons-dir options.
Change-Id: I9f033d6dd30e0c2992b7f3102c573b34ea9c49e0 Reviewed-on: https://gem5-review.googlesource.com/c/16562 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Gabe Black <gabeblack@google.com> |
13703:bedf6da29c9b |
14-Feb-2019 |
Gabe Black <gabeblack@google.com> |
systemc: Make sc_(pause|stop) exit to python when not using sc_main.
In those cases, there's no sc_main to return control to. The python config script is serving more or less the same purpose, so we can return control to there instead.
Change-Id: I3cf0623ae51d989b883fb8556ebbf44651bbec99 Reviewed-on: https://gem5-review.googlesource.com/c/16445 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Gabe Black <gabeblack@google.com> |
13702:f2d184ad0886 |
14-Feb-2019 |
Gabe Black <gabeblack@google.com> |
systemc: Init some values in the scheduler for running without sc_main.
When running without sc_main, sc_start won't be called, and therefore runToTime and maxTick won't be initialized. To avoid the scheduler getting confused and behaving erratically, those values should be initialized to something that makes sense in situations where there's no sc_main.
Change-Id: I6ddd7db9ecb36d716eb5ef75e1c38bb99a386092 Reviewed-on: https://gem5-review.googlesource.com/c/16443 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Gabe Black <gabeblack@google.com> |
13701:d84e5d2979a7 |
14-Feb-2019 |
Gabe Black <gabeblack@google.com> |
systemc: Handle exceptions "correctly" even if sc_main hasn't been run.
If sc_main hasn't run, for instance if there isn't an sc_main and gem5 is orchestrating the simulation directly, then exceptions shouldn't be thrown to the sc_main fiber since it isn't running and may not be able to run since sc_main may not even exist.
Instead, we need to check whether it makes sense to throw to sc_main, and if not pass the exception directly to the report handler since there likely won't be anyone to catch it if we just throw it from the scheduler or into general purpose gem5.
Since the name throwToScMain is no longer a complete description for what that function does, this change renames it to throwUp, since it will now throw exceptions up the stack, either to sc_main or to the conceptual top level by going directly to the report handler.
Change-Id: Ibdc92c9cf213ec6aa15ad654862057b7bf2e1c8e Reviewed-on: https://gem5-review.googlesource.com/c/16442 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Gabe Black <gabeblack@google.com> |
13687:5d81a7792e59 |
08-Feb-2019 |
Gabe Black <gabeblack@google.com> |
systemc: Add a systemc_home directory which maps to the ext headers.
Some systemc code bases expect to find a SYSTEMC_HOME environment variable which points to the installed header files provided by systemc, all under ${SYSTEMC_HOME}/include. The systemc headers in gem5 are not supposed to be installed anywhere, but to satisfy those expectations this change creates a dummy systemc_home directory with an include/ in it which has headers which just include the actual headers in src/systemc/ext.
More gem5 aware code bases can still access the headers either by letting gem5's scons environment -I the ext directory, or can do so themselves if they're not being built by gem5's scons.
Change-Id: I5f2e6bfcf20dd314d525207c2e13ca53474a33f3 Reviewed-on: https://gem5-review.googlesource.com/c/16263 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13686:0cdc35bbfc78 |
08-Feb-2019 |
Gabe Black <gabeblack@google.com> |
systemc: Make an include in src/systemc/ext use a relative path.
The includes in src/systemc/ext are supposed to use relative paths so that they can be included in other bodies of code which aren't based in gem5 and don't share it's -I-s, or potentially even have access to anything outside of src/systemc/ext.
Change-Id: Icde457329c2c4ab4689221015bfcfe2ff8b051f0 Reviewed-on: https://gem5-review.googlesource.com/c/16262 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13657:ee0fdfeb93ed |
09-Feb-2019 |
Gabe Black <gabeblack@google.com> |
systemc: Change the type of a loop counter to avoid a warning.
g++ complained about comparing an signed int loop counter with the return value of a size() function. This change changes it to an unsigned to make g++ happy/quiet.
Change-Id: I28fa79c448465b24d77b5623860f9b991f313561 Reviewed-on: https://gem5-review.googlesource.com/c/16286 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Gabe Black <gabeblack@google.com> |
13656:2727dfddacf3 |
09-Feb-2019 |
Gabe Black <gabeblack@google.com> |
scons: Change an = to a += when accumulating sources from filters.
The loop accidentally used a = when it should have used a +=, meaning only the sources from the final filter would be used.
Change-Id: Ie066a5f85696f05d9ad3cf61f928b12deb39475b Reviewed-on: https://gem5-review.googlesource.com/c/16285 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Gabe Black <gabeblack@google.com> |
13655:585ffa1a18d3 |
09-Feb-2019 |
Gabe Black <gabeblack@google.com> |
systemc: scons: Specify RPATH as a list.
scons will attempt to use insert() on the value of RPATH when adding in additional values. That will fail if RPATH is a Literal.
Change-Id: I9da75c6b189f12843a3452cdf92f7b56c0ec340b Reviewed-on: https://gem5-review.googlesource.com/c/16284 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Gabe Black <gabeblack@google.com> |
13586:008fe87c1ad4 |
22-Jan-2019 |
Gabe Black <gabeblack@google.com> |
systemc: Fix TLM related includes.
There are a couple things this CL fixes related to the TLM #includes.
1. Removes #includes of <systemc> and <tlm>. These bring in a header file from boost which shouldn't be necessary but which some of the tests (and likely some external code) depends on. We avoid including those in files built into gem5 itself so that gem5 isn't dependent on boost.
2. All includes in ext should be relative. That way those headers can be removed from gem5 and still build, allowing them to be moved over to or referenced from a foreign codebase which isn't part of gem5.
Change-Id: I76e267385b48cb4fe93aea89ec8319c76465a0a4 Reviewed-on: https://gem5-review.googlesource.com/c/15796 Reviewed-by: Ciro Santilli <ciro.santilli@arm.com> Maintainer: Gabe Black <gabeblack@google.com> |
13540:da30e62884ee |
10-Jan-2019 |
Andrea Mondelli <andrea.mondelli@ucf.edu> |
misc: updated shabang for python script
The default python on MacOS doesn’t have an alias to python2. The official python version supported in gem5 is Python2.7.
This patch updates the shabang according to the version required in gem5.
Change-Id: I9533c0f7858b5b3cab0ef101be1ee5cd718105b0 Reviewed-on: https://gem5-review.googlesource.com/c/15375 Maintainer: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> |
13529:73d7ab16c041 |
09-Jan-2019 |
Gabe Black <gabeblack@google.com> |
systemc: Fix a function which was broken during style fixes.
Some brackets were misapplied while correcting the style of the TLM header files.
Change-Id: I4e26d0316ca2545a5f26ad5fef0e986e42a1895b Reviewed-on: https://gem5-review.googlesource.com/c/15455 Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com> Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com> |
13527:94ec8e62580e |
12-Dec-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Make input.txt a dependency for the tlm/endian_conv test.
This input file is consumed by the test and needs to be in the build directory.
Change-Id: I3420dec9e41a1981c7d4e6df47f03273e378ab66 Reviewed-on: https://gem5-review.googlesource.com/c/15064 Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com> Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com> |
13526:ec97c829002a |
12-Dec-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Exclude some failing systemc TLM tests in working.filt.
These are known to fail and are undiagnosed, and so are not "working" and shouldn't be in included when using the working.filt filter file.
Change-Id: I46e9f880bd4095085e4217ac6bec950cb2af9536 Reviewed-on: https://gem5-review.googlesource.com/c/15066 Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com> Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com> |
13525:2d588ebdee7a |
11-Dec-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Remove the TLM dependence on a non-standard method.
The sc_event_finder class in Accellera's implementation has a non-standard report_error function that it uses internally. The TLM headers were calling that function in their own event finder subclass. This change replaces that call with what should be an equivalent bit of code which is based on the report_error implementation.
Change-Id: Id57d26791df01403a77e70d5f4a00f650dc33599 Reviewed-on: https://gem5-review.googlesource.com/c/15063 Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com> Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com> |
13524:7f0950094a4f |
03-Jan-2019 |
Gabe Black <gabeblack@google.com> |
systemc: Stop using the sc_string_view type.
It doesn't seem to provide anything more that std::string, and comes with extra dependencies/baggage.
Change-Id: I2c599bcc93fa4a944ff249410d24e8f8be981afe Reviewed-on: https://gem5-review.googlesource.com/c/15298 Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com> Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com> |
13523:de27641700bb |
03-Jan-2019 |
Gabe Black <gabeblack@google.com> |
systemc: Replace sc_core::sc_type_index with std::type_index.
The former is either the same as the later, or a custom wrapper if C++11 isn't supported. Since we generally expect C++11 support, we can skip the indirection.
Change-Id: I9a45e3854bb7cc56d094e3fe2773fe4b5c94403b Reviewed-on: https://gem5-review.googlesource.com/c/15297 Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com> Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com> |
13522:1b2565619f41 |
03-Jan-2019 |
Gabe Black <gabeblack@google.com> |
systemc: Stop using the Accellera specific "none" global event object.
That event being available is nonstandard. Define our own static event for use in that case.
Change-Id: I5e8892bd83cc1984d63949ef3e249755dca0c702 Reviewed-on: https://gem5-review.googlesource.com/c/15296 Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com> Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com> |
13521:74fa3ac44057 |
12-Dec-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Rename tlm_core header files to have a .hh extentension.
This makes those files more consistent with other headers in gem5. The top level headers (tlm and tlm.h) and the tlm_utils headers were left alone since the user might reasonably expect those to have a well known name. The tlm_core headers by comparison are an implementation detail, and users shouldn't include them directly by name.
Change-Id: Ibc82e8159e47717c79d76f50ed96fdd619294a06 Reviewed-on: https://gem5-review.googlesource.com/c/15067 Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com> Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com> |
13520:5b2b4cab1fa1 |
12-Dec-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Add a dummy argv[0] when running the tests.
One TLM test will complain if argc isn't 1 or 2, assuming that that must mean that argc > 2. If it's 0 then the test will also complain and fail. We therefore need to pass it at least a dummy value in argv/argc.
Change-Id: I5c64856f46d1459d7238e88ad8ba06933c7c38b8 Reviewed-on: https://gem5-review.googlesource.com/c/15065 Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com> Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com> |
13519:4de99619b070 |
11-Dec-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Stop using the non-standard sc_time % in TLM.
The TLM headers were using the non-standard % operator on sc_time. This change replaces that with % applied to the result of sc_time::value().
Change-Id: Ic381eb1ada2c994d04e65896db178f58446944ae Reviewed-on: https://gem5-review.googlesource.com/c/15062 Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com> Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com> |
13518:6168e030b4c7 |
11-Dec-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Add an elaboration_done method to sc_simcontext.
The TLM headers rely on this non-standard function.
Change-Id: Iaedec35f1f363dcf3e1fcdb58a74eb2cdc05ddc0 Reviewed-on: https://gem5-review.googlesource.com/c/15061 Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com> Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com> |
13517:64279791af98 |
11-Dec-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Include cstring in the tlm header file.
A lot of TLM implementation assumes the string functions (memcpy, memset, etc) are available, but don't include cstring. Lets do that for them to avoid having to fix up a lot of places.
Change-Id: I1f26d3a227fe2cefc2613e24cbb0333216e46ee9 Reviewed-on: https://gem5-review.googlesource.com/c/15060 Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com> Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com> |
13516:315f10e2567b |
11-Dec-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Remove redundant tlm_ prefixes from file names.
We already know those files belong to tlm because of the directory they're in. Removing the prefix makes the paths of the headers less enormously long.
Change-Id: I869e58fae904162f353bb31f4c0919fba08dffa6 Reviewed-on: https://gem5-review.googlesource.com/c/15059 Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com> Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com> |
13515:9e434d7ebd3a |
12-Dec-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Replace some calls to some Accellera specific functions in TLM.
The TLM event finder class was calling implementation specific functions from the Accellera version of systemc. This change replaces those calls with equivalent calls which match the gem5 implementation.
Change-Id: I0ecdb0a4bf09aeb1aad823a01105fbd88edb4601 Reviewed-on: https://gem5-review.googlesource.com/c/15075 Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com> Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com> |
13514:75569a60a0be |
03-Jan-2019 |
Gabe Black <gabeblack@google.com> |
systemc: Rename tlm .cpp files to .cc and add SConscripts.
Change-Id: Ia30192b441dd34bc7165c6335386c88c0015fdf6 Reviewed-on: https://gem5-review.googlesource.com/c/15295 Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com> Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com> |
13513:bbf275465d3d |
08-Dec-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Fix style issues in the TLM header files.
Change-Id: Id12ffb9b56b3887afcf30120f81ce5eb75a5987b Reviewed-on: https://gem5-review.googlesource.com/c/15057 Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com> Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com> |
13512:fa58ac6ea3e8 |
08-Dec-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Also look for tests in the tlm test directory.
Both basic systemc and tlm tests were present, but scons only looked in the systemc directory when populating the test json. This change makes it also look in the tlm directory so that those tests can be run.
Change-Id: Id65b744664350f6105fb3a4f28cbc7ab91d8c82e Reviewed-on: https://gem5-review.googlesource.com/c/15056 Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com> Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com> |
13511:dc5864c73df3 |
08-Dec-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Initial import of TLM headers from Accellera.
These headers will need to be cleaned up and have some Accellera specific quirks ironed out of them, but I'll do that in a later change to make it clear what those changes are.
Change-Id: Ia4e08633ab552b4c616c66c9b7e2bbd78ebfe7b9 Reviewed-on: https://gem5-review.googlesource.com/c/15055 Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com> Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com> |
13498:f6fb1bbfa39e |
17-Dec-2018 |
Nikos Nikoleris <nikos.nikoleris@arm.com> |
systemc: Allow specific functions to shadow the base class method
sc_in::bind and sc_core::sc_object::print shadow their respective base class method. This change adds the necessary declarations to inform the compiler that this is intentional.
Change-Id: I8c6bc0f05aa568630783db63d52be90f4ea4748c Signed-off-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Reviewed-on: https://gem5-review.googlesource.com/c/15135 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13497:026001930974 |
02-Dec-2018 |
Nikos Nikoleris <nikos.nikoleris@arm.com> |
scons: Disable systemc on Mac OS
LLVM on Mac OS up until version 10.0.0 doesn't seem to support the attribute for weak linking and fails to compile. Additionally, even the basic example tests fail. Therefore, this change disables systemc by default on Mac OS until we address these issues.
Change-Id: Iaa6360ec61317e01f4e645af8b509961b3144282 Signed-off-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Reviewed-on: https://gem5-review.googlesource.com/c/14818 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13495:75d257a1795e |
04-Dec-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Ensure resets and edges are notified when signaling a change.
Boolean sc_buffers (either pure bool or sc_dt::sc_logic) should signal positive and negative edges and resets even when their value doesn't change, unlike sc_signals. The spec doesn't actually say that and just mentions the value changed event, but it may have been implied that the other types of events also happen, they just made special mention of the value change event.
This change moves some code around a bit so that when _signalChange() is called, if the underlying type is a boolean signal, it will automatically notify the appropriate edge event and signal any reset. Putting the functionality in _signalChange instead of delegating it to the sc_buffer lets us have a single template for sc_buffer and makes the base class template specialization handle whether the edge events exist, and if so which should be notified.
Change-Id: Ic4ca86afc3fde6a9df5c15a0a7386e24ac89a9e2 Reviewed-on: https://gem5-review.googlesource.com/c/14916 Reviewed-by: Matthias Jung <jungma@eit.uni-kl.de> Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13491:9783a9007eac |
05-Dec-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Update test output for longer lived processes.
In the systemc spec, process handles can be invalidated if they have no children and are terminated. The implementation is not required to do so however, and for the sake of simplicity gem5 currently does not. To quote:
"When the underlying process instance terminates, if the process instance has no surviving children, an implementation may choose to invalidate any associated process handles, but it is not obliged to do so."
Two tests have reference output which is affected by this (legal) difference in behavior. In one case, the test creates new processes which reuse the names of processes that have been terminated. Since gem5 doesn't invalidate the old processes, a standard mechanism is activated which renames the processes to something which is unique.
The other test has this same problem, and also prints the hierarchy of processes several times during the test. In that hierarchy, the terminated tests with no live children are still present, where in the old reference output they've been removed.
This change updates the reference output to match gem5's behavior.
Change-Id: I363448de10080bdce01a4df92f991c67b31a2401 Reviewed-on: https://gem5-review.googlesource.com/c/14919 Reviewed-by: Matthias Jung <jungma@eit.uni-kl.de> Maintainer: Gabe Black <gabeblack@google.com> |
13490:f300a864a212 |
04-Dec-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Update the ordering in the reference output for some tests.
There are a number of cases where systemc leaves the decision of what order things happen up to the kernel, and any ordering is legal and conformant with the spec as long as it's repeatable. The reference outputs reflect a particular choice of ordering which is implementation specific, and while considerable effort has been made to make the gem5 ordering match the Accellera ordering, at a certain point that's no longer practical or desirable.
This change manually updates the reference output for the tests that haven't been excluded for other reasons which have this sort of ordering problem. They have been individually examined, and as best as I can tell changing the output this way does not mask any underlying error.
One or two real problems were discovered in addition to the ordering issues, and those were fixed in earlier changes.
Change-Id: I915269998de3f33d5ab5d1fd754a830fd620184d Reviewed-on: https://gem5-review.googlesource.com/c/14918 Reviewed-by: Matthias Jung <jungma@eit.uni-kl.de> Maintainer: Gabe Black <gabeblack@google.com> |
13489:8b0666946c20 |
05-Dec-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Ignore process control functions on terminated processes.
These functions can descend to the children of a terminated process, but should have no effect on that process itself.
Change-Id: I6e4bdec8c492dd03d05bc1397aa080e8a51397c1 Reviewed-on: https://gem5-review.googlesource.com/c/14917 Reviewed-by: Matthias Jung <jungma@eit.uni-kl.de> Maintainer: Gabe Black <gabeblack@google.com> |
13488:2e12afaa6cc7 |
30-Nov-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Update signals before initing processes.
We were supposed to do one update phase before adding all processes which didn't have dont_initialize() called to the run queue. We were doing that in the opposite order.
Change-Id: I6dd4108040d455dc78029da029a2eb5e7af819cb Reviewed-on: https://gem5-review.googlesource.com/c/14915 Reviewed-by: Matthias Jung <jungma@eit.uni-kl.de> Maintainer: Gabe Black <gabeblack@google.com> |
13487:ed055875261d |
07-Dec-2018 |
Giacomo Travaglini <giacomo.travaglini@arm.com> |
base, systemc: Fix clang compilation
This patch is fixing the following issues:
- base: typename should be used only for types - systemc: 'GCC_VERSION' is not defined for clang
Change-Id: I27c94445d65691a08a0a14a0ffe6b6942f6c455f Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Reviewed-on: https://gem5-review.googlesource.com/c/14976 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Gabe Black <gabeblack@google.com> |
13467:c24ac4d2adb8 |
29-Nov-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Disable systemc when using gcc versions older than 5.0.
These versions don't support the std::put_time function. Since versions of gcc older than 5.0 aren't going to be supported at all in the fairly near future, this should only be temporary. The number of people using both systemc and older versions of gcc should be very small, or even zero.
Change-Id: Ie9572fdf83ba9569df6bc0457c98d86565dcdcd8 Reviewed-on: https://gem5-review.googlesource.com/c/14755 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Maintainer: Gabe Black <gabeblack@google.com> |
13461:86544d36dfa6 |
21-Nov-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Run the systemc tests directly from their build directories.
We were previously running them from the current directory to start with, and then having the config script switch to the build directory. That worked, except when output streams might be opened as part of the global constructors which would run before the config script.
This change makes us start from the build directory directly, making the switch in the config script unnecessary and ensuring that no files leak outside of the build when running tests.
Change-Id: I484168793bfc5abc4e5631fb3468733fb9d829af Reviewed-on: https://gem5-review.googlesource.com/c/14519 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13460:047b96f24f97 |
21-Nov-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Run the systemc tests with the CWD in the build directory.
This will prevent some (but not all) output files the tests generate from ending up outside the build directory. Because some output file streams are constructed as global objects, their paths are resolved relative to the CWD when gem5 starts, before the config script has a chance to change it.
Subsequent changes will make verify.py should make gem5 start with the correct working directory, cleaning up the remaining leaking files.
Change-Id: I75a1256719dab4c98ab868c209d09b9dcdabb458 Reviewed-on: https://gem5-review.googlesource.com/c/14518 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13459:01fc1946c740 |
21-Nov-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Add DEPS files for some tests with non-source file dependencies.
This ensures that those files will be available when running the test relative to its build directory.
Change-Id: If775ca328b3e1165baa968e4b39c36db0172837c Reviewed-on: https://gem5-review.googlesource.com/c/14517 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13458:6ccb61e12fc7 |
21-Nov-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Make verify.py recognize a DEPS file in test dirs.
This file lists additional files beyond the sources that the test relies on, like files it uses when running.
Change-Id: Ifc4958b26eed08689e0e72bd87f84388dbcf1898 Reviewed-on: https://gem5-review.googlesource.com/c/14516 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13447:384e2dd906aa |
21-Nov-2018 |
Ciro Santilli <ciro.santilli@arm.com> |
systemc: set endianess to fix build for ARM host
ARM architectures were not covered in the endianess #if cases, which lead the build to fail on an arm host with message:
error The file boost/detail/endian.hpp needs to be set up for your CPU type.
Change-Id: Id012cf37810da113174a51746e290e25138739cb Reviewed-on: https://gem5-review.googlesource.com/c/14595 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13438:924abb66cea7 |
08-Nov-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Stop explicitly adding the systemc ext dir to CPPPATH.
That's now handled automatically when the native systemc API is enabled.
Change-Id: If1f88929af335a40554a9fd8df6f68aa1a4c0ba4 Reviewed-on: https://gem5-review.googlesource.com/c/14398 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Gabe Black <gabeblack@google.com> |
13437:9220b09052dc |
08-Nov-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Put systemc headers in the include path when supported.
When the native systemc API support is built in, put the systemc and systemc.h header files in the include path so they can be used as normal. We don't want any external systemc headers being included and getting mixed in with our local ones.
Change-Id: I5fc01ff5f069cfadb7c19a9dead13e7ce7272976 Reviewed-on: https://gem5-review.googlesource.com/c/14397 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Gabe Black <gabeblack@google.com> |
13436:e4498ecec979 |
16-Nov-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Increase the stack size for the sc_main fiber to 8MB.
This is a reasonable size for a stack, and the default size for a stack on Linux as determined by some quick Googling. The sc_main fiber would normally use the primary program stack if run under the standard systemc implementation, and so might expect to have more room to play with.
Change-Id: Ie12344939e7b249da203630ebc7dc773a387d716 Reviewed-on: https://gem5-review.googlesource.com/c/14396 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Gabe Black <gabeblack@google.com> |
13411:bd873635bba6 |
09-Nov-2018 |
Giacomo Travaglini <giacomo.travaglini@arm.com> |
systemc: Push python headers on top of sources
Some build failures has been seen after USE_SYSTEMC being True by default and that has been caused by double definition of _XOPEN_SOURCE and _POSIX_C_SOURCE in some python versions (like 2.7.5, 2.7.13) and /usr/include/features.h (used by gcc)
Python definition should preceed features.h one, since the latter will manually #undef them before #define them.
Change-Id: I774711aaf8145df9ad7677a393a60cf3662d6816 Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Reviewed-on: https://gem5-review.googlesource.com/c/14095 Maintainer: Gabe Black <gabeblack@google.com> |
13410:a03275d35b40 |
07-Nov-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Stop using python to set/manage the global time resolution.
Now that that's managed in c++, we can do that directly without having to depend on the python code being available, the code which lets us call from c++ to python, or for the embedded python interpretter to have started running and have loaded the appropriate modules.
Change-Id: Ied110d8f22181095f8c0c645636a9bd67964263e Reviewed-on: https://gem5-review.googlesource.com/c/14056 Maintainer: Gabe Black <gabeblack@google.com> Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com> |
13407:7915c998957c |
08-Nov-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Get rid of a duplicated base class initializer for sc_fifo.
These were consistent, but redundant and incorrect none the less.
Change-Id: I9ff7fdb9c83f9a8af6fbe969c6c73b9aab8967ad Reviewed-on: https://gem5-review.googlesource.com/c/14136 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Gabe Black <gabeblack@google.com> |
13406:8458901278f3 |
08-Nov-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Add a missing "const" on one of the sc_event operators.
Change-Id: I073ccb0f2c6d1bfebadb95869d6acf7f4ce565af Reviewed-on: https://gem5-review.googlesource.com/c/14135 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Gabe Black <gabeblack@google.com> |
13405:7d430f2488e0 |
07-Nov-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Only build python utility code if python is enabled.
Change-Id: I58054ddd0d5ef0dbee18028c4218e7418347f959 Reviewed-on: https://gem5-review.googlesource.com/c/13979 Maintainer: Gabe Black <gabeblack@google.com> Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com> |
13404:5da37c38d749 |
07-Nov-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Separate and conditionalize exposing sc_main to python.
Change-Id: Ib39dd79c607b277ba94f90dee41c09c1b3b66481 Reviewed-on: https://gem5-review.googlesource.com/c/13978 Maintainer: Gabe Black <gabeblack@google.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com> |
13403:cebee63981d3 |
07-Nov-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Seperate out the sc_main fiber and its bookkeeping.
By pulling out the sc_main fiber (scMainFiber), we can make it available to different entities in the simulator and avoid having to have parallel bookkeeping.
Also this will make it possible to hook into sc_main without putting the code in sc_main.cc.
Change-Id: I7689441424238e9b2e4d2b48e945dea35fd8cc5d Reviewed-on: https://gem5-review.googlesource.com/c/13977 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Gabe Black <gabeblack@google.com> |
13402:80646bbb5c55 |
07-Nov-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Stop using python init to set up predefined message ids.
We can now be sure register_id will work even mid static initializers, so we don't have to use python initialization as a hook to install these predefined message ids.
Change-Id: I2e4d0c678ddda0a9ce5b114bdf1710f36e955f23 Reviewed-on: https://gem5-review.googlesource.com/c/13976 Maintainer: Gabe Black <gabeblack@google.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com> |
13401:3bf529b4bc51 |
06-Nov-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Wrap some report maps in functions.
By declaring the map as a static variable in that function and then returning it, we can guarantee that it's initialized relative to other static initializers so that we don't try to use a data structure that isn't constructed yet. This will let us get rid of the dependence on python for setting up that mapping.
Change-Id: I031ce2039de8f5f79fbb9d76cf1363f15207b64b Reviewed-on: https://gem5-review.googlesource.com/c/13975 Maintainer: Gabe Black <gabeblack@google.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com> |
13384:0209b31e8b2b |
15-Oct-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Enable systemc support by default.
Change-Id: I9375518a54e14413a499d065f5bc5e1031834c81 Reviewed-on: https://gem5-review.googlesource.com/c/13535 Maintainer: Gabe Black <gabeblack@google.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com> |
13383:2a8fdb1a805c |
02-Nov-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Explicitly keep the sc_port bind alongside sc_in's version.
The sc_in bind function was hiding the one from sc_port by changing the const-ness of its parameter. This change explicitly exposes the underlying sc_port version, and keeps it alongside the new sc_in version.
This seems mildly dangerous and undesirable because now there are two very similar functions which would both need to be overridden in order to get new behavior, but I don't think it's any more dangerous and undesirable than as (perhaps unintentionally) specified in the standard.
Change-Id: Ib42a1f8e70bc97abeeeb8d614e71c4019b3a2323 Reviewed-on: https://gem5-review.googlesource.com/c/13880 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13382:7db1e345834c |
02-Nov-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Change how SC_BIND_PROXY_NIL is initialized.
The previous implementation dereferenced a null pointer to create a reference which would then have its address taken in the sc_bind_proxy constructor. clang says that that uses undefined behavior, so this change adds a default constructor which initializes the two contained pointers to null explicitly.
We have to hope systemc code doesn't play around with sc_bind_proxy too much and doesn't accidentally use this constructor unintentionally, but it seems like the least bad possible solution which makes clang happy.
Change-Id: Ic59603495fe7a406586a18ce44de979f84089bcd Reviewed-on: https://gem5-review.googlesource.com/c/13879 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13381:cf853277ac3f |
02-Nov-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Get rid of implementations for some disabled sc_vector methods.
These don't need to exist, and the specifics of their stub implementations were upsetting clang.
Change-Id: Ib38a39c5cfbc2e1647cfb6ed14c660e10df2b1c3 Reviewed-on: https://gem5-review.googlesource.com/c/13878 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13380:6e390b3db40e |
02-Nov-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Move a function after the class it uses internally.
The class was defined, but only later in the file. By putting the function definition later, clang stops reporting an error.
Change-Id: Id4dd1ec3f3a06f4d1dc10ef4ff8c545d98a6ae12 Reviewed-on: https://gem5-review.googlesource.com/c/13877 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13379:c4765c7fa0df |
02-Nov-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Get rid of an unused private member in sc_clock.
It's not useful, and having it makes clang upset.
Change-Id: I51366fd18a287e186c88f08af5c6ba8692779003 Reviewed-on: https://gem5-review.googlesource.com/c/13876 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13335:299a16ef8e3c |
10-Oct-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Get rid of leftovers from unimplemented warnings past.
These warnings were removed when the functionality they warned about was implemented, but there were some leftovers like unnecessary includes and some helper functions which hid gem5 specific headers from the ext directory.
Change-Id: Ic886ac0f1264687524e3a7b7eaab8836f318a5a2 Reviewed-on: https://gem5-review.googlesource.com/c/13398 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13334:b7b38ffa5863 |
10-Oct-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Implement Object::simcontext().
Implement it as a nonstandard alias for the also non-standard sc_get_curr_simcontext.
Change-Id: Ic9a51efa93f687e4b57d622247a5510136fab221 Reviewed-on: https://gem5-review.googlesource.com/c/13397 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13333:1c8ced831e21 |
10-Oct-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Stop filtering out warnings about unimplemented features.
These no longer cause any of the tests to break, so there's no reason to filter them out.
Change-Id: I9c0b25fc42eb3060ac7d6d6a46ded130227c302d Reviewed-on: https://gem5-review.googlesource.com/c/13396 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13332:03eec201e55a |
10-Oct-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Warn about using deprecated sc_port constructors.
This gets rid of one of the last instances of a warning about unimplemented functionality.
Change-Id: I3d8e50ea45554cba969118ce873ed3d2b041ec43 Reviewed-on: https://gem5-review.googlesource.com/c/13395 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13331:2e3f70431e60 |
10-Oct-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Add a python config class for sc_modules.
This class doesn't really add anything, but it provides a consistent base class for sc_modules vs. generic sc_objects.
Change-Id: I3fbd4f6b5d1be0b5419f5cbd304aec61d404a341 Reviewed-on: https://gem5-review.googlesource.com/c/13355 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13330:bcb4b4dea5d8 |
09-Oct-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Don't include the scheduler in an external header file.
The scheduler is an internal detail and shouldn't be exposed to the headers in ext. It would transitively include more headers which are not in ext, making it not self contained.
Change-Id: I8384cde9d19363953ffd0c91e7d8d27f8f79a570 Reviewed-on: https://gem5-review.googlesource.com/c/13336 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13329:a2d273c8e667 |
09-Oct-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Add an accessor for getting the current process.
This is to avoid having to expose the scheduler (which tracks the current process) to header files which should be independent of gem5 and the underlying implementation.
Change-Id: I1b0810ab66c3ce52b5b94236d7df86da66a62472 Reviewed-on: https://gem5-review.googlesource.com/c/13335 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13328:d5f4e801436a |
09-Oct-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Don't re-schedule a process which is already scheduled.
Change-Id: I8e12713c49aad03d0bfb779883adcbfa8fd4b42e Reviewed-on: https://gem5-review.googlesource.com/c/13334 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13327:2b5b3da7a732 |
09-Oct-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Fix accounting in the sc_fifo class.
Reads shouldn't free up space until an update happens.
Change-Id: I18e1601c27b44643f103c86f04b1fa2c23baf1e8 Reviewed-on: https://gem5-review.googlesource.com/c/13333 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13326:fc7933f477ae |
09-Oct-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Exclude a test which tests a feature we're not implementing.
Change-Id: Ieaca025786d70c0d851eec9d1eb9f7f01b513cde Reviewed-on: https://gem5-review.googlesource.com/c/13332 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13325:86323e6cc8ec |
08-Oct-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Switch to using predefined messages for datatypes.
Create and use predefined messages for datatypes which match the ones Accellera uses.
Change-Id: I92dd52f62462b864264217bb81f3ff1dcec020bf Reviewed-on: https://gem5-review.googlesource.com/c/13331 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13324:c8b709468e61 |
07-Oct-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Switch to using predefined messages for channels.
Create and use predefined messages for channels which match the ones Accellera uses.
Change-Id: I179214838bbd83604e50225926cdc6b5b1b16923 Reviewed-on: https://gem5-review.googlesource.com/c/13330 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13323:1cfcaaf573b9 |
07-Oct-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Don't depend on the order of static initializers.
STL containers may need to be constructed before they're used. Don't count on being able to insert into them during a static initializer.
Change-Id: Icb05d5084a470e1ebd976ae6e1954b1a78aabd6a Reviewed-on: https://gem5-review.googlesource.com/c/13329 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13322:7391057615bd |
07-Oct-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Switch to using predefined messages for utils.
Create and use predefined messages for utils which match the ones Accellera uses.
Change-Id: I932b7206fc16181d01a0d5b7441ce617b30e5365 Reviewed-on: https://gem5-review.googlesource.com/c/13328 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13321:1c59e4a11e6f |
07-Oct-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Remove a redundant error check.
If the check doesn't abort the port binding in progress, it will be reported twice.
Change-Id: I691ebd0f1598193f861c6085341dcd2fb05dd210 Reviewed-on: https://gem5-review.googlesource.com/c/13327 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13320:9995d3de4a88 |
07-Oct-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Check the maximum port size when finializing bindings.
Change-Id: Ie7d704547bb8523a3c44479a89d2af4fcce6e8b6 Reviewed-on: https://gem5-review.googlesource.com/c/13326 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13319:94ab5f67a8c3 |
07-Oct-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Fix how the maximum size is computed for sc_ports.
Change-Id: I073eb16cbeb892f24ac3860daca056ed2fb09086 Reviewed-on: https://gem5-review.googlesource.com/c/13325 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13318:5639300a6bbc |
07-Oct-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Mark a test as expected to fail.
This test expects to exit with an error.
Change-Id: Id0b1ae4967ad0b8a356c7a04ed5fe9eb2f3c6641 Reviewed-on: https://gem5-review.googlesource.com/c/13324 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13317:36c574a4036e |
07-Oct-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Switch to using predefined messages for core.
Create and use predefined messages for core which match the ones Accellera uses.
Change-Id: I05b1398933f753946d5917f39d0f39c7cb45ed9f Reviewed-on: https://gem5-review.googlesource.com/c/13323 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13316:0423798f1a05 |
07-Oct-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Add a mechanism for pre-registering message type ids.
These ids are the ones the Accellera implementation/tests use. Some of the tests expect them to be available and usable.
Change-Id: I4e4dc3470c28d4113330a44ccd06ffe7724e75b1 Reviewed-on: https://gem5-review.googlesource.com/c/13322 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13315:baeb753a3f10 |
06-Oct-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Add a warning about dont_initialize and cthreads.
Change-Id: I7cc3e571a7a63eed383ad7f897342a539318f961 Reviewed-on: https://gem5-review.googlesource.com/c/13321 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13314:d1f53683ab94 |
06-Oct-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Make suppress_id work like the test expects.
This is in contrast to how Accellera actually implements it, implying they would fail their own test.
The specific difference is that suppress_id should only suppress SC_INFO and SC_WARNING, not all severity levels like the Accellera implementation will do.
Change-Id: I34f0d2d5912548963433a785cfa6ef88ad818042 Reviewed-on: https://gem5-review.googlesource.com/c/13320 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13313:306a97d3b040 |
06-Oct-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Handle integer based IDs like Accellera does.
This is actually not consistent with how it was handled in 2.0.1 which is supposedly what this is supposed to be backwards compatible with, in that in the earlier version on info and warning messages were suppressed. This is exposed by one of the tests, utils/sc_report/test01, which suppresses an integer ID and then reports an error with it. The "golden" output shows the message supressed, but the actual implementation makes no such distinction.
This implementation duplicates Accelleras for now, but a future change will make it consistent with the old implementation so the test will pass.
Change-Id: I8f959321151e2bb60b94000594f30531b80e2684 Reviewed-on: https://gem5-review.googlesource.com/c/13319 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13312:a7685ffbead8 |
06-Oct-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Refactor reporting to prep for int based messages.
There's a deprecated reporting mechanism based on integer message ids, and the reporting mechanism needs to be refactored a bit to make it easier to support.
Some bookkeeping data structures were moved out to somewhere they can be accessed by other code, obviating the non-standard get_handler function.
Change-Id: Id427cd79be9ef0f3275fbac39ff047ab672fb3e0 Reviewed-on: https://gem5-review.googlesource.com/c/13318 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13311:45408a89d50e |
06-Oct-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Stop passing arguments to sc_main.
These arguments were originally just to make sure arguments could be successfully passed to sc_main, but serve no intrinsic purpose. There are some tests which can accept command line arguments to customize how they run, and having nonsense arguments confuses them and makes them behave incorrectly.
Change-Id: Ib328edb12e01a97dca778bbf45b10e91dd8c07a6 Reviewed-on: https://gem5-review.googlesource.com/c/13317 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13310:160fb526ab4d |
06-Oct-2018 |
Gabe Black <gabeblack@google.com> |
systemc: When resetting a process, clear suspended ready.
When resetting a process which is ready pending coming out of suspend, clear that state since the process is about to run in service of the reset.
Change-Id: Iade3ec4b2f3eadd372cce456dca66850d37ed5fd Reviewed-on: https://gem5-review.googlesource.com/c/13316 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13309:981ed18fdb57 |
06-Oct-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Manually correct the golden output for a test.
The golden reference output for the test was to throw an error which is clearly not at all related to the test (it was about immediate self notifications while the test never calls any form of notify()) and which would happen significantly before the end of the test, negating all the other behaviors and checks which would happen after that point.
Since it strongly looks like the reference output was updated in error, and because other very similarly structured tests are expected to run silently except for printing "Success" at the end (which it does when run under gem5), this change manually updates the golden reference output to reflect what appears to be correct.
Change-Id: I9cde81c28774049653d60f1ffd37a2fae875b522 Reviewed-on: https://gem5-review.googlesource.com/c/13315 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13308:30e825b4fd46 |
06-Oct-2018 |
Gabe Black <gabeblack@google.com> |
systemc: If a process hasn't started, still signal its reset event.
Change-Id: I9c8026cde455070841139d02955f5c083b9e0645 Reviewed-on: https://gem5-review.googlesource.com/c/13314 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13307:e30fee54d354 |
06-Oct-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Ignore attempts to throw a signal to a method.
Change-Id: I8c2b20525aa46955f4f2df34436b7424e706e410 Reviewed-on: https://gem5-review.googlesource.com/c/13313 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13306:2196f4a8201f |
06-Oct-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Remove a redundant injectException for Thread's throw_it.
For some reason lost to the sands of time, the throw_it function was virtual for the Thread class, and that class would call the base class's throw_it, and then also injectException itself. That would result in the exception being injected into the thread twice which is incorrect.
Since it's not clear what the original intention of this code was, the throw_it function is now no longer virtual, and the one useful aspect of it, a check if the process is already terminated, was moved into the base class function.
Change-Id: I7fb14baa7728bd1e9206011870b6ccaa9c4e8c64 Reviewed-on: https://gem5-review.googlesource.com/c/13312 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13305:c0cfd9454cdc |
06-Oct-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Get rid of the unused Process::_procKind.
This seems to be a leftover from an earlier implementation.
Change-Id: I63d7e576fd3c11cf73769c34bbc97a4d3bbbdaeb Reviewed-on: https://gem5-review.googlesource.com/c/13311 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13304:893e724efd57 |
06-Oct-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Ignore immediate self notifications.
Change-Id: If5140bd86159e9257eb9e6ccb8301dd6349dacff Reviewed-on: https://gem5-review.googlesource.com/c/13310 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13303:045f002c325c |
06-Oct-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Distinguish internal events from normal sc_events.
The internal events aren't supposed to show up in the namespace or as children of objects.
Change-Id: Id04b9bfe2e1f8f216390dd989797558eaf33d715 Reviewed-on: https://gem5-review.googlesource.com/c/13309 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13302:429f0adfe7b6 |
05-Oct-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Mark a test as expected to fail.
Change-Id: Iec3b10b0251a7a343b81540f524427e98031577a Reviewed-on: https://gem5-review.googlesource.com/c/13308 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13301:0ef9dd4e1154 |
05-Oct-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Use the "catch action" and the handler func outside sc_main.
If an exception escapes sc_main, Accellera catches it and feeds it into the report handler, telling it to run the catch actions. This seems like it sets up lots of dangerous scenarios, and also makes a vital error detecting path more complex and error prone.
On the other hand, it makes one of the tests pass.
Change-Id: I7f9d07e01e63c7abeee903febe2e434041ec49a4 Reviewed-on: https://gem5-review.googlesource.com/c/13307 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13300:e22889f59b74 |
05-Oct-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Change the default "catch action" to SC_DISPLAY.
There is a test which checks what it was and asserts if it's something else.
Change-Id: I114c0a38c9fa69544416a4d1b555bb87e6246efd Reviewed-on: https://gem5-review.googlesource.com/c/13306 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13299:6bde86615f6f |
05-Oct-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Add an error check to the deprecated notify_delayed.
This can't override pending notifications like normal notify does.
Change-Id: Ie5f12a97ffdcc3dfca20fa7852f89687ee8bfca3 Reviewed-on: https://gem5-review.googlesource.com/c/13305 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13298:0a0a0aad1b4a |
05-Oct-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Add a range check to the intial value of sc_semaphore.
Change-Id: I4e1ef90b14074e5a2794a4386e411397213b2789 Reviewed-on: https://gem5-review.googlesource.com/c/13304 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13297:bd7203a206f6 |
05-Oct-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Add some error checks to sc_clock.
The Accellera version reports an error if the period, high or low portions of the clock are zero.
Change-Id: I2cbb7c3a1b6abe4d969ef875ebf8754d2d1c489a Reviewed-on: https://gem5-review.googlesource.com/c/13303 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13296:7f0348c6e8cf |
05-Oct-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Add an error check to sc_gen_unique_name.
Accellera checks for a null pointer, and a test tries using that input.
Change-Id: I0f098f53de37ebbe481ea46e61fc0a9a404c29db Reviewed-on: https://gem5-review.googlesource.com/c/13302 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13295:e71ae162b863 |
05-Oct-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Detach child events in the Object destructor.
This way they don't try to detach themselves from a parent object which no longer exists.
Change-Id: Id4a3f3b2241cf8c67cae9b983bd4c1acbef083e3 Reviewed-on: https://gem5-review.googlesource.com/c/13301 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13294:c4bdd09fe163 |
05-Oct-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Report an error if an sc_event_finder is used on an unbound port.
Rather than assuming the port is bound, check and report an error.
Change-Id: I4af89d104bc6de9932ff044740446833732d01d9 Reviewed-on: https://gem5-review.googlesource.com/c/13300 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13293:60c727f33e16 |
04-Oct-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Implement port binding policies.
Change-Id: I585e34c4a666103af16ff1675701b61122822b55 Reviewed-on: https://gem5-review.googlesource.com/c/13299 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13292:0dc64d73b440 |
04-Oct-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Add some deprecated positional binding operators.
These are used in one of the tests, specifically the comma operator. It didn't cause compilation to fail because of the default meaning of the comma.
Change-Id: I7ce7fe74f02d4ad6a4ab896a2f0d6bd1ce635c2f Reviewed-on: https://gem5-review.googlesource.com/c/13298 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13291:ccbae1f89cd3 |
04-Oct-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Keep track of progress when positionally binding.
Positionally binding more than once (like with the deprecated comma or << operators) should pick up where it left off the last time instead of starting again from the beginning.
Change-Id: Ifc33520d6ce40544bd0ad80a5657b1a38a7914e4 Reviewed-on: https://gem5-review.googlesource.com/c/13297 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13290:1e720f971554 |
04-Oct-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Fill out some error reporting in sc_port.
Rather than just asserting some invariants are true, report errors if they aren't.
Change-Id: Id361b8a13011e1a75289ddddb6b41c1d09dbf794 Reviewed-on: https://gem5-review.googlesource.com/c/13296 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13289:f32600676fe3 |
04-Oct-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Run delta notifications in reverse insertion order.
This is sort of pointless, except that it matches Accellera's behavior.
Change-Id: Ia63f2de998157aa68ce36fdc2ba39ca7a80fecbe Reviewed-on: https://gem5-review.googlesource.com/c/13295 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13288:f1c04129f709 |
04-Oct-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Change how signal based resets work.
The previous implementation used the value changed event to track when signals changed value, but there were a couple problems with this approach. First, this piggybacked on the sensitivity mechanism in some ways, but diverged in others. The sensitivity didn't notify a process when it was satisfied like other sensitivity types would, and it also ignored whether the process was disabled.
Second, the value_changed_event is notified by a signal instance as a delta notification, but reset signals are supposed to act immediately. That means they should happen before all delta notifications, or in other words all delta notifications should see the reset status of a given process. That's particularly important in the case of wait(int n) where setting the reset clears the reset count, and the count is checked when determining whether or not to wake up a process when its sensitivity is satisfied, potentially by a delta notification.
Third, by removing the middle man and not trying to repurpose the sensitivity mechanism, the code gets simpler and easier to understand.
Change-Id: I0d05d11437291d368b060f6a45a207813615f113 Reviewed-on: https://gem5-review.googlesource.com/c/13294 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13287:fa657c66fc83 |
03-Oct-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Increment the change stamp value before the timing phase.
It appears that events which are triggered during the timing phase are considered triggered in the following evaluation phase. The "triggered()" function on events is non-standard and not really explained anywhere, but this appears to work in practice.
Change-Id: I2574dc4569bf148c55fbe2a4873d458fc507f2a5 Reviewed-on: https://gem5-review.googlesource.com/c/13293 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13286:89bb6d42831c |
03-Oct-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Add a simple implementation for sc_mempool.
This class is supposed to be a more efficient way to manage small bits of memory. At least for now, new and delete will do the same job functionally. Also, the heap manager may be just as efficient as whatever custom mechanism sc_mempool would use.
Change-Id: I6fdc01a69ca017d94b14a15a196ad29b66ef9858 Reviewed-on: https://gem5-review.googlesource.com/c/13292 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13285:86dc66ffac35 |
03-Oct-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Add an sc_gen_unique_name namespace to processes as well.
The standard says that there are namespaces for each module, and one global namespace. Accellera also has namespaces for each process, which shows up in the test output.
Change-Id: I4c8c5cecd5fb685d7bab521d9ae131aef23a6ab4 Reviewed-on: https://gem5-review.googlesource.com/c/13291 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13284:db01c2acd23f |
03-Oct-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Add some error checks to the sc_module constructor.
These match error checks which are already in, for instance, the sc_port constructor.
Change-Id: I8dfb4ce37bf0e59c6fa879f0afda5112af78b40b Reviewed-on: https://gem5-review.googlesource.com/c/13290 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13283:362061d5b968 |
03-Oct-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Change how errors are handled in some constructors slightly.
Because SC_REPORT_ERROR usually causes an exception to be thrown, it's easy to assume it will be the last thing executed in a function. It might, however, be set up to do nothing, in which case the function will continue to execute.
This change makes sure sc_prim will be set up properly even if errors about the time a channel can be set up are ignored.
Also, if an exception is thrown while sc_port is being set up, the corresponding Port object needs to be cleaned up. Rather than try to intercept exceptions in the constructor and clean up properly, we'll just make the allocation of the Port object be the last thing it does. If the function exits early, then the Port pointer will still be nullptr and nothing will need to be done.
Change-Id: If8f6f6b7e6830235fee3cd75625240b99e87dfbe Reviewed-on: https://gem5-review.googlesource.com/c/13289 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13282:d0546737f962 |
03-Oct-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Add an sc_gem5::Port destructor.
This destructor just removes the port from the list of all ports.
Change-Id: I809b529540c2946d20aeb8d64467d77dc94a7a96 Reviewed-on: https://gem5-review.googlesource.com/c/13288 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13281:faae5b71f567 |
03-Oct-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Change the point where elaboration is considered over.
Make it the end of "before_end_of_elaboration" rather than the end of "end_of_elaboration". This interpretation fits the behavior expected by some of the tests.
Change-Id: I3f589147834ab5d5dc8c0e9b4849dd00491c5848 Reviewed-on: https://gem5-review.googlesource.com/c/13287 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13280:3a1147706ccf |
02-Oct-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Implement sc_hierarchical_name_exists.
This function checks the top level collection of events and objects to find if one with a particular name exists.
Change-Id: Icf539b502fa9c7401be907ee975eb24a47e79a87 Reviewed-on: https://gem5-review.googlesource.com/c/13206 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13279:de51c5711c1a |
02-Oct-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Make sure otherwise unnamed events get autogenerated ones.
Change-Id: Iec4e0bd504e70d0096a4c90d5fbba9565dd0deed Reviewed-on: https://gem5-review.googlesource.com/c/13205 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13278:a059617d0d44 |
02-Oct-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Fix a typo in one of the error messages.
This typo was added purposefully to match Accellera's output, but then it was discovered that some test's golden output had the typo, and some didn't. That must mean that not all tests have up to date output, and that Accellera couldn't possibly pass all of their own tests.
To resolve this conflict, this change fixes the typo and manually updates all the golden output.
Change-Id: I3d80f74ff21e844609e7bde5dfcd99fc56c085b0 Reviewed-on: https://gem5-review.googlesource.com/c/13204 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13277:b479038de4d9 |
02-Oct-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Implement writer policies.
This includes the nonstandard SC_NO_WRITE_CHECK #define which the Accellera tests use and depend on.
Change-Id: I106c4c16160325725a00d5c337047251817dca32 Reviewed-on: https://gem5-review.googlesource.com/c/13203 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13276:de6b5828a3e3 |
02-Oct-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Don't use write() in sc_clock to set the clock value.
The two different processes we have to use to match Accellera behavior would trip the checks in write.
Change-Id: Iee729b239bccd8f7b854894000c9ef2c47600563 Reviewed-on: https://gem5-review.googlesource.com/c/13202 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13275:67a279e54b7a |
02-Oct-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Clear the current process when done with the eval phase.
The current process will still be set sometimes when exiting from the yield loop in the top of runReady in the scheduler. Clear it to ensure that we don't think a process is running when it isn't.
Change-Id: Idd44689e10fadf4a3e3ec07c60d107c80a44d39f Reviewed-on: https://gem5-review.googlesource.com/c/13201 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13274:79ce1482d383 |
01-Oct-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Implement register_port in all the predefined channels.
Something the Accellera implementation does which would be good to do in the gem5 implementation is to create a base class for sc_signal which isn't templated, and which holds the common/non-type specific versions of the various sc_signal methods. This will reduce code redundancy and binary size, and also let us hide more code in .cc files so that it's less likely we'd need to recompile model code to fix a bug.
Also, since this all uses of sc_channel_warn_unimple have now been eliminated, remove that function.
Change-Id: Ia574647c034e7136093c2047b69de725ac34f52f Reviewed-on: https://gem5-review.googlesource.com/c/13200 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13273:af60ddcf2a32 |
01-Oct-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Add missing sc_interface::register_port, and add calls to it.
This function is standard and supposed to be on sc_interface, but it was somehow left out. This change adds it, and makes sure it's called by the port binding code. The default implementation does nothing, as it's supposed to according to the spec.
Also note that only the ports farthest from the interfaces are suppose to call register_port. As the port bindings are completed, we keep track of whether a port has been bound to another port. If it has, the source port is farther from the interfaces than the target port (since it has to go "through" the target port to get to them, and so the target port should not call register_port.
Change-Id: Ia98f9ff364385fd1699d88a1d99787d205816a08 Reviewed-on: https://gem5-review.googlesource.com/c/13199 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13272:cb5ddeab3a04 |
01-Oct-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Remove some old warn includes from ext/channel.
The calls to sc_channel_warn_unimpl have been removed, so the includes aren't needed.
Change-Id: I58a916a7c4ef9a266be591789696457799b6b8dd Reviewed-on: https://gem5-review.googlesource.com/c/13198 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13271:f001f9287ba3 |
01-Oct-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Implement sc_vector.
Change-Id: I3cf096c4432fdf310fa1279da32620d5c9f57b5d Reviewed-on: https://gem5-review.googlesource.com/c/13197 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13270:99e1cfb8c6e8 |
01-Oct-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Change how the timing of binding ports works.
In the Accellera implementation, interfaces are bound to ports immediately if no ports have been bound, and otherwise saves them for later along with the ports. The existing implementation would save all interface and port bindings to finalize at the end of elaboration.
This seems like pointless complexity, but it's necessary to get the output to match in the tests.
Change-Id: Ib82d324ee2be9e56e6a41561611c7fca4f4f4e72 Reviewed-on: https://gem5-review.googlesource.com/c/13196 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13269:8807a4b970d4 |
01-Oct-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Use the stage of simulation and not port size in add_trace.
The assumption was that a port wouldn't have any interfaces until after elaboration, and that if it would be traced, it would have interfaces. Checking if the simulation has started (and hence elaboration has finished) is a more accurate and direct way to check the same thing.
Change-Id: I7fe9ecea469997d1a257dd3e4a0db31889aff722 Reviewed-on: https://gem5-review.googlesource.com/c/13195 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13268:9802f3e0a6ae |
28-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Centralize how object parents are chosen.
There's a lot of repeated code for this. Also, the sc_vector type needs to be able to artificially inject a parent for the objects it creates.
Change-Id: I76f9b551632cd2cd70e26741b215290b35c382e9 Reviewed-on: https://gem5-review.googlesource.com/c/13194 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13267:7997f7b8bede |
28-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Use c++11 partial functions instead of boosts.
This creates a depenendency on c++11 which the headers otherwise avoid, but gem5 itself already has a c++11 dependency and not a boost dependency, and outside of having a local copy of boost (which Accellera does) there isn't a good way to put the placeholder values _1, _2, etc., into the custom sc_unnammed namespace.
Change-Id: I52ca4c1bc52bef6ff2c62e9f3c32af46f95244dc Reviewed-on: https://gem5-review.googlesource.com/c/13193 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13266:98fa4585d1c0 |
27-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Filter out a test which breaks rules gem5 won't let it break.
Change-Id: Ifbc27a3134730a95ecdb79c588c4d7fe6e889046 Reviewed-on: https://gem5-review.googlesource.com/c/13192 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13265:6cde60ee99fb |
27-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Add a non-standard sc_time constructor and from_string.
The sc_time constructor was being called, but because of implicit type conversions, a const char * was being treated as a bool and totally unrelated constructor was being called.
This change adds and implements the missing but non-standard constructor. It also implements the from_string function which uses that constructor.
Change-Id: I21e7e40fd1a8d1c579b1abdc2036d016501f510c Reviewed-on: https://gem5-review.googlesource.com/c/13191 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13264:cdb71995fe75 |
27-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Modify reportifyException to keep sc_reports in scope.
reportifyException was sometimes indirectly creating temporary sc_report objects which would go out of scope when they were returned. The later code which tried to print them would then read garbage.
Change-Id: I0a744eb029c62bf2ffee83db0a0e6dcbe3e60f7d Reviewed-on: https://gem5-review.googlesource.com/c/13190 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13263:bcd6d8140486 |
27-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Implement the sc_time_tuple class.
This class is non-standard and is an implementation detail in Accellera's implementation, but is referred to directly by the tests. It does the same thing as the time printing function, so rather than having duplicate code the printing function now uses the sc_time_tuple class even though it was doing fine on its own already.
Change-Id: I69594ed0651f212ded6d979d60523bb3b0a789b1 Reviewed-on: https://gem5-review.googlesource.com/c/13189 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13262:ef4b783f84f7 |
27-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Merge notify and notifyWork and ignore disabled for resets.
Always notify a process if a reset signal changed, even if it's disabled. Also, because notify was what checked disabled and only notifyWork was virtual, this change merges the two so both can be overridden without any extra virtual functions.
Change-Id: I1e3563fa587aab65a5e95cd8a382ed48e093de3b Reviewed-on: https://gem5-review.googlesource.com/c/13188 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13261:c8e97d29976d |
26-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Ensure the reset event is notified before reseting the target.
The target may be the process which is currently running. In that case, the reset method will end and never get to notifying the reset event. To fix that, we need to notify the reset event first.
Change-Id: If3a9d87edc0999293a68d86d35989ae49eab3c07 Reviewed-on: https://gem5-review.googlesource.com/c/13187 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13260:4d18f1d20093 |
26-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Implement signal based resets.
The implementation is based on sc_event sensitivities.
Also of note is that the way reset works in the Accellera implementation isn't consistent with the spec. That says that wait(int n) is supposed to be equivalent to calling wait() n times, assuming n is greater than 0.
Instead, Accellera stores that count and then doesn't wake up the process until the count is 0, decrementing it otherwise.
That means that when the process is in reset, it won't actually reset for those intermediate wait()s which it would if wait() was called repeatedly. Also, oddly, when a reset becomes asserted, it will clear the count to 0 explicitly. That may have been an attempt to make the behavior of wait(int n) match the spec, but it doesn't handle cases where the reset is already set when wait(int n) is called.
Change-Id: I92f8e9a128e6618af94dc048ce570a4436e17e4b Reviewed-on: https://gem5-review.googlesource.com/c/13186 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13259:3730df183b84 |
26-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Implement the synchronous reset state.
Change-Id: Ie0c29bb6cf918aea1c0bc719b9d37628b5b19339 Reviewed-on: https://gem5-review.googlesource.com/c/13185 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13258:91b819262b87 |
26-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Implement sc_event_queue.
Change-Id: I58fd72b8c64ee82eb478d810f7114bab7a31cbfa Reviewed-on: https://gem5-review.googlesource.com/c/13184 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13257:c59a22cb44d7 |
22-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Remove a hack which scaled sc_time into ps unnecessarily.
sc_time is now represented in whatever the underlying time resolution is which isn't necessarily ps. Stop trying to scale it (incorrectly).
Change-Id: I18975e0ab01386b24196666e0ba02d1b36e11735 Reviewed-on: https://gem5-review.googlesource.com/c/12976 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13256:c1de139c72e5 |
22-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Change how the default timescale is set.
The spec says that the default timescale should be 1 PS, but the Accellera implementation uses the time resolution.
Change-Id: I7b307a33ef0856e9c19d81e401b15691275d4978 Reviewed-on: https://gem5-review.googlesource.com/c/12975 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13255:570e2d799f70 |
22-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Simplify sc_time_stamp().
sc_time is now inherently based on properly scaled Ticks, so there's no reason to try to scale it to be in picoseconds, especially since the scaling factor may be unreliable if the timescale hasn't been fixed yet.
Change-Id: I28baeb9792e81e1d00f6f37672df435766311864 Reviewed-on: https://gem5-review.googlesource.com/c/12974 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13254:3133d9760716 |
22-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Implement sc_get_curr_process_handle().
The implementation is fairly trivial, but the pieces it relies on weren't always available.
Change-Id: Ie77168ff336febd3ebe22c400f2b1f133e43aca7 Reviewed-on: https://gem5-review.googlesource.com/c/12973 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13253:32260b162ae7 |
22-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Print an Info when setting a tracefile's time unit.
This matches Accellera's output for the tests.
Change-Id: Ie67fd673a980b8ca2fdcd8f357ff7993a9091221 Reviewed-on: https://gem5-review.googlesource.com/c/12972 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13252:8814e5d87a48 |
22-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Move some constants out of sc_time.cc for other files to use.
Change-Id: Ic88c6834dfe980022e58a3d859ea53193a55bbb1 Reviewed-on: https://gem5-review.googlesource.com/c/12971 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13251:5cb61fcb0ae2 |
22-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Add a warning to sc_interface::default_event.
The default implementation returns a dummy event, but in the Accellera implementation it also prints a warning. Print a warning as well, so that the output matches for the tests.
Change-Id: I1ae2755685515c3fe538f4075af396e963cf155d Reviewed-on: https://gem5-review.googlesource.com/c/12970 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13250:4680968cc4cb |
22-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Filter out an Info about delta cycles and pseudo timesteps.
In the Accellera implementation, every time a delta cycle is traced a check is done to see if the user has been told what the pseudo timestep is. To avoid doing that check over and over, we'll leave that out and tell the verify.py to ignore that message in the reference output.
Change-Id: I825f05394dccf03e951d29561a11c3cc6d4bcda7 Reviewed-on: https://gem5-review.googlesource.com/c/12969 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13249:5e60ab2199b9 |
22-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Check the process type when using sc_join.
Method processes aren't allowed in an sc_join.
Change-Id: I5c8421a396dbe261645a074df514f69fc652c9c8 Reviewed-on: https://gem5-review.googlesource.com/c/12968 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13248:a07071974510 |
22-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Make sure the right type process is running when calling wait.
That function is only allowed when running a thread or cthread.
Change-Id: Idf98b70018169d4f724aa8168f3c4e8161f0b83d Reviewed-on: https://gem5-review.googlesource.com/c/12967 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13247:4aafce81e7dd |
22-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Add an error check to sc_time.
Change-Id: Ie525a1624a6496a51277fb984cbfeec21eb79749 Reviewed-on: https://gem5-review.googlesource.com/c/12966 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13246:b2648bba3d91 |
22-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Add some error checks to sc_export.
Change-Id: Ib0c14a5c7dad37b33d61c9b406f6b84121d94e46 Reviewed-on: https://gem5-review.googlesource.com/c/12965 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13245:c666c5d4996b |
20-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Implement general and VCD trace support.
This doesn't include WIF trace support, but does make allowances for adding it in the future.
Change-Id: Ifb62f40a7d8a13e94463930a44ac4b1cf41e3009 Reviewed-on: https://gem5-review.googlesource.com/c/12826 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13244:deedec45898f |
22-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Don't schedule the ready event unnecessarily.
If we're already going to process the thing we'd be scheduling it to process, just let the existing invocation get to it.
Change-Id: Ifeebc80903065567fc0eed02beefec6156b22ff7 Reviewed-on: https://gem5-review.googlesource.com/c/12964 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13243:9bb0d62c8a74 |
20-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Fix the implementation of sc_event::triggered.
This function just returned false. The new implementation uses the scheduler's changeStamp function to keep track of how recently the event was triggered so it can return return the right value.
Change-Id: Idf61cd459e53e224a33d3e53c16210f5e0a99a3a Reviewed-on: https://gem5-review.googlesource.com/c/12825 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13242:b4d52d9afc7f |
20-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Teach verify.py how to verify vcd files.
The reference output skips the first 7 lines which have volatile info like the current time.
Change-Id: I9c173ff3903982a07349ca6957ab25e07bdf8e54 Reviewed-on: https://gem5-review.googlesource.com/c/12824 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13241:9130cd8fe01d |
19-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Fix the default width values for the various sc_trace-s.
These were all set to 8 * sizeof(char) instead of using the size of the actual data type being traced.
Also add a very simple implementation to the generic sc_signal_in_if<T> sc_trace which just delegates to the sc_trace of the underlying type T.
Change-Id: I129df46ef9d49705dc3dac76e30c0a3652c981eb Reviewed-on: https://gem5-review.googlesource.com/c/12818 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13240:1c15c6d15766 |
17-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Fix a typo in verify.py.
In the generic (non-console output) output checker, a variable should have been called self.test, but was called self.text.
Change-Id: I2518d6ff01c51fc195eef2b61e987d1b3104c89b Reviewed-on: https://gem5-review.googlesource.com/c/12817 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13239:0fe49a9e1754 |
15-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Add an error check whether an interface is alread bound to a port.
Change-Id: I06e3484176c0c06daa28f7be0ed8437b3b15ddb2 Reviewed-on: https://gem5-review.googlesource.com/c/12816 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13238:3521d1f59c22 |
15-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Add some additional error checks.
Change-Id: I19c5e6f1795c2777dbe7d210cfa01f6ced2020f3 Reviewed-on: https://gem5-review.googlesource.com/c/12815 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13237:68e47399fc39 |
15-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Change an error message to match the reference outputs.
This is different from the message the Accellera implementation would print, so it looks like it wouldn't pass this test as is.
Change-Id: I0286fd3e3df7bc3e87f38c35086a32d8dec0bcc9 Reviewed-on: https://gem5-review.googlesource.com/c/12814 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13214:a37fa0c75211 |
15-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Implement the sc_signal_rv channel and ports.
Change-Id: Id1a3fd2ded224bbe94a4a65e0acf34a3547aedcc Reviewed-on: https://gem5-review.googlesource.com/c/12813 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13213:71b959531dc3 |
15-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Ignore a gem5 warning about setting the stack size in verify.py.
This warning shouldn't make a test fail, but it's still useful to keep around.
Change-Id: I9ebdbec804e11445edb82fa824ee0a6bce5943b0 Reviewed-on: https://gem5-review.googlesource.com/c/12812 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13212:4729f211fbae |
15-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Warn if sc_stop is called more than once.
Change-Id: Ief88b9af0119ba4b007f79905db2522b5f95b820 Reviewed-on: https://gem5-review.googlesource.com/c/12811 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13211:62e227fef520 |
15-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Check whether the simulation is running when creating sensitivities.
Change-Id: I499cde0d0eb45ba3287a8719174e1c794c1fb634 Reviewed-on: https://gem5-review.googlesource.com/c/12810 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13210:8f6d757c46dc |
15-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Handle nonstandard cthread sensitivities.
Accellera allows some non-standard values in the second position of the SC_CTHREAD macro. Do that as well, with the same special handling which automatically selects the positive edge of boolean ports/interfaces.
Change-Id: I79594980898a17afc30fea6f77384589cbc3c250 Reviewed-on: https://gem5-review.googlesource.com/c/12809 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13209:aad30faa966b |
14-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Change how the scheduler orders processes.
The Accellera implementation looks like it does all the methods, then all the threads, and then loops back and tries again, and there are even comments in the code that suggests that. What it actually does, however, is runs all the methods, then runs a single thread if one is waiting, and then starts over. The effect is that the scheduler will run any methods first, then run threads until a method might have become ready, and then repeat.
This will actually result in more mixing of threads and methods, more context switches, and worse performance, but it makes the regressions pass more.
Change-Id: I7cb0485e26eed79204ff2a3c3ded27b973e0b7b0 Reviewed-on: https://gem5-review.googlesource.com/c/12808 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13208:6703cb024823 |
14-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Differentiate between notifying methods and threads.
The Accellera implementation notifies all types of method sensitivities first, and then notifies all the ones for threads.
Change-Id: I5eda75958675ba518f008852148030e032f70d83 Reviewed-on: https://gem5-review.googlesource.com/c/12807 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13207:034ca389a810 |
14-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Rework how delayed sensitivities are handled.
Make BindInfo into a more general purpose Port class which mirrors sc_module and Module, sc_object and Object, etc. This tracks multiple bindings internally, and also pending sensitivities. Keep a global list of ports which are added in reverse order to match Accellera, and which is iterated over to finalize binding and for phase callbacks. This is as opposed to doing it one module at a time, and is to better match Accellera's ordering for the regressions.
Also the sensitivity classes are now built with factory functions, which gets around problems calling virtual functions from their constructors or forgetting to having to have extra boilerplate each place they're constructed.
The port class also now finalizes port or event finder sensitivities when its binding is completed, unless it's already complete in which case it does so immediately.
Change-Id: I1b01689715c425b94e0f68cf0271f5c1565d8c61 Reviewed-on: https://gem5-review.googlesource.com/c/12806 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13206:c944ef4abb48 |
14-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Refactor sensitivities.
Dynamic and Static sensitivities used to be represented by the same classes, even though they're (almost) disjoint in how they worked. Also timeouts, which can be used alongside dynamic sensitivities, were handled by the sensitivities themselves. That meant that the sensitivity mechanism had to mix in more types of behaviors, increasing complexity. Also, the non-standard timed_out function Accellera includes is harder to implement if the path for timeouts and regular sensitivities are mixed together.
This change splits up dynamic and static sensitivities and splits out timeouts. It also immitates the ordering Accellera uses when going through sensitivities for an event. Static sensitivities are triggered first in reverse order (why?), and then dynamic sensitivities are triggered in what amounts to reverse order. To delete a sensitivity which has been handled, it's swapped with the one in the last position, and then the vector is truncated to drop it at the end. This has the net effect of stirring the dynamic sensitivities, and isn't easily immitated using a different approach, even if other approaches would be more straightforward.
Double check addSensitivity for event.hh
Change-Id: I1e73dce386b95f68e9d6737deb8bed70ef717e0d Reviewed-on: https://gem5-review.googlesource.com/c/12805 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13205:e965ce37608e |
12-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Implement sc_buffer.
This required a small change to sc_signal so that the value change event and the change stamp for it were accessible.
Change-Id: Ife0545d84f3b25e98da079786c30ffa51025cce7 Reviewed-on: https://gem5-review.googlesource.com/c/12804 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13204:66d32b2a00be |
11-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Mark a few more tests as expected to return non-zero.
Change-Id: Ic23865d9c22909bb7482223548dbc7a46c356920 Reviewed-on: https://gem5-review.googlesource.com/c/12623 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13203:76ee4971fd9e |
11-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Add some error checks to some classes.
These check whether those classes are being constructed in legal circumstances, and avoids a null pointer dereference.
Change-Id: Ied36ee15c3d7bf6ee444351a841c38576780298e Reviewed-on: https://gem5-review.googlesource.com/c/12622 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13202:2bce0d678b2f |
11-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Add a "kind()" overload to sc_port_base.
This is "implementation defined" but needs to exist to match the golden reference output from Accellera.
Change-Id: I9b7949343b7c62a8d568abc06ab4dfc88233b20a Reviewed-on: https://gem5-review.googlesource.com/c/12621 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13201:200a488db61f |
11-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Implement the sc_*_resolved classes.
Change-Id: Ib595da10e0f900ee4cc1847d41d29251dacb55d7 Reviewed-on: https://gem5-review.googlesource.com/c/12620 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13200:06d1460c28ad |
11-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Implement the sc_clock::time_stamp function.
This is just a non-standard static alias for the sc_time_stamp function.
Change-Id: Ibcd0559e7dab8232528628259abb8d1bfaee16e0 Reviewed-on: https://gem5-review.googlesource.com/c/12619 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13199:3e15b22728f2 |
11-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Implement sc_mutex.
Change-Id: I8a5bd03b46d44aeca3bba15a01a5f2180b4ed5c7 Reviewed-on: https://gem5-review.googlesource.com/c/12618 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13198:5553e3cf7e1f |
11-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Implement sc_semaphore.
Change-Id: I778d41bd81880e76caa71dc92359a00127d8f987 Reviewed-on: https://gem5-review.googlesource.com/c/12617 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13197:aeba6988033f |
11-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Ensure SC_LONG_64 is defined and available.
The datatype code was checking if SC_LONG_64 was defined to determine if a long was 64 bits. The code that would define that value was dropped when porting over from the Accellera implementation, and so the wrong code was being included. This change both makes those checks look at the *value* of SC_LONG_64 to ensure that it's not missing by accident, and assigns it a value in sc_fxdefs.hh.
Change-Id: Ie9bb1146452a3db1d9d99c0db575098bb06463ff Reviewed-on: https://gem5-review.googlesource.com/c/12616 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13196:4b5ab2c22743 |
11-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Implement SC_FORK, SC_JOIN, and SC_CJOIN.
SC_CJOIN is non-standard, but relied on by the Accellera tests.
Change-Id: Ia4ddcb1749a07891157a58398137e94fcaa8e815 Reviewed-on: https://gem5-review.googlesource.com/c/12615 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13195:de9e5572ac44 |
10-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Stop assuming picoseconds as the time resolution.
Also adjust some code to avoid floating point rounding problems and integer overflow issues.
Change-Id: Ib4b9c4cf4af00333951db5ce07819556141aa5da Reviewed-on: https://gem5-review.googlesource.com/c/12614 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13194:9c6b495e650c |
10-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Keep all pre-init processes on a single list.
We were keeping track of processes which should be initialized and those which shouldn't on two different lists, and then processing each list one after the other. This could reorder processes from the order they were created, and so cause spurious differences which cause the Accellera tests to fail.
This does make the scheduler slightly simpler, so it's not all bad.
Change-Id: I63306a41ce7bea91fa9ff2f6774ce9150134ce48 Reviewed-on: https://gem5-review.googlesource.com/c/12613 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13193:37816241c855 |
10-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Track event sensitivities with a list instead of a set.
It's totally legal to signal that an event happened to waiting processes in any order we choose, but to match the order of events which appears in the Accellera test golden output, we need to do things in the order they did. This is less efficient, but will reduce the number of false positives.
Change-Id: Ie2882249ae846991d627f5f688a9e89e629bb300 Reviewed-on: https://gem5-review.googlesource.com/c/12612 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13192:28b6be4aeeb5 |
07-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Mostly implememt sc_simcontext.
Since we don't track the current process using the sc_curr_proc_handle structure, we keep one around just to return from the appropriate accessor, and set its values when it's requested. If the object is kept around, those values won't change to track changing processes.
From what I see, none of the tests rely on the value tracking the process beyond the callsight.
Change-Id: I1ad3b7a7b15aa0bc4d218f986ffbe7c51501b296 Reviewed-on: https://gem5-review.googlesource.com/c/12611 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13191:a2254693aa5b |
07-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Centralize module callbacks and report new warnings.
By centralizing module callbacks, the gem5 module class knows when different stages of the simulation are happening and can do it's own extra checks. It also compartmentalizes modules more since the kernel object doesn't have to reach into them to enumerate ports and exports.
Change-Id: I55887284af9c05150fe9d054f5b6147cad6092a1 Reviewed-on: https://gem5-review.googlesource.com/c/12610 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13190:81aeb0a8947c |
07-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Change how sc_clock creates processes to match the tests.
Accellera sets up the mechanism which toggles sc_clock differently than it's set up in gem5. This change moves things around a little to more closely match the order things are done by Accellera so that the test output matches.
Change-Id: Ia6d327f4cd5d689f6969398f02a66278a3dc010c Reviewed-on: https://gem5-review.googlesource.com/c/12609 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13189:057566bc8fd6 |
07-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Implement the deprecated "timed_out" function.
This function requires some slightly annoying bookkeeping since it doesn't just report whether the current process is running as a result of a timeout, it reports whether it's running as a result of a timeout *and* it could have been running from some other sensitivity instead. Pure timeouts don't count as timeouts which makes it harder to handle in a general way.
Change-Id: I533d97fe66d20d7b83aba80f2ef45a8944668070 Reviewed-on: https://gem5-review.googlesource.com/c/12608 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13188:7af408b60cac |
07-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Catch exceptions during updates, notifications, and callbacks.
Change-Id: I6005c12ce32d24413618e3955625432985f99f69 Reviewed-on: https://gem5-review.googlesource.com/c/12607 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13187:ee28771420a6 |
07-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Report an error if notifying during the update phase.
Change-Id: If261c7a981a247884f0a6466756966b454f197f4 Reviewed-on: https://gem5-review.googlesource.com/c/12606 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13186:1ebc6c729311 |
07-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Track the scheduler status using an enum instead of bools.
The scheduler tracked whether it was paused or stopped with two bools which are mutually exclusive. It's useful to be able to also check for some other mutually exclusive states like what phase the scheduler is currently running.
Rather than adding a bunch of additional bools, this change switches those mutually exclusive states over to an enum, and adds some methods to access and maintain that enum.
Change-Id: Ia9696b2853d1b122c1100c9df0e12b018fe9b84b Reviewed-on: https://gem5-review.googlesource.com/c/12605 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13185:286a48639227 |
07-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Remove a redundant call to update() from the kernel object.
The t0Handler runs the scheduler's initPhase function which has a call to update built into it. There's no reason to call that within one of the kernel's callbacks as well.
Change-Id: I02c755b7d53f93accdacf8149cc1988d7a6e214c Reviewed-on: https://gem5-review.googlesource.com/c/12604 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13184:17c6c73d5a48 |
07-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Mark a few tests as expected to raise an error.
Change-Id: I8291f5f32fb96c42f75521385cdf14c50243860f Reviewed-on: https://gem5-review.googlesource.com/c/12603 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13183:fb400e21c46f |
07-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Update some defaults in verify.py.
Change the defaults in verify.py to be more like how I've been running it. This is as close of an approximation as I have to how someone else would want to run it manually. When run as part of a script, it's less cumbersome to have to add extra arguments.
Change-Id: Ibd7c7168a38aa5c014ab5c1246c9617c7358e4f9 Reviewed-on: https://gem5-review.googlesource.com/c/12602 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13182:9e030f636a8c |
07-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Fortify how exceptions are caught and passed around.
This change tightens up exception catching and makes gem5's systemc code react to exceptions more in line with the Accellera implementation. This prevents exceptions from being caught by the pybind11 integration which makes it very difficult to see where an exception came from, and makes the output differ by including a (mostly useless) backtrace.
Change-Id: I7130d53a98fadd137073d1718f780f32f57c658c Reviewed-on: https://gem5-review.googlesource.com/c/12601 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13181:768a9881729b |
06-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Merge stderr and stdout when running tests.
The golden output for tests doesn't distinguish between stderr and stdout, and by only comparing against stdout we have to throw away errors which would be good to verify we get right. Also the tests sometimes send output to stderr for no apparent reason, requiring manually patching the tests.
This change adds filters for two messages which used to go to stderr in gem5 but now show up in the diffs, one that just says the simulation is starting, and the other for warns of unimplemented functionality. The second warning should be turned on at some point so we make sure everything the tests touch works and they don't just work by coincidence, but for now it introduces a lot of noise among otherwise passing tests.
Change-Id: I3b14f7807af561a79d6e0ca87aff1ab6051be596 Reviewed-on: https://gem5-review.googlesource.com/c/12600 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13180:79e680f62779 |
05-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Warn if a process is dont_initialize with no static sensitivieis.
Change-Id: I4db64f42872a6fb459faa401abdad3f168297347 Reviewed-on: https://gem5-review.googlesource.com/c/12599 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13179:7445c43d036b |
05-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Report a warning if an event or object needs to be renamed.
Change-Id: I8085ba19fd7acd69d07a1e032f2fd18b6c5fed6f Reviewed-on: https://gem5-review.googlesource.com/c/12598 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13178:1e2d0a8ffdb0 |
05-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Teach verify.py to filter messages which start within a line.
It's possible for a test to generate a warning or error in the middle of a line of output. The previous filter generator function would create a filter which would only detect those messages which started at the beginning of a new line.
Change-Id: I40372dc33049df84f3111e4d63a6619db97dcaa3 Reviewed-on: https://gem5-review.googlesource.com/c/12597 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13177:7b750aeab360 |
05-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Implement sc_time::to_string.
This is just another way to call sc_time::print, but it returns a string instead of printing to a stream.
Change-Id: Idc90c539127e6153af9511bfe5f258b870362330 Reviewed-on: https://gem5-review.googlesource.com/c/12596 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13176:76f52e8d8c6a |
05-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Match how Accellera schedules processes even more closely.
The Accellera implementation runs processes in a cycle where it first runs all the methods it has, then all the threads, and then starts again in case any new methods have been scheduled. This keeps methods and processes in the order they were marked ready (what a prior change made this scheduler do), but also keeps the methods together and the threads together (something it used to do, but that change made it stop doing). This change should make the gem5 scheduler match in both respects.
Note that its correct to run the processes in whatever order we want, it's just that if we're going to compare against the "golden" output from the Accellera tests, we need to match the order to get sensible results.
Change-Id: I0b1e4ed24c56f97921148b74e90c2dca5fd3fbc4 Reviewed-on: https://gem5-review.googlesource.com/c/12595 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13175:b93fb6caf043 |
05-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Implement the nonstandard halt function.
Change-Id: Ie9bd9db92a63169980230bc9a15e153d5609dd0b Reviewed-on: https://gem5-review.googlesource.com/c/12594 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13161:8bef8ce2784f |
05-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Change the default naming scheme to use sc_gen_unique_name.
The spec says the default name should just be "object", but the Accellera implementation calls sc_gen_unique_name, and the tests expects that.
Change-Id: Ic6922a6d9fb53f3126a9d527868fc11da5320446 Reviewed-on: https://gem5-review.googlesource.com/c/12593 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13160:1e959d3afc64 |
05-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: "Fix" some error message formatting.
These changes make the output match what Accellera outputs so that the tests will pass.
Change-Id: I1260cec35fa39586fbef39047b9da4ff3c03b3ed Reviewed-on: https://gem5-review.googlesource.com/c/12592 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13159:b5728438028b |
05-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Fix a typo/bug in sc_int_base.hh.
When being turned into gem5 coding style, a pair of "!" operators were dropped, reversing the behavior of the functions involved.
Change-Id: Ife795c22aff953c5ab592e7baa3a5e1c15e63c84 Reviewed-on: https://gem5-review.googlesource.com/c/12591 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13158:886ca37b7665 |
04-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Make some tests use cout instead of cerr to report completion.
cerr goes to simerr, but we compare simout against the golden output.
Change-Id: I9270866a92dd06a23d47c1964dacc4872030f30d Reviewed-on: https://gem5-review.googlesource.com/c/12470 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13157:ca4c4e2552f2 |
04-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Copy the msgType and msg parameters of sc_report.
The original strings pointed to by those parameters may go away before the sc_report has been completely consumed. By copying them, we make sure other consumers downstream can still access them.
Change-Id: Iab9a802b7ae3bb5aed3a2716cd92886b8d241dfa Reviewed-on: https://gem5-review.googlesource.com/c/12469 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13156:b3185074b0df |
04-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Ensure sc_stop during callbacks actually stops.
Make sure calling sc_stop during the appropriate callbacks will actually skip future action by skipping later callbacks, by flushing the scheduler before running init (so it doesn't really do anything but record that it's in running mode now), and schedule the stop event.
Change-Id: I5edfbceda457df88d15bfcac4d97e8578205ec5b Reviewed-on: https://gem5-review.googlesource.com/c/12468 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13155:4e77f1d0cdc3 |
01-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Implement the nonstandard at_negedge and at_posedge.
Change-Id: I7ea5cfd309db4b9883df551fd7dcec186e4f38a3 Reviewed-on: https://gem5-review.googlesource.com/c/12467 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13154:f86c71dac456 |
01-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: When stopping immediately, block new processes/updates.
When stopping immediately, we're supposed to finish the current process but not run any other processes or go to the update phase. The rest of the process could introduce new processes or request new updates, so we need to make sure we block those if we're in the process of stopping.
Change-Id: I9cc867d294cf171dfedb4b9d43fbc167c2057de8 Reviewed-on: https://gem5-review.googlesource.com/c/12466 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13153:f6ea343bb4f9 |
01-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Teach verify.py to ignore two types of errors.
Change-Id: I9e61a034d7f71bc9b1f28cb976ae8b17d6f37612 Reviewed-on: https://gem5-review.googlesource.com/c/12465 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13152:db311498b28f |
01-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Mark a test as expected to fail/report an error.
Change-Id: Ia5e22000449e233a079d8ba7d777a3d030138a44 Reviewed-on: https://gem5-review.googlesource.com/c/12464 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13151:5ce517287782 |
01-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Add some error checks to sc_set_default_time_unit.
Change-Id: I1d21c56d3b39044d91c96c98d242a571c099707c Reviewed-on: https://gem5-review.googlesource.com/c/12463 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13150:51337bd61c0a |
01-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Mark some tests as expected to fail.
One of them, systemc/kernel/sc_time/test07, should fail, but it should fail from an error check and not a floating point exception like it currently does.
Change-Id: I8c8f3c0aac5a5061780a248bde5f6de2feeecc8c Reviewed-on: https://gem5-review.googlesource.com/c/12462 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13149:91e215a2da78 |
01-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Implement sc_(g|s)et_time_resolution.
Change-Id: If546bea633e777cdb2b14f47c0d9d50b044b99cf Reviewed-on: https://gem5-review.googlesource.com/c/12461 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13148:db08868ca25d |
01-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Teach verify.py to ignore a new error.
Change-Id: Id967719803b5b306792c9fe6e6ddd36c36e09a88 Reviewed-on: https://gem5-review.googlesource.com/c/12460 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13147:957bb21df12a |
01-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Record that one of the tests will report an error.
This test purposefully fails with an error.
Change-Id: I305a186ee076ff4e63ee82c69c27ce85dabc8fdd Reviewed-on: https://gem5-review.googlesource.com/c/12459 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13146:3539fe351218 |
01-Sep-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Report an error if n <= 0 in wait(int n).
This is in the spec, and tested by one of the regression tests.
Change-Id: I035cfad279be3859242919a95598f191d5d06165 Reviewed-on: https://gem5-review.googlesource.com/c/12458 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13145:5291e0747c7c |
31-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Toggle off clumping methods together in the ready list.
This is totally legal and good for performance, but because some of Accellera's tests depend on processes which can run in any order running in a particular order to reproduce the golden output, it needs to be disabled to pass the tests.
This change leaves it as an option which could even be plumbed out in the future to support some sort of "compatibility" mode with the tests.
An alternative would be to verify that the tests pass, change the ordering to the alternative (but still correct) order, and then update the reference output.
Change-Id: I113a40dec52f8b623253f8a27886b4a0abe89485 Reviewed-on: https://gem5-review.googlesource.com/c/12457 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13144:61e0f3230787 |
31-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Store timed notifications in a list instead of a set.
This has three advantages. First, the data structure doesn't have to try to keep track of whether or not an event is already listed there. Second, it's easier to delete an item by storing an iterator for it when it gets inserted. Third, the ordering of events is not dependent on the arbitrary ordering of the set, it's bsaed on the fixed order the events get added to the list.
One part of this change makes ScEvent-s keep track of what list they're on, and handle their own insertion and deletion when they're scheduled or descheduled. A side effect of that is that it's no longer safe to simply use a range based for loop to loop over all of an ScEvent and deschedule all its events or to run then (which deschedules them internally once they execute).
That can be avoided by looping until the list is empty, and operating on the first element. As the first element is processed and removed from the list, the next element will become first and will get picked up in the next iteration.
Change-Id: Icad51a63f153297c88e65f85d22ac721e6c571d8 Reviewed-on: https://gem5-review.googlesource.com/c/12456 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13143:87d1097f49b0 |
30-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Implement sc_fifo::dump and improve sc_fifo::print.
The print function is supposed to print both pending and committed writes, apparently.
Accellera's implementation of sc_fifo uses a ring buffer to store the entries and manages a head and tail pointer to keep track of what's full, etc. Their dump function prints that whole buffer using the indexes. When not using a ring buffer, there's no easy way to determine what those indexes should be.
Fortunately the test that uses dump never moves away from the base of the ring buffer, so I can get the same effect (which also makes sense on its own) by printing the index into the fifo instead.
Change-Id: I50fe049461f6a5e8a55b54eeb2f134d20f0812c6 Reviewed-on: https://gem5-review.googlesource.com/c/12455 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13142:c00af880d3e5 |
30-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Implement the << operator for sc_signal.
Change-Id: I16955e58d96d49ec3bba90b73f5a368a245da438 Reviewed-on: https://gem5-review.googlesource.com/c/12454 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13141:f29234fb9ef4 |
30-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Implement the "event()" style sc_signal methods.
Change-Id: Ia829aef2292ff2d50e14433d5c36a2e15a9de54b Reviewed-on: https://gem5-review.googlesource.com/c/12453 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13140:ecd8a58f3884 |
30-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Add a "changeStamp" value to the scheduler.
This value is incremented after each delta cycle's evaluate stage and after timed notifications happen. Its value is used by some channels to determine whether certain events happened within the previous update phase to implement the "event()", "posedge()", and "negedge()" functions.
Change-Id: I9a73f0b5007dcbb6a74da9d666f28da1930b9d3d Reviewed-on: https://gem5-review.googlesource.com/c/12452 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13139:78d9cd67bbdf |
30-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Teach verify.py to ignore "In file: *" in test output.
Those lines are sensitive to the paths to the test files and are even redacted in the golden reference output, presumably for that reason.
Change-Id: I9fbd94c1b6d9d4e76397e84a4175d326f27b6e4d Reviewed-on: https://gem5-review.googlesource.com/c/12451 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13138:31951157e41e |
30-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Adjust some error messages to match Accellera.
Those messages include an error number in the Accellera implementation. Add those numbers to gem5 so it's easier to check against golden reference output for the regression tests.
Change-Id: I35054dd187e86a87eb177f4695d61044c58ce262 Reviewed-on: https://gem5-review.googlesource.com/c/12450 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13137:a3750228268f |
30-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Make verify.py filter out some error messages.
Some of the details of these messages would be annoying to match exactly, and the error messages in gem5 go to simerr which isn't being checked.
Change-Id: If80b124dd99987e205ccaf81d313d35df4191252 Reviewed-on: https://gem5-review.googlesource.com/c/12449 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13136:f0337b2cd1ca |
30-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Tell verify.py to expect two tests to fail.
These tests purposefully fail when they run, so a return code of 1 should be considered successful.
Change-Id: Ia4ef0469ed946d26a767805ca2d0acd734f1aec9 Reviewed-on: https://gem5-review.googlesource.com/c/12448 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13135:4bb2f323fb1a |
30-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Raise an error when SC_METHOD, etc. is used after starting.
Those mechanisms for creating processes are only allowed before the end of elaboration, or in other words before sc_start is called. Technically the check in Accellera's implementation won't trigger if the simulation is stopped, and we immitate that behavior.
Change-Id: I9b8b5bd32f876781b6e0d5c0ee0e09de19bdabc1 Reviewed-on: https://gem5-review.googlesource.com/c/12447 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13134:23ee016d1f54 |
30-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Teach verify.py how to expect failing error codes.
Some tests expect to fail. For those tests (and only those tests) we need to tell verify.py that it's ok if their exit status isn't 0. Also if those tests *don't* fail, then that will also be flagged as an error.
This is done by adding an expected_returncode file into the test's source directory which holds what the expected return code should be.
Change-Id: I239a28e1d98dd3f76b71028660e492f675a0b3cb Reviewed-on: https://gem5-review.googlesource.com/c/12446 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13133:41d8cd260825 |
30-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Keep track of more cases when we should be ready after resume.
If a thread self suspends, it should be marked as ready after resuming. If a process was already ready when suspended, it should also be remarked as ready after resuming.
Special care has to be taken in pre-initialization situations so that processes are put on the right lists, and whether a process is tracked is already marked as ready.
Change-Id: I15da7d747db591785358d47781297468c5f9fd09 Reviewed-on: https://gem5-review.googlesource.com/c/12445 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13132:1fb4a87f550f |
30-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: When sensitive to an event finder, find on all interfaces.
When a process is sensitive to an event finder and that finder is attached to a port which is bound to multiple interfaces, the process is supposed to be made sensitive to the event finder function's result when called on each interface, not just the first one.
Change-Id: I92312e04e60fab7a7ea51c1ed687edabe9768205 Reviewed-on: https://gem5-review.googlesource.com/c/12444 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13131:bf07048d69e4 |
29-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Make Process track whether it's dynamic on its own.
Processes which are created in end_of_elaboration aren't created with sc_spawn but still need to figure out if they're dynamic. Rather than duplicate the check in sc_spawn, this change centralizes it in the Process class itself.
Change-Id: I763d5a0fa89a72fbc82346b6ce2eed852ee72524 Reviewed-on: https://gem5-review.googlesource.com/c/12443 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13130:e67ad27f0858 |
29-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Track the module who's end_of_elaboration callback we're in.
Change-Id: Ib5fe3232cfea26df0c3396c583fd80da429cbdd5 Reviewed-on: https://gem5-review.googlesource.com/c/12442 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13129:7346c328de41 |
29-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: sc_spawn can create static or dynamic processes.
Their status depends on when sc_spawn is run.
Change-Id: I826adf9d5c905687e705642130ca5ad725ce92af Reviewed-on: https://gem5-review.googlesource.com/c/12441 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13128:60311a75e876 |
29-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Improve handling of empty process handles.
Most had checks, but didn't print any message. throw_it needed a check as well.
Change-Id: I916c837112f9b27852583f01b3e16a6f53d5e7ca Reviewed-on: https://gem5-review.googlesource.com/c/12440 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13127:d3318222cf09 |
29-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Ensure all objects and events have unique names.
Change-Id: I59b78048849953773b80bb2dac9b834762625331 Reviewed-on: https://gem5-review.googlesource.com/c/12439 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13126:770f2c828e33 |
28-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Make sure children of processes are recorded as such.
The process was treated as the parent of the object, but the object wasn't being installed as a child of the process.
Change-Id: I6710f34734835cbeceb3d33e5e37b6f5897c5e30 Reviewed-on: https://gem5-review.googlesource.com/c/12438 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13125:2488fd19b643 |
28-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Clamp the time of events to the present.
If systemc attempts to schedule an event in the past, schedule it for right now instead. Still preserve the difference between delta and timed events. This scheme doesn't really make a lot of sense (why not just disallow scheduling events in the past?) but this will approximate what I think the correct behavior is. What's probably supposed to happen is that events in the past are executed from most past to most present until they catch up with now, and then now advances as normal. Our approach is simpler, but won't preserve ordering between multiple events scheduled in the past.
Change-Id: I73c1e581c532530178458f044674613a4f4ea3be Reviewed-on: https://gem5-review.googlesource.com/c/12277 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13124:538eff58fb30 |
28-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Implement support for the default time unit.
This is deprecated, but still used in the tests.
Change-Id: I454540e419c53624a37f3d1271cb240415b816b6 Reviewed-on: https://gem5-review.googlesource.com/c/12276 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13123:c86a8a2bc851 |
28-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Implement most of sc_fifo and its interfaces.
There are still some bugs since the output of the tests don't all match, but more tests pass and fewer abort.
Change-Id: I37f84d65c4a8a43357c98282096e39b9401fc1dd Reviewed-on: https://gem5-review.googlesource.com/c/12275 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13102:f9a4fa519bb3 |
28-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Report errors when proc ctrl funcs are called during elab.
Change-Id: I19475b86d04af5b3e4e907d9e24cb15666fb7bb1 Reviewed-on: https://gem5-review.googlesource.com/12274 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13101:d0db2b204d51 |
27-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Abort verify.py if no tests were selected.
The various phases assume there are at least some tests, and if there are none they may try to run malformed commands.
Change-Id: I041d35c504da57b830c490651ab1b3c98e0288ca Reviewed-on: https://gem5-review.googlesource.com/12273 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13100:fc7df026c235 |
27-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Make verify.py run the tests from the directory they expect.
Change-Id: I4c902cd81f7e46f81f601cae0ff2da044ef48f85 Reviewed-on: https://gem5-review.googlesource.com/12272 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13099:4cb81fed7ee3 |
27-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Add a --working-dir option to the test config.py.
The tests expect to be run from a certain directory. Generally that doesn't matter, but in at least one case the test opens a file with a relative path, and that doesn't work unless CWD is what it expects.
Change-Id: I34c0ed975e77daed50ace4f7eebd034bf04c5595 Reviewed-on: https://gem5-review.googlesource.com/12271 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13098:e5f37a4dbbd0 |
27-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Change the test binaries to use rpath.
Use rpath to link the gem5 dynamic library into the systemc test binaries so that they don't have to be run from a particular directory to resolve all their linking dependencies.
Change-Id: I66b18c23ae6bbf32a959022f8789fc8bdd3a6c6b Reviewed-on: https://gem5-review.googlesource.com/12270 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13097:6efbd43ab80e |
26-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Handle sc_stop called from sc_main correctly.
When in sc_main, sc_is_running will return true but we're not going to run any gem5 events since we're currently in the sc_main Fiber. In that case, we need to do the sc_stop work inline.
If we're actually running and not just paused, then we do still want to schedule the work of sc_stop to happen as its own event since that will happen before returning to sc_main, and actually will likely be the mechanism by which sc_main starts executing again.
Change-Id: If9ffafc4f240af0f3d9c726b36a0950b5219dc00 Reviewed-on: https://gem5-review.googlesource.com/12269 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13096:9295fa397b3f |
26-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Fix some issues with starvation checks.
Make sure we check for starvation after timed notifications and at the very end of delta cycles (after delta notifications, not before). Also reverse the order of starvation checks (whether they apply at all, then if they're satisfied) to make those checks faster. Checking a bool is a lot easier than checking if a bunch of other structures are empty.
Change-Id: I514ff219909823f1f424fde69856d6b510655188 Reviewed-on: https://gem5-review.googlesource.com/12268 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13095:836fd7929940 |
26-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: When sc_start-ing with zero time, ensure the ready event runs.
The ready event is what notices that we only wanted to run one delta cycle, or no delta cycle if there was nothing to do, and return to sc_main. If the ready event wasn't scheduled, we would advance time before the ready event ran and returned to sc_main which is incorrect.
Change-Id: Ic3c10a2f1405f744e8c2bd37aa45846ee6e98e12 Reviewed-on: https://gem5-review.googlesource.com/12267 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13094:e74742df378b |
26-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Fix where we checked if sc_stop was called durig elaboration.
If sc_stop is called during one of the various callbacks, that has defined behavior and will cause the simulation to stop after the current batch of callbacks. We were checking whether sc_stop had been called during one of those batches and killing the system, erroneously assuming that meant it had called during elaboration.
This change moves the check to before the callbacks which actually does mean that sc_stop was called during elaboration.
Change-Id: I6876305450e52a407acffb9a2f45ee2ae24a9adf Reviewed-on: https://gem5-review.googlesource.com/12266 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13093:bea17ab221ef |
24-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Make sure methods aren't restarted by yield.
Methods may need to yield control to other Processes when throwing them exceptions. In that case, we need to keep track of the fact that the method doesn't need to be restarted when it resumes within yield.
Change-Id: I829c387d6ddb563b2957db47e55adadbbe6bc51a Reviewed-on: https://gem5-review.googlesource.com/12265 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13092:a4995c783157 |
24-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: When a thread completes, yield to the scheduler.
Don't just fall off the end of the fiber and return to gem5. By calling yield, we ensure that remaining Processes are run and that bookkeeping is maintained correctly.
Change-Id: Ifbe104e155cad29e40a89767a7c1f986399f784d Reviewed-on: https://gem5-review.googlesource.com/12264 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13091:81fceed26e1e |
23-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Implement positional binding.
Change-Id: Ifbcd7e4148b82b9bf5241e040e812925daea3705 Reviewed-on: https://gem5-review.googlesource.com/12263 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13090:25d3d4a9affd |
23-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Use sc_assert to check the number of interfaces.
The sc_port code had been using the .at() function of the vector class, but when that failed it threw an exception, and it was very difficult to tell where the exception came from from how gem5 crashed. This change switches to sc_assert (the systemc version of assert) which makes the cause/location of failures much more obvious.
Change-Id: I1cd51c86f47b314be551c304b014c44cfa030175 Reviewed-on: https://gem5-review.googlesource.com/12262 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13089:2cd69e58c0f8 |
23-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Get rid of the unused warning function in sc_event_finder_t.
Change-Id: Id615856af7ea366e499747e00f66924a25623663 Reviewed-on: https://gem5-review.googlesource.com/12261 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13088:05763ab10391 |
23-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Use the eq pointer directly less often in the scheduler.
This takes advantage of the utility functions that exist a little better, and also avoids accidentally asymetrically using eventsToSchedule and eq->(de)schedule.
Change-Id: I1eb1c228d47684cccb9deaf6f3409b77cfbad4cd Reviewed-on: https://gem5-review.googlesource.com/12260 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13087:1df34ed84a4b |
23-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Make sc_process_b less hokey, and make WAIT* work.
This change puts sc_process_b into the inheritance hierarchy for the Process types. It also adds the nonstandard sc_set_location function and calls it from the nonstandard WAIT* macros.
Change-Id: Ic997dcf74d262774dd7b53504146e372e03af2e0 Reviewed-on: https://gem5-review.googlesource.com/12259 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13086:6a6fa249add7 |
23-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Handle null and omitted event names.
If the simulation isn't running, these should be replaced with versions generated by sc_gen_unique_name().
Change-Id: Idd515e73ba17d3dfa866ee5509369e9c4e3fb2f5 Reviewed-on: https://gem5-review.googlesource.com/12258 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13085:9a64693dabcc |
23-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Handle null sc_object names.
A null pointer for an sc_object name is supposed to be equivalent to an empty string.
Change-Id: I6094577ad43f13d47a20bc67fa15f4c04d448fe5 Reviewed-on: https://gem5-review.googlesource.com/12257 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13084:383ac3b9b4ff |
23-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Check for time overflow in sc_start.
A regression tests checks this situation.
Change-Id: I7716bf7c8cf219c372ab9722fc0ad52e7e674b17 Reviewed-on: https://gem5-review.googlesource.com/12256 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13083:dcd7f038f7ff |
23-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Handle sc_time_stamp before any sc_time is constructed.
The time resolution won't yet be fixed, so the scaling factor will still be set to zero.
Change-Id: I1d1e58316ee05cc477a31ce90e2bbf56dcbc65c3 Reviewed-on: https://gem5-review.googlesource.com/12255 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13082:bbdf00db71ba |
22-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Make the test config retrieve sc_main results.
Accellera's implementation prints any sc_report which is thrown and escapes sc_main, so we need to do the same to make some tests pass. Arguably gem5 should fail if sc_main reports an error, but verify.py would interpret that as the test failing too, and some tests purposefully generate errors.
This change also stops using the logging module. It wasn't really providing any benefit, and added extra decoration to log messages which confused verify.py.
Change-Id: I6850d0ada5e477b67527d99d421478586cda93b3 Reviewed-on: https://gem5-review.googlesource.com/12254 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13081:fd1b50840830 |
22-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Keep track of how sc_main completes and expose that to python.
That makes it possible for the config script to retrieve the result of running sc_main. sc_main (or at least the python front end for it) can't return results directly since it usually doesn't run to completion when it's first called.
Change-Id: I9740e9688571e2ca824a684be70480f1eadddcdb Reviewed-on: https://gem5-review.googlesource.com/12253 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13080:5b49b8664269 |
22-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Make the report handler handle null messages.
It was checking the first character of the message for a null byte, but not whether the message string pointer itself was null.
Change-Id: Iddef1e22c35b55c8c898670576ab416dd1023d7c Reviewed-on: https://gem5-review.googlesource.com/12252 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13079:e7e261dd975b |
22-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: If no sc_module_name was used, throw an error.
This is tested by the regression tests. Also make sure the handshake which sets up instances of sc_module is cleaned up if we bail partway through for some reason, for instance if an intermediate class throws an exception as part of its constructor.
Change-Id: I89afe5f76832cc132aa2bb8f19916dea64546784 Reviewed-on: https://gem5-review.googlesource.com/12251 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13078:f11496886d1a |
22-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: If an event is a delta notification, checked if it's timed.
If we're descheduling an event which is at the current time, it may have been scheduled as a delta notification, but it could have also been scheduled as a timed notification and we just got to that point in time. If an event is for the current time but isn't in the delta notifications, this change detects that and then treats it as a timed notification.
Change-Id: I1d8f4c40325cc7f355b7f2e6f08611483ce11858 Reviewed-on: https://gem5-review.googlesource.com/12250 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13077:0037323cb4dd |
22-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: If sc_main returns, don't do any more systemc stuff.
When sc_main returns, clear out any pending work in the scheduler and also block the systemc kernel from doing actions which correspond with the start of simulation.
It's most likely that work like oustanding timeouts might survive past the end of sc_main, especially if it never officially called sc_stop. It's also possible for sc_main to return and never actually call sc_start. In that case, the kernel should not call callbacks of the various objects (which may no longer even exist), or go through the initialization phase.
If sc_main is never called at all, then the kernel's actions aren't gated.
Change-Id: I49bf094be3283a92d846d2f3da224950bd893a5c Reviewed-on: https://gem5-review.googlesource.com/12249 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13076:c9e2a8bfe907 |
22-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Clear out the scheduler more agressively and with common code.
It's be useful/necessary to flush pending activity even when not tearing down the scheduler, specifically when stopping.
Change-Id: I6b3716a8ca1f8ca151222e08f30bd3c9a43364b9 Reviewed-on: https://gem5-review.googlesource.com/12248 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13075:d7b8d1d5fc66 |
22-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Override notifyWork for timeout/event_and_list sensitivities.
The notifyWork function for SensitivityEventAndList assumes it's being triggered by an event which is part of its list, but when SensitivityTimeoutAndEventAndList triggers it might be from an event or from a timeout. This change overrides notifyWork for that class and makes it delegate to notifyWork for the subclasses depending on whether there's an event pointer.
Change-Id: I598af2b78d71ee9934edea10ca7ac5c88149e3f3 Reviewed-on: https://gem5-review.googlesource.com/12247 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13074:51b5e342f327 |
21-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Make sure no delta cycles are scheduled when stopping.
If the readyEvent is still scheduled when sc_main completes, gem5 will return to it's main fiber and keep executing events, including that one. That means a delta cycle will run even after sc_main is complete. This change ensures that the readyEvent has been descheduled as part of stopping.
Change-Id: I9479ac4ebff3335477b371b02efa6d44c70cbc8e Reviewed-on: https://gem5-review.googlesource.com/12224 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13073:71fccb27bace |
21-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Make sure an immediate notification overrides a delayed one.
If an event has a delayed notification pending, that should be cleared if it's later notified immediately.
Change-Id: I4272f6b47a41d80756769f3fe69069a00016dbd6 Reviewed-on: https://gem5-review.googlesource.com/12223 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13072:f2b83208ab54 |
21-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Improve scheduler cleanup.
Make the scheduler clear itself out when it's destructed to ensure that nobody will try to use it after it's gone away. Also make sure there are no pending events which might refer to it as well, either systemc events or gem5 events.
Change-Id: I12dadc06bd9db7016a8dc0c1827b3e630b0d23d5 Reviewed-on: https://gem5-review.googlesource.com/12222 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13071:91e07c3feb64 |
21-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Implement most of sc_inout.
Because sc_inout needs sc_dt::sc_logic and that probably calls functions from dt_sc_mempool.cc and because those hadn't yet been stubbed out. This change adds stubs for those as well.
Change-Id: I544a1669575b594d4612558b8b6f47668ac94414 Reviewed-on: https://gem5-review.googlesource.com/12221 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13070:b34c2606011e |
20-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Make sc_out delegate to its base class sc_inout.
The spec says these are essentially identical classes, they just have both so that users can show their intent.
Change-Id: I51908edca89acea25891a52bfa7fca0681ccfc5c Reviewed-on: https://gem5-review.googlesource.com/12220 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13069:d894ba8f881c |
17-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Generalize gem5 style event scheduling.
These events are either scheduled directly, or if no event queue is yet available they're recorded in a map to schedule later. Since this was used in a few places (and should have been used for the ready event), this change moves it into some common functions which remove some duplication and abstract away this detail.
Change-Id: I4320d7296f4f72344539b2b4b2564a6a27576dd8 Reviewed-on: https://gem5-review.googlesource.com/12219 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13068:822c1be3550e |
17-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Make sure sc_start waits for simulation even when starving.
Even if the simulation would return from sc_start immediately because of starvation, this change ensures that sc_start gives control back to gem5 so that the scheduler will have a chance to set up sensitivities, etc., before things get torn down.
Change-Id: I39b1fd704fcbe12c299cad9dbd30258e8fe9d032 Reviewed-on: https://gem5-review.googlesource.com/12218 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13067:3d6ef32002ef |
16-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Rework the init phase for the new way delta notes are handled.
The initialization phase had been done in a somewhat adhoc way, partially because delta notifications were being handled as top level gem5 events which were ordered based on their priorities. This change makes the initialization phase happen more explicitly, and more in the order in the spec.
Change-Id: I91d56b63fefcb81c845c52c97826a976a7559fad Reviewed-on: https://gem5-review.googlesource.com/12217 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13066:4fe03c113c16 |
16-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Make a test use cout for all its messages.
This makes them end up in simout so verify.py can find them when it's checking output.
Change-Id: I2b7b276b3e1816a257f58b0cfb13487d6296e6fd Reviewed-on: https://gem5-review.googlesource.com/12216 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13065:eec7d19ac479 |
16-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Implement a significant portion of sc_clock.
Change-Id: Ic195f46ac13b46a02c86a5fc8d90ba66a415a9c8 Reviewed-on: https://gem5-review.googlesource.com/12215 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13064:e06421881cec |
16-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Don't run the ready event inline when unpausing.
Now that delta events are handled explicitly by the scheduler, there's no reason to run the readyEvent inline when returning from a pause. The delta events will necessarily be run after the evaluate and update phases.
Change-Id: Iad6d431a87742354e3a46a0fb44c309aa785ea60 Reviewed-on: https://gem5-review.googlesource.com/12214 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13063:c9905ead0041 |
16-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Rework how delta and timed notifications/timeouts are tracked.
Rather than delegating them entirely to the gem5 event queue and using priorities to ensure the right thing happens, this change adds a few new structures which keep track of them and give the scheduler more control over what happens and in what order. The old scheme was mostly correct, but there were some competing situations which made it next to impossible to make everything happen at the right time.
Change-Id: I43f4dd6ddfa488a31073c0318bb41369b1a6117d Reviewed-on: https://gem5-review.googlesource.com/12213 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13061:9b868a2ab73c |
16-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: When sc_start is told to run zero time, do one delta cycle.
This is a special case which is mentioned in the spec but hadn't yet been given any special handling in this implementation.
Change-Id: I500d046f09d916a08e22821f8d3e2f490f8ba5bb Reviewed-on: https://gem5-review.googlesource.com/12212 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13060:a5465580f647 |
16-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Don't run clocked thread processes during the init phase.
Change-Id: I170d67fef61dd5536a842a1f64682d90ae7a1507 Reviewed-on: https://gem5-review.googlesource.com/12211 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13059:4be5f408e128 |
16-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Track exports and prim channels, and call their callbacks.
Also call the callbacks on the ports which were already being tracked.
Change-Id: I5ba8ea366e87fc48b58712f35b93c27bccf92cb3 Reviewed-on: https://gem5-review.googlesource.com/12210 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13058:da3ffd935b29 |
15-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Fix the priority of the maximum time event.
Change-Id: I3e5e71165d06da77076f0e58012c575e24456182 Reviewed-on: https://gem5-review.googlesource.com/12209 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13057:b1cdffff3bed |
15-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Implement a little more of sc_time.
This change implements a pair of constructors, and some conversion functions.
Change-Id: Ibd0e9ec5bcc24f4a17896313996b3112b5ef1934 Reviewed-on: https://gem5-review.googlesource.com/12208 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13056:f483df6334a5 |
15-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Teach verify.py to ignore another deprecation warning.
Change-Id: I4c45431abebafd69f485f9d740da30f4b957f609 Reviewed-on: https://gem5-review.googlesource.com/12207 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13055:59ec7f6db329 |
13-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Generalize ignoring info messages in the reference output.
Those messages are very implementation specific and don't (generally) affect correctness. This makes it easier to ignore info messages based on their number.
This change also makes the output checker ignore a similarly styled message gem5 generates. We should consider making gem5 not generate that message and have it generate another message instead which is specific to gem5. We would need to filter that out too when comparing results.
Change-Id: I93b9e2d547b6259512db091cfc557d21f86f4a3d Reviewed-on: https://gem5-review.googlesource.com/12086 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13054:bce8a8124325 |
13-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Implement the sc_in class.
Change-Id: I08174462cb650c7918a4e8f5284d4ee814cf595d Reviewed-on: https://gem5-review.googlesource.com/12085 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13053:a7a320144bc1 |
13-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Implement port binding except positional binding.
This change adds code which keeps track of ports and interfaces which are being bound to be finalized later, and the actual port binding of interfaces and recursive binding port ports.
Change-Id: Ifa885ed44b667254762cc101580be4f0a7d7a131 Reviewed-on: https://gem5-review.googlesource.com/12084 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13052:d1ac29fc3169 |
13-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Make BindInfo track ports or interfaces.
Change-Id: I0ca0d5de8de59d92cb65af56c25f418ff32696f4 Reviewed-on: https://gem5-review.googlesource.com/12083 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13051:9bf363246cb0 |
13-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Implement sc_event_finder.
Change-Id: I22aa0a34eabf13593986a92289155257fa26c7de Reviewed-on: https://gem5-review.googlesource.com/12082 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13050:7a026b534292 |
13-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Exclude two more tests which have undefined functions.
It seems that implementing more of systemc makes the compiler think it wants an implementation, and so the build fails with linker errors.
Change-Id: I6f0b031f300b0ad60dac8b4462b8f4d466aa7dfa Reviewed-on: https://gem5-review.googlesource.com/12081 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13049:181358d628b7 |
09-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Ensure delta notifications happen at the right time after sc_pause.
Normally delta notifications would be created during the evaluation or update phases, and so there isn't any problem with them cutting in front of those stages. When the simulation is paused however, those notifications could be waiting before the ready event starts and could preempt it.
This change adds a check for that situation to the end of the pause event and runs the evalution and update stages inline if necessary.
Change-Id: I4477b2ae8e7980406df00ba7320ae2a24ae2da9b Reviewed-on: https://gem5-review.googlesource.com/12080 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13048:9ae0bf1b32e6 |
08-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Implement sc_export.
This change ignores the rule that sc_exports all have to be bound exactly once and only by the end of elaboration. If it's bound more than once, then the earlier binding will be overwritten, and if it's not bound at all then it will act like a null pointer. To accomodate doing those checks in the future, the sc_export_base constructor and destructor are in the .cc file even though they do very little so that they can be extended to track a list of all exports which exist.
Change-Id: Ie9a3416b8fa87bca55bc9f87f3238c4de3c2e729 Reviewed-on: https://gem5-review.googlesource.com/12079 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13047:61a849083f15 |
08-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Don't schedule the update phase if the event queue is null.
That happens when an update is requested before the initialization phase has started. In that case, the update phase will be manually run and no event needs to be scheduled, even if that was possible.
Change-Id: I2008e29064d282f82bd1935dbe5b94407aa925b0 Reviewed-on: https://gem5-review.googlesource.com/12078 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13046:3a5e942051db |
08-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Use an std::list to track all modules.
This is less efficient when modules are destroyed since the list isn't sorted, and each module needs to find its own entry to remove. The benefit is that entries added to the end of the list while the list is being iterated over will still be included, and that the order the modules are added will be preserved so that it matches what the order in the regression tests.
Change-Id: I5af5d15f316fa58561e8fd9ca77f667ddc8b2c5e Reviewed-on: https://gem5-review.googlesource.com/12077 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13045:ccedccd0d93d |
08-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Track the module in the end_of_elaboration callback.
sc_objects constructed during that callback are considered children of the module the callback belongs to.
Change-Id: I164863a10beef6d0e2c6d9c5e8f2642d80769dca Reviewed-on: https://gem5-review.googlesource.com/12076 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13044:df7783886021 |
08-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Partially implement the sc_signal class template.
There are a few details of this class that still need to be fleshed out, but this implements most of it.
Change-Id: I6f8b546aacd8537d4341dc91e59b95864ae0f7c4 Reviewed-on: https://gem5-review.googlesource.com/12075 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13043:3d8585dabc3e |
08-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Add a nonstandard sc_status pretty printer operator.
This operator exists in the Accellera implementation, and is necessary to make the test output match.
Change-Id: I266629d6c936d4846e88e35af36555fb392b181c Reviewed-on: https://gem5-review.googlesource.com/12074 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13042:8c1fb556547e |
08-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Set the scheduler's event queue earlier.
The kernel can set the event queue during its own construction which will ensure that the scheduler can schedule events as early as possible.
Change-Id: I0e47ca0a667e77d36c97860cd7c6b7577415c801 Reviewed-on: https://gem5-review.googlesource.com/12073 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13041:ffcb5efb97d7 |
07-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: "Implement" sc_interface's methods.
Most don't do anything. Make default_event() return a dummy event to avoid dereferencing a null pointer.
Change-Id: I8d6d576d3a1f585029c387cd414bbebf2d670644 Reviewed-on: https://gem5-review.googlesource.com/12072 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13040:877a6e22f8d4 |
07-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Implement a few more member functions for sc_time.
Change-Id: I40a7fb278f2a0ec4124589e02e4441c1866c86ea Reviewed-on: https://gem5-review.googlesource.com/12071 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13039:0c8ecf92a420 |
07-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Use the new python interface to delay fixing the timescale.
This is necessary if an sc_time object is constructed globally, either directly or indirectly, before python is available to fix the timescale. The call will be deferred until the interpretter is up and ready.
Change-Id: I486c0a90d44a0e0f0ad8c530b7148e1cff04a5cc Reviewed-on: https://gem5-review.googlesource.com/12070 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13038:7bf84150855b |
07-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Generalize working with the systemc python module from C++.
This change pulls the systemc python module creation code out of sc_main and puts it into a more general purpose python.hh and python.cc which can be used by other code to add other entries into that module without having to track that in a central place.
This change also adds a mechanism for notifying C++ code that the embedded python interpretter is up and ready to interact with in case it needs to call some python only functionality. An example of that is the code which tracks and then fixes the timescale for the simulator.
Change-Id: I9afcd5a089b21d23ebc1b5fdb6f643ae2f7e5f11 Reviewed-on: https://gem5-review.googlesource.com/12069 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13037:ae6f69952478 |
07-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Ignore a warning in the reference test outputs.
The warning is about deprecated sc_module constructors which don't take an sc_module_name.
Change-Id: I2ef864a5bdac93eb8104a842179ffe45a8335085 Reviewed-on: https://gem5-review.googlesource.com/12068 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13036:6f7e3c29c11a |
07-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Fix the seed used with sc_gen_unique_name for sc_port.
The seed should only be "port" not "sc_port".
Change-Id: Ia046103abc0a9ed283fcb7cf7d8069383a1e2b0d Reviewed-on: https://gem5-review.googlesource.com/12067 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13035:bafbdba2352a |
07-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Implement sc_gen_unique_name.
The Accellera implementation statically allocates the buffer it uses to build the unique names and only allocates the name generator if it's going to be used for a particular module. I assume that's to avoid allocating a large buffer if it's not going to be used.
In this implementation, I use an std::string which manages its own memory and so shouldn't need to be selectively allocated. I also use a string stream to construct the name instead of sprintf.
Change-Id: If92c68586a85b5d27c067a75a6e9ebbf00d8c785 Reviewed-on: https://gem5-review.googlesource.com/12066 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13034:69726d1f9209 |
28-Jul-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Always set USE_SYSTEMC=1 when compiling with verify.py.
It doesn't make sense not to have systemc enabled when building the systemc regression tests.
Change-Id: I23b81fd4d7cbd0dbf5efbea773d816296d6492be Reviewed-on: https://gem5-review.googlesource.com/12065 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13033:97942c2a58ad |
28-Jul-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Make verify.py ignore an Info: message.
This message is about how to disable a warning about sc_bit being deprecated.
Change-Id: I1a0b12e2ca5b58328e37605ba3f7e3e1a384e351 Reviewed-on: https://gem5-review.googlesource.com/12064 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13032:35f2d72d73c8 |
28-Jul-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Adjust a warning to match Accellera.
This is to pass fix a diff in the regression tests.
Change-Id: Id1b963df647224d7a3589febe7986353a4a8e440 Reviewed-on: https://gem5-review.googlesource.com/12063 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13011:8809582e38f6 |
28-Jul-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Adjust some whitespace in a print out.
This makes a test output file diff successfully.
Change-Id: Ia269b4b33f719a2559197d9296f9acc601ec65f7 Reviewed-on: https://gem5-review.googlesource.com/12062 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13010:09b975489550 |
28-Jul-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Make verify.py ignore another warning.
Also make warning filters more general and easier to add by writing a function to generate them.
Change-Id: I8d813ded9ad8a9ccac4e48e5ea80a3c9c23959da Reviewed-on: https://gem5-review.googlesource.com/12061 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13009:95e4bce41913 |
28-Jul-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Make verify.py compare non output log reference files.
There are only a few of these which are vcd files. If there are reference files which aren't the log and which aren't in the gem5 output directory, mark those tests as failed as well.
Change-Id: I2c880c13d0f90ccf16ac0439dbac68de9223cc90 Reviewed-on: https://gem5-review.googlesource.com/12060 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13008:cc27d46fd408 |
28-Jul-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Delete empty/misnamed test reference file.
The name of the reference file doesn't match the name of the test, and is empty. There's also a correctly named log file in the same directory which will be used instead.
Change-Id: I6501b465b99af403ae4af6d43189280c4b45fc8f Reviewed-on: https://gem5-review.googlesource.com/12059 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13007:c76c7bc838e8 |
28-Jul-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Remove some junk test reference files.
These files have truncated names, and are identical to correct versions of the log files.
Change-Id: I1e5e3c8c489d41dea21f62b4664b05bf6a742117 Reviewed-on: https://gem5-review.googlesource.com/12058 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13006:f4e4f859d114 |
27-Jul-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Ensure the terminated event is notified in all cases.
The terminated event was being notified if a process was killed, but not if it was terminated in other ways. This change moves the notification into the helper which sets termination related state.
Change-Id: I10aa5ad25875db992c8408dc60f087efc76b336b Reviewed-on: https://gem5-review.googlesource.com/12057 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13005:9e97204bf57f |
27-Jul-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Make verify.py delete obsolete diff files.
If diff file exists but the underlying diff has been fixed, delete the diff file.
Change-Id: Icadc21a61c084198a8a246ab6d00a9b885647cde Reviewed-on: https://gem5-review.googlesource.com/12056 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13004:ba6455680bfc |
27-Jul-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Make verify.py ignore a warning.
Change-Id: Ia887b7195d84d0ba9e77370d7b928e201ca78731 Reviewed-on: https://gem5-review.googlesource.com/12055 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13003:3a164f2f8103 |
27-Jul-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Teach verify.py to diff files when checking test results.
Currently it just diffs the stdout and ignores other reference files. It also doesn't filter out noise in the diffs from non test related simulator messages. These include startup messages, messages when the simulator finishes executing, and some non-standard warnings, etc.
Change-Id: Idcb19edd893cd8818423c2c5ebb6cbfb278baffa Reviewed-on: https://gem5-review.googlesource.com/12054 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13002:b8d58d5f25a5 |
26-Jul-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Add return code verification to verify.py.
This just checks whether gem5 exited of its own accord with a successful error code, or in other words that it didn't hang or crash. More checking will need to be added to verify the output against the golden reference.
Change-Id: I1ddef56aa73b5f700743830bd6212804531c484f Reviewed-on: https://gem5-review.googlesource.com/12053 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13001:acf4fd41ba76 |
26-Jul-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Record the test's return code in the output directory.
verify.py will be able to use that value later to determine whether a test was successful.
Change-Id: Ib499a4b6f202ee46e66e5de1b61a7e6309df9886 Reviewed-on: https://gem5-review.googlesource.com/12052 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13000:c53f8c81369b |
26-Jul-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Extend the execute phase of verify.py.
Add -j and --timeout options to the execute phase of verify.py.
The --timeout option is implemented using the timeout utility program which is assumed to be available on the host system. Python 3.3 added a timeout argument to the subprocess module which is an alternative approach, but then we would be dependent on python 3.3.
-j is implemented using the standard multiprocess.pool.ThreadPool class.
Change-Id: I15b92f2b14de6710e2027a6a19984b2644b2a8df Reviewed-on: https://gem5-review.googlesource.com/12051 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
12999:1325c18d9ffd |
26-Jul-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Detect a process control corner case and report an error.
This error reporting results in an exception being thrown, and one (or more) of the tests depend on that behavior.
Change-Id: I858aa14fbb80b0648392179a6a8d2055c91aedf8 Reviewed-on: https://gem5-review.googlesource.com/12050 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
12998:68d2c7538b82 |
26-Jul-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Adjust process status tracking to improve kill/reset support.
This change rearranges how process status is tracked so that the kill and reset mechanisms work in more circumstances and more like they're supposed to according to the spec. This makes another test or two pass.
Change-Id: Ie2a683a796155a82092109d5bb45f07c84e06c76 Reviewed-on: https://gem5-review.googlesource.com/12049 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
12997:cfc14d8f4725 |
25-Jul-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Implement most of the sc_report_handler mechanism.
This doesn't include support for the deprecated integer message ids.
Change-Id: I309d58df1cdc464428189eb0b7180edf41ca4f67 Reviewed-on: https://gem5-review.googlesource.com/12048 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
12996:17ec70f9841e |
23-Jul-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Ignore direct requests to mark a process as ready.
That might happen when a process is being marked as ready at the start of simulation.
Because the process might not end up on the ready list, displacing it from the init list, excplicitly pop it off the init list as well.
Change-Id: Iebf972e3e1baedec17b9b99b4da9dd44cd8e6957 Reviewed-on: https://gem5-review.googlesource.com/12047 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
12995:3421144dd03e |
21-Jul-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Fill out process handle kill and reset mechanisms.
Some flags were being updated too early, making the functions think what they were about to do had already been done. Also, actually check for and throw the exception installed in a process when it's next supposed to run, and when injecting an exception schedule that other process to run immediately.
Change-Id: I0856b69903699b2c66f9dc7f44942bbfe3cfdcc4 Reviewed-on: https://gem5-review.googlesource.com/12046 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
12994:afce27405f70 |
21-Jul-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Fix a "problem" with kill/reset exceptions.
Despite what it says in the spec, the proc_ctrl compliance test throws a copy of the reset exception it catches, not the original. Because of that, the code in the kernel which catches the exception gets the base class, not the derived class with overridden virtual methods, etc. This happens to work for the Accellera implementation because they manipulate members of the base class itself which are preserved despite this bug. To make the test work, we imitate their implementation, even though it exposes more implementation details through the header files.
Change-Id: I7ed9818c0552869ec790cb7f7bfbe365ade5e49c Reviewed-on: https://gem5-review.googlesource.com/12045 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
12993:977fa1dfe9b3 |
20-Jul-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Implement much of sc_spawn.
This doesn't implement reset signals, although those aren't implemented for static processes either yet.
Change-Id: I748a7f75b9b91774c91d969bc1ff5b07e1711aa3 Reviewed-on: https://gem5-review.googlesource.com/12044 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
12992:94c1e8ce86e9 |
20-Jul-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Promote some functions to sc_export_base.
There are a few functions which return a generic sc_interface pointer which were (in the spec) defined to be in the interface type specific sc_export class. They don't need to be and aren't in the Accellera implementation, and without having them in the base class there's no good way to get at a generic interface pointer from an export.
Change-Id: Iba692c79bf1d4f7684f28447d8b22c88ef4b804d Reviewed-on: https://gem5-review.googlesource.com/12043 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
12991:9d018d22aefd |
20-Jul-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Add a sensitivity type for exports.
Dynamic processes can be sensitive to exports, so we need a pending sensitivity to represent them.
Change-Id: I87952f8bbb7847ad1f1d98d35cd5dd488e7b28ab Reviewed-on: https://gem5-review.googlesource.com/12042 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
12990:19d91b53e04e |
20-Jul-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Make some functions of the kernel static.
This makes it possible to call them without having to have a kernel instance available. The kernel is a singleton anyway, so there should only ever be a single instance of any of these values.
Change-Id: I3610d60cc72e9f3114997fe63db94b96ccaac3cd Reviewed-on: https://gem5-review.googlesource.com/12041 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
12989:f5e0cebe6999 |
20-Jul-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Implement + and - for sc_time, and sc_max_time.
Change-Id: I294b63840e42e2afdef198229adc60ddbb60b9a1 Reviewed-on: https://gem5-review.googlesource.com/12040 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
12988:df70e73818e4 |
20-Jul-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Fix a couple memory errors.
Because events are held in vectors, it doesn't make sense to keep an iterator into the parent to keep track of where that event is for easy removal since the iterator becomes invalid when the vector is changed.
The events need to be stored in a vector because systemc defines an accessor which returns that vector, and building a vector on the fly would be cumbersome.
Also, make sure the Event parent pointer is set to nullptr if there isn't a parent.
Change-Id: I63a676190e7747e60baaca50009161d47bfc1c54 Reviewed-on: https://gem5-review.googlesource.com/12039 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
12987:97fbdee919d8 |
20-Jul-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Implement the SC_EXIT_ON_STARVATION exit mode.
This mode implies checking whether there's any activity left either before starting a delta cycle, or processing delta or timed notification or timeout.
Change-Id: I0780a1f720cf63f3d2907b8dd28685266b52d6b4 Reviewed-on: https://gem5-review.googlesource.com/12038 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
12986:761e57785c6a |
20-Jul-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Fix the time resolution when constructing an sc_time.
This is (sort of) mandated by the spec. More specifically the spec says that the systemc API for changing the time resolution can only be called once, and can only be called before a non-zero sc_time is constructed.
Because sc_time can be constructed during elaboration and the gem5 version of time resolution is generally not locked down until the actual simulation starts (after elaboration), the sc_time constructor needs to call the fixing function itself to ensure that, for instance, the scaling factors for various real life time units within gem5 are initialized.
Change-Id: Ied4b43659834761b55b5ae49ea62779af891d9e3 Reviewed-on: https://gem5-review.googlesource.com/12037 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
12985:ec84697e4e63 |
19-Jul-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Handle event notifications scheduled before sc_start.
After sc_start is called, gem5 has run far enough to have an event queue to schedule the notification events on. Before then, it's still legal to request a timed notification. The scheduler should keep track of those requests, and once an event queue is available it should add them to it.
Change-Id: Ie7445b1f2e616f4bd36044a09dbef9e1d12d7350 Reviewed-on: https://gem5-review.googlesource.com/12036 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
12984:02f20eeeb8ce |
19-Jul-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Make orphans top level objects instead of panic-ing.
When a simulation ends, the sc_objects it contains are destroyed one by one, not necessarily in hierarchy order. That means that a parent object can legitimately be destroyed before its children. Instead of panic-ing when that inevitably happens, this change makes gem5 turn those children into top level objects.
Change-Id: Icad9c99310fbc3ddcadbbb4f8a990b4fbfe35bdf Reviewed-on: https://gem5-review.googlesource.com/12035 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
12983:fb1f462ae89e |
19-Jul-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Implement some of the basics of sc_time.
This is a very incomplete implementation, but is enough to unblock implementing some other dependent features.
Change-Id: Ibd2f3476fe01389e277c6956d48337f551d14acd Reviewed-on: https://gem5-review.googlesource.com/12034 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
12982:c7966254372e |
19-Jul-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Implement the various sc_module stage callbacks.
This change also gets rid of the SystemC namespace which was deprecated in favor of sc_gem5.
A few utility functions which check whether certain callbacks have finished were also implemented. status tracking moved from a global variable in sc_main.cc to a member of the kernel simobject.
Change-Id: I50967fae9c576fbe45b1faff587aaa824857a289 Reviewed-on: https://gem5-review.googlesource.com/12033 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
12962:004cc9133bd6 |
18-Jul-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Implement pending activity related functions
Track the number of notifications/timeouts that are scheduled at any given time. This lets us implement sc_pending_activity_at_current_time, sc_pending_activity_at_future_time, and sc_time_to_pending_activity.
Change-Id: Ia3fcd29bdbfe1a6c77eb52ce4836982d4705263c Reviewed-on: https://gem5-review.googlesource.com/12032 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
12961:9bd3a469fd11 |
17-Jul-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Implement sc_pause, sc_stop, and re-sc_start-ing.
This change further modifies the scheduler to implement the sc_pause and sc_stop functions, and to ensure that calling sc_start again works. Also, some small changes were made to how processes and contexts are hooked up. Now, rather than checking whether a process is running to determine wether it started on its own or needs to be started manually, there's a bool which explicitly tracks whether it needs this step. The problem was that once a thread finished, it wasn't considered running any more. In that case it had run but finished, but that was indistinguishable from it needing to run but not having been started.
Change-Id: I3aefb5493f91d9efa1a1382586196339b67925fe Reviewed-on: https://gem5-review.googlesource.com/12031 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
12960:ff77756883e0 |
16-Jul-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Implement sc_get_current_process_handle's other personality.
When run during simulation, sc_get_current_process_handle returns a handle for the currently running process or a invalid handle if no process is running (ie sc_main is running).
When run during elaboration, it returns a handle to the most recently created process. This second context is what this change handles.
Change-Id: I3fb247b9b7bf83891c782966cfef474753159158 Reviewed-on: https://gem5-review.googlesource.com/12030 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
12959:33d9a39e40a3 |
16-Jul-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Handle suspended processes and handle sensitivity overload.
This change keeps track of whether a process would have become ready but was suspended so that it can become ready when the process is resumed.
Also, this makes a process ignore its static sensitivity while a dynamic sensitivity is in place.
Change-Id: If3f6c62f370051e574f81bf227746db8c43527e2 Reviewed-on: https://gem5-review.googlesource.com/11715 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
12958:a8188f40f342 |
16-Jul-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Implement next_trigger and wait.
These set up dynamic sensitivity.
Change-Id: I6cf2c2e4f93fe001eb7df8377753d51846b57d32 Reviewed-on: https://gem5-review.googlesource.com/11714 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
12957:e54f9890363d |
16-Jul-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Implement the sensitivity mechanism.
This change lets processes be sensitive to events, timeouts, etc.
Change-Id: If30a256dfa8a2e92192c1f9c96b48e2aa28ec27e Reviewed-on: https://gem5-review.googlesource.com/11713 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
12956:264cdc9261e6 |
16-Jul-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Hook up sc_time_stamp sc_delta_count.
sc_time_stamp reports the current simulation time. sc_delta_count was hooked up to a dummy value. This change hooks it up to the scheduler so that it returns the real value.
Change-Id: I354c4be32161eabeea86af653f5cb0a5d384645b Reviewed-on: https://gem5-review.googlesource.com/11712 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
12955:9c8bf6a5f2e3 |
11-Jul-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Implement much of events, event lists and event exprs.
Three things aren't yet implemented, waking up processes which are sensitive to the event, triggering of events, and garbage collecting list objects which came from expression objects.
The garbage collection aspect is problematic since there doesn't seem to be a correct way to implement it given the constraints in the spec, including the way that's implemented by Accellera. It's something that will need to be dealt with at some point, but in the interest of forward progress it's being ignored for now.
Change-Id: Ic4e3c219ff482729f1f1302ab10181a798d48041 Reviewed-on: https://gem5-review.googlesource.com/11711 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
12954:8ea3a185354c |
05-Jul-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Implement channel updates and rework the scheduler.
This change implements channel updates, and also reworks the scheduler to delegate more to the gem5 event queue by taking advantage of event priorities to ensure things happen in the right order. There's a lengthy comment in scheduler.hh describes how that all works.
Change-Id: I5dee71b86b2e612bb720a4429f3a72e4b7c6d01f Reviewed-on: https://gem5-review.googlesource.com/11710 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
12953:ddfd5e4643a9 |
03-Jul-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Partially implement the scheduler.
This change implements the "evaluate" part of the delta cycles, and sketches out a function to run delta cycles and the initialization phase. The kernel object now schedules an event at time zero which runs the initialization phase.
Also, some small places which were stubbed out pending a way to check the currently running process have been filled in now that that's being tracked.
Change-Id: I6899569eb0195ff1c059fa4e68e90ef162b2f2df Reviewed-on: https://gem5-review.googlesource.com/11709 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
12952:94fca7e8120b |
29-Jun-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Fill out sc_process_handle and create Process classes.
The sc_process_handle class now primarily delegates to a Process object it points at. The Process object does book keeping as far as its internal state, but doesn't yet have a way to run its target function or to schedule itself or inject exceptions into its context of execution.
Change-Id: I98389778abe29aa26e3e3a91bf02e6721acc8a9c Reviewed-on: https://gem5-review.googlesource.com/11613 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
12951:9db2476bea4e |
25-Jun-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Implement some basic plumbing in sc_module.hh.
Take care of some low hanging fruit as far as wrapper methods and the sc_bind_proxy class.
Change-Id: I7f55a37eeaa82338bd608218c0261fbc39e65fc2 Reviewed-on: https://gem5-review.googlesource.com/11612 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
12950:af1f0b5e8dfb |
22-Jun-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Implement most of sc_object.
To avoid making it hard to change sc_object's implementation in the future, this change keeps most of the data members out of sc_object and keeps them in a seperate Object which is managed independently but still matches to the sc_objects one to one.
This change also moves away from the SystemC/sc_gem5 namespace pair in favor of sc_gem5. Having two namespaces with classes, etc, living in both was complicating things. Having to use a namespace that doesn't fit in one scheme or the other isn't great, but it's the lesser of two evils.
Change-Id: Ib59c3c515ca98c7fe519c59e9fe9270304b71cc0 Reviewed-on: https://gem5-review.googlesource.com/11611 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
12949:7014101fea10 |
22-Jun-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Get sc_main to work even when dynamically linked.
Unfortunately multiply defined weak symbols don't work like they're supposed to when the different versions are across dynamic linking boundaries.
Fortunately, a weak symbol with no definition at all will still consistently evaluate as 0, and a singularly defined weak symbol will still resolve correctly.
Instead of relying on a weak version of sc_main being overridden by a strong/non-default definition, this change leaves it as undefined and detects at run time whether the symbol resolves to 0 or to an actual code location.
Change-Id: I31c4ff769b0c52277c6cf4845ca3f85000009583 Reviewed-on: https://gem5-review.googlesource.com/11610 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
12948:cd54609046c4 |
22-Jun-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Implement the sc_attr classes.
Change-Id: Ibbe6da957b1b36687178f226e80718adc0f4ab81 Reviewed-on: https://gem5-review.googlesource.com/11609 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
12947:c2abf3dcb3a7 |
18-Jun-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Disable tests which use sensitive_(pos|neg).
Those members are deprecated and not worth supporting.
Change-Id: I30b64b36ba3201bb0bcbb541da512676c2bf8510 Reviewed-on: https://gem5-review.googlesource.com/11357 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
12946:70c6625468c3 |
18-Jun-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Enable some more sc_simcontext related tests.
Now that we bit the bullet and stubbed out sc_simcontext and related functions a little bit, we can enable a couple more tests. This change also adds in some functions the new tests expect sc_simcontext to have.
Change-Id: I00b5cc0c6eb658eb689b9c85ed171f290009768d Reviewed-on: https://gem5-review.googlesource.com/11356 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
12945:365bae01b46d |
18-Jun-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Add m_cur_val and m_new_val to sc_signal.
These members are referred to in one of the tests.
Change-Id: Iab0110a0e3acf627986664069622704f17b703a1 Reviewed-on: https://gem5-review.googlesource.com/11355 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
12944:3909a6e6fa6e |
18-Jun-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Add the "implementation defined" vport function.
This function is in an "implementation defined" class body in the spec, and has a comment next to it which says "(for internal use only)" next to it, but it is still used directly in one of the tests.
Change-Id: Ib3727c93cc531ddd31a24897291dc7e7c97c2b58 Reviewed-on: https://gem5-review.googlesource.com/11354 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
12943:12c1004709d4 |
18-Jun-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Add the nonstandard sc_join class and sc_thread_handle type.
Change-Id: I09905bad4797d9c456229afe601006ce16977394 Reviewed-on: https://gem5-review.googlesource.com/11353 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
12940:f191f383f3bf |
18-Jun-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Minimally implemented the deprecated sc_simcontext.
This is supposed to be deprecated, but is still used in a small way by the tests.
Change-Id: I94fc32f9e0f03d50c00ce5421926203859064020 Reviewed-on: https://gem5-review.googlesource.com/11352 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
12939:5256de693153 |
18-Jun-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Add a minimal version of the deprecated sc_process_b.
This type is deprecated, but some tests still rely on it. This change adds just enough of it to satisfy the tests, and also the several different mechanisms for retrieving the sc_process_b which refers to the currently active process.
Change-Id: Id122ae5df23744b5de1e1c97573412f97a73b77a Reviewed-on: https://gem5-review.googlesource.com/11351 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
12938:003057e39b9f |
18-Jun-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Add bind() to sc_port_base.
sc_port_base is supposed to be implementation defined, but internal details of it are relied on by the systemc tests.
Change-Id: I53d84e708a5543a2cf4bd0deffc2efea1c008d97 Reviewed-on: https://gem5-review.googlesource.com/11350 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
12937:e79dbd84705f |
17-Jun-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Make the verify.py --list option print a total count.
Make the --list option of verify.py print a count of how many tests it printed. Because --list respects the filter options, this is an easy way to check how many tests have certain properties.
Change-Id: I03fac349a946631c20c8e6b49e0ad8934872898e Reviewed-on: https://gem5-review.googlesource.com/11288 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
12936:d45fc11ddb86 |
17-Jun-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Disable a few more tests that aren't going to work.
One would never have worked as far as I can tell, and the others depend on a feature that breaks building the systemc library.
Change-Id: Ia3db31a15675ca6df2db16362ee2d9c8700cd0af Reviewed-on: https://gem5-review.googlesource.com/11287 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
12935:2dc521e3e4f9 |
16-Jun-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Disable the phase_callbacks set of tests.
This feature is experimental, nonstandard, and would in some cases be difficult to implement in gem5.
Change-Id: Ic7fe77e6a2e9dbc5aba06579fb85fd2f055cb6b1 Reviewed-on: https://gem5-review.googlesource.com/11285 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
12934:3f942d7b2d70 |
16-Jun-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Add the nonstandard sc_user exception type.
This type is not in the spec but is used in the tests.
Change-Id: I4537a33b0b5dcb3c72a091276d601c244c4a3862 Reviewed-on: https://gem5-review.googlesource.com/11284 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
12933:9fb537a605f6 |
16-Jun-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Add the nonstandard sc_trace_params and sc_trace_params_vec.
These two types are supposedly only for internal use in the Accellera implementation based on a big warning in all caps, but they still appear in the tests and examples in that version of systemc.
Change-Id: Icfb3ffdf1e78988def5dac145172bf28f93d7d38 Reviewed-on: https://gem5-review.googlesource.com/11283 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
12932:f6030424cd79 |
16-Jun-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Make some functions static in conflict with the spec.
The spec is likely wrong in this case since a lot of the other neighboring functions are static, and the Accellera implementation and the tests seem to assume they're static.
Change-Id: Ia12a3735497b50f8a2419a52c83ef256416e7bc5 Reviewed-on: https://gem5-review.googlesource.com/11282 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
12931:2dd5b061490b |
16-Jun-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Add the nonstandard time_stamp function.
Change-Id: I608c390b125611e5b62483c7e8567bb5479df553 Reviewed-on: https://gem5-review.googlesource.com/11281 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
12930:f0e472cf340c |
16-Jun-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Add the nonstandard sc_hierarchical_name_exists function.
Change-Id: I1340bb6cb0ae29d81b5d73b3dd39ebb11c14802c Reviewed-on: https://gem5-review.googlesource.com/11280 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
12929:6ed4226c66c7 |
16-Jun-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Add the nonstandard timed_out function.
Change-Id: If14a5f98f03448c712827b7f92d2a36992541518 Reviewed-on: https://gem5-review.googlesource.com/11279 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
12928:1746600c4672 |
16-Jun-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Add some deprecated sc_module constructors.
Change-Id: Ibe2bfe63536af33fca6040f4aef999ee928d876b Reviewed-on: https://gem5-review.googlesource.com/11278 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
12927:6be191c20575 |
16-Jun-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Add the non-standard sc_time_tuple class.
Change-Id: Ia3d6a6a4ea3383c82605653faac570ced7bebb70 Reviewed-on: https://gem5-review.googlesource.com/11277 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
12926:2b4c3973269f |
16-Jun-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Add non-standard sc_status constants.
Change-Id: I02f52df318473906062035b188348fb875daad08 Reviewed-on: https://gem5-review.googlesource.com/11276 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
12925:a745745a930b |
15-Jun-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Add deprecated sc_time constructors.
Change-Id: Iffae751272302ff2996258a1ab31b086e12bbb8d Reviewed-on: https://gem5-review.googlesource.com/11275 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
12924:f74f34bd41ce |
15-Jun-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Add an sc_event_finder::find_event method.
The guts of sc_event_finder are supposed to be implementation defined, but the tests reach in and call this particular method on that class.
Change-Id: I21c18fa68ccce7bc1a13122ee3b452ecb81b713a Reviewed-on: https://gem5-review.googlesource.com/11274 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
12923:8a77b84341de |
15-Jun-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Add some deprecated sc_time factory methods.
Change-Id: I0d9a7040a48b9f0d0079e9daecaf44ea78c186de Reviewed-on: https://gem5-review.googlesource.com/11273 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
12922:a4f51f3405ac |
15-Jun-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Add some common test include files.
These are "common" in the sense that they're not in a particular test directory, but I think they're only used by one test.
Change-Id: I4ffd209d04ed0e5253085810913827b87412b302 Reviewed-on: https://gem5-review.googlesource.com/11272 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
12921:51212996643f |
15-Jun-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Add some nonstandard, undocumented sc_report_* functions.
The tests use these functions.
Change-Id: I3cdc10d433d9388742a20fb3a97a1a3efa699e11 Reviewed-on: https://gem5-review.googlesource.com/11271 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
12916:8fa0c4e23f69 |
15-Jun-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Add deprecated default time unit management functions.
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> |
12915:aff42de64e41 |
15-Jun-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Add deprecated notify_delayed functions.
Change-Id: I8ec68920b35f9207b6856a0b1ddfdf7545b7148a Reviewed-on: https://gem5-review.googlesource.com/11269 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
12914:8fe7d8389c0f |
15-Jun-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Add some nonstandard cthread related sc_module functions.
Change-Id: I73f9868b80f9b75e7bd90df6e894daea60a203a1 Reviewed-on: https://gem5-review.googlesource.com/11268 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
12913:123e80053715 |
15-Jun-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Add the deprecated sc_trace_delta_cycles function.
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> |
12912:8a06e701c31a |
15-Jun-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Add a nonstandard sc_signal constructor.
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> |
12911:1cad71dac465 |
15-Jun-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Add some nonstandard (get|set)_catch_actions functions.
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> |
12910:76b4a4e55a37 |
15-Jun-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Exclude another test which exercises sc_string.
Change-Id: Ic05fe3d34ef403dd6ad9348478f73c6ed50cc7bc Reviewed-on: https://gem5-review.googlesource.com/11264 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
12909:88127fe770f5 |
15-Jun-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Add the nonstandard, undocumented halt function.
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> |
12908:51ad6cc67c52 |
15-Jun-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Define the nonstandard sc_event_queue_port typedef.
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> |
12907:89f8c39eb808 |
15-Jun-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Add some nonstandard SC_WAIT* macros.
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> |
12906:10f43657f384 |
15-Jun-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Exclude a test which probably could never compile?
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> |
12905:eb877328516a |
15-Jun-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Add nonstandard sc_trace-s for sc_event and sc_time.
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> |
12904:f5aa54a1f267 |
15-Jun-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Add a filter file for the tests which are expected to work.
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> |
12903:f81321fad993 |
15-Jun-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Add a filter-file option.
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> |
12902:1db5abf06c24 |
15-Jun-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Add support for deprecated integer report handler ids.
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> |
12901:72bc9ff65802 |
15-Jun-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Add the nonstandard macro SC_NEW.
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> |
12900:ae067a7dac04 |
14-Jun-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Add the nonstandard triggered function sc_event.
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> |
12899:9a512f5c4e91 |
14-Jun-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Add the nonstandard variable sc_allow_process_control_corners.
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> |
12898:9c24286c7ddb |
13-Jun-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Add some "implementation defined" stuff to sc_attr_cltn.
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> |
12897:9f8c25581024 |
14-Aug-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Fix a small bug in verify.py.
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> |
12879:3d1110d82f87 |
13-Jun-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Partially implement SC_FORK and SC_JOIN.
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> |
12878:97fdce181f51 |
13-Jun-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Add some deprecated features to sc_clock.*.
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> |
12877:27fdc86138ef |
13-Jun-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Add some non-standard sc_trace variants.
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> |
12876:e332bbd21d47 |
13-Jun-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Remove references to internal constants from the tests.
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> |
12875:13f9e1b80121 |
13-Jun-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Turn some macros into enums to fix regression test building.
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> |
12874:0f804b578160 |
11-Jun-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Remove more Accellera source specific include paths in tests.
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> |
12873:9e8c1b5de92c |
11-Jun-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Include boost/bind.hpp in the systemc header.
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> |
12872:037b430699e8 |
11-Jun-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Fill out some of the sc_vector.hh classes.
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> |
12871:ca8b5215b10e |
08-Jun-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Make a test stop including an internal path for sc_vector.
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> |
12870:9b917f0e3864 |
08-Jun-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Add a script which automates building and running tests.
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> |
12869:1ad10753e8c3 |
07-Jun-2018 |
Gabe Black <gabeblack@google.com> |
systemc, scons: Link systemc tests against the shared gem5 library.
Otherwise, having hundreds of statically linked gem5s takes up a huge amount of space, and all those repeated linkings brings the mightiest workstation to its knees with sufficient parallelism, or will take forever without it.
Change-Id: I4c358b1a50c5e2b0027ac72423f887e24c786b19 Reviewed-on: https://gem5-review.googlesource.com/10959 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
12868:23162a436538 |
07-Jun-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Add in the deprecated binding port constructors.
These are needed by... you guessed it, the regression tests.
Change-Id: Id30e71944cc7f3faca7dcb197f37938368364fcd Reviewed-on: https://gem5-review.googlesource.com/10958 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
12867:eb8d1838275b |
07-Jun-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Add a non-standard default writer policy on sc_buffer.
The standard says there's not supposed to be a default writer policy for the sc_buffer template class, but in the Accellera implementation there is, and the regression tests depend on it to compile.
Change-Id: I31d17617441224e86c56c54e45364be8f4f45b00 Reviewed-on: https://gem5-review.googlesource.com/10957 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
12866:99ec3860ae84 |
07-Jun-2018 |
Gabe Black <gabeblack@google.com> |
systemc, scons: Add a mechanism to hook in the systemc tests.
This mechanism scans the systemc test directories as described in their original distribution. It tells scons how to build each test executable, and also how to build a json manifest file which lists all the tests and some properties about them.
Change-Id: I8ebc748c1aed71f0bb76e04a2040f15abd2837d9 Reviewed-on: https://gem5-review.googlesource.com/10956 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
12865:507b9dd90d21 |
07-Jun-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Add the deprecated sc_signal_out_if typedef.
This is needed by the regression tests.
Change-Id: I5666cf9ad445869e74edda857afd59ab7ece4f4c Reviewed-on: https://gem5-review.googlesource.com/10955 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
12864:7f28dd4f33ac |
06-Jun-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Add the deprecated sc_module::end_module function.
The regression tests use this function. In the Accellera implementation it seems to just do some error checking, so our version doesn't do anything for now.
Change-Id: Icaad45e934bad69e301bc0234f73e69791940736 Reviewed-on: https://gem5-review.googlesource.com/10854 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
12863:ed8c2541cb30 |
31-May-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Construct and manage a module name stack.
Change-Id: I5f7f64d6c3d7e08ec6d2529f3c5d84fbfc2c421b Reviewed-on: https://gem5-review.googlesource.com/10850 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
12862:df3aaa5bda42 |
31-May-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Make sc_main run in its own fiber.
The fiber will run until either sc_main returns, or until sc_start is called. If sc_start is called, then the fiber will only be paused and waiting for simulation cycles to be run by gem5. Once sc_pause and sc_stop are implemented, if those are called the sc_main fiber will be re-entered and allowed to run further towards completion.
Change-Id: I4df94f4f6fed8d49471732619a203d734d9a13a6 Reviewed-on: https://gem5-review.googlesource.com/10849 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
12861:6cd674bd189a |
30-May-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Implement some simple accessor functions in sc_main.cc.
These functions just read or write values with minimal amounts of logic.
Change-Id: I22d5b49a2550a88a854d1619f08b0055c1312271 Reviewed-on: https://gem5-review.googlesource.com/10847 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Gabe Black <gabeblack@google.com> |
12860:6051cef4adec |
30-May-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Add some missing functions which interact with the scheduler.
Change-Id: Ifc8c8d4a7bb6e941485e80f4884cfa4bb648c17c Reviewed-on: https://gem5-review.googlesource.com/10846 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Gabe Black <gabeblack@google.com> |
12855:588919e0e4aa |
24-May-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Import tests from the Accellera systemc distribution.
Change-Id: Iad76b398949a55d768a34d027a2d8e3739953da6 Reviewed-on: https://gem5-review.googlesource.com/10845 Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Maintainer: Gabe Black <gabeblack@google.com> |
12854:c95c35407325 |
24-May-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Add the Accellera implementation for the data type classes.
These files have been cleaned up style wise, and some macros have been resolved like they were for the header files.
Change-Id: I447e5311961036847e7da0c5a86c0da25a633010 Reviewed-on: https://gem5-review.googlesource.com/10844 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
12853:e23d6f09069a |
22-May-2018 |
Gabe Black <gabeblack@google.com> |
Systemc: Port over all of the systemc "datatype" headers.
These are the headers originally written by Accellera with a few modifications. Most significantly, I went through and mostly (but not entirely) manually editted them to conform to gem5 style and to be more self consistent. Second, I resolved some macros which optionally select features. I removed support for deprecated functions, and otherwise enabled everything.
The actual implementation behind these headers will also be ported over, but in a subsequent change.
Change-Id: I203d3f6c8a3af9120b946001d01defbb0643a6b6 Reviewed-on: https://gem5-review.googlesource.com/10843 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
12852:300397457d0b |
18-May-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Stub out all the standard utilility classes and functions.
Change-Id: I9e9724edb6281e0b0a6bae5546b0ede77d295c12 Reviewed-on: https://gem5-review.googlesource.com/10841 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
12842:79e4e6e731fe |
15-May-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Flesh out the sc_port implementation slightly.
This makes other files compile because it changes the relationship between constructors,etc., slightly.
Change-Id: I8d9a6e12ec640a82da166fe05c4f5e91f3f608de Reviewed-on: https://gem5-review.googlesource.com/10840 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Gabe Black <gabeblack@google.com> |
12841:22aa7ba47bf9 |
09-May-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Stub out the predefined channels.
Change-Id: Ie030aad26875bd49e54981ec1e9076b7b5af6630 Reviewed-on: https://gem5-review.googlesource.com/10839 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Gabe Black <gabeblack@google.com> |
12840:afc4b2b0f0f2 |
09-May-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Add systemc and systemc.h header files.
These are the header files as defined by the standard, although some predefined channel types and most of the sc_dt namespace have yet to be stubbed out, and so those portions are excluded.
Change-Id: Ic70f887c06e591974a4265c820eb0fdfa740d19a Reviewed-on: https://gem5-review.googlesource.com/10838 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Gabe Black <gabeblack@google.com> |
12839:45ad57043567 |
09-May-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Stub out the sc_spawn related classes and functions.
Change-Id: I79f695cca97aaae9af324eb18cab073f42f0a193 Reviewed-on: https://gem5-review.googlesource.com/10837 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Gabe Black <gabeblack@google.com> |
12838:f03602fb0c75 |
09-May-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Stub out the sc_process_handle class.
Change-Id: I2250ccb369e0a5f2b9172d35662a9ce5e41ab1c1 Reviewed-on: https://gem5-review.googlesource.com/10836 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Gabe Black <gabeblack@google.com> |
12837:413a7b490b1b |
08-May-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Seperate the "external" header interface.
Most (but not all) of the SystemC headers are part of the "external" interface that an existing, standard compliant module would include through <systemc.h> or <systemc>. Since those follow slightly different rules (relative includes, no gem5 includes), this change separates them out so that they're easier to identify.
Also, this change moves the other files into a "core" subdirectory, with the intention to add a "dt", aka data type, directory some time in the future when those standard defined types are implemented.
Change-Id: Ida63f9cc0bc0431024d4dd691cc5b22b944a99a8 Reviewed-on: https://gem5-review.googlesource.com/10835 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Gabe Black <gabeblack@google.com> |
12836:03e4843e9131 |
08-May-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Stub out the sc_module class and related functions.
Change-Id: I2c20717fe1f750bf7ae84de79726b1503ec6e1cd Reviewed-on: https://gem5-review.googlesource.com/10834 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Gabe Black <gabeblack@google.com> |
12835:db79fee97860 |
08-May-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Add a stubbed out implementation of the sc_sensitive class.
This sc_sensitive class is mostly implementation defined, but has a few standards defined methods.
Change-Id: I7157f6bfaaef38b5804b19a1de9f3f0aff08b697 Reviewed-on: https://gem5-review.googlesource.com/10833 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Gabe Black <gabeblack@google.com> |
12834:a93127f9d44b |
08-May-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Add a stub implementation for sc_attr related classes.
Change-Id: I59ba11f71b5412643ea7026df91587fafa0c6fda Reviewed-on: https://gem5-review.googlesource.com/10832 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Gabe Black <gabeblack@google.com> |
12832:f8567137ab8b |
08-May-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Add a stubbed out sc_event_finder class.
The standard defines this class very loosely, and so there isn't much in the stub definition.
Change-Id: I2f8d07927a4eb087235e345a09d5a4d4891413b5 Reviewed-on: https://gem5-review.googlesource.com/10831 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Gabe Black <gabeblack@google.com> |
12831:64426553842e |
07-May-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Implement a stub version of the sc_prim class.
Change-Id: Iad32f6e385e62dc10491783c1e5cdd5d9bfcc3e6 Reviewed-on: https://gem5-review.googlesource.com/10830 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
12830:c88145ed0de2 |
07-May-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Add stubbed out versions of sc_port and sc_export.
Change-Id: I04edb5da995212f9179eeb7a97486031eea71aff Reviewed-on: https://gem5-review.googlesource.com/10829 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
12829:fc90fded1bed |
07-May-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Add stubbed out versions of sc_event and related classes.
Change-Id: Id45c80cbb8774d8469d4df6ce7915161df977de0 Reviewed-on: https://gem5-review.googlesource.com/10828 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
12828:31e23506134e |
07-May-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Add stubbed out versions of the sc_time functions.
Change-Id: Ie7e3eac0382dc2ed861eaa9ea53ab11069812db8 Reviewed-on: https://gem5-review.googlesource.com/10827 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Gabe Black <gabeblack@google.com> |
12827:9ca4f16ec978 |
07-May-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Add the sc_nbdefs.hh header from Accellera.
This header defines the uint64 type alias needed for the sc_time class.
Change-Id: I7793dbfb98001796c8c8fe24f69fe7868249ff85 Reviewed-on: https://gem5-review.googlesource.com/10826 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Gabe Black <gabeblack@google.com> |
12826:33ea221f1321 |
03-May-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Add a stub version of the sc_interface class.
Change-Id: Iad1da472e13b0e16ad4de03f456ca0a001e69b51 Reviewed-on: https://gem5-review.googlesource.com/10825 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
12825:3bf4b8e922f4 |
02-May-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Hook up sc_main.
sc_main is exported as a python method on the SystemC_Kernel class and takes a series of string arguments. The internal c++ implementation converts those arguments into the standard argc and argv and uses them to call the standard SystemC version of that function.
A weak SystemC version of sc_main is provided so that systemc will compile with or without a simulation provided version of that function. The weak version just complains and dies.
Change-Id: Iad735536c37c8bc85d06cf24779f607ae4309b8b Reviewed-on: https://gem5-review.googlesource.com/10824 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Gabe Black <gabeblack@google.com> |
12824:9130a933fb85 |
02-May-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Partially implement the sc_module_name class.
This class is mostly implemented as defined by the spec, except that it doesn't maintain the module name stack (which doesn't yet exist).
Change-Id: I05fdc4aa40fb0497b0165824baee87ebf01a7821 Reviewed-on: https://gem5-review.googlesource.com/10823 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Gabe Black <gabeblack@google.com> |
12818:a864dbe5da87 |
02-May-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Add a stub kernel SimObject.
The guts of this class will be added in later changes.
Change-Id: I3582c40f88f7d9ba6028a6f0a8ee5c32924a65bf Reviewed-on: https://gem5-review.googlesource.com/10822 Maintainer: Gabe Black <gabeblack@google.com> Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com> |
12817:e634213487cd |
01-May-2018 |
Gabe Black <gabeblack@google.com> |
systemc: Add a stubbed out sc_object class.
Also add a SConsopt variable USE_SYSTEMC to hide systemc support until it's usable.
Change-Id: Ibb37483432b147ee690a36bb5c8dd74f1c4c7ae4 Reviewed-on: https://gem5-review.googlesource.com/10821 Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Maintainer: Gabe Black <gabeblack@google.com> |