19 #include "axi_recorder.h"
20 #include <axi/axi_tlm.h>
26 sc_core::sc_port_policy POL = sc_core::SC_ONE_OR_MORE_BOUND>
28 static std::string gen_name(
const char* first,
const char* second) {
30 ss << first <<
"_" << second;
37 using port_type = sc_core::sc_port<fw_interface_type, N, POL>;
38 using export_type = sc_core::sc_export<bw_interface_type>;
39 using base_target_socket_type = tlm::tlm_base_target_socket_b<BUSWIDTH, fw_interface_type, bw_interface_type>;
40 using base_type = tlm::tlm_base_initiator_socket_b<BUSWIDTH, fw_interface_type, bw_interface_type>;
44 , recorder(gen_name(this->name(),
"tx").c_str()) {
45 this->add_attribute(recorder.enableTracing);
46 this->add_attribute(recorder.enableTimed);
51 , recorder(gen_name(this->name(),
"tx").c_str()) {}
55 virtual const char* kind()
const {
return "axi_rec_initiator_socket"; }
63 virtual void bind(base_target_socket_type& s) {
65 (this->get_base_port())(recorder);
66 recorder.fw_port(s.get_base_interface());
68 (s.get_base_port())(recorder);
69 recorder.bw_port(this->get_base_interface());
75 virtual void bind(base_type& s) {
77 (this->get_base_port())(recorder);
78 recorder.fw_port(s.get_base_port());
80 (s.get_base_export())(recorder);
81 recorder.bw_port(this->get_base_export());
88 virtual void bind(bw_interface_type& ifs) { (this->get_base_export())(ifs); }
91 recorder.setExtensionRecording(extensionRecording);
99 sc_core::sc_port_policy POL = sc_core::SC_ONE_OR_MORE_BOUND>
101 static std::string gen_name(
const char* first,
const char* second) {
102 std::stringstream ss;
103 ss << first <<
"_" << second;
110 using port_type = sc_core::sc_port<bw_interface_type, N, POL>;
111 using export_type = sc_core::sc_export<fw_interface_type>;
112 using base_initiator_socket_type = tlm::tlm_base_initiator_socket_b<BUSWIDTH, fw_interface_type, bw_interface_type>;
113 using base_type = tlm::tlm_base_target_socket_b<BUSWIDTH, fw_interface_type, bw_interface_type>;
117 , recorder(gen_name(this->name(),
"tx").c_str()) {
118 this->add_attribute(recorder.enableTracing);
119 this->add_attribute(recorder.enableTimed);
124 , recorder(gen_name(this->name(),
"tx").c_str()) {}
128 virtual const char* kind()
const {
return "axi_rec_target_socket"; }
133 virtual void bind(base_type& s) {
135 (this->get_base_export())(s.get_base_export());
137 (s.get_base_port())(recorder);
144 virtual void bind(fw_interface_type& ifs) {
145 export_type* exp = &this->get_base_export();
147 export_type::bind(recorder);
148 recorder.fw_port(ifs);
149 recorder.bw_port(this->m_port);
155 sc_core::sc_port_b<bw_interface_type>& get_base_port()
override {
return recorder.bw_port; }
157 sc_core::sc_port_b<bw_interface_type>
const& get_base_port()
const override {
return recorder.bw_port; }
161 bw_interface_type* operator->() {
return &recorder; }
164 recorder.setExtensionRecording(extensionRecording);
The TLM2 transaction recorder.
The TLM transaction extensions recorder interface.
TLM2.0 components modeling AHB.
tlm::tlm_bw_transport_if< TYPES > axi_bw_transport_if
alias declaration for the backward interface:
tlm::tlm_fw_transport_if< TYPES > axi_fw_transport_if
alias declaration for the forward interface
The AXI protocol traits class. Since the protocoll defines additional non-ignorable phases a dedicate...