diff options
author | Akash Bagdia <akash.bagdia@arm.com> | 2013-06-27 05:49:49 -0400 |
---|---|---|
committer | Akash Bagdia <akash.bagdia@arm.com> | 2013-06-27 05:49:49 -0400 |
commit | 076d04a653f5a4252c6c16e010ad0d7bf36c1674 (patch) | |
tree | 1be09e01ab286960ae6fcd5d767bfb0e10270ec2 /configs/example | |
parent | 4459b305251109ff147d72142452e25c74542ebd (diff) | |
download | gem5-076d04a653f5a4252c6c16e010ad0d7bf36c1674.tar.xz |
config: Add a system clock command-line option
This patch adds a 'sys_clock' command-line option and use it to assign
clocks to the system during instantiation.
As part of this change, the default clock in the System class is
removed and whenever a system is instantiated a system clock value
must be set. A default value is provided for the command-line option.
The configs and tests are updated accordingly.
Diffstat (limited to 'configs/example')
-rw-r--r-- | configs/example/fs.py | 4 | ||||
-rw-r--r-- | configs/example/memtest.py | 1 | ||||
-rw-r--r-- | configs/example/ruby_direct_test.py | 2 | ||||
-rw-r--r-- | configs/example/ruby_fs.py | 2 | ||||
-rw-r--r-- | configs/example/ruby_mem_test.py | 1 | ||||
-rw-r--r-- | configs/example/ruby_network_test.py | 1 | ||||
-rw-r--r-- | configs/example/ruby_random_test.py | 1 | ||||
-rw-r--r-- | configs/example/se.py | 1 |
8 files changed, 12 insertions, 1 deletions
diff --git a/configs/example/fs.py b/configs/example/fs.py index 31106cba7..cbcacd6d4 100644 --- a/configs/example/fs.py +++ b/configs/example/fs.py @@ -120,6 +120,8 @@ elif buildEnv['TARGET_ISA'] == "arm": else: fatal("Incapable of building %s full system!", buildEnv['TARGET_ISA']) +test_sys.clock = options.sys_clock + if options.kernel is not None: test_sys.kernel = binary(options.kernel) @@ -172,6 +174,8 @@ if len(bm) == 2: drive_sys = makeArmSystem(drive_mem_mode, options.machine_type, DriveMemClass, bm[1]) + drive_sys.clock = options.sys_clock + drive_sys.cpu = DriveCPUClass(cpu_id=0) drive_sys.cpu.createThreads() drive_sys.cpu.createInterruptController() diff --git a/configs/example/memtest.py b/configs/example/memtest.py index b29a612e9..e8dc52fb5 100644 --- a/configs/example/memtest.py +++ b/configs/example/memtest.py @@ -144,6 +144,7 @@ for scale in treespec[:-2]: system = System(funcmem = SimpleMemory(in_addr_map = False), funcbus = NoncoherentBus(), physmem = SimpleMemory(latency = "100ns")) +system.clock = options.sys_clock def make_level(spec, prototypes, attach_obj, attach_port): fanout = spec[0] diff --git a/configs/example/ruby_direct_test.py b/configs/example/ruby_direct_test.py index 170e774dc..a60725230 100644 --- a/configs/example/ruby_direct_test.py +++ b/configs/example/ruby_direct_test.py @@ -93,7 +93,7 @@ else: # M5 memory size == Ruby memory size checks # system = System(physmem = SimpleMemory()) - +system.clock = options.sys_clock # # Create the ruby random tester # diff --git a/configs/example/ruby_fs.py b/configs/example/ruby_fs.py index e6239caf4..403e55584 100644 --- a/configs/example/ruby_fs.py +++ b/configs/example/ruby_fs.py @@ -93,6 +93,8 @@ elif buildEnv['TARGET_ISA'] == "x86": else: fatal("incapable of building non-alpha or non-x86 full system!") +system.clock = options.sys_clock + if options.kernel is not None: system.kernel = binary(options.kernel) diff --git a/configs/example/ruby_mem_test.py b/configs/example/ruby_mem_test.py index 1d3e20412..14db9d40b 100644 --- a/configs/example/ruby_mem_test.py +++ b/configs/example/ruby_mem_test.py @@ -108,6 +108,7 @@ system = System(cpu = cpus, funcmem = SimpleMemory(in_addr_map = False), funcbus = NoncoherentBus(), physmem = SimpleMemory()) +system.clock = options.sys_clock if options.num_dmas > 0: dmas = [ MemTest(atomic = False, diff --git a/configs/example/ruby_network_test.py b/configs/example/ruby_network_test.py index 58e8b2e40..74bdd5504 100644 --- a/configs/example/ruby_network_test.py +++ b/configs/example/ruby_network_test.py @@ -105,6 +105,7 @@ cpus = [ NetworkTest(fixed_pkts=options.fixed_pkts, # create the desired simulated system system = System(cpu = cpus, physmem = SimpleMemory()) +system.clock = options.sys_clock Ruby.create_system(options, system) diff --git a/configs/example/ruby_random_test.py b/configs/example/ruby_random_test.py index 3f6bd72e2..646863e88 100644 --- a/configs/example/ruby_random_test.py +++ b/configs/example/ruby_random_test.py @@ -98,6 +98,7 @@ tester = RubyTester(check_flush = check_flush, # M5 memory size == Ruby memory size checks # system = System(tester = tester, physmem = SimpleMemory()) +system.clock = options.sys_clock Ruby.create_system(options, system) diff --git a/configs/example/se.py b/configs/example/se.py index 000390080..3ff3f0c7d 100644 --- a/configs/example/se.py +++ b/configs/example/se.py @@ -160,6 +160,7 @@ np = options.num_cpus system = System(cpu = [CPUClass(cpu_id=i) for i in xrange(np)], physmem = MemClass(range=AddrRange("512MB")), mem_mode = test_mem_mode) +system.clock = options.sys_clock # Sanity check if options.fastmem: |