#
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>
|
#
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>
|
#
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>
|
#
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>
|
#
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>
|
#
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>
|
#
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>
|
#
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>
|
#
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>
|
#
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>
|
#
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>
|
#
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>
|
#
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>
|