1754SN/A// Copyright (c) 2015 ARM Limited
21762SN/A// All rights reserved.
3754SN/A//
4754SN/A// The license below extends only to copyright in the software and shall
5754SN/A// not be construed as granting a license to any other intellectual
6754SN/A// property including but not limited to intellectual property relating
7754SN/A// to a hardware implementation of the functionality of the software
8754SN/A// licensed hereunder.  You may use the software subject to the license
9754SN/A// terms below provided that you ensure that this notice is replicated
10754SN/A// unmodified and in its entirety in all distributions of the software,
11754SN/A// modified or unmodified, in source code or in binary form.
12754SN/A//
13754SN/A// Redistribution and use in source and binary forms, with or without
14754SN/A// modification, are permitted provided that the following conditions are
15754SN/A// met: redistributions of source code must retain the above copyright
16754SN/A// notice, this list of conditions and the following disclaimer;
17754SN/A// redistributions in binary form must reproduce the above copyright
18754SN/A// notice, this list of conditions and the following disclaimer in the
19754SN/A// documentation and/or other materials provided with the distribution;
20754SN/A// neither the name of the copyright holders nor the names of its
21754SN/A// contributors may be used to endorse or promote products derived from
22754SN/A// this software without specific prior written permission.
23754SN/A//
24754SN/A// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
25754SN/A// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
26754SN/A// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
272665Ssaidi@eecs.umich.edu// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
282665Ssaidi@eecs.umich.edu// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
292665Ssaidi@eecs.umich.edu// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
30754SN/A// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
31754SN/A// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
32754SN/A// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
33754SN/A// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
34754SN/A// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35754SN/A
36754SN/A// Copyright 2009-2014 Sandia Coporation.  Under the terms
378229Snate@binkert.org// of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S.
387678Sgblack@eecs.umich.edu// Government retains certain rights in this software.
391917SN/A//
401681SN/A// Copyright (c) 2009-2014, Sandia Corporation
411070SN/A// All rights reserved.
421070SN/A//
431070SN/A// For license information, see the LICENSE file in the current directory.
441070SN/A
453548SN/A#include <core/sst_config.h>
461070SN/A
471070SN/A#include "gem5.hh"
483548SN/A
495999Snate@binkert.orgstatic
505999Snate@binkert.orgSST::Component* create_gem5(SST::ComponentId_t id, SST::Params &params)
511070SN/A{
521070SN/A    return new SST::gem5::gem5Component(id, params);
533548SN/A}
541070SN/A
551070SN/A
5613905Sgabeblack@google.comstatic const SST::ElementInfoParam gem5_params[] = {
571070SN/A    {"cmd", "gem5 command to execute."},
581070SN/A    {"comp_debug", "Debug information from the component: 0 (off), 1 (stdout),"
591070SN/A                   " 2 (stderr), 3(file)"},
601070SN/A    {"frequency", "Frequency with which to call into gem5"},
611070SN/A    {NULL, NULL}
621070SN/A};
6312182Sgabeblack@google.com
6412182Sgabeblack@google.comstatic const SST::ElementInfoComponent components[] = {
651070SN/A    { "gem5",
661070SN/A        "gem5 simulation component",
677811Ssteve.reinhardt@amd.com        NULL,
681070SN/A        create_gem5,
69754SN/A        gem5_params
70    },
71    { NULL, NULL, NULL, NULL, NULL }
72};
73
74extern "C" {
75    SST::ElementLibraryInfo gem5_eli = {
76        "gem5",
77        "gem5 Simulation",
78        components,
79    };
80}
81