fs_bigLITTLE.py (12166:1e88ad5f1a47) | fs_bigLITTLE.py (12476:a891137813ec) |
---|---|
1# Copyright (c) 2016-2017 ARM Limited 2# All rights reserved. 3# 4# The license below extends only to copyright in the software and shall 5# not be construed as granting a license to any other intellectual 6# property including but not limited to intellectual property relating 7# to a hardware implementation of the functionality of the software 8# licensed hereunder. You may use the software subject to the license --- 43 unchanged lines hidden (view full) --- 52from common import SysPaths 53from common import CpuConfig 54from common.cores.arm import ex5_big, ex5_LITTLE 55 56import devices 57from devices import AtomicCluster, KvmCluster 58 59 | 1# Copyright (c) 2016-2017 ARM Limited 2# All rights reserved. 3# 4# The license below extends only to copyright in the software and shall 5# not be construed as granting a license to any other intellectual 6# property including but not limited to intellectual property relating 7# to a hardware implementation of the functionality of the software 8# licensed hereunder. You may use the software subject to the license --- 43 unchanged lines hidden (view full) --- 52from common import SysPaths 53from common import CpuConfig 54from common.cores.arm import ex5_big, ex5_LITTLE 55 56import devices 57from devices import AtomicCluster, KvmCluster 58 59 |
60default_dtb = 'armv8_gem5_v1_big_little_2_2.dtb' | |
61default_kernel = 'vmlinux4.3.aarch64' 62default_disk = 'aarch64-ubuntu-trusty-headless.img' 63default_rcs = 'bootscript.rcS' 64 65default_mem_size= "2GB" 66 67def _to_ticks(value): 68 """Helper function to convert a latency from string format to Ticks""" --- 79 unchanged lines hidden (view full) --- 148# Only add the KVM CPU if it has been compiled into gem5 149if devices.have_kvm: 150 cpu_types["kvm"] = (KvmCluster, KvmCluster) 151 152 153def addOptions(parser): 154 parser.add_argument("--restore-from", type=str, default=None, 155 help="Restore from checkpoint") | 60default_kernel = 'vmlinux4.3.aarch64' 61default_disk = 'aarch64-ubuntu-trusty-headless.img' 62default_rcs = 'bootscript.rcS' 63 64default_mem_size= "2GB" 65 66def _to_ticks(value): 67 """Helper function to convert a latency from string format to Ticks""" --- 79 unchanged lines hidden (view full) --- 147# Only add the KVM CPU if it has been compiled into gem5 148if devices.have_kvm: 149 cpu_types["kvm"] = (KvmCluster, KvmCluster) 150 151 152def addOptions(parser): 153 parser.add_argument("--restore-from", type=str, default=None, 154 help="Restore from checkpoint") |
156 parser.add_argument("--dtb", type=str, default=default_dtb, | 155 parser.add_argument("--dtb", type=str, default=None, |
157 help="DTB file to load") 158 parser.add_argument("--kernel", type=str, default=default_kernel, 159 help="Linux kernel") 160 parser.add_argument("--disk", action="append", type=str, default=[], 161 help="Disks to instantiate") 162 parser.add_argument("--bootscript", type=str, default=default_rcs, 163 help="Linux bootscript") 164 parser.add_argument("--cpu-type", type=str, choices=cpu_types.keys(), --- 79 unchanged lines hidden (view full) --- 244 if options.little_cpus > 0 and system.littleCluster.requireCaches(): 245 m5.util.panic("Little CPU model requires caches") 246 247 # Create a KVM VM and do KVM-specific configuration 248 if issubclass(big_model, KvmCluster): 249 _build_kvm(system, all_cpus) 250 251 # Linux device tree | 156 help="DTB file to load") 157 parser.add_argument("--kernel", type=str, default=default_kernel, 158 help="Linux kernel") 159 parser.add_argument("--disk", action="append", type=str, default=[], 160 help="Disks to instantiate") 161 parser.add_argument("--bootscript", type=str, default=default_rcs, 162 help="Linux bootscript") 163 parser.add_argument("--cpu-type", type=str, choices=cpu_types.keys(), --- 79 unchanged lines hidden (view full) --- 243 if options.little_cpus > 0 and system.littleCluster.requireCaches(): 244 m5.util.panic("Little CPU model requires caches") 245 246 # Create a KVM VM and do KVM-specific configuration 247 if issubclass(big_model, KvmCluster): 248 _build_kvm(system, all_cpus) 249 250 # Linux device tree |
252 system.dtb_filename = SysPaths.binary(options.dtb) | 251 if options.dtb is not None: 252 system.dtb_filename = SysPaths.binary(options.dtb) 253 else: 254 def create_dtb_for_system(system, filename): 255 state = FdtState(addr_cells=2, size_cells=2, cpu_cells=1) 256 rootNode = system.generateDeviceTree(state) |
253 | 257 |
258 fdt = Fdt() 259 fdt.add_rootnode(rootNode) 260 dtb_filename = os.path.join(m5.options.outdir, filename) 261 return fdt.writeDtbFile(dtb_filename) 262 263 system.dtb_filename = create_dtb_for_system(system, 'system.dtb') 264 |
|
254 return root 255 256def _build_kvm(system, cpus): 257 system.kvm_vm = KvmVM() 258 259 # Assign KVM CPUs to their own event queues / threads. This 260 # has to be done after creating caches and other child objects 261 # since these mustn't inherit the CPU event queue. --- 64 unchanged lines hidden --- | 265 return root 266 267def _build_kvm(system, cpus): 268 system.kvm_vm = KvmVM() 269 270 # Assign KVM CPUs to their own event queues / threads. This 271 # has to be done after creating caches and other child objects 272 # since these mustn't inherit the CPU event queue. --- 64 unchanged lines hidden --- |