I2C.py (11262:3aeb879a66e6) | I2C.py (13665:9c7fe3811b88) |
---|---|
1# Copyright (c) 2012 ARM Limited 2# All rights reserved. 3# 4# The license below extends only to copyright in the software and shall 5# not be construed as granting a license to any other intellectual 6# property including but not limited to intellectual property relating 7# to a hardware implementation of the functionality of the software 8# licensed hereunder. You may use the software subject to the license --- 23 unchanged lines hidden (view full) --- 32# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 33# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 34# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 35# 36# Authors: Peter Enns 37 38from m5.SimObject import SimObject 39from m5.params import * | 1# Copyright (c) 2012 ARM Limited 2# All rights reserved. 3# 4# The license below extends only to copyright in the software and shall 5# not be construed as granting a license to any other intellectual 6# property including but not limited to intellectual property relating 7# to a hardware implementation of the functionality of the software 8# licensed hereunder. You may use the software subject to the license --- 23 unchanged lines hidden (view full) --- 32# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 33# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 34# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 35# 36# Authors: Peter Enns 37 38from m5.SimObject import SimObject 39from m5.params import * |
40from Device import BasicPioDevice | 40from m5.objects.Device import BasicPioDevice |
41 42class I2CDevice(SimObject): 43 type = 'I2CDevice' 44 cxx_header = "dev/i2c/device.hh" 45 abstract = True 46 i2c_addr = Param.UInt8("Address of device on i2c bus") 47 48class I2CBus(BasicPioDevice): 49 type = 'I2CBus' 50 cxx_header = "dev/i2c/bus.hh" 51 devices = VectorParam.I2CDevice([], "Devices") | 41 42class I2CDevice(SimObject): 43 type = 'I2CDevice' 44 cxx_header = "dev/i2c/device.hh" 45 abstract = True 46 i2c_addr = Param.UInt8("Address of device on i2c bus") 47 48class I2CBus(BasicPioDevice): 49 type = 'I2CBus' 50 cxx_header = "dev/i2c/bus.hh" 51 devices = VectorParam.I2CDevice([], "Devices") |