T1000.py revision 9338
14486Sbinkertn@umich.edu# Copyright (c) 2006-2007 The Regents of The University of Michigan 24486Sbinkertn@umich.edu# All rights reserved. 34486Sbinkertn@umich.edu# 44486Sbinkertn@umich.edu# Redistribution and use in source and binary forms, with or without 54486Sbinkertn@umich.edu# modification, are permitted provided that the following conditions are 64486Sbinkertn@umich.edu# met: redistributions of source code must retain the above copyright 74486Sbinkertn@umich.edu# notice, this list of conditions and the following disclaimer; 84486Sbinkertn@umich.edu# redistributions in binary form must reproduce the above copyright 94486Sbinkertn@umich.edu# notice, this list of conditions and the following disclaimer in the 104486Sbinkertn@umich.edu# documentation and/or other materials provided with the distribution; 114486Sbinkertn@umich.edu# neither the name of the copyright holders nor the names of its 124486Sbinkertn@umich.edu# contributors may be used to endorse or promote products derived from 134486Sbinkertn@umich.edu# this software without specific prior written permission. 144486Sbinkertn@umich.edu# 154486Sbinkertn@umich.edu# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 164486Sbinkertn@umich.edu# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 174486Sbinkertn@umich.edu# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 184486Sbinkertn@umich.edu# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 194486Sbinkertn@umich.edu# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 204486Sbinkertn@umich.edu# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 214486Sbinkertn@umich.edu# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 224486Sbinkertn@umich.edu# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 234486Sbinkertn@umich.edu# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 244486Sbinkertn@umich.edu# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 254486Sbinkertn@umich.edu# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 264486Sbinkertn@umich.edu# 274486Sbinkertn@umich.edu# Authors: Gabe Black 284486Sbinkertn@umich.edu 293630SN/Afrom m5.params import * 303630SN/Afrom m5.proxy import * 314104SN/Afrom Device import BasicPioDevice, PioDevice, IsaFake, BadAddr 325478Snate@binkert.orgfrom Platform import Platform 335478Snate@binkert.orgfrom Terminal import Terminal 343743SN/Afrom Uart import Uart8250 353630SN/A 363898SN/A 373898SN/Aclass MmDisk(BasicPioDevice): 383898SN/A type = 'MmDisk' 399338SAndreas.Sandberg@arm.com cxx_header = "dev/sparc/mm_disk.hh" 403898SN/A image = Param.DiskImage("Disk Image") 413898SN/A pio_addr = 0x1F40000000 423898SN/A 433914SN/Aclass DumbTOD(BasicPioDevice): 443914SN/A type = 'DumbTOD' 459338SAndreas.Sandberg@arm.com cxx_header = "dev/sparc/dtod.hh" 463914SN/A time = Param.Time('01/01/2009', "System time to use ('Now' for real time)") 473914SN/A pio_addr = 0xfff0c1fff8 483914SN/A 494104SN/Aclass Iob(PioDevice): 504104SN/A type = 'Iob' 519338SAndreas.Sandberg@arm.com cxx_header = "dev/sparc/iob.hh" 528742Sgblack@eecs.umich.edu platform = Param.Platform(Parent.any, "Platform this device is part of.") 539162Sandreas.hansson@arm.com pio_latency = Param.Latency('1ns', "Programed IO latency") 544104SN/A 553914SN/A 563630SN/Aclass T1000(Platform): 573630SN/A type = 'T1000' 589338SAndreas.Sandberg@arm.com cxx_header = "dev/sparc/t1000.hh" 593630SN/A system = Param.System(Parent.any, "system") 603630SN/A 614007SN/A fake_clk = IsaFake(pio_addr=0x9600000000, pio_size=0x100000000) 624007SN/A #warn_access="Accessing Clock Unit -- Unimplemented!") 633630SN/A 643814SN/A fake_membnks = IsaFake(pio_addr=0x9700000000, pio_size=16384, 654007SN/A ret_data64=0x0000000000000000, update_data=False) 664007SN/A #warn_access="Accessing Memory Banks -- Unimplemented!") 673814SN/A 684007SN/A fake_jbi = IsaFake(pio_addr=0x8000000000, pio_size=0x100000000) 694007SN/A #warn_access="Accessing JBI -- Unimplemented!") 703814SN/A 713814SN/A fake_l2_1 = IsaFake(pio_addr=0xA900000000, pio_size=0x8, 724007SN/A ret_data64=0x0000000000000001, update_data=True) 734007SN/A #warn_access="Accessing L2 Cache Banks -- Unimplemented!") 743814SN/A 753814SN/A fake_l2_2 = IsaFake(pio_addr=0xA900000040, pio_size=0x8, 764007SN/A ret_data64=0x0000000000000001, update_data=True) 774007SN/A #warn_access="Accessing L2 Cache Banks -- Unimplemented!") 783814SN/A 793814SN/A fake_l2_3 = IsaFake(pio_addr=0xA900000080, pio_size=0x8, 804007SN/A ret_data64=0x0000000000000001, update_data=True) 814007SN/A #warn_access="Accessing L2 Cache Banks -- Unimplemented!") 823814SN/A 833814SN/A fake_l2_4 = IsaFake(pio_addr=0xA9000000C0, pio_size=0x8, 844007SN/A ret_data64=0x0000000000000001, update_data=True) 854007SN/A #warn_access="Accessing L2 Cache Banks -- Unimplemented!") 863814SN/A 873825SN/A fake_l2esr_1 = IsaFake(pio_addr=0xAB00000000, pio_size=0x8, 884007SN/A ret_data64=0x0000000000000000, update_data=True) 894007SN/A #warn_access="Accessing L2 ESR Cache Banks -- Unimplemented!") 903825SN/A 913825SN/A fake_l2esr_2 = IsaFake(pio_addr=0xAB00000040, pio_size=0x8, 924007SN/A ret_data64=0x0000000000000000, update_data=True) 934007SN/A #warn_access="Accessing L2 ESR Cache Banks -- Unimplemented!") 943825SN/A 953825SN/A fake_l2esr_3 = IsaFake(pio_addr=0xAB00000080, pio_size=0x8, 964007SN/A ret_data64=0x0000000000000000, update_data=True) 974007SN/A #warn_access="Accessing L2 ESR Cache Banks -- Unimplemented!") 983825SN/A 993825SN/A fake_l2esr_4 = IsaFake(pio_addr=0xAB000000C0, pio_size=0x8, 1004007SN/A ret_data64=0x0000000000000000, update_data=True) 1014007SN/A #warn_access="Accessing L2 ESR Cache Banks -- Unimplemented!") 1023825SN/A 1034007SN/A fake_ssi = IsaFake(pio_addr=0xff00000000, pio_size=0x10000000) 1044007SN/A #warn_access="Accessing SSI -- Unimplemented!") 1053814SN/A 1065478Snate@binkert.org hterm = Terminal() 1073814SN/A hvuart = Uart8250(pio_addr=0xfff0c2c000) 1083914SN/A htod = DumbTOD() 1093914SN/A 1105478Snate@binkert.org pterm = Terminal() 1113814SN/A puart0 = Uart8250(pio_addr=0x1f10000000) 1123630SN/A 1134104SN/A iob = Iob() 1144104SN/A # Attach I/O devices that are on chip 1154104SN/A def attachOnChipIO(self, bus): 1168847Sandreas.hansson@arm.com self.iob.pio = bus.master 1178847Sandreas.hansson@arm.com self.htod.pio = bus.master 1184104SN/A 1194104SN/A 1203630SN/A # Attach I/O devices to specified bus object. Can't do this 1213630SN/A # earlier, since the bus object itself is typically defined at the 1223630SN/A # System level. 1233630SN/A def attachIO(self, bus): 1245478Snate@binkert.org self.hvuart.terminal = self.hterm 1255478Snate@binkert.org self.puart0.terminal = self.pterm 1268847Sandreas.hansson@arm.com self.fake_clk.pio = bus.master 1278847Sandreas.hansson@arm.com self.fake_membnks.pio = bus.master 1288847Sandreas.hansson@arm.com self.fake_l2_1.pio = bus.master 1298847Sandreas.hansson@arm.com self.fake_l2_2.pio = bus.master 1308847Sandreas.hansson@arm.com self.fake_l2_3.pio = bus.master 1318847Sandreas.hansson@arm.com self.fake_l2_4.pio = bus.master 1328847Sandreas.hansson@arm.com self.fake_l2esr_1.pio = bus.master 1338847Sandreas.hansson@arm.com self.fake_l2esr_2.pio = bus.master 1348847Sandreas.hansson@arm.com self.fake_l2esr_3.pio = bus.master 1358847Sandreas.hansson@arm.com self.fake_l2esr_4.pio = bus.master 1368847Sandreas.hansson@arm.com self.fake_ssi.pio = bus.master 1378847Sandreas.hansson@arm.com self.fake_jbi.pio = bus.master 1388847Sandreas.hansson@arm.com self.puart0.pio = bus.master 1398847Sandreas.hansson@arm.com self.hvuart.pio = bus.master 140