Need config read/write latency.
authorKevin Lim <ktlim@umich.edu>
Thu, 27 Jul 2006 20:43:02 +0000 (16:43 -0400)
committerKevin Lim <ktlim@umich.edu>
Thu, 27 Jul 2006 20:43:02 +0000 (16:43 -0400)
--HG--
extra : convert_revision : 2d978635db89e727f228890738b24fcad9b6ced6

src/dev/ide_ctrl.cc
src/dev/ns_gige.cc
src/dev/sinic.cc
src/python/m5/objects/Ethernet.py
src/python/m5/objects/Ide.py

index 5ffc02d34959d490343d4979190ba9eaa59cde7b..e8d7f48171ef8fab3ac27b6d5214ee997a3ea30d 100644 (file)
@@ -756,6 +756,7 @@ BEGIN_DECLARE_SIM_OBJECT_PARAMS(IdeController)
     Param<uint32_t> pci_dev;
     Param<uint32_t> pci_func;
     Param<Tick> pio_latency;
+    Param<Tick> config_latency;
     SimObjectVectorParam<IdeDisk *> disks;
 
 END_DECLARE_SIM_OBJECT_PARAMS(IdeController)
@@ -769,6 +770,7 @@ BEGIN_INIT_SIM_OBJECT_PARAMS(IdeController)
     INIT_PARAM(pci_dev, "PCI device number"),
     INIT_PARAM(pci_func, "PCI function code"),
     INIT_PARAM_DFLT(pio_latency, "Programmed IO latency in bus cycles", 1),
+    INIT_PARAM(config_latency, "Number of cycles for a config read or write"),
     INIT_PARAM(disks, "IDE disks attached to this controller")
 
 END_INIT_SIM_OBJECT_PARAMS(IdeController)
@@ -784,6 +786,7 @@ CREATE_SIM_OBJECT(IdeController)
     params->deviceNum = pci_dev;
     params->functionNum = pci_func;
     params->pio_delay = pio_latency;
+    params->config_delay = config_latency;
     params->disks = disks;
     return new IdeController(params);
 }
index bf2279d93a23b070d3e83fb701cdf0f4604a134f..704afcf7d2376915ab43c8ec3e92a782625f3b78 100644 (file)
@@ -2815,6 +2815,7 @@ BEGIN_DECLARE_SIM_OBJECT_PARAMS(NSGigE)
     Param<uint32_t> pci_dev;
     Param<uint32_t> pci_func;
     Param<Tick> pio_latency;
+    Param<Tick> config_latency;
 
     Param<Tick> clock;
     Param<bool> dma_desc_free;
@@ -2848,6 +2849,7 @@ BEGIN_INIT_SIM_OBJECT_PARAMS(NSGigE)
     INIT_PARAM(pci_dev, "PCI device number"),
     INIT_PARAM(pci_func, "PCI function code"),
     INIT_PARAM_DFLT(pio_latency, "Programmed IO latency in bus cycles", 1),
+    INIT_PARAM(config_latency, "Number of cycles for a config read or write"),
     INIT_PARAM(clock, "State machine cycle time"),
 
     INIT_PARAM(dma_desc_free, "DMA of Descriptors is free"),
@@ -2885,6 +2887,7 @@ CREATE_SIM_OBJECT(NSGigE)
     params->deviceNum = pci_dev;
     params->functionNum = pci_func;
     params->pio_delay = pio_latency;
+    params->config_delay = config_latency;
 
     params->clock = clock;
     params->dma_desc_free = dma_desc_free;
index 815cecca5a40056c75a5cd19bcb4e98afe6bc61a..40bf29c876333c3cb0ca4908bf1b8a642e635614 100644 (file)
@@ -1639,6 +1639,7 @@ BEGIN_DECLARE_SIM_OBJECT_PARAMS(Device)
     Param<uint32_t> pci_dev;
     Param<uint32_t> pci_func;
     Param<Tick> pio_latency;
+    Param<Tick> config_latency;
     Param<Tick> intr_delay;
 
     Param<Tick> clock;
@@ -1681,6 +1682,7 @@ BEGIN_INIT_SIM_OBJECT_PARAMS(Device)
     INIT_PARAM(pci_dev, "PCI device number"),
     INIT_PARAM(pci_func, "PCI function code"),
     INIT_PARAM_DFLT(pio_latency, "Programmed IO latency in bus cycles", 1),
+    INIT_PARAM(config_latency, "Number of cycles for a config read or write"),
     INIT_PARAM(intr_delay, "Interrupt Delay"),
     INIT_PARAM(clock, "State machine cycle time"),
 
@@ -1725,6 +1727,7 @@ CREATE_SIM_OBJECT(Device)
     params->deviceNum = pci_dev;
     params->functionNum = pci_func;
     params->pio_delay = pio_latency;
+    params->config_delay = config_latency;
     params->intr_delay = intr_delay;
     params->clock = clock;
 
index db7efe0040cdbe265540c8ee4a53b94bd4e56138..fb641bf809ce497c52fc1415b39e10da7d7cd9a2 100644 (file)
@@ -68,6 +68,8 @@ class EtherDevBase(PciDevice):
 
     clock = Param.Clock('0ns', "State machine processor frequency")
 
+    config_latency = Param.Latency('20ns', "Config read or write latency")
+
     dma_read_delay = Param.Latency('0us', "fixed delay for dma reads")
     dma_read_factor = Param.Latency('0us', "multiplier for dma reads")
     dma_write_delay = Param.Latency('0us', "fixed delay for dma writes")
index a5fe1b595835346dbc42d3b13623a7ac0d917c2c..a8bd4ac5ac6ef22917ce32a6af6d95422c5ecfee 100644 (file)
@@ -36,4 +36,6 @@ class IdeController(PciDevice):
     type = 'IdeController'
     disks = VectorParam.IdeDisk("IDE disks attached to this controller")
 
+    config_latency = Param.Latency('20ns', "Config read or write latency")
+
     configdata =IdeControllerPciData()