Small changes in code and README file.

Cosmetic changes in code.
Small improvements in the README text.
This commit is contained in:
Éder Ferreira Zulian
2015-06-22 12:44:20 +02:00
parent 14062a9d9b
commit ffbbff3cbf
7 changed files with 29 additions and 26 deletions

View File

@@ -5,18 +5,13 @@ Generic DRAM controller simulator **DRAMSys** [1] and related tools.
## Basic Setup ## Basic Setup
In a terminal window execute the commands that follow. Open a terminal window, go to your home directory, create a directory for your
projects and change to it.
Go to your home directory.
``` bash ``` bash
$ cd $ cd
```
Create a directory for your projects.
``` bash
$ mkdir projects $ mkdir projects
$ cd projects
``` ```
Clone the repository. Clone the repository.
@@ -104,6 +99,14 @@ $ qmake ../dramSys/dramSys.pro
$ make $ make
``` ```
The result of the compilation is an executable binary file **dramSys**
generated inside the build directory. The program can be executed with the
command below.
``` bash
$ ./dramSys
```
### DRAMSys Configuration ### DRAMSys Configuration
The **dramSys** executable supports one argument which is a XML file that The **dramSys** executable supports one argument which is a XML file that
@@ -115,7 +118,7 @@ The XML code below shows a typic configuration:
``` xml ``` xml
<simulation> <simulation>
<!-- Simulator configuration --> <!-- Simulator Configuration -->
<simconfig> <simconfig>
<Debug value="1"/> <Debug value="1"/>
<DatabaseRecording value="1"/> <DatabaseRecording value="1"/>
@@ -124,22 +127,22 @@ The XML code below shows a typic configuration:
<NumberOfMemChannels value="1"/> <NumberOfMemChannels value="1"/>
</simconfig> </simconfig>
<!-- Memory specifications --> <!-- Memory Specifications -->
<memspecs> <memspecs>
<memspec src="../resources/configs/memspecs/WideIO.xml"></memspec> <memspec src="../resources/configs/memspecs/WideIO.xml"></memspec>
</memspecs> </memspecs>
<!-- Address mappings --> <!-- Address Mappings -->
<addressmappings> <addressmappings>
<addressmapping src="../resources/configs/amconfigs/am_wideio.xml"></addressmapping> <addressmapping src="../resources/configs/amconfigs/am_wideio.xml"></addressmapping>
</addressmappings> </addressmappings>
<!-- Memory configurations --> <!-- Memory Configurations -->
<memconfigs> <memconfigs>
<memconfig src="../resources/configs/memconfigs/fifo.xml"/> <memconfig src="../resources/configs/memconfigs/fifo.xml"/>
</memconfigs> </memconfigs>
<!-- Trace setups --> <!-- Trace Setups -->
<tracesetups> <tracesetups>
<!-- Multiple trace setups are allowed for the same simulation setup --> <!-- Multiple trace setups are allowed for the same simulation setup -->
<tracesetup id="fifo"> <tracesetup id="fifo">
@@ -168,7 +171,8 @@ configuration structure.
#### Simulation Setups #### Simulation Setups
Every possible combination of memory specification, address mapping and memory configuration corresponds to a **simulation setup**. Every possible combination of memory specification, address mapping and memory
configuration corresponds to a **simulation setup**.
DRAMSys executes all the **trace setups** listed in the configuration file for DRAMSys executes all the **trace setups** listed in the configuration file for
each of the simulation setups. each of the simulation setups.
@@ -325,10 +329,10 @@ Below are listed the configuration sections and configuration fields.
trace player. trace player.
Some attributes are self-explanatory while others require some previous Some attributes are self-explanatory while others require some previous
knowhow of memory technologies or some knowledge of the simulator source code. knowhow of memory technologies.
Resources of the simulator are available in the **resources** directory its Resources of the simulator are available inside of the **resources** directory
sub-directories. and its sub-directories.
``` bash ``` bash
$ cd /projects/dram.vp.system/dram/resources $ cd /projects/dram.vp.system/dram/resources

View File

@@ -32,6 +32,7 @@
* Authors: * Authors:
* Robert Gernhardt * Robert Gernhardt
* Matthias Jung * Matthias Jung
* Eder F. Zulian
*/ */
#ifndef UTILS_COMMON_UTILS_H_ #ifndef UTILS_COMMON_UTILS_H_

View File

@@ -40,7 +40,7 @@
#include <map> #include <map>
#include <string> #include <string>
#include <vector> #include <vector>
#include<iostream> #include <iostream>
#include "/opt/systemc-2.3.0/include/systemc" #include "/opt/systemc-2.3.0/include/systemc"
#include "/opt/systemc-2.3.0/include/tlm" #include "/opt/systemc-2.3.0/include/tlm"

View File

@@ -227,4 +227,3 @@ void ControllerCore::printDebugMessage(string message)
DebugManager::getInstance().printDebugMessage(ControllerCore::senderName, message); DebugManager::getInstance().printDebugMessage(ControllerCore::senderName, message);
} }

View File

@@ -80,5 +80,5 @@ private:
std::map<Command, ICommandChecker*> commandChecker; std::map<Command, ICommandChecker*> commandChecker;
}; };
#endif /* CONTROLLER_H_ */ #endif /* CONTROLLER_H_ */

View File

@@ -117,6 +117,10 @@ void Configuration::setParameter(std::string name, std::string value)
PowerAnalysis = string2bool(value); PowerAnalysis = string2bool(value);
else if(name == "Debug") else if(name == "Debug")
Debug = string2bool(value); Debug = string2bool(value);
else if (name == "NumberOfTracePlayers")
NumberOfTracePlayers = string2int(value);
else if (name == "NumberOfMemChannels")
NumberOfMemChannels = string2int(value);
// Specification for ErrorChipSeed, ErrorCSVFile path and ErrorStoreMode // Specification for ErrorChipSeed, ErrorCSVFile path and ErrorStoreMode
else if(name == "ErrorChipSeed") else if(name == "ErrorChipSeed")
ErrorChipSeed = string2int(value); ErrorChipSeed = string2int(value);
@@ -124,10 +128,6 @@ void Configuration::setParameter(std::string name, std::string value)
ErrorCSVFile = value; ErrorCSVFile = value;
else if(name == "ErrorStoreMode") else if(name == "ErrorStoreMode")
ErrorStoreMode = StringToEnum(value); ErrorStoreMode = StringToEnum(value);
else if (name == "NumberOfTracePlayers")
NumberOfTracePlayers = string2int(value);
else if (name == "NumberOfMemChannels")
NumberOfMemChannels = string2int(value);
else else
{ {
SC_REPORT_FATAL("Configuration", ("Parameter " + name + " not defined in Configuration").c_str()); SC_REPORT_FATAL("Configuration", ("Parameter " + name + " not defined in Configuration").c_str());

View File

@@ -128,12 +128,11 @@ void Simulation::instantiateModules(const string &pathToResources, const std::ve
void Simulation::bindSockets() void Simulation::bindSockets()
{ {
size_t i = 0;
for (auto player : players) { for (auto player : players) {
player->iSocket.bind(arbiter->tSocket); player->iSocket.bind(arbiter->tSocket);
} }
for (i = 0; i < Configuration::getInstance().NumberOfMemChannels; i++) { for (size_t i = 0; i < Configuration::getInstance().NumberOfMemChannels; i++) {
arbiter->iSocket.bind(controllers[i]->tSocket); arbiter->iSocket.bind(controllers[i]->tSocket);
controllers[i]->iSocket.bind(drams[i]->tSocket); controllers[i]->iSocket.bind(drams[i]->tSocket);
} }