scc 2025.09
SystemC components library
recorder_modules.h
1/*
2 * Copyright 2020 Arteris IP
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#pragma once
18
19#include "ace_recorder.h"
20#include "axi_recorder.h"
21
22namespace axi {
23namespace scv {
34template <unsigned int BUSWIDTH, typename TYPES, typename BASE>
35class axitlm_recorder_module : public sc_core::sc_module, public BASE {
36public:
37 SC_HAS_PROCESS(axitlm_recorder_module); // NOLINT
39 typename BASE::template target_socket_type<BUSWIDTH> tsckt{"tsckt"};
41 typename BASE::template initiator_socket_type<BUSWIDTH> isckt{"isckt"};
42
51 axitlm_recorder_module(sc_core::sc_module_name name, bool recording_enabled = true,
52 SCVNS scv_tr_db* tr_db = SCVNS scv_tr_db::get_default_db())
53 : sc_module(name)
54 , BASE(this->name(), BUSWIDTH, recording_enabled, tr_db) {
55 // bind the sockets to the module
56 tsckt.bind(*this);
57 isckt.bind(*this);
58 }
59
61
62 typename BASE::template target_socket_type<BUSWIDTH>::base_type::fw_interface_type* get_fw_if() override { return isckt.get_base_port().operator->(); }
63
64 typename BASE::template target_socket_type<BUSWIDTH>::base_type::bw_interface_type* get_bw_if() override { return tsckt.get_base_port().operator->(); }
65
66private:
67 void start_of_simulation() override { BASE::initialize_streams(); }
68};
69
70template <unsigned int BUSWIDTH = 32>
71using axi_recorder_module =
73
74template <unsigned int BUSWIDTH = 32>
75using ace_recorder_module =
77
78} // namespace scv
79} // namespace axi
The TLM2 transaction recorder.
axi_recorder< axi::axi_protocol_types >::template target_socket_type< BUSWIDTH > tsckt
axi_recorder< axi::axi_protocol_types >::template initiator_socket_type< BUSWIDTH > isckt
axitlm_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.
TLM2.0 components modeling AHB.