17 #ifndef TLM2_RECORDER_MODULE_H_
18 #define TLM2_RECORDER_MODULE_H_
20 #include <tlm/scc/scv/tlm_recorder.h>
21 #include <tlm_utils/simple_initiator_socket.h>
22 #include <tlm_utils/simple_target_socket.h>
40 template <
unsigned int BUSWIDTH = 32,
typename TYPES = tlm::tlm_base_protocol_types>
class tlm_recorder_module :
public sc_core::sc_module {
44 tlm::tlm_target_socket<BUSWIDTH, TYPES, 1>
ts{
"ts"};
46 tlm::tlm_initiator_socket<BUSWIDTH, TYPES, 1>
is{
"is"};
57 SCVNS scv_tr_db* tr_db = SCVNS scv_tr_db::get_default_db())
60 new tlm_recorder<TYPES>(sc_core::sc_object::name(),
is.get_base_port(),
ts.get_base_port(), recording_enabled, tr_db));
61 add_attribute(recorder->enableBlTracing);
62 add_attribute(recorder->enableNbTracing);
63 add_attribute(recorder->enableTimedTracing);
64 add_attribute(recorder->enableDmiTracing);
70 sc_core::sc_attribute<bool> enableTimedTracing() {
return recorder->enableBlTracing; }
74 std::unique_ptr<tlm_recorder<TYPES>> recorder;
77 void start_of_simulation()
override { recorder->initialize_streams(); }
The TLM2 transaction recorder.
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::tlm_target_socket< BUSWIDTH, TYPES, 1 > ts
The target socket of the recorder to be bound to the initiator.
tlm::tlm_initiator_socket< BUSWIDTH, TYPES, 1 > is
The initiator to be bound to the target socket.
The TLM2 transaction recorder.