16700SN/A/*
28257SN/A * Copyright (c) 2011 Advanced Micro Devices, Inc.
36700SN/A * All rights reserved.
46700SN/A *
56700SN/A * Redistribution and use in source and binary forms, with or without
66700SN/A * modification, are permitted provided that the following conditions are
76700SN/A * met: redistributions of source code must retain the above copyright
86700SN/A * notice, this list of conditions and the following disclaimer;
96700SN/A * redistributions in binary form must reproduce the above copyright
106700SN/A * notice, this list of conditions and the following disclaimer in the
116700SN/A * documentation and/or other materials provided with the distribution;
126700SN/A * neither the name of the copyright holders nor the names of its
136700SN/A * contributors may be used to endorse or promote products derived from
146700SN/A * this software without specific prior written permission.
156700SN/A *
166700SN/A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
176700SN/A * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
186700SN/A * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
196700SN/A * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
206700SN/A * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
216700SN/A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
226700SN/A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
236700SN/A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
246700SN/A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
256700SN/A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
266700SN/A * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
276700SN/A */
286285SN/A
298258SBrad.Beckmann@amd.com#include "mem/ruby/network/simple/SimpleLink.hh"
306285SN/A
318258SBrad.Beckmann@amd.comSimpleExtLink::SimpleExtLink(const Params *p)
328258SBrad.Beckmann@amd.com    : BasicExtLink(p)
336285SN/A{
348258SBrad.Beckmann@amd.com    // For the simple links, the bandwidth factor translates to the
3511320Ssteve.reinhardt@amd.com    // bandwidth multiplier.  The multipiler, in combination with the
3611320Ssteve.reinhardt@amd.com    // endpoint bandwidth multiplier - message size multiplier ratio,
3711320Ssteve.reinhardt@amd.com    // determines the link bandwidth in bytes
388258SBrad.Beckmann@amd.com    m_bw_multiplier = p->bandwidth_factor;
396285SN/A}
406285SN/A
417054SN/Avoid
428258SBrad.Beckmann@amd.comSimpleExtLink::print(std::ostream& out) const
436493SN/A{
448257SN/A    out << name();
456493SN/A}
467054SN/A
478258SBrad.Beckmann@amd.comSimpleExtLink *
488258SBrad.Beckmann@amd.comSimpleExtLinkParams::create()
497054SN/A{
508258SBrad.Beckmann@amd.com    return new SimpleExtLink(this);
517054SN/A}
528257SN/A
538258SBrad.Beckmann@amd.comSimpleIntLink::SimpleIntLink(const Params *p)
548258SBrad.Beckmann@amd.com    : BasicIntLink(p)
558257SN/A{
568258SBrad.Beckmann@amd.com    // For the simple links, the bandwidth factor translates to the
5711320Ssteve.reinhardt@amd.com    // bandwidth multiplier.  The multipiler, in combination with the
5811320Ssteve.reinhardt@amd.com    // endpoint bandwidth multiplier - message size multiplier ratio,
5911320Ssteve.reinhardt@amd.com    // determines the link bandwidth in bytes
608258SBrad.Beckmann@amd.com    m_bw_multiplier = p->bandwidth_factor;
618257SN/A}
628257SN/A
638258SBrad.Beckmann@amd.comvoid
648258SBrad.Beckmann@amd.comSimpleIntLink::print(std::ostream& out) const
658257SN/A{
668258SBrad.Beckmann@amd.com    out << name();
678257SN/A}
688257SN/A
698258SBrad.Beckmann@amd.comSimpleIntLink *
708258SBrad.Beckmann@amd.comSimpleIntLinkParams::create()
718257SN/A{
728258SBrad.Beckmann@amd.com    return new SimpleIntLink(this);
738257SN/A}
74