[gem5-dev] Change in gem5/gem5[master]: systemc: Stub out all the standard utilility classes and functions.
Gabe Black has submitted this change and it was merged. ( https://gem5-review.googlesource.com/c/public/gem5/+/10841 ) Change subject: systemc: Stub out all the standard utilility classes and functions. .. 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 Maintainer: Gabe Black --- M src/systemc/ext/core/sc_process_handle.hh M src/systemc/ext/systemc M src/systemc/ext/systemc.h A src/systemc/ext/utils/_using.hh A src/systemc/ext/utils/_utils.hh A src/systemc/ext/utils/endian.hh A src/systemc/ext/utils/functions.hh A src/systemc/ext/utils/sc_exception.hh A src/systemc/ext/utils/sc_report.hh A src/systemc/ext/utils/sc_report_handler.hh A src/systemc/ext/utils/sc_trace_file.hh A src/systemc/ext/utils/sc_vector.hh A src/systemc/ext/utils/warn_unimpl.hh A src/systemc/utils/SConscript A src/systemc/utils/functions.cc A src/systemc/utils/sc_report.cc A src/systemc/utils/sc_report_handler.cc A src/systemc/utils/sc_trace_file.cc A src/systemc/utils/sc_vector.cc A src/systemc/utils/warn_unimpl.cc 20 files changed, 2,080 insertions(+), 0 deletions(-) Approvals: Gabe Black: Looks good to me, approved; Looks good to me, approved diff --git a/src/systemc/ext/core/sc_process_handle.hh b/src/systemc/ext/core/sc_process_handle.hh index ce3fe03..a928ab3 100644 --- a/src/systemc/ext/core/sc_process_handle.hh +++ b/src/systemc/ext/core/sc_process_handle.hh @@ -33,6 +33,13 @@ #include #include +namespace sc_gem5 +{ + +class Process; + +} // namespace sc_gem5 + namespace sc_core { @@ -67,12 +74,26 @@ class sc_process_handle { + private: +::sc_gem5::Process *_gem5_process; + public: sc_process_handle(); sc_process_handle(const sc_process_handle &); explicit sc_process_handle(sc_object *); ~sc_process_handle(); +// These non-standard operators provide access to the data structure which +// actually tracks the process within gem5. By making them operators, we +// can minimize the symbols added to the class namespace. +operator ::sc_gem5::Process * () const { return _gem5_process; } +sc_process_handle & +operator = (::sc_gem5::Process *p) +{ +_gem5_process = p; +return *this; +} + bool valid() const; sc_process_handle = (const sc_process_handle &); diff --git a/src/systemc/ext/systemc b/src/systemc/ext/systemc index 633b84e..1224a7e 100644 --- a/src/systemc/ext/systemc +++ b/src/systemc/ext/systemc @@ -33,5 +33,6 @@ #include "channel/_channel.hh" #include "core/_core.hh" #include "dt/_dt.hh" +#include "utils/_utils.hh" #endif //__SYSTEMC_EXT_SYSTEMC__ diff --git a/src/systemc/ext/systemc.h b/src/systemc/ext/systemc.h index 4b49272..d530d61 100644 --- a/src/systemc/ext/systemc.h +++ b/src/systemc/ext/systemc.h @@ -36,6 +36,7 @@ #include "channel/_using.hh" #include "core/_using.hh" #include "dt/_using.hh" +#include "utils/_using.hh" // Include some system header files, and import some symbols from std into // the base namespace. diff --git a/src/systemc/ext/utils/_using.hh b/src/systemc/ext/utils/_using.hh new file mode 100644 index 000..e6477c7 --- /dev/null +++ b/src/systemc/ext/utils/_using.hh @@ -0,0 +1,98 @@ +/* + * Copyright 2018 Google, Inc. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer; + * redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution; + * neither the name of the copyright holders nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * Authors: Gabe Black + */ + +#ifndef
[gem5-dev] Change in gem5/gem5[master]: systemc: Stub out all the standard utilility classes and functions.
Hello Jason Lowe-Power, Matthias Jung, Andreas Sandberg, I'd like you to reexamine a change. Please visit https://gem5-review.googlesource.com/10841 to look at the new patch set (#4). Change subject: systemc: Stub out all the standard utilility classes and functions. .. systemc: Stub out all the standard utilility classes and functions. Change-Id: I9e9724edb6281e0b0a6bae5546b0ede77d295c12 --- M src/systemc/ext/core/sc_process_handle.hh M src/systemc/ext/systemc M src/systemc/ext/systemc.h A src/systemc/ext/utils/_using.hh A src/systemc/ext/utils/_utils.hh A src/systemc/ext/utils/endian.hh A src/systemc/ext/utils/functions.hh A src/systemc/ext/utils/sc_exception.hh A src/systemc/ext/utils/sc_report.hh A src/systemc/ext/utils/sc_report_handler.hh A src/systemc/ext/utils/sc_trace_file.hh A src/systemc/ext/utils/sc_vector.hh A src/systemc/ext/utils/warn_unimpl.hh A src/systemc/utils/SConscript A src/systemc/utils/functions.cc A src/systemc/utils/sc_report.cc A src/systemc/utils/sc_report_handler.cc A src/systemc/utils/sc_trace_file.cc A src/systemc/utils/sc_vector.cc A src/systemc/utils/warn_unimpl.cc 20 files changed, 2,080 insertions(+), 0 deletions(-) -- To view, visit https://gem5-review.googlesource.com/10841 To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings Gerrit-Project: public/gem5 Gerrit-Branch: master Gerrit-Change-Id: I9e9724edb6281e0b0a6bae5546b0ede77d295c12 Gerrit-Change-Number: 10841 Gerrit-PatchSet: 4 Gerrit-Owner: Gabe Black Gerrit-Reviewer: Andreas Sandberg Gerrit-Reviewer: Gabe Black Gerrit-Reviewer: Jason Lowe-Power Gerrit-Reviewer: Matthias Jung Gerrit-MessageType: newpatchset ___ gem5-dev mailing list gem5-dev@gem5.org http://m5sim.org/mailman/listinfo/gem5-dev
[gem5-dev] Change in gem5/gem5[master]: systemc: Stub out all the standard utilility classes and functions.
Hello Jason Lowe-Power, Matthias Jung, Andreas Sandberg, I'd like you to reexamine a change. Please visit https://gem5-review.googlesource.com/10841 to look at the new patch set (#3). Change subject: systemc: Stub out all the standard utilility classes and functions. .. systemc: Stub out all the standard utilility classes and functions. Change-Id: I9e9724edb6281e0b0a6bae5546b0ede77d295c12 --- M src/systemc/ext/systemc M src/systemc/ext/systemc.h A src/systemc/ext/utils/_using.hh A src/systemc/ext/utils/_utils.hh A src/systemc/ext/utils/endian.hh A src/systemc/ext/utils/functions.hh A src/systemc/ext/utils/sc_exception.hh A src/systemc/ext/utils/sc_report.hh A src/systemc/ext/utils/sc_report_handler.hh A src/systemc/ext/utils/sc_trace_file.hh A src/systemc/ext/utils/sc_vector.hh A src/systemc/ext/utils/warn_unimpl.hh A src/systemc/utils/SConscript A src/systemc/utils/functions.cc A src/systemc/utils/sc_report.cc A src/systemc/utils/sc_report_handler.cc A src/systemc/utils/sc_trace_file.cc A src/systemc/utils/sc_vector.cc A src/systemc/utils/warn_unimpl.cc 19 files changed, 2,043 insertions(+), 0 deletions(-) -- To view, visit https://gem5-review.googlesource.com/10841 To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings Gerrit-Project: public/gem5 Gerrit-Branch: master Gerrit-Change-Id: I9e9724edb6281e0b0a6bae5546b0ede77d295c12 Gerrit-Change-Number: 10841 Gerrit-PatchSet: 3 Gerrit-Owner: Gabe Black Gerrit-Reviewer: Andreas Sandberg Gerrit-Reviewer: Gabe Black Gerrit-Reviewer: Jason Lowe-Power Gerrit-Reviewer: Matthias Jung Gerrit-MessageType: newpatchset ___ gem5-dev mailing list gem5-dev@gem5.org http://m5sim.org/mailman/listinfo/gem5-dev
[gem5-dev] Change in gem5/gem5[master]: systemc: Stub out all the standard utilility classes and functions.
Hello Jason Lowe-Power, Matthias Jung, Andreas Sandberg, I'd like you to reexamine a change. Please visit https://gem5-review.googlesource.com/10841 to look at the new patch set (#2). Change subject: systemc: Stub out all the standard utilility classes and functions. .. systemc: Stub out all the standard utilility classes and functions. Change-Id: I9e9724edb6281e0b0a6bae5546b0ede77d295c12 --- M src/systemc/ext/systemc M src/systemc/ext/systemc.h A src/systemc/ext/utils/_using.hh A src/systemc/ext/utils/_utils.hh A src/systemc/ext/utils/endian.hh A src/systemc/ext/utils/functions.hh A src/systemc/ext/utils/sc_exception.hh A src/systemc/ext/utils/sc_report.hh A src/systemc/ext/utils/sc_report_handler.hh A src/systemc/ext/utils/sc_trace_file.hh A src/systemc/ext/utils/sc_vector.hh A src/systemc/ext/utils/warn_unimpl.hh A src/systemc/utils/SConscript A src/systemc/utils/functions.cc A src/systemc/utils/sc_report.cc A src/systemc/utils/sc_report_handler.cc A src/systemc/utils/sc_trace_file.cc A src/systemc/utils/warn_unimpl.cc 18 files changed, 1,953 insertions(+), 0 deletions(-) -- To view, visit https://gem5-review.googlesource.com/10841 To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings Gerrit-Project: public/gem5 Gerrit-Branch: master Gerrit-Change-Id: I9e9724edb6281e0b0a6bae5546b0ede77d295c12 Gerrit-Change-Number: 10841 Gerrit-PatchSet: 2 Gerrit-Owner: Gabe Black Gerrit-Reviewer: Andreas Sandberg Gerrit-Reviewer: Gabe Black Gerrit-Reviewer: Jason Lowe-Power Gerrit-Reviewer: Matthias Jung Gerrit-MessageType: newpatchset ___ gem5-dev mailing list gem5-dev@gem5.org http://m5sim.org/mailman/listinfo/gem5-dev
[gem5-dev] Change in gem5/gem5[master]: systemc: Stub out all the standard utilility classes and functions.
Gabe Black has uploaded this change for review. ( https://gem5-review.googlesource.com/10841 Change subject: systemc: Stub out all the standard utilility classes and functions. .. systemc: Stub out all the standard utilility classes and functions. Change-Id: I9e9724edb6281e0b0a6bae5546b0ede77d295c12 --- M src/systemc/ext/systemc M src/systemc/ext/systemc.h A src/systemc/ext/utils/_using.hh A src/systemc/ext/utils/_utils.hh A src/systemc/ext/utils/endian.hh A src/systemc/ext/utils/functions.hh A src/systemc/ext/utils/sc_exception.hh A src/systemc/ext/utils/sc_report.hh A src/systemc/ext/utils/sc_report_handler.hh A src/systemc/ext/utils/sc_trace_file.hh A src/systemc/ext/utils/sc_vector.hh A src/systemc/ext/utils/warn_unimpl.hh A src/systemc/utils/SConscript A src/systemc/utils/functions.cc A src/systemc/utils/sc_report.cc A src/systemc/utils/sc_report_handler.cc A src/systemc/utils/sc_trace_file.cc A src/systemc/utils/warn_unimpl.cc 18 files changed, 1,950 insertions(+), 0 deletions(-) diff --git a/src/systemc/ext/systemc b/src/systemc/ext/systemc index 633b84e..1224a7e 100644 --- a/src/systemc/ext/systemc +++ b/src/systemc/ext/systemc @@ -33,5 +33,6 @@ #include "channel/_channel.hh" #include "core/_core.hh" #include "dt/_dt.hh" +#include "utils/_utils.hh" #endif //__SYSTEMC_EXT_SYSTEMC__ diff --git a/src/systemc/ext/systemc.h b/src/systemc/ext/systemc.h index 4b49272..d530d61 100644 --- a/src/systemc/ext/systemc.h +++ b/src/systemc/ext/systemc.h @@ -36,6 +36,7 @@ #include "channel/_using.hh" #include "core/_using.hh" #include "dt/_using.hh" +#include "utils/_using.hh" // Include some system header files, and import some symbols from std into // the base namespace. diff --git a/src/systemc/ext/utils/_using.hh b/src/systemc/ext/utils/_using.hh new file mode 100644 index 000..596617e --- /dev/null +++ b/src/systemc/ext/utils/_using.hh @@ -0,0 +1,76 @@ +/* + * Copyright 2018 Google, Inc. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer; + * redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution; + * neither the name of the copyright holders nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * Authors: Gabe Black + */ + +#ifndef __SYSTEMC_EXT_UTILS__USING_HH__ +#define __SYSTEMC_EXT_UTILS__USING_HH__ + +#include "_utils.hh" + +using sc_core::sc_severity; +using sc_core::sc_verbosity; +using sc_core::sc_report; + +using sc_core::SC_UNSPECIFIED; +using sc_core::SC_DO_NOTHING; +using sc_core::SC_THROW; +using sc_core::SC_LOG; +using sc_core::SC_DISPLAY; +using sc_core::SC_CACHE_REPORT; +using sc_core::SC_INTERRUPT; +using sc_core::SC_STOP; +using sc_core::SC_ABORT; +using sc_core::sc_report_handler_proc; +using sc_core::sc_report_handler; +using sc_core::sc_interrupt_here; +using sc_core::sc_stop_here; + +using sc_core::sc_trace_file; +using sc_core::sc_trace; + +using sc_core::sc_exception; + +using sc_core::sc_vector_base; +using sc_core::sc_vector_iter; +using sc_core::sc_vector; +using sc_core::sc_vector_assembly; + +using sc_dt::sc_abs; +using sc_dt::sc_max; +using sc_dt::sc_min; + +using sc_core::sc_version_major; +using sc_core::sc_version_minor; +using sc_core::sc_version_patch; +using sc_core::sc_version_originator; +using sc_core::sc_version_release_date; +using sc_core::sc_version_prerelease; +using sc_core::sc_version_string; +using sc_core::sc_copyright_string; + +#endif //__SYSTEMC_EXT_UTILS__USING_HH__ diff --git a/src/systemc/ext/utils/_utils.hh b/src/systemc/ext/utils/_utils.hh new file mode 100644 index 000..d76caf9 --- /dev/null +++ b/src/systemc/ext/utils/_utils.hh @@ -0,0 +1,40 @@ +/* + * Copyright 2018