112338Sjason@lowepower.com# -*- coding: utf-8 -*- 212338Sjason@lowepower.com# Copyright (c) 2017 Jason Lowe-Power 312338Sjason@lowepower.com# All rights reserved. 412338Sjason@lowepower.com# 512338Sjason@lowepower.com# Redistribution and use in source and binary forms, with or without 612338Sjason@lowepower.com# modification, are permitted provided that the following conditions are 712338Sjason@lowepower.com# met: redistributions of source code must retain the above copyright 812338Sjason@lowepower.com# notice, this list of conditions and the following disclaimer; 912338Sjason@lowepower.com# redistributions in binary form must reproduce the above copyright 1012338Sjason@lowepower.com# notice, this list of conditions and the following disclaimer in the 1112338Sjason@lowepower.com# documentation and/or other materials provided with the distribution; 1212338Sjason@lowepower.com# neither the name of the copyright holders nor the names of its 1312338Sjason@lowepower.com# contributors may be used to endorse or promote products derived from 1412338Sjason@lowepower.com# this software without specific prior written permission. 1512338Sjason@lowepower.com# 1612338Sjason@lowepower.com# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 1712338Sjason@lowepower.com# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 1812338Sjason@lowepower.com# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 1912338Sjason@lowepower.com# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 2012338Sjason@lowepower.com# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 2112338Sjason@lowepower.com# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 2212338Sjason@lowepower.com# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 2312338Sjason@lowepower.com# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 2412338Sjason@lowepower.com# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 2512338Sjason@lowepower.com# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 2612338Sjason@lowepower.com# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 2712338Sjason@lowepower.com# 2812338Sjason@lowepower.com# Authors: Jason Lowe-Power 2912338Sjason@lowepower.com 3012338Sjason@lowepower.comfrom m5.params import * 3114252Sgabeblack@google.comfrom m5.SimObject import SimObject 3212338Sjason@lowepower.com 3314252Sgabeblack@google.comclass SimpleMemobj(SimObject): 3412338Sjason@lowepower.com type = 'SimpleMemobj' 3512338Sjason@lowepower.com cxx_header = "learning_gem5/part2/simple_memobj.hh" 3612338Sjason@lowepower.com 3712338Sjason@lowepower.com inst_port = SlavePort("CPU side port, receives requests") 3812338Sjason@lowepower.com data_port = SlavePort("CPU side port, receives requests") 3912338Sjason@lowepower.com mem_side = MasterPort("Memory side port, sends requests") 40