2006-09-05 02:14:07 +02:00
|
|
|
from m5.params import *
|
|
|
|
from m5.proxy import *
|
2006-04-20 23:14:30 +02:00
|
|
|
from MemObject import *
|
2005-01-15 10:12:25 +01:00
|
|
|
|
2006-04-20 23:14:30 +02:00
|
|
|
class PhysicalMemory(MemObject):
|
2005-02-03 03:13:01 +01:00
|
|
|
type = 'PhysicalMemory'
|
2006-06-14 05:19:28 +02:00
|
|
|
port = Port("the access port")
|
2006-08-18 00:46:43 +02:00
|
|
|
range = Param.AddrRange(AddrRange('128MB'), "Device Address")
|
2005-01-15 10:12:25 +01:00
|
|
|
file = Param.String('', "memory mapped file")
|
2006-05-16 23:36:50 +02:00
|
|
|
latency = Param.Latency(Parent.clock, "latency of an access")
|
2006-08-17 01:01:11 +02:00
|
|
|
|
|
|
|
class DRAMMemory(PhysicalMemory):
|
|
|
|
type = 'DRAMMemory'
|
|
|
|
# Many of these should be observed from the configuration
|
|
|
|
cpu_ratio = Param.Int(5,"ratio between CPU speed and memory bus speed")
|
|
|
|
mem_type = Param.String("SDRAM", "Type of DRAM (DRDRAM, SDRAM)")
|
|
|
|
mem_actpolicy = Param.String("open", "Open/Close policy")
|
|
|
|
memctrladdr_type = Param.String("interleaved", "Mapping interleaved or direct")
|
|
|
|
bus_width = Param.Int(16, "")
|
|
|
|
act_lat = Param.Int(2, "RAS to CAS delay")
|
|
|
|
cas_lat = Param.Int(1, "CAS delay")
|
|
|
|
war_lat = Param.Int(2, "write after read delay")
|
|
|
|
pre_lat = Param.Int(2, "precharge delay")
|
|
|
|
dpl_lat = Param.Int(2, "data in to precharge delay")
|
|
|
|
trc_lat = Param.Int(6, "row cycle delay")
|
|
|
|
num_banks = Param.Int(4, "Number of Banks")
|
|
|
|
num_cpus = Param.Int(4, "Number of CPUs connected to DRAM")
|
|
|
|
|