scc  2022.4.0
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 
22 namespace axi {
24 namespace pe {
25 
26 
27 template <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>
30 public:
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 
54  simple_ace_target(simple_ace_target&&) = delete;
55 
56  simple_ace_target& operator=(simple_ace_target const&) = delete;
57 
58  simple_ace_target& operator=(simple_ace_target&&) = delete;
59 
60 protected:
62 
63  void end_of_elaboration(){
64  base::end_of_elaboration();
65  set_bw_interface(socket.get_base_port().operator -> ());
66  }
67 };
68 
69 } // namespace pe
70 } // namespace axi
simple_ace_target(axi::ace_target_socket< BUSWIDTH, TYPES, N, POL > &socket)
the constructor
TLM2.0 components modeling AHB.
Definition: axi_initiator.h:30
The AXI protocol traits class. Since the protocoll defines additional non-ignorable phases a dedicate...
Definition: axi_tlm.h:890
axi::axi_protocol_types::tlm_payload_type payload_type
aliases used in the class
Definition: base.h:45