mem-ruby,scons: Add scons option for multiple protocols
This change does many things, but they must all be atomically done. **USER FACING CHANGE**: The Ruby protocols in Kconfig have changed names (they are now the same case as the SLICC file names). So, after this commit, your build configurations need to be updated. You can do so by running `scons menuconfig <build dir>` and selecting the right ruby options. Alternatively, if you're using a `build_opts` file, you can run `scons defconfig build/<ISA> build_opts/<ISA>` which should update your config correctly. Detailed changes are described below. Kconfig changes: - Kconfig files in ruby now must all be declared in the ruby/Kconfig file - All of the protocol names are changed to match their slicc file names including the case - A new option is available called "Use multiple protocols" which should be selected if multiple protocols are selected. This is only used to set the PROTOCOL variable to "MULTIPLE" when in multiple mode. - The PROTOCOL variable can now be "MULTIPLE" which means it will be ignored. If it's not "MULTIPLE" then it holds the "main" protocol, which is necessary for backwards compatibility with the Ruby.py files. Ruby config changes: To make this change backwards compatible with Ruby.py, this change adds a new "protocol" config called MULTIPLE.py which is used to allow the user to set a "--protocol" option on the command line. This is only needed if you are using a gem5 binary with multiple protocols but need to use Ruby.py. stdlib changes: - Make the coherence protocol file behave like the ISA file - Add a function to get the coherence protocol from the `CacheHierarchy` like we do with the ISA in the `Processor`. - Use this function where `get_runtime_coherence_protocol` was used - Update the requires code to work with the ne CoherenceProtocol - Fix a typo in the AMD Hammer name and also add the missing MSI protocol Scons changes: - In Ruby we now gather up all of the protocols and build them all if there are multiple protocols - There's some bending over backwards to tell the user if they are using an out of date gem5.build/config file and how to update it - Note that multiple ruby protocols adds a significant amount of time to the build since we have to run slicc twice for each file. build_opts: - Update all files with new names - Add a new NULL_All_Ruby that will be used for testing Signed-off-by: Jason Lowe-Power <jason@lowepower.com>
This commit is contained in:
committed by
Bobby R. Bruce
parent
9a904478eb
commit
97542c1a4c
@@ -42,7 +42,6 @@ from gem5.components.processors.cpu_types import (
|
||||
from gem5.components.processors.simple_processor import SimpleProcessor
|
||||
from gem5.isas import ISA
|
||||
from gem5.resources.resource import obtain_resource
|
||||
from gem5.runtime import get_runtime_coherence_protocol
|
||||
from gem5.simulate.simulator import Simulator
|
||||
from gem5.utils.requires import requires
|
||||
|
||||
@@ -196,7 +195,9 @@ motherboard.set_workload(workload)
|
||||
# Begin running of the simulation. This will exit once the Linux system boot
|
||||
# is complete.
|
||||
print("Running with ISA: " + processor.get_isa().name)
|
||||
print("Running with protocol: " + get_runtime_coherence_protocol().name)
|
||||
print(
|
||||
"Running with protocol: " + cache_hierarchy.get_coherence_protocol().name
|
||||
)
|
||||
print()
|
||||
|
||||
print("Beginning simulation!")
|
||||
|
||||
Reference in New Issue
Block a user