History log of /gem5/src/systemc/ext/
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
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>

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>

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>


tlm_core/1/analysis/analysis.hh
tlm_core/1/analysis/analysis_fifo.hh
tlm_core/1/analysis/analysis_if.hh
tlm_core/1/analysis/analysis_port.hh
tlm_core/1/analysis/write_if.hh
tlm_core/1/req_rsp/adapters/adapters.hh
tlm_core/1/req_rsp/channels/fifo/fifo.hh
tlm_core/1/req_rsp/channels/req_rsp_channels/req_rsp_channels.hh
tlm_core/1/req_rsp/interfaces/core_ifs.hh
tlm_core/1/req_rsp/interfaces/fifo_ifs.hh
tlm_core/1/req_rsp/interfaces/master_slave_ifs.hh
tlm_core/1/req_rsp/ports/event_finder.hh
tlm_core/1/req_rsp/ports/nonblocking_port.hh
tlm_core/1/req_rsp/req_rsp.hh
tlm_core/2/generic_payload/endian_conv.hh
tlm_core/2/generic_payload/generic_payload.hh
tlm_core/2/generic_payload/gp.hh
tlm_core/2/interfaces/dmi.hh
tlm_core/2/interfaces/fw_bw_ifs.hh
tlm_core/2/interfaces/interfaces.hh
tlm_core/2/quantum/global_quantum.hh
tlm_core/2/quantum/quantum.hh
tlm_core/2/sockets/base_socket_if.hh
tlm_core/2/sockets/initiator_socket.hh
tlm_core/2/sockets/sockets.hh
tlm_core/2/sockets/target_socket.hh
tlm_utils/convenience_socket_bases.h
tlm_utils/instance_specific_extensions.h
tlm_utils/instance_specific_extensions_int.h
tlm_utils/multi_passthrough_target_socket.h
tlm_utils/multi_socket_bases.h
tlm_utils/passthrough_target_socket.h
tlm_utils/peq_with_cb_and_phase.h
tlm_utils/peq_with_get.h
tlm_utils/simple_initiator_socket.h
tlm_utils/simple_target_socket.h
tlm_utils/tlm_quantumkeeper.h
/gem5/src/systemc/tlm_core/2/generic_payload/gp.cc
/gem5/src/systemc/tlm_core/2/generic_payload/phase.cc
/gem5/src/systemc/tlm_core/2/quantum/global_quantum.cc
/gem5/src/systemc/tlm_utils/convenience_socket_bases.cc
/gem5/src/systemc/tlm_utils/instance_specific_extensions.cc
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>

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>

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>


