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