Gabe Black has submitted this change and it was merged. (
https://gem5-review.googlesource.com/c/public/gem5/+/11185 )
Change subject: systemc: Add some "implementation defined" stuff to
sc_attr_cltn.
......................................................................
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 <[email protected]>
Maintainer: Gabe Black <[email protected]>
---
M src/systemc/core/sc_attr.cc
M src/systemc/ext/core/sc_attr.hh
M src/systemc/ext/core/sc_process_handle.hh
3 files changed, 84 insertions(+), 2 deletions(-)
Approvals:
Gabe Black: Looks good to me, approved; Looks good to me, approved
diff --git a/src/systemc/core/sc_attr.cc b/src/systemc/core/sc_attr.cc
index 28e0b60..ca9e0af 100644
--- a/src/systemc/core/sc_attr.cc
+++ b/src/systemc/core/sc_attr.cc
@@ -89,4 +89,53 @@
return (const_iterator)nullptr;
}
+sc_attr_cltn::sc_attr_cltn()
+{
+ warn("%s not implemented.\n", __PRETTY_FUNCTION__);
+}
+
+sc_attr_cltn::sc_attr_cltn(const sc_attr_cltn &)
+{
+ warn("%s not implemented.\n", __PRETTY_FUNCTION__);
+}
+
+sc_attr_cltn::~sc_attr_cltn()
+{
+ warn("%s not implemented.\n", __PRETTY_FUNCTION__);
+}
+
+bool
+sc_attr_cltn::push_back(sc_attr_base *)
+{
+ warn("%s not implemented.\n", __PRETTY_FUNCTION__);
+ return false;
+}
+
+sc_attr_base *
+sc_attr_cltn::operator [] (const std::string &name)
+{
+ warn("%s not implemented.\n", __PRETTY_FUNCTION__);
+ return nullptr;
+}
+
+const sc_attr_base *
+sc_attr_cltn::operator [] (const std::string &name) const
+{
+ warn("%s not implemented.\n", __PRETTY_FUNCTION__);
+ return nullptr;
+}
+
+sc_attr_base *
+sc_attr_cltn::remove(const std::string &name)
+{
+ warn("%s not implemented.\n", __PRETTY_FUNCTION__);
+ return nullptr;
+}
+
+void
+sc_attr_cltn::remove_all()
+{
+ warn("%s not implemented.\n", __PRETTY_FUNCTION__);
+}
+
} // namespace sc_core
diff --git a/src/systemc/ext/core/sc_attr.hh
b/src/systemc/ext/core/sc_attr.hh
index d7baa14..e1c5ae7 100644
--- a/src/systemc/ext/core/sc_attr.hh
+++ b/src/systemc/ext/core/sc_attr.hh
@@ -31,6 +31,7 @@
#define __SYSTEMC_EXT_CORE_SC_ATTR_HH__
#include <string>
+#include <vector>
namespace sc_core
{
@@ -91,6 +92,33 @@
const_iterator begin() const;
iterator end();
const_iterator end() const;
+
+ private:
+ // Disabled
+ sc_attr_cltn &operator = (const sc_attr_cltn &);
+
+ // "Impelemtation defined" members required by the regression tests.
+ public:
+ sc_attr_cltn();
+
+ // It's non-standard for this not to be disabled.
+ sc_attr_cltn(const sc_attr_cltn &);
+
+ ~sc_attr_cltn();
+
+ bool push_back(sc_attr_base *);
+
+ sc_attr_base *operator [] (const std::string &name);
+ const sc_attr_base *operator [] (const std::string &name) const;
+
+ sc_attr_base *remove(const std::string &name);
+
+ void remove_all();
+
+ int size() const { return cltn.size(); }
+
+ private:
+ std::vector<sc_attr_base *> cltn;
};
} // namespace sc_core
diff --git a/src/systemc/ext/core/sc_process_handle.hh
b/src/systemc/ext/core/sc_process_handle.hh
index a928ab3..a8f977b 100644
--- a/src/systemc/ext/core/sc_process_handle.hh
+++ b/src/systemc/ext/core/sc_process_handle.hh
@@ -66,10 +66,15 @@
virtual const char *what() const throw();
virtual bool is_reset() const;
- protected:
- sc_unwind_exception();
+ // Nonstandard.
+ // These should be protected, but I think this is to enable catch by
+ // value.
+ public:
sc_unwind_exception(const sc_unwind_exception &);
virtual ~sc_unwind_exception() throw();
+
+ protected:
+ sc_unwind_exception();
};
class sc_process_handle
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/11185
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: Ief6567fcd9d99d3a0f526cfa3b65043b2c828efa
Gerrit-Change-Number: 11185
Gerrit-PatchSet: 6
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-Reviewer: Andreas Sandberg <[email protected]>
Gerrit-Reviewer: Gabe Black <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: Matthias Jung <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev