Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gem5 Support #1243

Open
ShvetankPrakash opened this issue Nov 14, 2023 · 3 comments
Open

Gem5 Support #1243

ShvetankPrakash opened this issue Nov 14, 2023 · 3 comments
Labels

Comments

@ShvetankPrakash
Copy link

ShvetankPrakash commented Nov 14, 2023

Hello!

I was wondering if WA integration with Gem5 is still supported:
http://old.gem5.org/wiki/images/b/b8/Summit2017_wa_devlib.pdf

And if so would you be able to point me to a link where it outlines how to get this setup so I can run the workloads using Gem5.

Thank you so much!

@marcbonnici
Copy link
Contributor

Hi Shvetank,

WA and devlib technically still have support for the Gem5 platform, however as far as I'm aware this has not been exercised in a few years and therefore I do not expect this functionality to work out of the box today.

Unfortunately I think the old documentation you've found is probably still the most update to date guide we have available so depending on what your overall aim is, there are few options that we could suggest:

  1. Pick up the old version of WA that is more inline with when that guidance was written, this would likely be the path of least resistance to getting "something" running, however may miss out of some later features or workloads.

  2. Pick up a slightly older version of WA/Devlib so it includes more of the recent changes and other fixes that have been added but may still have some incompatibilities that could required digging into.

  3. Pick up that latest versions which I suspect could require a fair bit of work to adapt the Gem5 target to some changes that have been made recently to improve the performance / flexibility of other connections (SSH/ADB) that could cause compatibility issues.

We'd be happy to try and provide some further pointers to you if you wanted to peruse any of these options so please let us know if any of these sound of interest to you.

Thanks.

@Sticklyman1936
Copy link
Contributor

Hi Shvetank,

Just to build on what Marc has said above:

The (old) documentation on gem5.org (http://old.gem5.org/WA-gem5.html) includes a gem5 patch to add a parameter to pass the directory to be mapped into the gem5 simulation to some of the gem5 run scripts. This directory is the one mapped into the simulation using VirtIO 9P, and it is used for transferring files into or out of the simulated system when running with WA or devlib. For example, this is used to copy workloads into the system prior to executing them.

The gem5 patch in the old documentation is no longer required if you use a modern gem5, as this function has now been merged (see gem5/gem5@55c5b66). This commit added the interface to configs/example/arm/fs_bigLITTLE.py. However, the parameter name itself has changed - the command line parameter is now --vio-9p=/path/to/folder, as opposed to --workload-automation-vio=/path/to/folder. Hence, you'll want an agenda that looks similar to the following (untested!):

config:
    device: gem5_linux
    device_config:
        gem5_args: "configs/example/arm/fs_bigLITTLE.py"
        gem5_vio_args: "--vio-9p={}"
        username: root
        temp_dir: "/tmp"
        checkpoint: True
        run_delay: 10
    reboot_policy: never
    result_processors: [~sqlite]
    instrumentation: [~cpufreq]

workloads:
  - id: dhrystone
    workload_name: dhrystone
    iterations: 1

If you try it, please let us know how it goes :)

@douglas-raillard-arm
Copy link
Contributor

@Sticklyman1936 There has been a fair amount of change in the core of devlib over the past few years, and while I tried to keep the code working (based on eyeballing it), I think it's extremely likely that you will face some bugs (at least typos). On top of that, you might also face bugs that have been solved for all the other connection types.

Maybe that's irrelevant since I never used GEM5, but if you can make just make GEM5 run an SSH server and use a regular linux target, I would strongly advise doing so. You can setup a very minimal server, and even have the userspace built in a kernel image quite easily using buildroot (15-30 MB), as we do for some dev boards when using LISA:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants