diff --git a/README.adoc b/README.adoc index 2a0d781..f6d17fa 100644 --- a/README.adoc +++ b/README.adoc @@ -1913,6 +1913,25 @@ Pass options to the `gem5` executable itself: ./run -G '-h' -g .... +===== Run multiple GEM5 instances at once + +GEM5 just assigns new ports if some ports are occupied, so we can do: + +.... +./run -g +# Same as ./gem5-shell 0 +./gem5-shell +.... + +And a second instance: + +.... +./run -g +./gem5-shell 1 +.... + +TODO Now we just need to network them up to have some more fun! + ===== QEMU and GEM5 with the same kernel configuration We would like to be able to run both GEM5 and QEMU with the same kernel build to avoid duplication, but TODO we haven't been able to get that working yet. diff --git a/gem5-shell b/gem5-shell index 7150b8b..49d123a 100755 --- a/gem5-shell +++ b/gem5-shell @@ -1,2 +1,4 @@ #!/usr/bin/env bash -telnet localhost "${1:-3456}" +offset="${1:-0}" +base=3456 +telnet localhost $(("$base" + "$offset"))