config.py revision 12870
112870Sgabeblack@google.com# Copyright 2018 Google, Inc.
212870Sgabeblack@google.com#
312870Sgabeblack@google.com# Redistribution and use in source and binary forms, with or without
412870Sgabeblack@google.com# modification, are permitted provided that the following conditions are
512870Sgabeblack@google.com# met: redistributions of source code must retain the above copyright
612870Sgabeblack@google.com# notice, this list of conditions and the following disclaimer;
712870Sgabeblack@google.com# redistributions in binary form must reproduce the above copyright
812870Sgabeblack@google.com# notice, this list of conditions and the following disclaimer in the
912870Sgabeblack@google.com# documentation and/or other materials provided with the distribution;
1012870Sgabeblack@google.com# neither the name of the copyright holders nor the names of its
1112870Sgabeblack@google.com# contributors may be used to endorse or promote products derived from
1212870Sgabeblack@google.com# this software without specific prior written permission.
1312870Sgabeblack@google.com#
1412870Sgabeblack@google.com# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
1512870Sgabeblack@google.com# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
1612870Sgabeblack@google.com# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
1712870Sgabeblack@google.com# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
1812870Sgabeblack@google.com# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
1912870Sgabeblack@google.com# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
2012870Sgabeblack@google.com# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2112870Sgabeblack@google.com# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
2212870Sgabeblack@google.com# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2312870Sgabeblack@google.com# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2412870Sgabeblack@google.com# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2512870Sgabeblack@google.com#
2612870Sgabeblack@google.com# Authors: Gabe Black
2712870Sgabeblack@google.com
2812870Sgabeblack@google.comfrom __future__ import print_function
2912870Sgabeblack@google.com
3012870Sgabeblack@google.comimport logging
3112870Sgabeblack@google.com
3212870Sgabeblack@google.comimport m5
3312870Sgabeblack@google.com
3412870Sgabeblack@google.comfrom m5.objects import SystemC_Kernel, Root
3512870Sgabeblack@google.com
3612870Sgabeblack@google.com# pylint:disable=unused-variable
3712870Sgabeblack@google.com
3812870Sgabeblack@google.comkernel = SystemC_Kernel()
3912870Sgabeblack@google.comroot = Root(full_system=True, systemc_kernel=kernel)
4012870Sgabeblack@google.com
4112870Sgabeblack@google.comkernel.sc_main("Hello", "World");
4212870Sgabeblack@google.com
4312870Sgabeblack@google.comm5.instantiate(None)
4412870Sgabeblack@google.com
4512870Sgabeblack@google.comcause = m5.simulate(m5.MaxTick).getCause()
4612870Sgabeblack@google.comlogging.info('Exiting @ tick %i because %s', m5.curTick(), cause)
47