tlm
tlm_core/1/analysis/analysis.h
tlm_core/1/analysis/analysis.hh
tlm_core/1/analysis/analysis_fifo.h
tlm_core/1/analysis/analysis_fifo.hh
tlm_core/1/analysis/analysis_if.h
tlm_core/1/analysis/analysis_if.hh
tlm_core/1/analysis/analysis_port.h
tlm_core/1/analysis/analysis_port.hh
tlm_core/1/analysis/analysis_triple.h
tlm_core/1/analysis/analysis_triple.hh
tlm_core/1/analysis/write_if.h
tlm_core/1/analysis/write_if.hh
tlm_core/1/req_rsp/adapters/adapters.h
tlm_core/1/req_rsp/adapters/adapters.hh
tlm_core/1/req_rsp/channels/fifo/circular_buffer.h
tlm_core/1/req_rsp/channels/fifo/circular_buffer.hh
tlm_core/1/req_rsp/channels/fifo/fifo.h
tlm_core/1/req_rsp/channels/fifo/fifo.hh
tlm_core/1/req_rsp/channels/fifo/fifo_peek.h
tlm_core/1/req_rsp/channels/fifo/fifo_peek.hh
tlm_core/1/req_rsp/channels/fifo/fifo_put_get.h
tlm_core/1/req_rsp/channels/fifo/fifo_put_get.hh
tlm_core/1/req_rsp/channels/fifo/fifo_resize.h
tlm_core/1/req_rsp/channels/fifo/fifo_resize.hh
tlm_core/1/req_rsp/channels/req_rsp_channels/put_get_imp.h
tlm_core/1/req_rsp/channels/req_rsp_channels/put_get_imp.hh
tlm_core/1/req_rsp/channels/req_rsp_channels/req_rsp_channels.h
tlm_core/1/req_rsp/channels/req_rsp_channels/req_rsp_channels.hh
tlm_core/1/req_rsp/interfaces/core_ifs.h
tlm_core/1/req_rsp/interfaces/core_ifs.hh
tlm_core/1/req_rsp/interfaces/fifo_ifs.h
tlm_core/1/req_rsp/interfaces/fifo_ifs.hh
tlm_core/1/req_rsp/interfaces/master_slave_ifs.h
tlm_core/1/req_rsp/interfaces/master_slave_ifs.hh
tlm_core/1/req_rsp/interfaces/tag.h
tlm_core/1/req_rsp/interfaces/tag.hh
tlm_core/1/req_rsp/ports/event_finder.h
tlm_core/1/req_rsp/ports/event_finder.hh
tlm_core/1/req_rsp/ports/nonblocking_port.h
tlm_core/1/req_rsp/ports/nonblocking_port.hh
tlm_core/1/req_rsp/req_rsp.h
tlm_core/1/req_rsp/req_rsp.hh
tlm_core/2/generic_payload/array.h
tlm_core/2/generic_payload/array.hh
tlm_core/2/generic_payload/endian_conv.h
tlm_core/2/generic_payload/endian_conv.hh
tlm_core/2/generic_payload/generic_payload.h
tlm_core/2/generic_payload/generic_payload.hh
tlm_core/2/generic_payload/gp.h
tlm_core/2/generic_payload/gp.hh
tlm_core/2/generic_payload/helpers.h
tlm_core/2/generic_payload/helpers.hh
tlm_core/2/generic_payload/phase.h
tlm_core/2/generic_payload/phase.hh
tlm_core/2/interfaces/dmi.h
tlm_core/2/interfaces/dmi.hh
tlm_core/2/interfaces/fw_bw_ifs.h
tlm_core/2/interfaces/fw_bw_ifs.hh
tlm_core/2/interfaces/interfaces.h
tlm_core/2/interfaces/interfaces.hh
tlm_core/2/quantum/global_quantum.h
tlm_core/2/quantum/global_quantum.hh
tlm_core/2/quantum/quantum.h
tlm_core/2/quantum/quantum.hh
tlm_core/2/sockets/base_socket_if.h
tlm_core/2/sockets/base_socket_if.hh
tlm_core/2/sockets/initiator_socket.h
tlm_core/2/sockets/initiator_socket.hh
tlm_core/2/sockets/sockets.h
tlm_core/2/sockets/sockets.hh
tlm_core/2/sockets/target_socket.h
tlm_core/2/sockets/target_socket.hh
tlm_core/2/version.h
tlm_core/2/version.hh
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>


