Can anyone please tell me the difference between config scripts for coherence protocols present in configs/ruby vs. those that are used by simple_ruby.py? For example, ruby_caches_MI_example.py can be used by simple_ruby.py to simulate a simple MI protocol. However, configs/ruby/MI_example.py is also present (which I don't know how to use). As far as I can see, they are quite different in terms of class hierarchy (for eg. one sets up a MyCacheSystem whereas the other defines two functions define_options and create_system). Also, in one L1Cache inherits from RubyCache whereas the other inherits from L1Cache_Controller. Any clarification would be appreciated.
My main goal is to use and understand how the ruby testing framework scripts work with different coherence protocols (ruby_random_test, ruby_test, ruby_direct_test). Any help would be appreciated!
Thanks and Regards,
When configuring more complex systems, the python run-script tends to spread over several to many .py files. In case of Ruby, each protocol PROT has a main configuration file: configs/ruby/PROT.py. (It can then use other files like CHI that has CHI.py as its configuration entry point and CHI_config.py imported by CHI.py).
The main entry point to these scripts is configs/ruby/Ruby.py, specifically the create_system function. The bloc starting with
protocol = buildEnv['PROTOCOL'] is where the magic happens to import the correct PROT.py file.
Then, from your top configuration file:
from ruby import Ruby
Et voilà! You have plenty of examples in configs/example/ruby_XXX_test.py