util: Force the m5 utility to be built using c++14.
[gem5.git] / util / m5 / README.md
index f1d9bece3cb79e01d4f195476ee81ebf9beedb1b..cbdff1d12f795232814125ea7b5aa82ec55c48e4 100644 (file)
@@ -93,7 +93,7 @@ first identify what ABI(s) you're targetting.
 
    ABI   | Description  | Triggers
 ---------|--------------|----------
- aarch64 | 64 bit ARM   | instruction, adddress, semihosting
+ arm64   | 64 bit ARM   | instruction, adddress, semihosting
  arm     | 32 bit ARM   | instruction
  thumb   | ARM thumb    | instruction
  sparc   | 64 bit SPARC | instruction
@@ -161,7 +161,7 @@ scons x86.CROSS_COMPILE=x86_64-linux-gnu- build/x86/out/m5
 
    ABI   | QEMU_ARCH |     CROSS_COMPILE
 ---------|-----------|---------------------
- aarch64 | aarch64   | aarch64-linux-gnu-
+ arm64   | aarch64   | aarch64-linux-gnu-
  arm     | arm       | arm-linux-gnueabihf-
  thumb   | arm       | arm-linux-gnueabihf-
  sparc   | sparc64   | sparc64-linux-gnu-
@@ -175,6 +175,8 @@ some other prefix corresponding to that host.
 ### SCons command line flags
 
 --debug-build: Compile with the -g option, and -O0.
+--run-tests:   Allow the test result XML files to be build targets.
+--verbose:     Show build command lines and full command output.
 
 ## External dependency detection
 
@@ -221,6 +223,10 @@ will catch attempts to use them and verify that they were used correctly. When
 running these tests under gem5, set the RUNNING_IN_GEM5 environment variable
 which will tell the test to expect the trigger mechanism to actually work.
 
+A junit test exists for the Java jar, in a file named 'OpsTest.java'. That test
+can be run on its own through its own main function, or through the junit
+framework.
+
 
 
 # Command line utility
@@ -243,7 +249,7 @@ varies based on the ABI.
 
    ABI   | Default call type
 ---------|-------------------
- aarch64 | instruction
+ arm64   | instruction
  arm     | instruction
  thumb   | instruction
  sparc   | instruction
@@ -339,20 +345,35 @@ library only if that trigger mechanism is supported for that ABI.
 
 # Java jar
 
-To use the gem5 java jar, you will need to load the corresponding .so.
+In your java source, import the gem5Op class.
 
-```shell
-System.loadLibrary("gem5OpJni");
+```java
+import gem5.Ops
 ```
 
-In your java source, import the gem5Op class which will have methods for
-calling each of the gem5 operations.
+This class provides a static map named callTypes which map from each of the
+call type names ("addr", "inst", or "semi") to an Ops instance. That instance
+will provide a set of methods which trigger each of the gem5 operations using
+the requested trigger mechanism. The call type "default" maps to whatever the
+default call type is for the current ABI.
 
 ```shell
-import jni.gem5Op
+gem5.Ops gem5_ops = gem5.Ops.callTypes.get("default");
+long sum = gem5_ops.sum(1, 2, 3, 4, 5, 6);
 ```
 
-These methods will all use the magic instruction based trigger mechanism.
+To configure the address based trigger mechanism, you can use these static
+methods.
+
+void setAddr(long addr);
+Set the address for the "magic" address region.
+
+void mapMem();
+Map the "magic" physical address region into the process' address space, likely
+by mmapping the "/dev/mem" device file.
+
+void unmapMem();
+Unmap the "magic" physical address region that was previously mapped.