17 #include <axi/axi_tlm.h>
18 #include <tlm/scc/scv/tlm_extension_recording_registry.h>
19 #include <tlm/scc/scv/tlm_recorder.h>
20 #include <tlm/scc/tlm_id.h>
27 void recordBeginTx(SCVNS scv_tr_handle& handle, axi_protocol_types::tlm_payload_type& trans)
override {
29 handle.record_attribute(
"trans.uid", ext->id);
33 void recordEndTx(SCVNS scv_tr_handle& handle, tlm::tlm_base_protocol_types::tlm_payload_type& trans)
override {
39 void recordBeginTx(SCVNS scv_tr_handle& handle, axi_protocol_types::tlm_payload_type& trans)
override {
41 handle.record_attribute(
"trans.axi3.id", ext3->get_id());
42 handle.record_attribute(
"trans.axi3.user[CTRL]", ext3->get_user(common::id_type::CTRL));
43 handle.record_attribute(
"trans.axi3.user[DATA]", ext3->get_user(common::id_type::DATA));
44 handle.record_attribute(
"trans.axi3.user[RESP]", ext3->get_user(common::id_type::RESP));
45 handle.record_attribute(
"trans.axi3.length", ext3->get_length());
46 handle.record_attribute(
"trans.axi3.size", ext3->get_size());
47 handle.record_attribute(
"trans.axi3.burst", std::string(
to_char(ext3->get_burst())));
48 handle.record_attribute(
"trans.axi3.prot", ext3->get_prot());
49 handle.record_attribute(
"trans.axi3.exclusive", std::string(ext3->is_exclusive() ?
"true" :
"false"));
50 handle.record_attribute(
"trans.axi3.cache", ext3->get_cache());
51 handle.record_attribute(
"trans.axi4.cache_bufferable", ext3->is_bufferable());
52 handle.record_attribute(
"trans.axi4.cache_cacheable", ext3->is_cacheable());
53 handle.record_attribute(
"trans.axi4.cache_read_alloc", ext3->is_read_allocate());
54 handle.record_attribute(
"trans.axi4.cache_write_alloc", ext3->is_write_allocate());
55 handle.record_attribute(
"trans.axi3.qos", ext3->get_qos());
56 handle.record_attribute(
"trans.axi3.region", ext3->get_region());
60 void recordEndTx(SCVNS scv_tr_handle& handle, axi_protocol_types::tlm_payload_type& trans)
override {
62 handle.record_attribute(
"trans.axi3.resp", std::string(
to_char(ext3->get_resp())));
68 void recordBeginTx(SCVNS scv_tr_handle& handle, axi_protocol_types::tlm_payload_type& trans)
override {
70 handle.record_attribute(
"trans.axi4.id", ext4->get_id());
71 handle.record_attribute(
"trans.axi4.user[CTRL]", ext4->get_user(common::id_type::CTRL));
72 handle.record_attribute(
"trans.axi4.user[DATA]", ext4->get_user(common::id_type::DATA));
73 handle.record_attribute(
"trans.axi4.user[RESP]", ext4->get_user(common::id_type::RESP));
74 handle.record_attribute(
"trans.axi4.length", ext4->get_length());
75 handle.record_attribute(
"trans.axi4.size", ext4->get_size());
76 handle.record_attribute(
"trans.axi4.burst", std::string(
to_char(ext4->get_burst())));
77 handle.record_attribute(
"trans.axi4.prot", ext4->get_prot());
78 handle.record_attribute(
"trans.axi4.exclusive", std::string(ext4->is_exclusive() ?
"true" :
"false"));
79 handle.record_attribute(
"trans.axi4.cache", ext4->get_cache());
80 handle.record_attribute(
"trans.axi4.cache_bufferable", ext4->is_bufferable());
81 handle.record_attribute(
"trans.axi4.cache_modifiable", ext4->is_modifiable());
82 handle.record_attribute(
"trans.axi4.cache_allocate", ext4->is_allocate());
83 handle.record_attribute(
"trans.axi4.cache_other_alloc", ext4->is_other_allocate());
84 handle.record_attribute(
"trans.axi4.qos", ext4->get_qos());
85 handle.record_attribute(
"trans.axi4.region", ext4->get_region());
89 void recordEndTx(SCVNS scv_tr_handle& handle, axi_protocol_types::tlm_payload_type& trans)
override {
91 handle.record_attribute(
"trans.axi4.resp", std::string(
to_char(ext4->get_resp())));
97 void recordBeginTx(SCVNS scv_tr_handle& handle, axi_protocol_types::tlm_payload_type& trans)
override {
99 handle.record_attribute(
"trans.ace.id", ext4->get_id());
100 handle.record_attribute(
"trans.ace.user[CTRL]", ext4->get_user(common::id_type::CTRL));
101 handle.record_attribute(
"trans.ace.user[DATA]", ext4->get_user(common::id_type::DATA));
102 handle.record_attribute(
"trans.ace.length", ext4->get_length());
103 handle.record_attribute(
"trans.ace.size", ext4->get_size());
104 handle.record_attribute(
"trans.ace.burst", std::string(
to_char(ext4->get_burst())));
105 handle.record_attribute(
"trans.ace.prot", ext4->get_prot());
106 handle.record_attribute(
"trans.ace.exclusive", std::string(ext4->is_exclusive() ?
"true" :
"false"));
107 handle.record_attribute(
"trans.ace.cache", ext4->get_cache());
108 handle.record_attribute(
"trans.ace.cache_bufferable", ext4->is_bufferable());
109 handle.record_attribute(
"trans.ace.cache_modifiable", ext4->is_modifiable());
110 handle.record_attribute(
"trans.ace.cache_allocate", ext4->is_allocate());
111 handle.record_attribute(
"trans.ace.cache_other_alloc", ext4->is_other_allocate());
112 handle.record_attribute(
"trans.ace.qos", ext4->get_qos());
113 handle.record_attribute(
"trans.ace.region", ext4->get_region());
114 handle.record_attribute(
"trans.ace.domain", std::string(
to_char(ext4->get_domain())));
115 handle.record_attribute(
"trans.ace.snoop", std::string(
to_char(ext4->get_snoop())));
116 handle.record_attribute(
"trans.ace.barrier", std::string(
to_char(ext4->get_barrier())));
117 handle.record_attribute(
"trans.ace.unique", ext4->get_unique());
121 void recordEndTx(SCVNS scv_tr_handle& handle, axi_protocol_types::tlm_payload_type& trans)
override {
123 handle.record_attribute(
"trans.ace.resp", std::string(
to_char(ext4->get_resp())));
124 handle.record_attribute(
"trans.ace.cresp",
static_cast<unsigned>(ext4->get_cresp()));
125 handle.record_attribute(
"trans.ace.cresp_PassDirty", ext4->is_pass_dirty());
126 handle.record_attribute(
"trans.ace.cresp_IsShared", ext4->is_shared());
127 handle.record_attribute(
"trans.ace.cresp_SnoopDataTransfer", ext4->is_snoop_data_transfer());
128 handle.record_attribute(
"trans.ace.cresp_SnoopError", ext4->is_snoop_error());
129 handle.record_attribute(
"trans.ace.cresp_SnoopWasUnique", ext4->is_snoop_was_unique());
134 #if defined(__GNUG__)
135 __attribute__((constructor))
137 bool register_extensions() {
152 bool registered = register_extensions();
The TLM transaction extensions recorder registry.
The TLM transaction extensions recorder interface.
TLM2.0 components modeling AHB.
const char * to_char(E t)