SimpleLink.cc revision 11320
111390Ssteve.reinhardt@amd.com/*
211390Ssteve.reinhardt@amd.com * Copyright (c) 2011 Advanced Micro Devices, Inc.
38540SN/A * All rights reserved.
48540SN/A *
53021SN/A * Redistribution and use in source and binary forms, with or without
611390Ssteve.reinhardt@amd.com * modification, are permitted provided that the following conditions are
711390Ssteve.reinhardt@amd.com * met: redistributions of source code must retain the above copyright
811390Ssteve.reinhardt@amd.com * notice, this list of conditions and the following disclaimer;
911390Ssteve.reinhardt@amd.com * redistributions in binary form must reproduce the above copyright
1011219Snilay@cs.wisc.edu * notice, this list of conditions and the following disclaimer in the
114398SN/A * documentation and/or other materials provided with the distribution;
125723SN/A * neither the name of the copyright holders nor the names of its
135876SN/A * contributors may be used to endorse or promote products derived from
145509SN/A * this software without specific prior written permission.
1511390Ssteve.reinhardt@amd.com *
16 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */
28
29#include "mem/ruby/network/simple/SimpleLink.hh"
30
31SimpleExtLink::SimpleExtLink(const Params *p)
32    : BasicExtLink(p)
33{
34    // For the simple links, the bandwidth factor translates to the
35    // bandwidth multiplier.  The multipiler, in combination with the
36    // endpoint bandwidth multiplier - message size multiplier ratio,
37    // determines the link bandwidth in bytes
38    m_bw_multiplier = p->bandwidth_factor;
39}
40
41void
42SimpleExtLink::print(std::ostream& out) const
43{
44    out << name();
45}
46
47SimpleExtLink *
48SimpleExtLinkParams::create()
49{
50    return new SimpleExtLink(this);
51}
52
53SimpleIntLink::SimpleIntLink(const Params *p)
54    : BasicIntLink(p)
55{
56    // For the simple links, the bandwidth factor translates to the
57    // bandwidth multiplier.  The multipiler, in combination with the
58    // endpoint bandwidth multiplier - message size multiplier ratio,
59    // determines the link bandwidth in bytes
60    m_bw_multiplier = p->bandwidth_factor;
61}
62
63void
64SimpleIntLink::print(std::ostream& out) const
65{
66    out << name();
67}
68
69SimpleIntLink *
70SimpleIntLinkParams::create()
71{
72    return new SimpleIntLink(this);
73}
74