Renamed some objects from suffix IF to suffix Base. Added a small readme to the 'dramTimeDependencies' folder.

This commit is contained in:
Iron Prando da Silva
2022-03-17 12:06:02 +01:00
parent 837662bd35
commit c58ac6cfcc
43 changed files with 156 additions and 103 deletions

View File

@@ -107,8 +107,8 @@ add_executable(TraceAnalyzer
businessObjects/dramTimeDependencies/common/StringMapper.cpp
businessObjects/dramTimeDependencies/deviceDependencies/poolcontroller.cpp
businessObjects/dramTimeDependencies/deviceDependencies/poolcontrollermap.cpp
businessObjects/dramTimeDependencies/deviceDependencies/dramtimedependenciesIF.cpp
businessObjects/dramTimeDependencies/configurations/configurationIF.cpp
businessObjects/dramTimeDependencies/deviceDependencies/dramtimedependenciesbase.cpp
businessObjects/dramTimeDependencies/configurations/configurationBase.cpp
businessObjects/dramTimeDependencies/dbEntries/specialized/DDR3dbphaseentry.cpp
# businessObjects/dramTimeDependencies/deviceDependencies/specialized/DDR3TimeDependencies.cpp

View File

@@ -0,0 +1,53 @@
## Relevant classes
```
PhaseDependenciesTracker
├── ConfigurationFactory
│   └── ConfigurationBase
│   ├── DBPhaseEntryBase
│   └── DRAMTimeDependenciesBase
│   ├── DependencyMap
│   │   └── PhaseTimeDependencies
│   └── PoolControllerMap
└── DBDependencyEntry
```
#### PhaseDependenciesTracker
Responsible for the whole execution. Instantiates a configuration class through the ConfigurationFactory, loads the selected phases into memory, calculates the time dependencies between phases and saves into the database file.
#### ConfigurationFactory
Creates a configuration object given its name.
#### ConfigurationBase
Interface and common functionality of configuration classes. These include creating DBPhaseEntryBase objects from the database for the given device and delegate methods.
#### DBPhaseEntryBase
Interfaces to device specific phase entries. Specificities include object data, construction and dependency logic.
#### DRAMTimeDependenciesBase
Interfaces to device's time dependencies descriptor class.
#### DependencyMap
A STL map using auxiliar objects. Maps phases to their PhaseTimeDependencies.
#### PhaseTimeDependencies
An auxiliar class with initializer list constructor. Contains a vector of TimeDependency objects and its maximum time value.
#### PoolControllerMap
Maps pool names to PoolController objects. Pools keep track of all potential dependencies of a given phase.
#### DBDependencyEntry
Contains the data to be written to the database.
## Suggested steps for creating a device:
1. Create a time dependencies class inheriting from the DRAMTimeDependenciesBase object.
2. Create the phase entry object inheriting from DBPhaseEntryBase. The object must determine the relevant data to be used and how phases may be correlated.
3. Create a configuration class for your object inheriting from ConfigurationBase. This will contain the dependencies maps and instantiate the specialized DBPhaseEntryBase object.
4. Add the newly created device to the functions of the ConfigurationFactory class. The device name is taken from the database.
#### Example
For instance, we have the necessary objects for calculating DDR3 device dependencies implemented in the following files:
1. deviceDependencies/specialized/TimeDependenciesInfoDDR3.(h/cpp)
2. dbEntries/specialized/DDR3dbphaseentry.(h/cpp)
3. configurations/specialized/DDR3Configuration.(h/cpp)

View File

@@ -33,34 +33,34 @@
* Iron Prando da Silva
*/
#include "configurationIF.h"
#include "configurationBase.h"
const uint ConfigurationIF::getClk() const {
const uint ConfigurationBase::getClk() const {
if (!mDeviceDeps)
throw std::invalid_argument("Invalid DRAMTimeDependenciesIF object in 'ConfigurationIF::getClk'.");
throw std::invalid_argument("Invalid DRAMTimeDependenciesBase object in 'ConfigurationBase::getClk'.");
return mDeviceDeps->getClk();
}
DependencyMap ConfigurationIF::getDependencies(std::vector<QString>& commands) const {
DependencyMap ConfigurationBase::getDependencies(std::vector<QString>& commands) const {
if (!mDeviceDeps)
throw std::invalid_argument("Invalid DRAMTimeDependenciesIF object in 'ConfigurationIF::getDependencies'.");
throw std::invalid_argument("Invalid DRAMTimeDependenciesBase object in 'ConfigurationBase::getDependencies'.");
return mDeviceDeps->getDependencies(commands);
}
PoolControllerMap ConfigurationIF::getPools() const {
PoolControllerMap ConfigurationBase::getPools() const {
if (!mDeviceDeps)
throw std::invalid_argument("Invalid DRAMTimeDependenciesIF object in 'ConfigurationIF::getAWPools'.");
throw std::invalid_argument("Invalid DRAMTimeDependenciesBase object in 'ConfigurationBase::getAWPools'.");
return mDeviceDeps->getPools();
}
const QString ConfigurationIF::getDeviceName(const TraceDB& tdb) {
const QString ConfigurationBase::getDeviceName(const TraceDB& tdb) {
return mGetMemspec(tdb)["memoryType"].toString();
}
const uint ConfigurationIF::mGetClk(const TraceDB& tdb) {
const uint ConfigurationBase::mGetClk(const TraceDB& tdb) {
QSqlDatabase db = tdb.getDatabase();
QString query = "SELECT clk FROM GeneralInfo";
QSqlQuery sqlQuery = db.exec(query);
@@ -72,7 +72,7 @@ const uint ConfigurationIF::mGetClk(const TraceDB& tdb) {
return clock;
}
const QJsonObject ConfigurationIF::mGetMemspec(const TraceDB& tdb) {
const QJsonObject ConfigurationBase::mGetMemspec(const TraceDB& tdb) {
QSqlDatabase db = tdb.getDatabase();
QString query = "SELECT Memspec FROM GeneralInfo";
QSqlQuery sqlQuery = db.exec(query);

View File

@@ -37,15 +37,15 @@
#include <QSqlQuery>
#include "businessObjects/dramTimeDependencies/deviceDependencies/dramtimedependenciesIF.h"
#include "businessObjects/dramTimeDependencies/dbEntries/dbphaseentryIF.h"
#include "businessObjects/dramTimeDependencies/deviceDependencies/dramtimedependenciesbase.h"
#include "businessObjects/dramTimeDependencies/dbEntries/dbphaseentryBase.h"
class ConfigurationIF {
class ConfigurationBase {
public:
ConfigurationIF() {};
virtual ~ConfigurationIF() = default;
ConfigurationBase() {};
virtual ~ConfigurationBase() = default;
virtual std::shared_ptr<DBPhaseEntryIF> makePhaseEntry(const QSqlQuery&) const { return nullptr; }
virtual std::shared_ptr<DBPhaseEntryBase> makePhaseEntry(const QSqlQuery&) const { return nullptr; }
// Delegated methods
const uint getClk() const;
@@ -55,7 +55,7 @@ class ConfigurationIF {
static const QString getDeviceName(const TraceDB& tdb);
protected:
std::shared_ptr<DRAMTimeDependenciesIF> mDeviceDeps = nullptr;
std::shared_ptr<DRAMTimeDependenciesBase> mDeviceDeps = nullptr;
static const uint mGetClk(const TraceDB& tdb);
static const QJsonObject mGetMemspec(const TraceDB& tdb);

View File

@@ -35,8 +35,8 @@
#include "configurationfactory.h"
std::shared_ptr<ConfigurationIF> ConfigurationFactory::make(const TraceDB& tdb) {
const QString deviceName = ConfigurationIF::getDeviceName(tdb);
std::shared_ptr<ConfigurationBase> ConfigurationFactory::make(const TraceDB& tdb) {
const QString deviceName = ConfigurationBase::getDeviceName(tdb);
if (deviceName == "DDR3") {
return std::make_shared<DDR3Configuration>(tdb);
@@ -62,7 +62,7 @@ std::shared_ptr<ConfigurationIF> ConfigurationFactory::make(const TraceDB& tdb)
}
const std::vector<QString> ConfigurationFactory::possiblePhases(const TraceDB& tdb) {
const QString deviceName = ConfigurationIF::getDeviceName(tdb);
const QString deviceName = ConfigurationBase::getDeviceName(tdb);
if (deviceName == "DDR3") {
// return DDR3TimeDependencies::getPossiblePhases();
@@ -90,7 +90,7 @@ const std::vector<QString> ConfigurationFactory::possiblePhases(const TraceDB& t
bool ConfigurationFactory::deviceSupported(const TraceDB& tdb) {
uint clk; // Not used
const QString deviceName = ConfigurationIF::getDeviceName(tdb);
const QString deviceName = ConfigurationBase::getDeviceName(tdb);
if (deviceName == "DDR3") {
return true;

View File

@@ -37,7 +37,7 @@
#include <memory>
#include "configurationIF.h"
#include "configurationBase.h"
#include "specialized/DDR3Configuration.h"
#include "specialized/DDR4Configuration.h"
@@ -49,7 +49,7 @@
class ConfigurationFactory {
public:
static std::shared_ptr<ConfigurationIF> make(const TraceDB& tdb);
static std::shared_ptr<ConfigurationBase> make(const TraceDB& tdb);
static const std::vector<QString> possiblePhases(const TraceDB& tdb);

View File

@@ -41,6 +41,6 @@ DDR3Configuration::DDR3Configuration(const TraceDB& tdb) {
}
std::shared_ptr<DBPhaseEntryIF> DDR3Configuration::makePhaseEntry(const QSqlQuery& query) const {
std::shared_ptr<DBPhaseEntryBase> DDR3Configuration::makePhaseEntry(const QSqlQuery& query) const {
return std::make_shared<DDR3DBPhaseEntry>(query);
}

View File

@@ -35,15 +35,15 @@
#pragma once
#include "businessObjects/dramTimeDependencies/configurations/configurationIF.h"
#include "businessObjects/dramTimeDependencies/configurations/configurationBase.h"
// #include "businessObjects/dramTimeDependencies/deviceDependencies/specialized/DDR3TimeDependencies.h"
#include "businessObjects/dramTimeDependencies/deviceDependencies/specialized/TimeDependenciesInfoDDR3.h"
#include "businessObjects/dramTimeDependencies/dbEntries/specialized/DDR3dbphaseentry.h"
class DDR3Configuration : public ConfigurationIF {
class DDR3Configuration : public ConfigurationBase {
public:
DDR3Configuration(const TraceDB& tdb);
std::shared_ptr<DBPhaseEntryIF> makePhaseEntry(const QSqlQuery&) const override;
std::shared_ptr<DBPhaseEntryBase> makePhaseEntry(const QSqlQuery&) const override;
};

View File

@@ -40,6 +40,6 @@ DDR4Configuration::DDR4Configuration(const TraceDB& tdb) {
}
std::shared_ptr<DBPhaseEntryIF> DDR4Configuration::makePhaseEntry(const QSqlQuery& query) const {
std::shared_ptr<DBPhaseEntryBase> DDR4Configuration::makePhaseEntry(const QSqlQuery& query) const {
return std::make_shared<DDR4DBPhaseEntry>(query);
}

View File

@@ -35,14 +35,14 @@
#pragma once
#include "businessObjects/dramTimeDependencies/configurations/configurationIF.h"
#include "businessObjects/dramTimeDependencies/configurations/configurationBase.h"
#include "businessObjects/dramTimeDependencies/deviceDependencies/specialized/TimeDependenciesInfoDDR4.h"
#include "businessObjects/dramTimeDependencies/dbEntries/specialized/DDR4dbphaseentry.h"
class DDR4Configuration : public ConfigurationIF {
class DDR4Configuration : public ConfigurationBase {
public:
DDR4Configuration(const TraceDB& tdb);
std::shared_ptr<DBPhaseEntryIF> makePhaseEntry(const QSqlQuery&) const override;
std::shared_ptr<DBPhaseEntryBase> makePhaseEntry(const QSqlQuery&) const override;
};

View File

@@ -41,7 +41,7 @@ DDR5Configuration::DDR5Configuration(const TraceDB& tdb) {
}
std::shared_ptr<DBPhaseEntryIF> DDR5Configuration::makePhaseEntry(const QSqlQuery& query) const {
std::shared_ptr<DBPhaseEntryBase> DDR5Configuration::makePhaseEntry(const QSqlQuery& query) const {
auto phase = std::make_shared<DDR5DBPhaseEntry>(query);
std::dynamic_pointer_cast<TimeDependenciesInfoDDR5>(mDeviceDeps)->rankIDToRankIDs(phase->tRank, phase->tLogicalRank, phase->tPhysicalRank, phase->tDIMMRank);

View File

@@ -35,14 +35,14 @@
#pragma once
#include "businessObjects/dramTimeDependencies/configurations/configurationIF.h"
#include "businessObjects/dramTimeDependencies/configurations/configurationBase.h"
#include "businessObjects/dramTimeDependencies/deviceDependencies/specialized/TimeDependenciesInfoDDR5.h"
#include "businessObjects/dramTimeDependencies/dbEntries/specialized/DDR5dbphaseentry.h"
class DDR5Configuration : public ConfigurationIF {
class DDR5Configuration : public ConfigurationBase {
public:
DDR5Configuration(const TraceDB& tdb);
std::shared_ptr<DBPhaseEntryIF> makePhaseEntry(const QSqlQuery&) const override;
std::shared_ptr<DBPhaseEntryBase> makePhaseEntry(const QSqlQuery&) const override;
};

View File

@@ -40,6 +40,6 @@ HBM2Configuration::HBM2Configuration(const TraceDB& tdb) {
}
std::shared_ptr<DBPhaseEntryIF> HBM2Configuration::makePhaseEntry(const QSqlQuery& query) const {
std::shared_ptr<DBPhaseEntryBase> HBM2Configuration::makePhaseEntry(const QSqlQuery& query) const {
return std::make_shared<HBM2DBPhaseEntry>(query);
}

View File

@@ -35,14 +35,14 @@
#pragma once
#include "businessObjects/dramTimeDependencies/configurations/configurationIF.h"
#include "businessObjects/dramTimeDependencies/configurations/configurationBase.h"
#include "businessObjects/dramTimeDependencies/deviceDependencies/specialized/TimeDependenciesInfoHBM2.h"
#include "businessObjects/dramTimeDependencies/dbEntries/specialized/HBM2dbphaseentry.h"
class HBM2Configuration : public ConfigurationIF {
class HBM2Configuration : public ConfigurationBase {
public:
HBM2Configuration(const TraceDB& tdb);
std::shared_ptr<DBPhaseEntryIF> makePhaseEntry(const QSqlQuery&) const override;
std::shared_ptr<DBPhaseEntryBase> makePhaseEntry(const QSqlQuery&) const override;
};

View File

@@ -41,6 +41,6 @@ LPDDR4Configuration::LPDDR4Configuration(const TraceDB& tdb) {
}
std::shared_ptr<DBPhaseEntryIF> LPDDR4Configuration::makePhaseEntry(const QSqlQuery& query) const {
std::shared_ptr<DBPhaseEntryBase> LPDDR4Configuration::makePhaseEntry(const QSqlQuery& query) const {
return std::make_shared<LPDDR4DBPhaseEntry>(query);
}

View File

@@ -35,14 +35,14 @@
#pragma once
#include "businessObjects/dramTimeDependencies/configurations/configurationIF.h"
#include "businessObjects/dramTimeDependencies/configurations/configurationBase.h"
#include "businessObjects/dramTimeDependencies/deviceDependencies/specialized/TimeDependenciesInfoLPDDR4.h"
#include "businessObjects/dramTimeDependencies/dbEntries/specialized/LPDDR4dbphaseentry.h"
class LPDDR4Configuration : public ConfigurationIF {
class LPDDR4Configuration : public ConfigurationBase {
public:
LPDDR4Configuration(const TraceDB& tdb);
std::shared_ptr<DBPhaseEntryIF> makePhaseEntry(const QSqlQuery&) const override;
std::shared_ptr<DBPhaseEntryBase> makePhaseEntry(const QSqlQuery&) const override;
};

View File

@@ -40,12 +40,12 @@
#include "businessObjects/phases/phasedependency.h"
#include "businessObjects/dramTimeDependencies/common/common.h"
class DBPhaseEntryIF {
class DBPhaseEntryBase {
public:
DBPhaseEntryIF() = default;
virtual ~DBPhaseEntryIF() = default;
DBPhaseEntryBase() = default;
virtual ~DBPhaseEntryBase() = default;
virtual bool potentialDependency(const TimeDependency& dep, const std::shared_ptr<DBPhaseEntryIF> otherPhase) const { return false; }
virtual bool potentialDependency(const TimeDependency& dep, const std::shared_ptr<DBPhaseEntryBase> otherPhase) const { return false; }
size_t id;
StringMapper phaseName;

View File

@@ -46,7 +46,7 @@ DDR3DBPhaseEntry::DDR3DBPhaseEntry(const QSqlQuery& query) {
tRank = query.value(7).toLongLong();
}
bool DDR3DBPhaseEntry::potentialDependency(const TimeDependency& dep, const std::shared_ptr<DBPhaseEntryIF> otherPhase) const {
bool DDR3DBPhaseEntry::potentialDependency(const TimeDependency& dep, const std::shared_ptr<DBPhaseEntryBase> otherPhase) const {
auto other = std::dynamic_pointer_cast<DDR3DBPhaseEntry>(otherPhase);
if (!other) return false;

View File

@@ -35,14 +35,14 @@
#pragma once
#include "businessObjects/dramTimeDependencies/dbEntries/dbphaseentryIF.h"
#include "businessObjects/dramTimeDependencies/dbEntries/dbphaseentryBase.h"
class DDR3DBPhaseEntry : public DBPhaseEntryIF {
class DDR3DBPhaseEntry : public DBPhaseEntryBase {
public:
DDR3DBPhaseEntry(const QSqlQuery&);
// size_t tBankgroup;
size_t tRank;
bool potentialDependency(const TimeDependency& dep, const std::shared_ptr<DBPhaseEntryIF> otherPhase) const override;
bool potentialDependency(const TimeDependency& dep, const std::shared_ptr<DBPhaseEntryBase> otherPhase) const override;
};

View File

@@ -46,7 +46,7 @@ DDR4DBPhaseEntry::DDR4DBPhaseEntry(const QSqlQuery& query) {
tRank = query.value(7).toLongLong();
}
bool DDR4DBPhaseEntry::potentialDependency(const TimeDependency& dep, const std::shared_ptr<DBPhaseEntryIF> otherPhase) const {
bool DDR4DBPhaseEntry::potentialDependency(const TimeDependency& dep, const std::shared_ptr<DBPhaseEntryBase> otherPhase) const {
auto other = std::dynamic_pointer_cast<DDR4DBPhaseEntry>(otherPhase);
if (!other) return false;

View File

@@ -35,14 +35,14 @@
#pragma once
#include "businessObjects/dramTimeDependencies/dbEntries/dbphaseentryIF.h"
#include "businessObjects/dramTimeDependencies/dbEntries/dbphaseentryBase.h"
class DDR4DBPhaseEntry : public DBPhaseEntryIF {
class DDR4DBPhaseEntry : public DBPhaseEntryBase {
public:
DDR4DBPhaseEntry(const QSqlQuery&);
size_t tBankgroup;
size_t tRank;
bool potentialDependency(const TimeDependency& dep, const std::shared_ptr<DBPhaseEntryIF> otherPhase) const override;
bool potentialDependency(const TimeDependency& dep, const std::shared_ptr<DBPhaseEntryBase> otherPhase) const override;
};

View File

@@ -46,7 +46,7 @@ DDR5DBPhaseEntry::DDR5DBPhaseEntry(const QSqlQuery& query) {
tRank = query.value(7).toLongLong();
}
bool DDR5DBPhaseEntry::potentialDependency(const TimeDependency& dep, const std::shared_ptr<DBPhaseEntryIF> otherPhase) const {
bool DDR5DBPhaseEntry::potentialDependency(const TimeDependency& dep, const std::shared_ptr<DBPhaseEntryBase> otherPhase) const {
auto other = std::dynamic_pointer_cast<DDR5DBPhaseEntry>(otherPhase);
if (!other) return false;

View File

@@ -35,9 +35,9 @@
#pragma once
#include "businessObjects/dramTimeDependencies/dbEntries/dbphaseentryIF.h"
#include "businessObjects/dramTimeDependencies/dbEntries/dbphaseentryBase.h"
class DDR5DBPhaseEntry : public DBPhaseEntryIF {
class DDR5DBPhaseEntry : public DBPhaseEntryBase {
public:
DDR5DBPhaseEntry(const QSqlQuery&);
@@ -48,5 +48,5 @@ class DDR5DBPhaseEntry : public DBPhaseEntryIF {
size_t tPhysicalRank;
size_t tDIMMRank;
bool potentialDependency(const TimeDependency& dep, const std::shared_ptr<DBPhaseEntryIF> otherPhase) const override;
bool potentialDependency(const TimeDependency& dep, const std::shared_ptr<DBPhaseEntryBase> otherPhase) const override;
};

View File

@@ -46,7 +46,7 @@ HBM2DBPhaseEntry::HBM2DBPhaseEntry(const QSqlQuery& query) {
tRank = query.value(7).toLongLong();
}
bool HBM2DBPhaseEntry::potentialDependency(const TimeDependency& dep, const std::shared_ptr<DBPhaseEntryIF> otherPhase) const {
bool HBM2DBPhaseEntry::potentialDependency(const TimeDependency& dep, const std::shared_ptr<DBPhaseEntryBase> otherPhase) const {
auto other = std::dynamic_pointer_cast<HBM2DBPhaseEntry>(otherPhase);
if (!other) return false;

View File

@@ -35,14 +35,14 @@
#pragma once
#include "businessObjects/dramTimeDependencies/dbEntries/dbphaseentryIF.h"
#include "businessObjects/dramTimeDependencies/dbEntries/dbphaseentryBase.h"
class HBM2DBPhaseEntry : public DBPhaseEntryIF {
class HBM2DBPhaseEntry : public DBPhaseEntryBase {
public:
HBM2DBPhaseEntry(const QSqlQuery&);
size_t tBankgroup;
size_t tRank;
bool potentialDependency(const TimeDependency& dep, const std::shared_ptr<DBPhaseEntryIF> otherPhase) const override;
bool potentialDependency(const TimeDependency& dep, const std::shared_ptr<DBPhaseEntryBase> otherPhase) const override;
};

View File

@@ -46,7 +46,7 @@ LPDDR4DBPhaseEntry::LPDDR4DBPhaseEntry(const QSqlQuery& query) {
tRank = query.value(7).toLongLong();
}
bool LPDDR4DBPhaseEntry::potentialDependency(const TimeDependency& dep, const std::shared_ptr<DBPhaseEntryIF> otherPhase) const {
bool LPDDR4DBPhaseEntry::potentialDependency(const TimeDependency& dep, const std::shared_ptr<DBPhaseEntryBase> otherPhase) const {
auto other = std::dynamic_pointer_cast<LPDDR4DBPhaseEntry>(otherPhase);
if (!other) return false;

View File

@@ -36,14 +36,14 @@
#pragma once
#include "businessObjects/dramTimeDependencies/dbEntries/dbphaseentryIF.h"
#include "businessObjects/dramTimeDependencies/dbEntries/dbphaseentryBase.h"
class LPDDR4DBPhaseEntry : public DBPhaseEntryIF {
class LPDDR4DBPhaseEntry : public DBPhaseEntryBase {
public:
LPDDR4DBPhaseEntry(const QSqlQuery&);
// size_t tBankgroup;
size_t tRank;
bool potentialDependency(const TimeDependency& dep, const std::shared_ptr<DBPhaseEntryIF> otherPhase) const override;
bool potentialDependency(const TimeDependency& dep, const std::shared_ptr<DBPhaseEntryBase> otherPhase) const override;
};

View File

@@ -33,18 +33,18 @@
* Iron Prando da Silva
*/
#include "dramtimedependenciesIF.h"
#include "dramtimedependenciesbase.h"
#include <QJsonDocument>
DRAMTimeDependenciesIF::DRAMTimeDependenciesIF(const QJsonObject& memspec, const uint inTCK) {
DRAMTimeDependenciesBase::DRAMTimeDependenciesBase(const QJsonObject& memspec, const uint inTCK) {
mMemspecJson = memspec;
tCK = inTCK;
}
DependencyMap
DRAMTimeDependenciesIF::getDependencies(std::vector<QString>& dependencyFilter) const {
DRAMTimeDependenciesBase::getDependencies(std::vector<QString>& dependencyFilter) const {
DependencyMap dependenciesMap;
std::vector<StringMapper> dependencyFilterStrMapper(dependencyFilter.begin(), dependencyFilter.end());
@@ -68,11 +68,11 @@ DRAMTimeDependenciesIF::getDependencies(std::vector<QString>& dependencyFilter)
return dependenciesMap;
}
PoolControllerMap DRAMTimeDependenciesIF::getPools() const {
PoolControllerMap DRAMTimeDependenciesBase::getPools() const {
return PoolControllerMap(mPools);
}
void DRAMTimeDependenciesIF::mFilterDependencyList(std::vector<TimeDependency>& dependencyList, const std::vector<StringMapper>& dependencyFilter) const {
void DRAMTimeDependenciesBase::mFilterDependencyList(std::vector<TimeDependency>& dependencyList, const std::vector<StringMapper>& dependencyFilter) const {
std::vector<TimeDependency> newDepList(dependencyList.size());
// TODO - probably there is a smarter way to filter these values,
@@ -113,7 +113,7 @@ void DRAMTimeDependenciesIF::mFilterDependencyList(std::vector<TimeDependency>&
}
void DRAMTimeDependenciesIF::mFilterDependencyMap(DependencyMap& dependencyMap, const std::vector<StringMapper>& dependencyFilter) const {
void DRAMTimeDependenciesBase::mFilterDependencyMap(DependencyMap& dependencyMap, const std::vector<StringMapper>& dependencyFilter) const {
if (!dependencyMap.empty()) {
auto itFilter = dependencyFilter.begin();
@@ -159,7 +159,7 @@ void DRAMTimeDependenciesIF::mFilterDependencyMap(DependencyMap& dependencyMap,
}
uint DRAMTimeDependenciesIF::mFindVectorMaximum(const std::vector<TimeDependency>& dependencyList) const {
uint DRAMTimeDependenciesBase::mFindVectorMaximum(const std::vector<TimeDependency>& dependencyList) const {
auto maxElement = std::max_element(
dependencyList.begin(),
dependencyList.end(),

View File

@@ -39,10 +39,10 @@
#include "businessObjects/dramTimeDependencies/common/common.h"
#include "poolcontrollermap.h"
class DRAMTimeDependenciesIF {
class DRAMTimeDependenciesBase {
public:
DRAMTimeDependenciesIF(const QJsonObject& memspec, const uint tCK);
virtual ~DRAMTimeDependenciesIF() = default;
DRAMTimeDependenciesBase(const QJsonObject& memspec, const uint tCK);
virtual ~DRAMTimeDependenciesBase() = default;
DependencyMap getDependencies(std::vector<QString>& dependencyFilter) const;

View File

@@ -37,7 +37,7 @@
using namespace std;
DDR3TimeDependencies::DDR3TimeDependencies(const QJsonObject& memspec, const uint tCK) : DRAMTimeDependenciesIF(memspec, tCK) {
DDR3TimeDependencies::DDR3TimeDependencies(const QJsonObject& memspec, const uint tCK) : DRAMTimeDependenciesBase(memspec, tCK) {
mInitializeValues();
}

View File

@@ -35,9 +35,9 @@
#pragma once
#include "businessObjects/dramTimeDependencies/deviceDependencies/dramtimedependenciesIF.h"
#include "businessObjects/dramTimeDependencies/deviceDependencies/dramtimedependenciesbase.h"
class DDR3TimeDependencies final : public DRAMTimeDependenciesIF {
class DDR3TimeDependencies final : public DRAMTimeDependenciesBase {
public:
DDR3TimeDependencies(const QJsonObject& memspec, const uint tCK);

View File

@@ -37,7 +37,7 @@
using namespace std;
TimeDependenciesInfoDDR3::TimeDependenciesInfoDDR3(const QJsonObject& memspec, const uint tCK) : DRAMTimeDependenciesIF(memspec, tCK) {
TimeDependenciesInfoDDR3::TimeDependenciesInfoDDR3(const QJsonObject& memspec, const uint tCK) : DRAMTimeDependenciesBase(memspec, tCK) {
mInitializeValues();
}

View File

@@ -35,9 +35,9 @@
#pragma once
#include "../dramtimedependenciesIF.h"
#include "../dramtimedependenciesbase.h"
class TimeDependenciesInfoDDR3 final : public DRAMTimeDependenciesIF {
class TimeDependenciesInfoDDR3 final : public DRAMTimeDependenciesBase {
public:
TimeDependenciesInfoDDR3(const QJsonObject& memspec, const uint clk);

View File

@@ -37,7 +37,7 @@
using namespace std;
TimeDependenciesInfoDDR4::TimeDependenciesInfoDDR4(const QJsonObject& memspec, const uint tCK) : DRAMTimeDependenciesIF(memspec, tCK) {
TimeDependenciesInfoDDR4::TimeDependenciesInfoDDR4(const QJsonObject& memspec, const uint tCK) : DRAMTimeDependenciesBase(memspec, tCK) {
mInitializeValues();
}

View File

@@ -35,9 +35,9 @@
#pragma once
#include "../dramtimedependenciesIF.h"
#include "../dramtimedependenciesbase.h"
class TimeDependenciesInfoDDR4 final : public DRAMTimeDependenciesIF {
class TimeDependenciesInfoDDR4 final : public DRAMTimeDependenciesBase {
public:
TimeDependenciesInfoDDR4(const QJsonObject& memspec, const uint clk);

View File

@@ -38,7 +38,7 @@
using namespace std;
TimeDependenciesInfoDDR5::TimeDependenciesInfoDDR5(const QJsonObject& memspec, const uint tCK) : DRAMTimeDependenciesIF(memspec, tCK) {
TimeDependenciesInfoDDR5::TimeDependenciesInfoDDR5(const QJsonObject& memspec, const uint tCK) : DRAMTimeDependenciesBase(memspec, tCK) {
mInitializeValues();
mBitsDIMMRanks = ceil(log2(mNumOfDIMMRanks));

View File

@@ -35,9 +35,9 @@
#pragma once
#include "../dramtimedependenciesIF.h"
#include "../dramtimedependenciesbase.h"
class TimeDependenciesInfoDDR5 final : public DRAMTimeDependenciesIF {
class TimeDependenciesInfoDDR5 final : public DRAMTimeDependenciesBase {
public:
TimeDependenciesInfoDDR5(const QJsonObject& memspec, const uint clk);

View File

@@ -37,7 +37,7 @@
using namespace std;
TimeDependenciesInfoHBM2::TimeDependenciesInfoHBM2(const QJsonObject& memspec, const uint tCK) : DRAMTimeDependenciesIF(memspec, tCK) {
TimeDependenciesInfoHBM2::TimeDependenciesInfoHBM2(const QJsonObject& memspec, const uint tCK) : DRAMTimeDependenciesBase(memspec, tCK) {
mInitializeValues();
}

View File

@@ -35,9 +35,9 @@
#pragma once
#include "../dramtimedependenciesIF.h"
#include "../dramtimedependenciesbase.h"
class TimeDependenciesInfoHBM2 final : public DRAMTimeDependenciesIF {
class TimeDependenciesInfoHBM2 final : public DRAMTimeDependenciesBase {
public:
TimeDependenciesInfoHBM2(const QJsonObject& memspec, const uint clk);

View File

@@ -37,7 +37,7 @@
using namespace std;
TimeDependenciesInfoLPDDR4::TimeDependenciesInfoLPDDR4(const QJsonObject& memspec, const uint tCK) : DRAMTimeDependenciesIF(memspec, tCK) {
TimeDependenciesInfoLPDDR4::TimeDependenciesInfoLPDDR4(const QJsonObject& memspec, const uint tCK) : DRAMTimeDependenciesBase(memspec, tCK) {
mInitializeValues();
}

View File

@@ -35,9 +35,9 @@
#pragma once
#include "../dramtimedependenciesIF.h"
#include "../dramtimedependenciesbase.h"
class TimeDependenciesInfoLPDDR4 final : public DRAMTimeDependenciesIF {
class TimeDependenciesInfoLPDDR4 final : public DRAMTimeDependenciesBase {
public:
TimeDependenciesInfoLPDDR4(const QJsonObject& memspec, const uint clk);

View File

@@ -152,9 +152,9 @@ void PhaseDependenciesTracker::mInsertIntoTable(TraceDB& tdb, const std::vector<
}
const std::vector<std::shared_ptr<DBPhaseEntryIF>>
PhaseDependenciesTracker::mGetFilteredPhases(const std::shared_ptr<ConfigurationIF> deviceConfig, TraceDB& tdb, const std::vector<QString>& commands) {
std::vector<std::shared_ptr<DBPhaseEntryIF>> phases;
const std::vector<std::shared_ptr<DBPhaseEntryBase>>
PhaseDependenciesTracker::mGetFilteredPhases(const std::shared_ptr<ConfigurationBase> deviceConfig, TraceDB& tdb, const std::vector<QString>& commands) {
std::vector<std::shared_ptr<DBPhaseEntryBase>> phases;
QString queryStr = "SELECT Phases.*, Transactions.TBank, Transactions.TBankgroup, Transactions.TRank "
" FROM Phases "
@@ -207,7 +207,7 @@ PhaseDependenciesTracker::mGetFilteredPhases(const std::shared_ptr<Configuration
}
const std::vector<DBDependencyEntry>
PhaseDependenciesTracker::mCalculateDependencies(const std::shared_ptr<ConfigurationIF> deviceConfig, const std::vector<std::shared_ptr<DBPhaseEntryIF>>& phases, std::vector<QString>& commands) {
PhaseDependenciesTracker::mCalculateDependencies(const std::shared_ptr<ConfigurationBase> deviceConfig, const std::vector<std::shared_ptr<DBPhaseEntryBase>>& phases, std::vector<QString>& commands) {
std::vector<DBDependencyEntry> entries;
entries.reserve((size_t) (0.4 * phases.size()));

View File

@@ -52,8 +52,8 @@ private:
static void mCreateTable(TraceDB& tdb);
static void mInsertIntoTable(TraceDB& tdb, const std::vector<DBDependencyEntry>& entries);
static const std::vector<std::shared_ptr<DBPhaseEntryIF>> mGetFilteredPhases(const std::shared_ptr<ConfigurationIF>, TraceDB& tdb, const std::vector<QString>& commands);
static const std::vector<DBDependencyEntry> mCalculateDependencies(const std::shared_ptr<ConfigurationIF>, const std::vector<std::shared_ptr<DBPhaseEntryIF>>& phases, std::vector<QString>& commands);
static const std::vector<std::shared_ptr<DBPhaseEntryBase>> mGetFilteredPhases(const std::shared_ptr<ConfigurationBase>, TraceDB& tdb, const std::vector<QString>& commands);
static const std::vector<DBDependencyEntry> mCalculateDependencies(const std::shared_ptr<ConfigurationBase>, const std::vector<std::shared_ptr<DBPhaseEntryBase>>& phases, std::vector<QString>& commands);
static QSqlQuery mExecuteQuery(TraceDB& tdb, const QString queryStr);