Get rid of the Trace ParamContext and give python direct
[gem5.git] / src / python / m5 / objects / Ide.py
1 from m5.SimObject import SimObject
2 from m5.params import *
3 from Pci import PciDevice, PciConfigData
4
5 class IdeID(Enum): vals = ['master', 'slave']
6
7 class IdeControllerPciData(PciConfigData):
8 VendorID = 0x8086
9 DeviceID = 0x7111
10 Command = 0x0
11 Status = 0x280
12 Revision = 0x0
13 ClassCode = 0x01
14 SubClassCode = 0x01
15 ProgIF = 0x85
16 BAR0 = 0x00000001
17 BAR1 = 0x00000001
18 BAR2 = 0x00000001
19 BAR3 = 0x00000001
20 BAR4 = 0x00000001
21 BAR5 = 0x00000001
22 InterruptLine = 0x1f
23 InterruptPin = 0x01
24 BAR0Size = '8B'
25 BAR1Size = '4B'
26 BAR2Size = '8B'
27 BAR3Size = '4B'
28 BAR4Size = '16B'
29
30 class IdeDisk(SimObject):
31 type = 'IdeDisk'
32 delay = Param.Latency('1us', "Fixed disk delay in microseconds")
33 driveID = Param.IdeID('master', "Drive ID")
34 image = Param.DiskImage("Disk image")
35
36 class IdeController(PciDevice):
37 type = 'IdeController'
38 disks = VectorParam.IdeDisk("IDE disks attached to this controller")
39
40 configdata =IdeControllerPciData()