tlm
tlm_core/1/README.txt
tlm_core/1/analysis/analysis.h
tlm_core/1/analysis/analysis_fifo.h
tlm_core/1/analysis/analysis_if.h
tlm_core/1/analysis/analysis_port.h
tlm_core/1/analysis/analysis_triple.h
tlm_core/1/analysis/write_if.h
tlm_core/1/req_rsp/adapters/adapters.h
tlm_core/1/req_rsp/channels/fifo/circular_buffer.h
tlm_core/1/req_rsp/channels/fifo/fifo.h
tlm_core/1/req_rsp/channels/fifo/fifo_peek.h
tlm_core/1/req_rsp/channels/fifo/fifo_put_get.h
tlm_core/1/req_rsp/channels/fifo/fifo_resize.h
tlm_core/1/req_rsp/channels/req_rsp_channels/put_get_imp.h
tlm_core/1/req_rsp/channels/req_rsp_channels/req_rsp_channels.h
tlm_core/1/req_rsp/interfaces/core_ifs.h
tlm_core/1/req_rsp/interfaces/fifo_ifs.h
tlm_core/1/req_rsp/interfaces/master_slave_ifs.h
tlm_core/1/req_rsp/interfaces/tag.h
tlm_core/1/req_rsp/ports/event_finder.h
tlm_core/1/req_rsp/ports/nonblocking_port.h
tlm_core/1/req_rsp/req_rsp.h
tlm_core/2/README.txt
tlm_core/2/generic_payload/array.h
tlm_core/2/generic_payload/endian_conv.h
tlm_core/2/generic_payload/generic_payload.h
tlm_core/2/generic_payload/gp.h
tlm_core/2/generic_payload/helpers.h
tlm_core/2/generic_payload/phase.h
tlm_core/2/interfaces/dmi.h
tlm_core/2/interfaces/fw_bw_ifs.h
tlm_core/2/interfaces/interfaces.h
tlm_core/2/quantum/global_quantum.h
tlm_core/2/quantum/quantum.h
tlm_core/2/sockets/base_socket_if.h
tlm_core/2/sockets/initiator_socket.h
tlm_core/2/sockets/sockets.h
tlm_core/2/sockets/target_socket.h
tlm_core/2/version.h
tlm_core/tlm_1/README.txt
tlm_core/tlm_1/tlm_analysis/tlm_analysis.h
tlm_core/tlm_1/tlm_analysis/tlm_analysis_fifo.h
tlm_core/tlm_1/tlm_analysis/tlm_analysis_if.h
tlm_core/tlm_1/tlm_analysis/tlm_analysis_port.h
tlm_core/tlm_1/tlm_analysis/tlm_analysis_triple.h
tlm_core/tlm_1/tlm_analysis/tlm_write_if.h
tlm_core/tlm_1/tlm_req_rsp/tlm_1_interfaces/tlm_core_ifs.h
tlm_core/tlm_1/tlm_req_rsp/tlm_1_interfaces/tlm_fifo_ifs.h
tlm_core/tlm_1/tlm_req_rsp/tlm_1_interfaces/tlm_master_slave_ifs.h
tlm_core/tlm_1/tlm_req_rsp/tlm_1_interfaces/tlm_tag.h
tlm_core/tlm_1/tlm_req_rsp/tlm_adapters/tlm_adapters.h
tlm_core/tlm_1/tlm_req_rsp/tlm_channels/tlm_fifo/circular_buffer.h
tlm_core/tlm_1/tlm_req_rsp/tlm_channels/tlm_fifo/tlm_fifo.h
tlm_core/tlm_1/tlm_req_rsp/tlm_channels/tlm_fifo/tlm_fifo_peek.h
tlm_core/tlm_1/tlm_req_rsp/tlm_channels/tlm_fifo/tlm_fifo_put_get.h
tlm_core/tlm_1/tlm_req_rsp/tlm_channels/tlm_fifo/tlm_fifo_resize.h
tlm_core/tlm_1/tlm_req_rsp/tlm_channels/tlm_req_rsp_channels/tlm_put_get_imp.h
tlm_core/tlm_1/tlm_req_rsp/tlm_channels/tlm_req_rsp_channels/tlm_req_rsp_channels.h
tlm_core/tlm_1/tlm_req_rsp/tlm_ports/tlm_event_finder.h
tlm_core/tlm_1/tlm_req_rsp/tlm_ports/tlm_nonblocking_port.h
tlm_core/tlm_1/tlm_req_rsp/tlm_req_rsp.h
tlm_core/tlm_2/README.txt
tlm_core/tlm_2/tlm_2_interfaces/tlm_2_interfaces.h
tlm_core/tlm_2/tlm_2_interfaces/tlm_dmi.h
tlm_core/tlm_2/tlm_2_interfaces/tlm_fw_bw_ifs.h
tlm_core/tlm_2/tlm_generic_payload/tlm_array.h
tlm_core/tlm_2/tlm_generic_payload/tlm_endian_conv.h
tlm_core/tlm_2/tlm_generic_payload/tlm_generic_payload.h
tlm_core/tlm_2/tlm_generic_payload/tlm_gp.h
tlm_core/tlm_2/tlm_generic_payload/tlm_helpers.h
tlm_core/tlm_2/tlm_generic_payload/tlm_phase.h
tlm_core/tlm_2/tlm_quantum/tlm_global_quantum.h
tlm_core/tlm_2/tlm_quantum/tlm_quantum.h
tlm_core/tlm_2/tlm_sockets/tlm_base_socket_if.h
tlm_core/tlm_2/tlm_sockets/tlm_initiator_socket.h
tlm_core/tlm_2/tlm_sockets/tlm_sockets.h
tlm_core/tlm_2/tlm_sockets/tlm_target_socket.h
tlm_core/tlm_2/tlm_version.h
tlm_utils/tlm_quantumkeeper.h
/gem5/src/systemc/tlm_core/2/generic_payload/SConscript
/gem5/src/systemc/tlm_core/2/generic_payload/gp.cc
/gem5/src/systemc/tlm_core/2/generic_payload/phase.cc
/gem5/src/systemc/tlm_core/2/quantum/SConscript
/gem5/src/systemc/tlm_core/2/quantum/global_quantum.cc
/gem5/src/systemc/tlm_core/tlm_2/tlm_generic_payload/SConscript
/gem5/src/systemc/tlm_core/tlm_2/tlm_generic_payload/tlm_gp.cc
/gem5/src/systemc/tlm_core/tlm_2/tlm_generic_payload/tlm_phase.cc
/gem5/src/systemc/tlm_core/tlm_2/tlm_quantum/SConscript
/gem5/src/systemc/tlm_core/tlm_2/tlm_quantum/tlm_global_quantum.cc
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>

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>


