scc 2025.09
SystemC components library
tlm_recorder_module.h
1/*******************************************************************************
2 * Copyright 2016, 2025 MINRES Technologies GmbH
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *******************************************************************************/
16
17#ifndef TLM_NW_SCV_TLM_RECORDER_MODULE_H
18#define TLM_NW_SCV_TLM_RECORDER_MODULE_H
20#include "tlm_recorder.h"
21#include <tlm_utils/simple_initiator_socket.h>
22#include <tlm_utils/simple_target_socket.h>
23
25namespace tlm {
27namespace nw {
29namespace scv {
40template <typename CMDENUM, unsigned int FLIT_WITH, typename TYPES> class tlm_recorder_module : public sc_core::sc_module {
41public:
42 SC_HAS_PROCESS(tlm_recorder_module); // NOLINT
56 tlm_recorder_module(sc_core::sc_module_name name, bool recording_enabled = true,
57 SCVNS scv_tr_db* tr_db = SCVNS scv_tr_db::get_default_db())
58 : sc_module(name)
59 , recorder(sc_core::sc_object::name(), is.get_base_port(), ts.get_base_port(), recording_enabled, tr_db) {
60 // bind the sockets to the module
61 is.bind(recorder);
62 ts.bind(recorder);
63 }
64
65 virtual ~tlm_recorder_module() {}
66
67 tlm_recorder<TYPES> recorder;
68
69private:
70 void start_of_simulation() override { recorder.initialize_streams(); }
71};
72} // namespace scv
73} // namespace nw
74} // namespace tlm
75
76#endif /* TLM_NW_SCV_TLM_RECORDER_MODULE_H */
The TLM2 transaction recorder.
tlm::nw::tlm_network_target_socket< FLIT_WITH, CMDENUM, TYPES > ts
The target socket of the recorder to be bound to the initiator.
tlm_recorder_module(sc_core::sc_module_name name, bool recording_enabled=true, SCVNS scv_tr_db *tr_db=SCVNS scv_tr_db::get_default_db())
The constructor of the component.
tlm::nw::tlm_network_initiator_socket< FLIT_WITH, CMDENUM, TYPES > is
The initiator to be bound to the target socket.
SCC SCV4TLM classes and functions.
Definition cxs_tlm.h:546
SCC TLM utilities.
Definition cxs_tlm.h:544
SystemC TLM.
Definition dmi_mgr.h:19
Definition of the tlm_network_initiator_socket class.
Definition of the tlm_network_target_socket class.
The SystemC Transaction Level Model (TLM) Network TLM utilities.