scc 2025.09
SystemC components library
simple_ace_target.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.axi_util.cpp
15 */
16
17#pragma once
18
19#include <axi/pe/ace_target_pe.h>
20
22namespace axi {
24namespace pe {
25
26
27template <unsigned int BUSWIDTH = 32, typename TYPES = axi::axi_protocol_types, int N = 1,
28 sc_core::sc_port_policy POL = sc_core::SC_ONE_OR_MORE_BOUND>
30public:
31 using base = ace_target_pe;
32 using payload_type = base::payload_type;
33 using phase_type = base::phase_type;
34
40 : // @suppress("Class members should be properly initialized")
41 simple_ace_target(sc_core::sc_gen_unique_name("simple_ace_target"), socket) {}
42
43 simple_ace_target(const sc_core::sc_module_name& nm, axi::ace_target_socket<BUSWIDTH, TYPES, N, POL>& socket)
44 : ace_target_pe(nm, BUSWIDTH)
45 , socket(socket) {
46 socket(*this);
47 this->instance_name = name();
48 }
49
50 simple_ace_target() = delete;
51
52 simple_ace_target(simple_ace_target const&) = delete;
53
55
56 simple_ace_target& operator=(simple_ace_target const&) = delete;
57
58 simple_ace_target& operator=(simple_ace_target&&) = delete;
59
60protected:
62
63 void end_of_elaboration() override {
64 base::end_of_elaboration();
65 set_bw_interface(socket.get_base_port().operator -> ());
66 }
67};
68
69} // namespace pe
70} // namespace axi
ace_target_pe(const sc_core::sc_module_name &nm, size_t transfer_width)
simple_ace_target(axi::ace_target_socket< BUSWIDTH, TYPES, N, POL > &socket)
the constructor
protocol engine implementations
TLM2.0 components modeling AHB.