aboutsummaryrefslogtreecommitdiff
path: root/src/utils
diff options
context:
space:
mode:
authorJohannes Stoelp <johannes.stoelp@gmail.com>2023-10-29 18:05:02 +0100
committerJohannes Stoelp <johannes.stoelp@gmail.com>2023-10-29 18:12:17 +0100
commitb716fdae5ef9b76920fdd2bcd8aab97d9cde90a0 (patch)
tree2027817e4966ea5c7422152c287ce7b190316129 /src/utils
parentf0646cfa16d909b107e81dafd2f3c8f80d28a5f8 (diff)
downloadsysc-playground-b716fdae5ef9b76920fdd2bcd8aab97d9cde90a0.tar.gz
sysc-playground-b716fdae5ef9b76920fdd2bcd8aab97d9cde90a0.zip
build: enable warnings and fix existing warnings
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/sysc.h7
-rw-r--r--src/utils/tlm_initiator_socket_tagged.h2
-rw-r--r--src/utils/tlm_target_socket_tagged.h8
3 files changed, 8 insertions, 9 deletions
diff --git a/src/utils/sysc.h b/src/utils/sysc.h
index 02ad412..99c863b 100644
--- a/src/utils/sysc.h
+++ b/src/utils/sysc.h
@@ -4,9 +4,8 @@
#include <sysc/kernel/sc_module.h>
#include <sysc/kernel/sc_simcontext.h>
-struct scoped_push_hierarchy {
- [[nodiscard]] explicit scoped_push_hierarchy(sc_core::sc_module& mod)
- : m_mod(mod), m_simctx(sc_core::sc_get_curr_simcontext()) {
+struct [[nodiscard]] scoped_push_hierarchy {
+ explicit scoped_push_hierarchy(sc_core::sc_module& mod) : m_mod{mod} {
assert(m_simctx);
m_simctx->hierarchy_push(&m_mod);
}
@@ -17,7 +16,7 @@ struct scoped_push_hierarchy {
}
private:
- sc_core::sc_simcontext* m_simctx{nullptr};
+ sc_core::sc_simcontext* m_simctx{sc_core::sc_get_curr_simcontext()};
sc_core::sc_module& m_mod;
};
diff --git a/src/utils/tlm_initiator_socket_tagged.h b/src/utils/tlm_initiator_socket_tagged.h
index 194de61..d1e91a5 100644
--- a/src/utils/tlm_initiator_socket_tagged.h
+++ b/src/utils/tlm_initiator_socket_tagged.h
@@ -18,8 +18,8 @@ class tlm_initiator_socket_tagged : public tlm::tlm_initiator_socket<>,
Module* mod,
cb_invalidate_direct_mem_ptr i)
: tlm_initiator_socket<>{name},
- m_mod{mod},
m_id{id},
+ m_mod{mod},
m_invalidate_direct_mem_ptr{i} {
bind(*static_cast<tlm::tlm_bw_transport_if<>*>(this));
}
diff --git a/src/utils/tlm_target_socket_tagged.h b/src/utils/tlm_target_socket_tagged.h
index d8ca155..40139e7 100644
--- a/src/utils/tlm_target_socket_tagged.h
+++ b/src/utils/tlm_target_socket_tagged.h
@@ -25,8 +25,8 @@ class tlm_target_socket_tagged : public tlm::tlm_target_socket<>,
cb_get_direct_mem_ptr m,
cb_transport_dbg d)
: tlm_target_socket<>{name},
- m_mod{mod},
m_id{id},
+ m_mod{mod},
m_b_transport{b},
m_get_direct_mem_ptr{m},
m_transport_dbg{d} {
@@ -50,9 +50,9 @@ class tlm_target_socket_tagged : public tlm::tlm_target_socket<>,
return (m_mod->*m_transport_dbg)(m_id, tx);
}
- virtual tlm::tlm_sync_enum nb_transport_fw(tlm::tlm_generic_payload& tx,
- tlm::tlm_phase& phase,
- sc_core::sc_time& t) override {
+ virtual tlm::tlm_sync_enum nb_transport_fw(tlm::tlm_generic_payload&,
+ tlm::tlm_phase&,
+ sc_core::sc_time&) override {
std::fprintf(stderr,
"tlm_target_socket_tagged: nb_transport_fw not supported\n");
std::abort();