tlm
tlm_core/Makefile.am
tlm_core/Makefile.in
tlm_core/tlm_1/tlm_analysis/tlm_analysis.h
tlm_core/tlm_1/tlm_analysis/tlm_analysis_fifo.h
tlm_core/tlm_1/tlm_analysis/tlm_analysis_if.h
tlm_core/tlm_1/tlm_analysis/tlm_analysis_port.h
tlm_core/tlm_1/tlm_analysis/tlm_analysis_triple.h
tlm_core/tlm_1/tlm_analysis/tlm_write_if.h
tlm_core/tlm_1/tlm_req_rsp/tlm_1_interfaces/tlm_core_ifs.h
tlm_core/tlm_1/tlm_req_rsp/tlm_1_interfaces/tlm_fifo_ifs.h
tlm_core/tlm_1/tlm_req_rsp/tlm_1_interfaces/tlm_master_slave_ifs.h
tlm_core/tlm_1/tlm_req_rsp/tlm_1_interfaces/tlm_tag.h
tlm_core/tlm_1/tlm_req_rsp/tlm_adapters/tlm_adapters.h
tlm_core/tlm_1/tlm_req_rsp/tlm_channels/tlm_fifo/circular_buffer.h
tlm_core/tlm_1/tlm_req_rsp/tlm_channels/tlm_fifo/tlm_fifo.h
tlm_core/tlm_1/tlm_req_rsp/tlm_channels/tlm_fifo/tlm_fifo_peek.h
tlm_core/tlm_1/tlm_req_rsp/tlm_channels/tlm_fifo/tlm_fifo_put_get.h
tlm_core/tlm_1/tlm_req_rsp/tlm_channels/tlm_fifo/tlm_fifo_resize.h
tlm_core/tlm_1/tlm_req_rsp/tlm_channels/tlm_req_rsp_channels/tlm_put_get_imp.h
tlm_core/tlm_1/tlm_req_rsp/tlm_channels/tlm_req_rsp_channels/tlm_req_rsp_channels.h
tlm_core/tlm_1/tlm_req_rsp/tlm_ports/tlm_event_finder.h
tlm_core/tlm_1/tlm_req_rsp/tlm_ports/tlm_nonblocking_port.h
tlm_core/tlm_1/tlm_req_rsp/tlm_req_rsp.h
tlm_core/tlm_2/tlm_2_interfaces/tlm_2_interfaces.h
tlm_core/tlm_2/tlm_2_interfaces/tlm_dmi.h
tlm_core/tlm_2/tlm_2_interfaces/tlm_fw_bw_ifs.h
tlm_core/tlm_2/tlm_generic_payload/tlm_array.h
tlm_core/tlm_2/tlm_generic_payload/tlm_endian_conv.h
tlm_core/tlm_2/tlm_generic_payload/tlm_generic_payload.h
tlm_core/tlm_2/tlm_generic_payload/tlm_gp.h
tlm_core/tlm_2/tlm_generic_payload/tlm_helpers.h
tlm_core/tlm_2/tlm_generic_payload/tlm_phase.h
tlm_core/tlm_2/tlm_quantum/tlm_global_quantum.h
tlm_core/tlm_2/tlm_quantum/tlm_quantum.h
tlm_core/tlm_2/tlm_sockets/tlm_base_socket_if.h
tlm_core/tlm_2/tlm_sockets/tlm_initiator_socket.h
tlm_core/tlm_2/tlm_sockets/tlm_sockets.h
tlm_core/tlm_2/tlm_sockets/tlm_target_socket.h
tlm_core/tlm_2/tlm_version.h
tlm_utils/Makefile.am
tlm_utils/Makefile.in
tlm_utils/convenience_socket_bases.h
tlm_utils/instance_specific_extensions.h
tlm_utils/instance_specific_extensions_int.h
tlm_utils/multi_passthrough_initiator_socket.h
tlm_utils/multi_passthrough_target_socket.h
tlm_utils/multi_socket_bases.h
tlm_utils/passthrough_target_socket.h
tlm_utils/peq_with_cb_and_phase.h
tlm_utils/peq_with_get.h
tlm_utils/simple_initiator_socket.h
tlm_utils/simple_target_socket.h
tlm_utils/tlm_quantumkeeper.h
/gem5/src/systemc/tlm_core/tlm_2/tlm_generic_payload/tlm_gp.cpp
/gem5/src/systemc/tlm_core/tlm_2/tlm_generic_payload/tlm_phase.cpp
/gem5/src/systemc/tlm_core/tlm_2/tlm_quantum/tlm_global_quantum.cpp
/gem5/src/systemc/tlm_utils/convenience_socket_bases.cpp
/gem5/src/systemc/tlm_utils/instance_specific_extensions.cpp
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>


tlm
tlm.h
tlm_core/Makefile.am
tlm_core/Makefile.in
tlm_core/tlm_1/README.txt
tlm_core/tlm_1/tlm_analysis/tlm_analysis.h
tlm_core/tlm_1/tlm_analysis/tlm_analysis_fifo.h
tlm_core/tlm_1/tlm_analysis/tlm_analysis_if.h
tlm_core/tlm_1/tlm_analysis/tlm_analysis_port.h
tlm_core/tlm_1/tlm_analysis/tlm_analysis_triple.h
tlm_core/tlm_1/tlm_analysis/tlm_write_if.h
tlm_core/tlm_1/tlm_req_rsp/tlm_1_interfaces/tlm_core_ifs.h
tlm_core/tlm_1/tlm_req_rsp/tlm_1_interfaces/tlm_fifo_ifs.h
tlm_core/tlm_1/tlm_req_rsp/tlm_1_interfaces/tlm_master_slave_ifs.h
tlm_core/tlm_1/tlm_req_rsp/tlm_1_interfaces/tlm_tag.h
tlm_core/tlm_1/tlm_req_rsp/tlm_adapters/tlm_adapters.h
tlm_core/tlm_1/tlm_req_rsp/tlm_channels/tlm_fifo/circular_buffer.h
tlm_core/tlm_1/tlm_req_rsp/tlm_channels/tlm_fifo/tlm_fifo.h
tlm_core/tlm_1/tlm_req_rsp/tlm_channels/tlm_fifo/tlm_fifo_peek.h
tlm_core/tlm_1/tlm_req_rsp/tlm_channels/tlm_fifo/tlm_fifo_put_get.h
tlm_core/tlm_1/tlm_req_rsp/tlm_channels/tlm_fifo/tlm_fifo_resize.h
tlm_core/tlm_1/tlm_req_rsp/tlm_channels/tlm_req_rsp_channels/tlm_put_get_imp.h
tlm_core/tlm_1/tlm_req_rsp/tlm_channels/tlm_req_rsp_channels/tlm_req_rsp_channels.h
tlm_core/tlm_1/tlm_req_rsp/tlm_ports/tlm_event_finder.h
tlm_core/tlm_1/tlm_req_rsp/tlm_ports/tlm_nonblocking_port.h
tlm_core/tlm_1/tlm_req_rsp/tlm_req_rsp.h
tlm_core/tlm_2/README.txt
tlm_core/tlm_2/tlm_2_interfaces/tlm_2_interfaces.h
tlm_core/tlm_2/tlm_2_interfaces/tlm_dmi.h
tlm_core/tlm_2/tlm_2_interfaces/tlm_fw_bw_ifs.h
tlm_core/tlm_2/tlm_generic_payload/tlm_array.h
tlm_core/tlm_2/tlm_generic_payload/tlm_endian_conv.h
tlm_core/tlm_2/tlm_generic_payload/tlm_generic_payload.h
tlm_core/tlm_2/tlm_generic_payload/tlm_gp.h
tlm_core/tlm_2/tlm_generic_payload/tlm_helpers.h
tlm_core/tlm_2/tlm_generic_payload/tlm_phase.h
tlm_core/tlm_2/tlm_quantum/tlm_global_quantum.h
tlm_core/tlm_2/tlm_quantum/tlm_quantum.h
tlm_core/tlm_2/tlm_sockets/tlm_base_socket_if.h
tlm_core/tlm_2/tlm_sockets/tlm_initiator_socket.h
tlm_core/tlm_2/tlm_sockets/tlm_sockets.h
tlm_core/tlm_2/tlm_sockets/tlm_target_socket.h
tlm_core/tlm_2/tlm_version.h
tlm_utils/Makefile.am
tlm_utils/Makefile.in
tlm_utils/README.txt
tlm_utils/convenience_socket_bases.h
tlm_utils/instance_specific_extensions.h
tlm_utils/instance_specific_extensions_int.h
tlm_utils/multi_passthrough_initiator_socket.h
tlm_utils/multi_passthrough_target_socket.h
tlm_utils/multi_socket_bases.h
tlm_utils/passthrough_target_socket.h
tlm_utils/peq_with_cb_and_phase.h
tlm_utils/peq_with_get.h
tlm_utils/simple_initiator_socket.h
tlm_utils/simple_target_socket.h
tlm_utils/tlm_quantumkeeper.h
/gem5/src/systemc/tlm_core/tlm_2/tlm_generic_payload/tlm_gp.cpp
/gem5/src/systemc/tlm_core/tlm_2/tlm_generic_payload/tlm_phase.cpp
/gem5/src/systemc/tlm_core/tlm_2/tlm_quantum/tlm_global_quantum.cpp
/gem5/src/systemc/tlm_utils/convenience_socket_bases.cpp
/gem5/src/systemc/tlm_utils/instance_specific_extensions.cpp
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>

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>

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>

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>

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>

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>

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>

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>

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>

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>

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>

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>

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>

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>

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>

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>

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>

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>

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>

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>

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>

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>

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>

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>

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>

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>

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>

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>

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>

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>

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>

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>

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>

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>

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>

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>

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>

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>

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>

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>

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>

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>

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>

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>

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>

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>

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>

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>

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>

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>

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>


