gem5 v24.0.0.0
Loading...
Searching...
No Matches
req_rsp_channels.hh
Go to the documentation of this file.
1/*****************************************************************************
2
3 Licensed to Accellera Systems Initiative Inc. (Accellera) under one or
4 more contributor license agreements. See the NOTICE file distributed
5 with this work for additional information regarding copyright ownership.
6 Accellera licenses this file to you under the Apache License, Version 2.0
7 (the "License"); you may not use this file except in compliance with the
8 License. You may obtain a copy of the License at
9
10 http://www.apache.org/licenses/LICENSE-2.0
11
12 Unless required by applicable law or agreed to in writing, software
13 distributed under the License is distributed on an "AS IS" BASIS,
14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
15 implied. See the License for the specific language governing
16 permissions and limitations under the License.
17
18 *****************************************************************************/
19
20#ifndef \
21 __EXT_TLM_CORE_1_REQ_RSP_CHANNELS_REQ_RSP_CHANNELS_REQ_RSP_CHANNELS_HH__
22#define \
23 __EXT_TLM_CORE_1_REQ_RSP_CHANNELS_REQ_RSP_CHANNELS_REQ_RSP_CHANNELS_HH__
24
26#include "../fifo/fifo.hh"
27#include "put_get_imp.hh"
28
29namespace tlm
30{
31
32template <typename REQ, typename RSP, typename REQ_CHANNEL=tlm_fifo<REQ>,
33 typename RSP_CHANNEL=tlm_fifo<RSP>>
35{
36 public:
37 // Uni-directional slave interface.
40
41 // Uni-directional master interface.
44
45 // Master/slave interfaces.
48
49 tlm_req_rsp_channel(int req_size=1, int rsp_size=1) :
50 sc_core::sc_module(sc_core::sc_module_name(
51 sc_core::sc_gen_unique_name("tlm_req_rsp_channel"))),
52 request_fifo(req_size), response_fifo(rsp_size),
55 {
57 }
58
60 int req_size=1, int rsp_size=1) :
61 sc_core::sc_module(module_name),
62 request_fifo(req_size), response_fifo(rsp_size),
65 {
67 }
68
69 private:
70 void
82
83 protected:
84 REQ_CHANNEL request_fifo;
85 RSP_CHANNEL response_fifo;
86
89};
90
91template <typename REQ, typename RSP,
92 typename REQ_CHANNEL=tlm_fifo<REQ>,
93 typename RSP_CHANNEL=tlm_fifo<RSP>>
95{
96 public:
97 // Master transport interface.
99
100 // Slave interfaces.
103
105
107 sc_core::sc_module(sc_core::sc_module_name(
108 sc_core::sc_gen_unique_name("transport_channel"))),
109 target_export("target_export"), req_rsp("req_rsp", 1, 1), t2m("ts2m")
110 {
111 do_binding();
112 }
113
115 sc_core::sc_module(nm), target_export("target_export"),
116 req_rsp("req_rsp", 1, 1), t2m("tsm")
117 {
118 do_binding();
119 }
120
121 private:
122 void
124 {
125 target_export(t2m.target_export);
126 t2m.master_port(req_rsp.master_export);
127
128 get_request_export(req_rsp.get_request_export);
129 put_response_export(req_rsp.put_response_export);
130 slave_export(req_rsp.slave_export);
131 }
132
135};
136
137} // namespace tlm
138
139#endif
140/* __EXT_TLM_CORE_1_REQ_RSP_CHANNELS_REQ_RSP_CHANNELS_REQ_RSP_CHANNELS_HH__ */
sc_core::sc_export< tlm_fifo_put_if< RSP > > put_response_export
sc_core::sc_export< tlm_fifo_get_if< REQ > > get_request_export
sc_core::sc_export< tlm_fifo_put_if< REQ > > put_request_export
tlm_req_rsp_channel(int req_size=1, int rsp_size=1)
sc_core::sc_export< tlm_fifo_get_if< RSP > > get_response_export
sc_core::sc_export< tlm_master_if< REQ, RSP > > master_export
tlm_slave_imp< REQ, RSP > slave
tlm_master_imp< REQ, RSP > master
tlm_req_rsp_channel(sc_core::sc_module_name module_name, int req_size=1, int rsp_size=1)
sc_core::sc_export< tlm_slave_if< REQ, RSP > > slave_export
tlm_transport_channel(sc_core::sc_module_name nm)
tlm_transport_to_master< REQ, RSP > t2m
tlm_req_rsp_channel< REQ, RSP, REQ_CHANNEL, RSP_CHANNEL > req_rsp
sc_core::sc_export< tlm_fifo_get_if< REQ > > get_request_export
sc_core::sc_export< tlm_slave_if< REQ, RSP > > slave_export
sc_core::sc_export< tlm_transport_if< REQ, RSP > > target_export
sc_core::sc_export< tlm_fifo_put_if< RSP > > put_response_export

Generated on Tue Jun 18 2024 16:24:07 for gem5 by doxygen 1.11.0