gem5 v24.0.0.0
Loading...
Searching...
No Matches
GarnetLink.cc
Go to the documentation of this file.
1/*
2 * Copyright (c) 2008 Princeton University
3 * Copyright (c) 2016 Georgia Institute of Technology
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are
8 * met: redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer;
10 * redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution;
13 * neither the name of the copyright holders nor the names of its
14 * contributors may be used to endorse or promote products derived from
15 * this software without specific prior written permission.
16 *
17 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 */
29
30
32
33#include "debug/RubyNetwork.hh"
37
38namespace gem5
39{
40
41namespace ruby
42{
43
44namespace garnet
45{
46
49{
50 // Uni-directional
51
52 m_network_link = p.network_link;
53 m_credit_link = p.credit_link;
54
55 srcCdcEn = p.src_cdc;
56 dstCdcEn = p.dst_cdc;
57
58 srcSerdesEn = p.src_serdes;
59 dstSerdesEn = p.dst_serdes;
60
61 srcBridgeEn = false;
62 dstBridgeEn = false;
63
64 if (srcCdcEn || srcSerdesEn) {
65 srcBridgeEn = true;
66 srcNetBridge = p.src_net_bridge;
67 srcCredBridge = p.src_cred_bridge;
68 }
69 if (dstCdcEn || dstSerdesEn) {
70 dstBridgeEn = true;
71 dstNetBridge = p.dst_net_bridge;
72 dstCredBridge = p.dst_cred_bridge;
73 }
74}
75
76void
91
92void
93GarnetIntLink::print(std::ostream& out) const
94{
95 out << name();
96}
97
100{
101 // Bi-directional
102
103 // In
104 m_network_links[0] = p.network_links[0];
105 m_credit_links[0] = p.credit_links[0];
106
107 // Out
108 m_network_links[1] = p.network_links[1];
109 m_credit_links[1] = p.credit_links[1];
110
111
112 extCdcEn = p.ext_cdc;
113 intCdcEn = p.int_cdc;
114
115 extSerdesEn = p.ext_serdes;
116 intSerdesEn = p.int_serdes;
117
118 extBridgeEn = false;
119 intBridgeEn = false;
120
121 if (extCdcEn || extSerdesEn) {
122 extBridgeEn = true;
123 extNetBridge[0] = p.ext_net_bridge[0];
124 extCredBridge[0] = p.ext_cred_bridge[0];
125 extNetBridge[1] = p.ext_net_bridge[1];
126 extCredBridge[1] = p.ext_cred_bridge[1];
127 }
128
129 if (intCdcEn || intSerdesEn) {
130 intBridgeEn = true;
131 intNetBridge[0] = p.int_net_bridge[0];
132 intNetBridge[1] = p.int_net_bridge[1];
133 intCredBridge[0] = p.int_cred_bridge[0];
134 intCredBridge[1] = p.int_cred_bridge[1];
135 }
136}
137
138void
159
160void
161GarnetExtLink::print(std::ostream& out) const
162{
163 out << name();
164}
165
166} // namespace garnet
167} // namespace ruby
168} // namespace gem5
virtual std::string name() const
Definition named.hh:47
void initBridge(NetworkBridge *coBrid, bool cdc_en, bool serdes_en)
Bitfield< 0 > p
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
Definition binary32.hh:36

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