/gem5/src/systemc/SConscript
/gem5/src/systemc/SystemC.py
/gem5/src/systemc/core/SConscript
/gem5/src/systemc/core/SystemC.py
/gem5/src/systemc/core/kernel.cc
/gem5/src/systemc/core/kernel.hh
/gem5/src/systemc/core/sc_attr.cc
/gem5/src/systemc/core/sc_event.cc
/gem5/src/systemc/core/sc_export.cc
/gem5/src/systemc/core/sc_interface.cc
/gem5/src/systemc/core/sc_main.cc
/gem5/src/systemc/core/sc_module.cc
/gem5/src/systemc/core/sc_module_name.cc
/gem5/src/systemc/core/sc_object.cc
/gem5/src/systemc/core/sc_port.cc
/gem5/src/systemc/core/sc_prim.cc
/gem5/src/systemc/core/sc_sensitive.cc
/gem5/src/systemc/core/sc_time.cc
/gem5/src/systemc/dt/int/sc_nbdefs.hh
core/sc_attr.hh
core/sc_event.hh
core/sc_export.hh
core/sc_interface.hh
core/sc_main.hh
core/sc_module.hh
core/sc_module_name.hh
core/sc_object.hh
core/sc_port.hh
core/sc_prim.hh
core/sc_sensitive.hh
core/sc_time.hh
dt/int/sc_nbdefs.hh
/gem5/src/systemc/kernel.cc
/gem5/src/systemc/kernel.hh
/gem5/src/systemc/sc_attr.cc
/gem5/src/systemc/sc_attr.hh
/gem5/src/systemc/sc_event.cc
/gem5/src/systemc/sc_event.hh
/gem5/src/systemc/sc_export.cc
/gem5/src/systemc/sc_export.hh
/gem5/src/systemc/sc_interface.cc
/gem5/src/systemc/sc_interface.hh
/gem5/src/systemc/sc_main.cc
/gem5/src/systemc/sc_main.hh
/gem5/src/systemc/sc_module.cc
/gem5/src/systemc/sc_module.hh
/gem5/src/systemc/sc_module_name.cc
/gem5/src/systemc/sc_module_name.hh
/gem5/src/systemc/sc_object.cc
/gem5/src/systemc/sc_object.hh
/gem5/src/systemc/sc_port.cc
/gem5/src/systemc/sc_port.hh
/gem5/src/systemc/sc_prim.cc
/gem5/src/systemc/sc_prim.hh
/gem5/src/systemc/sc_sensitive.cc
/gem5/src/systemc/sc_sensitive.hh
/gem5/src/systemc/sc_time.cc
/gem5/src/systemc/sc_time.hh