On 6/14/2023 11:30 AM, Derek Christ wrote:
Hello Eliot Moss, [one ell please]
a shared Python file with parameter settings sounds useful.
What I meant with running gem5 without the gem5 executable was to use the compiled library directly from the Python configuration script.
From what I have seen, the gem5 executable sets up some internal state and then directly calls the embedded Python interpreter to launch the user-provided script.
But as I see it there is no technical reason why it shouldn't be possible to call this setup routine directly from Python. This would reduce the complexity to only one single Python script.
Well, there may remain value to having a standard setup/run script that invokes a user supplied script. It helps keep gem5 per se separate from the user's setup / configuration - a principle of modularity. A quick look at main.cc suggests you may be right that this *could* be done, though I have no idea what those various setup functions do and whether any of that would be hard to do from python. What I suppose I am missing is the motivation - why such a change would be substantially better. My applications tend to be quite complex and I find I need the layers of script, for various reasons. Maybe this has more to do with preference to write in python vs bash scripts vs C++ code. gem5 is not currently packaged as a library, I don't think, though I suppose it could be. Given the amount of existing projects and infrastructure, one would need to continue to support the current way of doing things as well. This might further complicate the system and its maintenance - one hopes by not very much. HTH - EM _______________________________________________ gem5-users mailing list -- gem5-users@gem5.org To unsubscribe send an email to gem5-users-le...@gem5.org