110800SN/A# Copyright (c) 2012 ARM Limited 210800SN/A# All rights reserved. 310800SN/A# 410800SN/A# The license below extends only to copyright in the software and shall 510800SN/A# not be construed as granting a license to any other intellectual 610800SN/A# property including but not limited to intellectual property relating 710800SN/A# to a hardware implementation of the functionality of the software 810800SN/A# licensed hereunder. You may use the software subject to the license 910800SN/A# terms below provided that you ensure that this notice is replicated 1010800SN/A# unmodified and in its entirety in all distributions of the software, 1110800SN/A# modified or unmodified, in source code or in binary form. 1210800SN/A# 1310800SN/A# Redistribution and use in source and binary forms, with or without 1410800SN/A# modification, are permitted provided that the following conditions are 1510800SN/A# met: redistributions of source code must retain the above copyright 1610800SN/A# notice, this list of conditions and the following disclaimer; 1710800SN/A# redistributions in binary form must reproduce the above copyright 1810800SN/A# notice, this list of conditions and the following disclaimer in the 1910800SN/A# documentation and/or other materials provided with the distribution; 2010800SN/A# neither the name of the copyright holders nor the names of its 2110800SN/A# contributors may be used to endorse or promote products derived from 2210800SN/A# this software without specific prior written permission. 2310800SN/A# 2410800SN/A# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 2510800SN/A# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 2610800SN/A# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 2710800SN/A# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 2810800SN/A# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 2910800SN/A# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 3010800SN/A# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 3110800SN/A# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 3210800SN/A# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 3310800SN/A# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 3410800SN/A# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 3510800SN/A# 3610800SN/A# Authors: Peter Enns 3710800SN/A 3810800SN/Afrom m5.SimObject import SimObject 3910800SN/Afrom m5.params import * 4013665Sandreas.sandberg@arm.comfrom m5.objects.Device import BasicPioDevice 4110800SN/A 4210800SN/Aclass I2CDevice(SimObject): 4310800SN/A type = 'I2CDevice' 4411262Sandreas.sandberg@arm.com cxx_header = "dev/i2c/device.hh" 4510800SN/A abstract = True 4610800SN/A i2c_addr = Param.UInt8("Address of device on i2c bus") 4710800SN/A 4810800SN/Aclass I2CBus(BasicPioDevice): 4910800SN/A type = 'I2CBus' 5011262Sandreas.sandberg@arm.com cxx_header = "dev/i2c/bus.hh" 5110800SN/A devices = VectorParam.I2CDevice([], "Devices") 52