Ability to specify a different resource folder
This commit is contained in:
@@ -39,6 +39,7 @@
|
||||
#include <systemc.h>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
#include <ctime>
|
||||
|
||||
#include "DRAMSys.h"
|
||||
#include "TraceSetup.h"
|
||||
@@ -61,16 +62,27 @@ int sc_main(int argc, char **argv)
|
||||
{
|
||||
sc_set_time_resolution(1, SC_PS);
|
||||
|
||||
// Get path of resources:
|
||||
resources = pathOfFile(argv[0])
|
||||
+ string("/../../DRAMSys/library/resources/");
|
||||
|
||||
string SimulationXML;
|
||||
if (argc > 1) {
|
||||
SimulationXML = argv[1];
|
||||
} else {
|
||||
// Run only with default config (ddr-example.xml):
|
||||
if (argc == 1) {
|
||||
// Get path of resources:
|
||||
resources = pathOfFile(argv[0])
|
||||
+ string("/../../DRAMSys/library/resources/");
|
||||
SimulationXML = resources + "simulations/ddr3-example.xml";
|
||||
}
|
||||
// Run with specific config but default resource folders:
|
||||
else if (argc == 2) {
|
||||
// Get path of resources:
|
||||
resources = pathOfFile(argv[0])
|
||||
+ string("/../../DRAMSys/library/resources/");
|
||||
SimulationXML = argv[1];
|
||||
}
|
||||
// Run with spefific config and specific resource folder:
|
||||
else if (argc == 3) {
|
||||
SimulationXML = argv[1];
|
||||
resources = argv[2];
|
||||
}
|
||||
|
||||
std::vector<TracePlayer *> players;
|
||||
|
||||
|
||||
10
README.md
10
README.md
@@ -182,6 +182,16 @@ $ cd simulator
|
||||
$ ./DRAMSys
|
||||
```
|
||||
|
||||
To run DRAMSys with a specific config:
|
||||
```bash
|
||||
$ ./DRAMSys ../../DRAMSys/library/resources/simulations/ddr3-example.xml
|
||||
```
|
||||
|
||||
To run DRAMSys with a specific config and a resource folder somewhere else to the standard:
|
||||
```bash
|
||||
$ ./DRAMSys ../../DRAMSys/tests/example_ddr3/simulations/ddr3-example.xml ../../DRAMSys/tests/example_ddr3/
|
||||
```
|
||||
|
||||
From the build directory use the commands below to execute the traceAnalyzer.
|
||||
|
||||
```bash
|
||||
|
||||
Reference in New Issue
Block a user