17674Snate@binkert.org# Copyright (c) 2010 The Hewlett-Packard Development Company
27674Snate@binkert.org# All rights reserved.
37674Snate@binkert.org#
47674Snate@binkert.org# Redistribution and use in source and binary forms, with or without
57674Snate@binkert.org# modification, are permitted provided that the following conditions are
67674Snate@binkert.org# met: redistributions of source code must retain the above copyright
77674Snate@binkert.org# notice, this list of conditions and the following disclaimer;
87674Snate@binkert.org# redistributions in binary form must reproduce the above copyright
97674Snate@binkert.org# notice, this list of conditions and the following disclaimer in the
107674Snate@binkert.org# documentation and/or other materials provided with the distribution;
117674Snate@binkert.org# neither the name of the copyright holders nor the names of its
127674Snate@binkert.org# contributors may be used to endorse or promote products derived from
137674Snate@binkert.org# this software without specific prior written permission.
147674Snate@binkert.org#
157674Snate@binkert.org# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
167674Snate@binkert.org# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
177674Snate@binkert.org# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
187674Snate@binkert.org# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
197674Snate@binkert.org# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
207674Snate@binkert.org# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
217674Snate@binkert.org# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
227674Snate@binkert.org# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
237674Snate@binkert.org# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
247674Snate@binkert.org# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
257674Snate@binkert.org# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
267674Snate@binkert.org#
277674Snate@binkert.org# Authors: Nathan Binkert
287674Snate@binkert.org
2913714Sandreas.sandberg@arm.comfrom __future__ import print_function
3013714Sandreas.sandberg@arm.comfrom __future__ import absolute_import
3113714Sandreas.sandberg@arm.com
327677Snate@binkert.orgfrom m5.internal import params
337674Snate@binkert.orgfrom m5.SimObject import *
347674Snate@binkert.org
357674Snate@binkert.orgtry:
367674Snate@binkert.org    modules = __loader__.modules
377674Snate@binkert.orgexcept NameError:
387674Snate@binkert.org    modules = { }
397674Snate@binkert.org
4013709Sandreas.sandberg@arm.comfor module in modules.keys():
417677Snate@binkert.org    if module.startswith('m5.objects.'):
4213671Sandreas.sandberg@arm.com        exec("from %s import *" % module)
43