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