This patch updates the FileSystemConfig so it works with more kinds of config scripts (e.g., the Learning gem5 scripts). There are 4 main changes: - Added system as a parameter to the config_filesystem function so the function can search the system for the number of CPUs instead of relying on options from Options.py - Instead of calling redirect_paths everywhere config_filesystem is used, now it is implicitly called. - Cleaned up the Ruby scripts a bit to remove redundant calls to config_filesystem - Added a config_filesystem call to the Ruby Learning gem5 script (currently the only Learning gem5 script that requires it). In the future, I think it would be better to move the config_filesystem call into simulate.py, probably into the instantiate function. I tried to use the per-CPU configuration parameters instead of options from Options.py, but that's not possible until after the SimObject params have been finalized in instantiate. Change-Id: Ie6501a7435cfb3ac9d2b45be3722388b34063b1e Signed-off-by: Jason Lowe-Power <jason@lowepower.com> Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/18848 Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br> Tested-by: kokoro <noreply+kokoro@google.com>
Learning_gem README ------------------- This directory contains the configuration scripts used in the "Learning gem5" book. The scripts contained in these directories are for educational purposes only and should not be used for architectural research as-is. "Learning gem5" is a work-in-progress book that is frequently updated. For the most up-to-date version of the book, see the website. http://learning.gem5.org/book/ This directory is broken into one subdirectory per part of the book. If you would like to contribute (please do!) the code for the Learning gem5 book is hosted on GitHub. https://github.com/powerjg/learning_gem5 Goals of these scripts ~~~~~~~~~~~~~~~~~~~~~~ These scripts are not necessarily useful outside the scope of the Learning gem5 book. The goal is to include the learning gem5 scripts, following the book as closely as possible, so that the regression tester will catch any changes that affect the book. For general users, these are *not* good scripts to use for running complex architectural experiments. These scripts *are* a good starting point example of how to write your own scripts for experiments. Feedback ~~~~~~~~ Send mail to jason@lowepower.com to provide feedback.