config: Remove redundant explicit setting of default clocks
This patch removes the explicit setting of the clock period for certain instances of CoherentBus, NonCoherentBus and IOCache where the specified clock is same as the default value of the system clock. As all the values used are the defaults, there are no performance changes. There are similar cases where the toL2Bus is set to use the parent CPU clock which is already the default behaviour. The main motivation for these simplifications is to ease the introduction of clock domains.
This commit is contained in:
parent
f821c5472b
commit
7eccb1b779
9 changed files with 11 additions and 16 deletions
|
@ -134,8 +134,8 @@ if is_kvm_cpu(TestCPUClass) or is_kvm_cpu(FutureClass):
|
||||||
test_sys.vm = KvmVM()
|
test_sys.vm = KvmVM()
|
||||||
|
|
||||||
if options.caches or options.l2cache:
|
if options.caches or options.l2cache:
|
||||||
test_sys.iocache = IOCache(clock = '1GHz',
|
# By default the IOCache runs at the system clock
|
||||||
addr_ranges = test_sys.mem_ranges)
|
test_sys.iocache = IOCache(addr_ranges = test_sys.mem_ranges)
|
||||||
test_sys.iocache.cpu_side = test_sys.iobus.master
|
test_sys.iocache.cpu_side = test_sys.iobus.master
|
||||||
test_sys.iocache.mem_side = test_sys.membus.slave
|
test_sys.iocache.mem_side = test_sys.membus.slave
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -281,10 +281,10 @@ class BaseCPU(MemObject):
|
||||||
|
|
||||||
def addTwoLevelCacheHierarchy(self, ic, dc, l2c, iwc = None, dwc = None):
|
def addTwoLevelCacheHierarchy(self, ic, dc, l2c, iwc = None, dwc = None):
|
||||||
self.addPrivateSplitL1Caches(ic, dc, iwc, dwc)
|
self.addPrivateSplitL1Caches(ic, dc, iwc, dwc)
|
||||||
# Override the default bus clock of 1 GHz and uses the CPU
|
# Set a width of 32 bytes (256-bits), which is four times that
|
||||||
# clock for the L1-to-L2 bus, and also set a width of 32 bytes
|
# of the default bus. The clock of the CPU is inherited by
|
||||||
# (256-bits), which is four times that of the default bus.
|
# default.
|
||||||
self.toL2Bus = CoherentBus(clock = Parent.clock, width = 32)
|
self.toL2Bus = CoherentBus(width = 32)
|
||||||
self.connectCachedPorts(self.toL2Bus)
|
self.connectCachedPorts(self.toL2Bus)
|
||||||
self.l2cache = l2c
|
self.l2cache = l2c
|
||||||
self.toL2Bus.master = self.l2cache.cpu_side
|
self.toL2Bus.master = self.l2cache.cpu_side
|
||||||
|
|
|
@ -53,8 +53,6 @@ class CopyEngine(PciDevice):
|
||||||
ChanCnt = Param.UInt8(4, "Number of DMA channels that exist on device")
|
ChanCnt = Param.UInt8(4, "Number of DMA channels that exist on device")
|
||||||
XferCap = Param.MemorySize('4kB', "Number of bits of transfer size that are supported")
|
XferCap = Param.MemorySize('4kB', "Number of bits of transfer size that are supported")
|
||||||
|
|
||||||
# Override the default clock
|
|
||||||
clock = '500MHz'
|
|
||||||
latBeforeBegin = Param.Latency('20ns', "Latency after a DMA command is seen before it's proccessed")
|
latBeforeBegin = Param.Latency('20ns', "Latency after a DMA command is seen before it's proccessed")
|
||||||
latAfterCompletion = Param.Latency('20ns', "Latency after a DMA command is complete before it's reported as such")
|
latAfterCompletion = Param.Latency('20ns', "Latency after a DMA command is complete before it's reported as such")
|
||||||
|
|
||||||
|
|
|
@ -118,8 +118,6 @@ class CpuLocalTimer(BasicPioDevice):
|
||||||
gic = Param.BaseGic(Parent.any, "Gic to use for interrupting")
|
gic = Param.BaseGic(Parent.any, "Gic to use for interrupting")
|
||||||
int_num_timer = Param.UInt32("Interrrupt number used per-cpu to GIC")
|
int_num_timer = Param.UInt32("Interrrupt number used per-cpu to GIC")
|
||||||
int_num_watchdog = Param.UInt32("Interrupt number for per-cpu watchdog to GIC")
|
int_num_watchdog = Param.UInt32("Interrupt number for per-cpu watchdog to GIC")
|
||||||
# Override the default clock
|
|
||||||
clock = '1GHz'
|
|
||||||
|
|
||||||
class PL031(AmbaIntDevice):
|
class PL031(AmbaIntDevice):
|
||||||
type = 'PL031'
|
type = 'PL031'
|
||||||
|
|
|
@ -36,7 +36,6 @@ class RubySystem(ClockedObject):
|
||||||
random_seed = Param.Int(1234, "random seed used by the simulation");
|
random_seed = Param.Int(1234, "random seed used by the simulation");
|
||||||
randomization = Param.Bool(False,
|
randomization = Param.Bool(False,
|
||||||
"insert random delays on message enqueue times");
|
"insert random delays on message enqueue times");
|
||||||
clock = '1GHz'
|
|
||||||
block_size_bytes = Param.UInt32(64,
|
block_size_bytes = Param.UInt32(64,
|
||||||
"default cache block size; must be a power of two");
|
"default cache block size; must be a power of two");
|
||||||
mem_size = Param.MemorySize("total memory size of the system");
|
mem_size = Param.MemorySize("total memory size of the system");
|
||||||
|
|
|
@ -161,8 +161,8 @@ class BaseFSSystem(BaseSystem):
|
||||||
def init_system(self, system):
|
def init_system(self, system):
|
||||||
BaseSystem.init_system(self, system)
|
BaseSystem.init_system(self, system)
|
||||||
|
|
||||||
#create the iocache
|
# create the iocache, which by default runs at the system clock
|
||||||
system.iocache = IOCache(clock='1GHz', addr_ranges=system.mem_ranges)
|
system.iocache = IOCache(addr_ranges=system.mem_ranges)
|
||||||
system.iocache.cpu_side = system.iobus.master
|
system.iocache.cpu_side = system.iobus.master
|
||||||
system.iocache.mem_side = system.membus.slave
|
system.iocache.mem_side = system.membus.slave
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@ cpus = [ MemTest(clock = '2GHz') for i in xrange(nb_cores) ]
|
||||||
system = System(cpu = cpus, funcmem = SimpleMemory(in_addr_map = False),
|
system = System(cpu = cpus, funcmem = SimpleMemory(in_addr_map = False),
|
||||||
funcbus = NoncoherentBus(),
|
funcbus = NoncoherentBus(),
|
||||||
physmem = SimpleMemory(),
|
physmem = SimpleMemory(),
|
||||||
membus = CoherentBus(clock="1GHz", width=16))
|
membus = CoherentBus(width=16))
|
||||||
|
|
||||||
# l2cache & bus
|
# l2cache & bus
|
||||||
system.toL2Bus = CoherentBus(clock="2GHz", width=16)
|
system.toL2Bus = CoherentBus(clock="2GHz", width=16)
|
||||||
|
|
|
@ -49,7 +49,7 @@ cpu = TrafficGen(config_file = "tests/quick/se/70.tgen/tgen-simple-dram.cfg")
|
||||||
|
|
||||||
# system simulated
|
# system simulated
|
||||||
system = System(cpu = cpu, physmem = DDR3_1600_x64(),
|
system = System(cpu = cpu, physmem = DDR3_1600_x64(),
|
||||||
membus = NoncoherentBus(clock="1GHz", width = 16))
|
membus = NoncoherentBus(width = 16))
|
||||||
|
|
||||||
# add a communication monitor
|
# add a communication monitor
|
||||||
system.monitor = CommMonitor()
|
system.monitor = CommMonitor()
|
||||||
|
|
|
@ -49,7 +49,7 @@ cpu = TrafficGen(config_file = "tests/quick/se/70.tgen/tgen-simple-mem.cfg")
|
||||||
|
|
||||||
# system simulated
|
# system simulated
|
||||||
system = System(cpu = cpu, physmem = SimpleMemory(),
|
system = System(cpu = cpu, physmem = SimpleMemory(),
|
||||||
membus = NoncoherentBus(clock="1GHz", width = 16))
|
membus = NoncoherentBus(width = 16))
|
||||||
|
|
||||||
# add a communication monitor, and also trace all the packets
|
# add a communication monitor, and also trace all the packets
|
||||||
system.monitor = CommMonitor(trace_file = "monitor.ptrc.gz")
|
system.monitor = CommMonitor(trace_file = "monitor.ptrc.gz")
|
||||||
|
|
Loading…
Reference in a new issue