DRAMSys_gem5 functional examples, essential files and doc

This commit intends to provide functional examples and doc.
This commit is contained in:
Éder F. Zulian
2018-08-30 12:57:59 +02:00
parent 0ae7eb842e
commit b0343beac1
13 changed files with 3163 additions and 0 deletions

View File

@@ -1547,6 +1547,50 @@ Lets run the simulation for some seconds and then stop the simulation with
**CTRL-C**. Observe the output of the simulation in the trace analyzer. The trace
database file is stored in the gem5 directory in the building directory.
### Gem5 SE mode and DRAMSys
All essential files for some functional examples are provided.
Execute a hello world application:
``` bash
./DRAMSys_gem5 /home/eder/repos/dram.vp.system/DRAMSys/library/resources/simulations/ddr3-gem5-se.xml ../../DRAMSys/gem5/configs/hello.ini
```
A **Hello world!** message should be printed to the standard output.
Execute a bubble sort application:
``` bash
./DRAMSys_gem5 /home/eder/repos/dram.vp.system/DRAMSys/library/resources/simulations/ddr3-gem5-se.xml ../../DRAMSys/gem5/configs/bubblesort.ini
```
Wait some minutes for the bubble sort application to finish.
The hello application binary was copied from gem5 repository. The bubble sort application was obtained with [gem5.TnT](https://github.com/tukl-msd/gem5.TnT).
Command template for generating **.ini** configuration files follows:
``` bash
build/ARM/gem5.opt configs/example/se.py -c <application> --mem-size=512MB --mem-channels=1 --caches --l2cache --mem-type=SimpleMemory --cpu-type=TimingSimpleCPU --num-cpu=1 --tlm-memory=transactor
```
An overview of the architcture being simulated is presented below:
![arch](DRAMSys/docs/images/gem5_se_mode_arch.png)
Note: this is a gem5 generated file, therefore DRAMSys is omitted. DRAMSys is
direct connected as external tlm slave.
Note: workaround in se.py required:
```
...
if options.tlm_memory:
system.physmem = SimpleMemory()
MemConfig.config_mem(options, system)
...
```
### Boot Linux with gem5 and DRAMSys
The procedure is very similar to the traffic generator example above.
@@ -1607,6 +1651,29 @@ Then start DRAMSys_gem5 with the following command:
For further sophisticated address mappings or scenarios checkout the file DRAMSys/gem5/main.cpp
All essential files for a functional example are provided.
Unzip the disk image:
``` bash
tar -xaf DRAMSys/gem5/boot_linux/linux-aarch32-ael.img.tar.gz -C DRAMSys/gem5/boot_linux/
```
Execute the example:
``` bash
./DRAMSys_gem5 ../../DRAMSys/library/resources/simulations/ddr3-boot-linux.xml ../../DRAMSys/gem5/configs/boot_linux.ini
```
Open a new terminal and connect to gem5:
``` bash
telnet localhost 3456
```
Wait some minutes for the Linux boot process to complete then login. Username is **root** no password required.
### DRAMSys with gem5 Elastic Traces
For understanding elastic traces and their generation, study the [gem5 wiki](http://gem5.org/TraceCPU) and the paper [13].