SimpleLink.cc revision 11320
13549SN/A/*
23549SN/A * Copyright (c) 2011 Advanced Micro Devices, Inc.
33549SN/A * All rights reserved.
43549SN/A *
53549SN/A * Redistribution and use in source and binary forms, with or without
63549SN/A * modification, are permitted provided that the following conditions are
73549SN/A * met: redistributions of source code must retain the above copyright
83549SN/A * notice, this list of conditions and the following disclaimer;
93549SN/A * redistributions in binary form must reproduce the above copyright
103549SN/A * notice, this list of conditions and the following disclaimer in the
113549SN/A * documentation and/or other materials provided with the distribution;
123549SN/A * neither the name of the copyright holders nor the names of its
133549SN/A * contributors may be used to endorse or promote products derived from
143549SN/A * this software without specific prior written permission.
153549SN/A *
163549SN/A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
173549SN/A * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
183549SN/A * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
193549SN/A * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
203549SN/A * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
213549SN/A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
223549SN/A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
233549SN/A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
243549SN/A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
253549SN/A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
263549SN/A * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
273549SN/A */
283549SN/A
293549SN/A#include "mem/ruby/network/simple/SimpleLink.hh"
303549SN/A
313549SN/ASimpleExtLink::SimpleExtLink(const Params *p)
323565Sgblack@eecs.umich.edu    : BasicExtLink(p)
3311793Sbrandon.potter@amd.com{
343565Sgblack@eecs.umich.edu    // For the simple links, the bandwidth factor translates to the
353549SN/A    // bandwidth multiplier.  The multipiler, in combination with the
363549SN/A    // endpoint bandwidth multiplier - message size multiplier ratio,
375567Snate@binkert.org    // determines the link bandwidth in bytes
383549SN/A    m_bw_multiplier = p->bandwidth_factor;
393549SN/A}
403549SN/A
413549SN/Avoid
425569Snate@binkert.orgSimpleExtLink::print(std::ostream& out) const
4313614Sgabeblack@google.com{
445569Snate@binkert.org    out << name();
455569Snate@binkert.org}
463549SN/A
473549SN/ASimpleExtLink *
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