Merge branch 'formatting' into 'develop'
Format all files See merge request ems/astdm/modeling.dram/dram.sys.5!42
This commit is contained in:
@@ -6,6 +6,6 @@ BinPackParameters: 'false'
|
||||
BreakBeforeBraces: Allman
|
||||
BreakConstructorInitializers: AfterColon
|
||||
ColumnLimit: '100'
|
||||
ConstructorInitializerAllOnOneLineOrOnePerLine: 'true'
|
||||
IndentWidth: '4'
|
||||
PackConstructorInitializers: CurrentLine
|
||||
PointerAlignment: Left
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
--style=kr
|
||||
--indent=spaces=4
|
||||
--align-pointer=name
|
||||
--align-reference=name
|
||||
--convert-tabs
|
||||
--attach-namespaces
|
||||
--max-code-length=80
|
||||
--max-instatement-indent=100
|
||||
--pad-header
|
||||
--pad-oper
|
||||
@@ -35,11 +35,12 @@
|
||||
|
||||
#include "commentmodel.h"
|
||||
|
||||
#include <QMenu>
|
||||
#include <QItemSelectionModel>
|
||||
#include <QKeyEvent>
|
||||
#include <QMenu>
|
||||
|
||||
CommentModel::CommentModel(QObject *parent) : QAbstractTableModel(parent),
|
||||
CommentModel::CommentModel(QObject* parent) :
|
||||
QAbstractTableModel(parent),
|
||||
gotoAction(new QAction("Goto comment", this)),
|
||||
editAction(new QAction("Edit comment", this)),
|
||||
deleteAction(new QAction("Delete comment", this)),
|
||||
@@ -52,52 +53,72 @@ CommentModel::CommentModel(QObject *parent) : QAbstractTableModel(parent),
|
||||
|
||||
void CommentModel::setUpActions()
|
||||
{
|
||||
QObject::connect(gotoAction, &QAction::triggered, this, [=](){
|
||||
const QModelIndexList indexes = internalSelectionModel->selectedRows();
|
||||
for (const QModelIndex ¤tIndex : indexes)
|
||||
{
|
||||
emit gotoCommentTriggered(currentIndex);
|
||||
}
|
||||
});
|
||||
QObject::connect(gotoAction,
|
||||
&QAction::triggered,
|
||||
this,
|
||||
[=]()
|
||||
{
|
||||
const QModelIndexList indexes = internalSelectionModel->selectedRows();
|
||||
for (const QModelIndex& currentIndex : indexes)
|
||||
{
|
||||
emit gotoCommentTriggered(currentIndex);
|
||||
}
|
||||
});
|
||||
|
||||
QObject::connect(editAction, &QAction::triggered, this, [=](){
|
||||
const QModelIndexList indexes = internalSelectionModel->selectedRows();
|
||||
for (const QModelIndex ¤tIndex : indexes)
|
||||
emit editTriggered(index(currentIndex.row(), static_cast<int>(Column::Comment)));
|
||||
});
|
||||
QObject::connect(editAction,
|
||||
&QAction::triggered,
|
||||
this,
|
||||
[=]()
|
||||
{
|
||||
const QModelIndexList indexes = internalSelectionModel->selectedRows();
|
||||
for (const QModelIndex& currentIndex : indexes)
|
||||
emit editTriggered(
|
||||
index(currentIndex.row(), static_cast<int>(Column::Comment)));
|
||||
});
|
||||
|
||||
QObject::connect(deleteAction, &QAction::triggered, this, [=](){
|
||||
const QModelIndexList indexes = internalSelectionModel->selectedRows();
|
||||
for (const QModelIndex ¤tIndex : indexes)
|
||||
removeComment(currentIndex);
|
||||
});
|
||||
QObject::connect(deleteAction,
|
||||
&QAction::triggered,
|
||||
this,
|
||||
[=]()
|
||||
{
|
||||
const QModelIndexList indexes = internalSelectionModel->selectedRows();
|
||||
for (const QModelIndex& currentIndex : indexes)
|
||||
removeComment(currentIndex);
|
||||
});
|
||||
|
||||
QObject::connect(selectAllAction, &QAction::triggered, this, [=](){
|
||||
QModelIndex topLeft = index(0, 0);
|
||||
QModelIndex bottomRight = index(rowCount() - 1, columnCount() - 1);
|
||||
internalSelectionModel->select(QItemSelection(topLeft, bottomRight),
|
||||
QItemSelectionModel::Select | QItemSelectionModel::Rows);
|
||||
});
|
||||
QObject::connect(selectAllAction,
|
||||
&QAction::triggered,
|
||||
this,
|
||||
[=]()
|
||||
{
|
||||
QModelIndex topLeft = index(0, 0);
|
||||
QModelIndex bottomRight = index(rowCount() - 1, columnCount() - 1);
|
||||
internalSelectionModel->select(QItemSelection(topLeft, bottomRight),
|
||||
QItemSelectionModel::Select |
|
||||
QItemSelectionModel::Rows);
|
||||
});
|
||||
|
||||
QObject::connect(deselectAllAction, &QAction::triggered,
|
||||
internalSelectionModel, &QItemSelectionModel::clearSelection);
|
||||
QObject::connect(deselectAllAction,
|
||||
&QAction::triggered,
|
||||
internalSelectionModel,
|
||||
&QItemSelectionModel::clearSelection);
|
||||
}
|
||||
|
||||
int CommentModel::rowCount(const QModelIndex &parent) const
|
||||
int CommentModel::rowCount(const QModelIndex& parent) const
|
||||
{
|
||||
Q_UNUSED(parent)
|
||||
|
||||
return comments.size();
|
||||
}
|
||||
|
||||
int CommentModel::columnCount(const QModelIndex &parent) const
|
||||
int CommentModel::columnCount(const QModelIndex& parent) const
|
||||
{
|
||||
Q_UNUSED(parent)
|
||||
|
||||
return static_cast<int>(Column::COLUMNCOUNT);
|
||||
}
|
||||
|
||||
QVariant CommentModel::data(const QModelIndex &index, int role) const
|
||||
QVariant CommentModel::data(const QModelIndex& index, int role) const
|
||||
{
|
||||
if (!index.isValid())
|
||||
return QVariant();
|
||||
@@ -106,12 +127,13 @@ QVariant CommentModel::data(const QModelIndex &index, int role) const
|
||||
if (role != Qt::DisplayRole && role != Qt::EditRole && role != Qt::UserRole)
|
||||
return QVariant();
|
||||
|
||||
const Comment &comment = comments.at(index.row());
|
||||
const Comment& comment = comments.at(index.row());
|
||||
|
||||
if (role == Qt::UserRole && static_cast<Column>(index.column()) == Column::Time)
|
||||
return QVariant(comment.time);
|
||||
|
||||
switch (static_cast<Column>(index.column())) {
|
||||
switch (static_cast<Column>(index.column()))
|
||||
{
|
||||
case Column::Time:
|
||||
return QVariant(prettyFormatTime(comment.time));
|
||||
case Column::Comment:
|
||||
@@ -123,7 +145,7 @@ QVariant CommentModel::data(const QModelIndex &index, int role) const
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
bool CommentModel::setData(const QModelIndex &index, const QVariant &value, int role)
|
||||
bool CommentModel::setData(const QModelIndex& index, const QVariant& value, int role)
|
||||
{
|
||||
if (!index.isValid())
|
||||
return false;
|
||||
@@ -136,7 +158,7 @@ bool CommentModel::setData(const QModelIndex &index, const QVariant &value, int
|
||||
|
||||
QString newText = value.toString();
|
||||
|
||||
Comment &comment = comments.at(index.row());
|
||||
Comment& comment = comments.at(index.row());
|
||||
comment.text = newText;
|
||||
|
||||
emit dataChanged(index, index);
|
||||
@@ -150,7 +172,8 @@ QVariant CommentModel::headerData(int section, Qt::Orientation orientation, int
|
||||
|
||||
if (orientation == Qt::Horizontal)
|
||||
{
|
||||
switch (static_cast<Column>(section)) {
|
||||
switch (static_cast<Column>(section))
|
||||
{
|
||||
case Column::Time:
|
||||
return "Time";
|
||||
case Column::Comment:
|
||||
@@ -163,7 +186,7 @@ QVariant CommentModel::headerData(int section, Qt::Orientation orientation, int
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
Qt::ItemFlags CommentModel::flags(const QModelIndex &index) const
|
||||
Qt::ItemFlags CommentModel::flags(const QModelIndex& index) const
|
||||
{
|
||||
Qt::ItemFlags flags = QAbstractItemModel::flags(index);
|
||||
|
||||
@@ -178,28 +201,26 @@ void CommentModel::openContextMenu()
|
||||
if (!internalSelectionModel->hasSelection())
|
||||
return;
|
||||
|
||||
QMenu *menu = new QMenu();
|
||||
QMenu* menu = new QMenu();
|
||||
menu->addActions({gotoAction, editAction, deleteAction});
|
||||
menu->addSeparator();
|
||||
menu->addActions({selectAllAction, deselectAllAction});
|
||||
|
||||
QObject::connect(menu, &QMenu::aboutToHide, [=]() {
|
||||
menu->deleteLater();
|
||||
});
|
||||
QObject::connect(menu, &QMenu::aboutToHide, [=]() { menu->deleteLater(); });
|
||||
|
||||
menu->popup(QCursor::pos());
|
||||
}
|
||||
|
||||
QItemSelectionModel *CommentModel::selectionModel() const
|
||||
QItemSelectionModel* CommentModel::selectionModel() const
|
||||
{
|
||||
return internalSelectionModel;
|
||||
}
|
||||
|
||||
void CommentModel::addComment(traceTime time)
|
||||
{
|
||||
auto commentIt = std::find_if(comments.rbegin(), comments.rend(), [time](const Comment &comment){
|
||||
return comment.time <= time;
|
||||
});
|
||||
auto commentIt = std::find_if(comments.rbegin(),
|
||||
comments.rend(),
|
||||
[time](const Comment& comment) { return comment.time <= time; });
|
||||
|
||||
int insertIndex = std::distance(comments.begin(), commentIt.base());
|
||||
|
||||
@@ -207,17 +228,17 @@ void CommentModel::addComment(traceTime time)
|
||||
comments.insert(comments.begin() + insertIndex, {time, "Enter comment text..."});
|
||||
endInsertRows();
|
||||
|
||||
internalSelectionModel->setCurrentIndex(index(insertIndex, 0),
|
||||
QItemSelectionModel::ClearAndSelect | QItemSelectionModel::Rows);
|
||||
internalSelectionModel->setCurrentIndex(
|
||||
index(insertIndex, 0), QItemSelectionModel::ClearAndSelect | QItemSelectionModel::Rows);
|
||||
|
||||
emit editTriggered(index(insertIndex, 1));
|
||||
}
|
||||
|
||||
void CommentModel::addComment(traceTime time, QString text)
|
||||
{
|
||||
auto commentIt = std::find_if(comments.rbegin(), comments.rend(), [time](const Comment &comment){
|
||||
return comment.time <= time;
|
||||
});
|
||||
auto commentIt = std::find_if(comments.rbegin(),
|
||||
comments.rend(),
|
||||
[time](const Comment& comment) { return comment.time <= time; });
|
||||
|
||||
int insertIndex = std::distance(comments.begin(), commentIt.base());
|
||||
|
||||
@@ -228,9 +249,9 @@ void CommentModel::addComment(traceTime time, QString text)
|
||||
|
||||
void CommentModel::removeComment(traceTime time)
|
||||
{
|
||||
auto commentIt = std::find_if(comments.begin(), comments.end(), [time](const Comment &comment){
|
||||
return comment.time == time;
|
||||
});
|
||||
auto commentIt = std::find_if(comments.begin(),
|
||||
comments.end(),
|
||||
[time](const Comment& comment) { return comment.time == time; });
|
||||
|
||||
if (commentIt == comments.end())
|
||||
return;
|
||||
@@ -242,19 +263,19 @@ void CommentModel::removeComment(traceTime time)
|
||||
endRemoveRows();
|
||||
}
|
||||
|
||||
void CommentModel::removeComment(const QModelIndex &index)
|
||||
void CommentModel::removeComment(const QModelIndex& index)
|
||||
{
|
||||
beginRemoveRows(QModelIndex(), index.row(), index.row());
|
||||
comments.erase(comments.begin() + index.row());
|
||||
endRemoveRows();
|
||||
}
|
||||
|
||||
const std::vector<CommentModel::Comment> &CommentModel::getComments() const
|
||||
const std::vector<CommentModel::Comment>& CommentModel::getComments() const
|
||||
{
|
||||
return comments;
|
||||
}
|
||||
|
||||
traceTime CommentModel::getTimeFromIndex(const QModelIndex &index) const
|
||||
traceTime CommentModel::getTimeFromIndex(const QModelIndex& index) const
|
||||
{
|
||||
Q_ASSERT(comments.size() > index.row());
|
||||
|
||||
@@ -263,9 +284,11 @@ traceTime CommentModel::getTimeFromIndex(const QModelIndex &index) const
|
||||
|
||||
QModelIndex CommentModel::hoveredComment(Timespan timespan) const
|
||||
{
|
||||
auto commentIt = std::find_if(comments.begin(), comments.end(), [timespan](const Comment &comment){
|
||||
return timespan.Begin() < comment.time && comment.time < timespan.End();
|
||||
});
|
||||
auto commentIt =
|
||||
std::find_if(comments.begin(),
|
||||
comments.end(),
|
||||
[timespan](const Comment& comment)
|
||||
{ return timespan.Begin() < comment.time && comment.time < timespan.End(); });
|
||||
|
||||
if (commentIt == comments.end())
|
||||
return QModelIndex();
|
||||
@@ -275,17 +298,17 @@ QModelIndex CommentModel::hoveredComment(Timespan timespan) const
|
||||
return index(commentIndex, 0);
|
||||
}
|
||||
|
||||
bool CommentModel::eventFilter(QObject *object, QEvent *event)
|
||||
bool CommentModel::eventFilter(QObject* object, QEvent* event)
|
||||
{
|
||||
Q_UNUSED(object)
|
||||
|
||||
if (event->type() == QEvent::KeyPress)
|
||||
{
|
||||
QKeyEvent *keyEvent = static_cast<QKeyEvent *>(event);
|
||||
QKeyEvent* keyEvent = static_cast<QKeyEvent*>(event);
|
||||
if (keyEvent->key() == Qt::Key_Delete)
|
||||
{
|
||||
const QModelIndexList indexes = internalSelectionModel->selectedRows();
|
||||
for (const QModelIndex ¤tIndex : indexes)
|
||||
for (const QModelIndex& currentIndex : indexes)
|
||||
{
|
||||
removeComment(currentIndex);
|
||||
}
|
||||
@@ -295,7 +318,7 @@ bool CommentModel::eventFilter(QObject *object, QEvent *event)
|
||||
return false;
|
||||
}
|
||||
|
||||
void CommentModel::rowDoubleClicked(const QModelIndex &index)
|
||||
void CommentModel::rowDoubleClicked(const QModelIndex& index)
|
||||
{
|
||||
if (!index.isValid())
|
||||
return;
|
||||
|
||||
@@ -36,8 +36,8 @@
|
||||
#ifndef COMMENTMODEL_H
|
||||
#define COMMENTMODEL_H
|
||||
|
||||
#include "tracetime.h"
|
||||
#include "timespan.h"
|
||||
#include "tracetime.h"
|
||||
|
||||
#include <QAbstractTableModel>
|
||||
#include <utility>
|
||||
@@ -50,22 +50,25 @@ class CommentModel : public QAbstractTableModel
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit CommentModel(QObject *parent = nullptr);
|
||||
explicit CommentModel(QObject* parent = nullptr);
|
||||
|
||||
struct Comment {
|
||||
struct Comment
|
||||
{
|
||||
traceTime time;
|
||||
QString text;
|
||||
};
|
||||
|
||||
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||
int columnCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||
int rowCount(const QModelIndex& parent = QModelIndex()) const override;
|
||||
int columnCount(const QModelIndex& parent = QModelIndex()) const override;
|
||||
|
||||
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
|
||||
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
|
||||
QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override;
|
||||
QVariant
|
||||
headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
|
||||
|
||||
Qt::ItemFlags flags(const QModelIndex &index) const override;
|
||||
Qt::ItemFlags flags(const QModelIndex& index) const override;
|
||||
|
||||
enum class Column {
|
||||
enum class Column
|
||||
{
|
||||
Time = 0,
|
||||
Comment,
|
||||
COLUMNCOUNT
|
||||
@@ -73,47 +76,47 @@ public:
|
||||
|
||||
void openContextMenu();
|
||||
|
||||
QItemSelectionModel *selectionModel() const;
|
||||
QItemSelectionModel* selectionModel() const;
|
||||
|
||||
void addComment(traceTime time);
|
||||
void addComment(traceTime time, QString text);
|
||||
|
||||
void removeComment(traceTime time);
|
||||
void removeComment(const QModelIndex &index);
|
||||
void removeComment(const QModelIndex& index);
|
||||
|
||||
const std::vector<Comment> &getComments() const;
|
||||
const std::vector<Comment>& getComments() const;
|
||||
|
||||
traceTime getTimeFromIndex(const QModelIndex &index) const;
|
||||
traceTime getTimeFromIndex(const QModelIndex& index) const;
|
||||
|
||||
QModelIndex hoveredComment(Timespan timespan) const;
|
||||
|
||||
public Q_SLOTS:
|
||||
void rowDoubleClicked(const QModelIndex &index);
|
||||
void rowDoubleClicked(const QModelIndex& index);
|
||||
|
||||
protected:
|
||||
bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override;
|
||||
bool setData(const QModelIndex& index, const QVariant& value, int role = Qt::EditRole) override;
|
||||
|
||||
/**
|
||||
* The eventFilter is used to delete comments using the delete key.
|
||||
*/
|
||||
bool eventFilter(QObject *object, QEvent *event) override;
|
||||
bool eventFilter(QObject* object, QEvent* event) override;
|
||||
|
||||
Q_SIGNALS:
|
||||
void editTriggered(const QModelIndex &index);
|
||||
void gotoCommentTriggered(const QModelIndex &index);
|
||||
void editTriggered(const QModelIndex& index);
|
||||
void gotoCommentTriggered(const QModelIndex& index);
|
||||
|
||||
private:
|
||||
void setUpActions();
|
||||
|
||||
std::vector<Comment> comments;
|
||||
|
||||
QAction *gotoAction;
|
||||
QAction *editAction;
|
||||
QAction *deleteAction;
|
||||
QAction *selectAllAction;
|
||||
QAction *deselectAllAction;
|
||||
QAction* gotoAction;
|
||||
QAction* editAction;
|
||||
QAction* deleteAction;
|
||||
QAction* selectAllAction;
|
||||
QAction* deselectAllAction;
|
||||
|
||||
QItemSelectionModel *internalSelectionModel;
|
||||
QItemSelectionModel* internalSelectionModel;
|
||||
};
|
||||
|
||||
#endif // COMMENTMODEL_H
|
||||
|
||||
@@ -35,10 +35,11 @@
|
||||
|
||||
#include "configmodels.h"
|
||||
|
||||
#include <QJsonObject>
|
||||
#include <QJsonDocument>
|
||||
#include <QJsonObject>
|
||||
|
||||
McConfigModel::McConfigModel(const TraceDB &traceFile, QObject *parent) : QAbstractTableModel(parent)
|
||||
McConfigModel::McConfigModel(const TraceDB& traceFile, QObject* parent) :
|
||||
QAbstractTableModel(parent)
|
||||
{
|
||||
QSqlDatabase db = traceFile.getDatabase();
|
||||
QString query = "SELECT MCconfig FROM GeneralInfo";
|
||||
@@ -52,7 +53,7 @@ McConfigModel::McConfigModel(const TraceDB &traceFile, QObject *parent) : QAbstr
|
||||
parseJson(mcConfigJson);
|
||||
}
|
||||
|
||||
void McConfigModel::parseJson(const QString &jsonString)
|
||||
void McConfigModel::parseJson(const QString& jsonString)
|
||||
{
|
||||
QJsonDocument jsonDocument = QJsonDocument::fromJson(jsonString.toUtf8());
|
||||
QJsonObject mcConfigJson = jsonDocument.object()["mcconfig"].toObject();
|
||||
@@ -76,31 +77,34 @@ void McConfigModel::parseJson(const QString &jsonString)
|
||||
}
|
||||
}
|
||||
|
||||
void McConfigModel::addAdditionalInfos(const GeneralInfo &generalInfo)
|
||||
void McConfigModel::addAdditionalInfos(const GeneralInfo& generalInfo)
|
||||
{
|
||||
auto addEntry = [this](const QString &key, const QString &value) { entries.push_back({key, value}); };
|
||||
auto addEntry = [this](const QString& key, const QString& value) {
|
||||
entries.push_back({key, value});
|
||||
};
|
||||
|
||||
addEntry("Number of Transactions", QString::number(generalInfo.numberOfTransactions));
|
||||
addEntry("Clock period", QString::number(generalInfo.clkPeriod) + " " + generalInfo.unitOfTime.toLower());
|
||||
addEntry("Clock period",
|
||||
QString::number(generalInfo.clkPeriod) + " " + generalInfo.unitOfTime.toLower());
|
||||
addEntry("Length of trace", prettyFormatTime(generalInfo.span.End()));
|
||||
addEntry("Window size", QString::number(generalInfo.windowSize));
|
||||
}
|
||||
|
||||
int McConfigModel::rowCount(const QModelIndex &parent) const
|
||||
int McConfigModel::rowCount(const QModelIndex& parent) const
|
||||
{
|
||||
Q_UNUSED(parent)
|
||||
|
||||
return entries.size();
|
||||
}
|
||||
|
||||
int McConfigModel::columnCount(const QModelIndex &parent) const
|
||||
int McConfigModel::columnCount(const QModelIndex& parent) const
|
||||
{
|
||||
Q_UNUSED(parent)
|
||||
|
||||
return 2;
|
||||
}
|
||||
|
||||
QVariant McConfigModel::data(const QModelIndex &index, int role) const
|
||||
QVariant McConfigModel::data(const QModelIndex& index, int role) const
|
||||
{
|
||||
if (!index.isValid())
|
||||
return QVariant();
|
||||
@@ -125,7 +129,8 @@ QVariant McConfigModel::headerData(int section, Qt::Orientation orientation, int
|
||||
|
||||
if (orientation == Qt::Horizontal)
|
||||
{
|
||||
switch (section) {
|
||||
switch (section)
|
||||
{
|
||||
case 0:
|
||||
return "Field";
|
||||
case 1:
|
||||
@@ -138,7 +143,7 @@ QVariant McConfigModel::headerData(int section, Qt::Orientation orientation, int
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
MemSpecModel::MemSpecModel(const TraceDB &traceFile, QObject *parent) : QAbstractItemModel(parent)
|
||||
MemSpecModel::MemSpecModel(const TraceDB& traceFile, QObject* parent) : QAbstractItemModel(parent)
|
||||
{
|
||||
QSqlDatabase db = traceFile.getDatabase();
|
||||
QString query = "SELECT Memspec FROM GeneralInfo";
|
||||
@@ -156,23 +161,24 @@ int MemSpecModel::Node::getRow() const
|
||||
if (!parent)
|
||||
return 0;
|
||||
|
||||
const auto &siblings = parent->children;
|
||||
const auto siblingsIt = std::find_if(siblings.begin(), siblings.end(), [this](const std::unique_ptr<Node> &node){
|
||||
return node.get() == this;
|
||||
});
|
||||
const auto& siblings = parent->children;
|
||||
const auto siblingsIt =
|
||||
std::find_if(siblings.begin(),
|
||||
siblings.end(),
|
||||
[this](const std::unique_ptr<Node>& node) { return node.get() == this; });
|
||||
|
||||
Q_ASSERT(siblingsIt != siblings.end());
|
||||
|
||||
return std::distance(siblings.begin(), siblingsIt);
|
||||
}
|
||||
|
||||
void MemSpecModel::parseJson(const QString &jsonString)
|
||||
void MemSpecModel::parseJson(const QString& jsonString)
|
||||
{
|
||||
QJsonDocument jsonDocument = QJsonDocument::fromJson(jsonString.toUtf8());
|
||||
QJsonObject memSpecJson = jsonDocument.object()["memspec"].toObject();
|
||||
|
||||
std::function<void(const QJsonObject &, std::unique_ptr<Node> &)> addNodes;
|
||||
addNodes = [&addNodes](const QJsonObject &obj, std::unique_ptr<Node> &parentNode)
|
||||
std::function<void(const QJsonObject&, std::unique_ptr<Node>&)> addNodes;
|
||||
addNodes = [&addNodes](const QJsonObject& obj, std::unique_ptr<Node>& parentNode)
|
||||
{
|
||||
for (auto key : obj.keys())
|
||||
{
|
||||
@@ -192,7 +198,8 @@ void MemSpecModel::parseJson(const QString &jsonString)
|
||||
value = currentValue.toBool() ? "True" : "False";
|
||||
}
|
||||
|
||||
std::unique_ptr<Node> node = std::unique_ptr<Node>(new Node({key, value}, parentNode.get()));
|
||||
std::unique_ptr<Node> node =
|
||||
std::unique_ptr<Node>(new Node({key, value}, parentNode.get()));
|
||||
addNodes(obj[key].toObject(), node);
|
||||
|
||||
parentNode->children.push_back(std::move(node));
|
||||
@@ -202,29 +209,29 @@ void MemSpecModel::parseJson(const QString &jsonString)
|
||||
addNodes(memSpecJson, rootNode);
|
||||
}
|
||||
|
||||
int MemSpecModel::rowCount(const QModelIndex &parent) const
|
||||
int MemSpecModel::rowCount(const QModelIndex& parent) const
|
||||
{
|
||||
if (parent.column() > 0)
|
||||
return 0;
|
||||
|
||||
const Node *parentNode;
|
||||
const Node* parentNode;
|
||||
|
||||
if (!parent.isValid())
|
||||
parentNode = rootNode.get();
|
||||
else
|
||||
parentNode = static_cast<const Node *>(parent.internalPointer());
|
||||
parentNode = static_cast<const Node*>(parent.internalPointer());
|
||||
|
||||
return parentNode->childCount();
|
||||
}
|
||||
|
||||
int MemSpecModel::columnCount(const QModelIndex &parent) const
|
||||
int MemSpecModel::columnCount(const QModelIndex& parent) const
|
||||
{
|
||||
Q_UNUSED(parent)
|
||||
|
||||
return 2;
|
||||
}
|
||||
|
||||
QVariant MemSpecModel::data(const QModelIndex &index, int role) const
|
||||
QVariant MemSpecModel::data(const QModelIndex& index, int role) const
|
||||
{
|
||||
if (!index.isValid())
|
||||
return QVariant();
|
||||
@@ -232,7 +239,7 @@ QVariant MemSpecModel::data(const QModelIndex &index, int role) const
|
||||
if (role != Qt::DisplayRole && role != Qt::ToolTipRole)
|
||||
return QVariant();
|
||||
|
||||
auto *node = static_cast<const Node *>(index.internalPointer());
|
||||
auto* node = static_cast<const Node*>(index.internalPointer());
|
||||
|
||||
if (index.column() == 0)
|
||||
return QVariant(node->data.first);
|
||||
@@ -247,7 +254,8 @@ QVariant MemSpecModel::headerData(int section, Qt::Orientation orientation, int
|
||||
|
||||
if (orientation == Qt::Horizontal)
|
||||
{
|
||||
switch (section) {
|
||||
switch (section)
|
||||
{
|
||||
case 0:
|
||||
return "Field";
|
||||
case 1:
|
||||
@@ -260,33 +268,33 @@ QVariant MemSpecModel::headerData(int section, Qt::Orientation orientation, int
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
QModelIndex MemSpecModel::index(int row, int column, const QModelIndex &parent) const
|
||||
QModelIndex MemSpecModel::index(int row, int column, const QModelIndex& parent) const
|
||||
{
|
||||
if (!hasIndex(row, column, parent))
|
||||
return QModelIndex();
|
||||
|
||||
const Node *parentNode;
|
||||
const Node* parentNode;
|
||||
|
||||
if (!parent.isValid())
|
||||
parentNode = rootNode.get();
|
||||
else
|
||||
parentNode = static_cast<const Node *>(parent.internalPointer());
|
||||
parentNode = static_cast<const Node*>(parent.internalPointer());
|
||||
|
||||
const Node *node = parentNode->children[row].get();
|
||||
const Node* node = parentNode->children[row].get();
|
||||
|
||||
return createIndex(row, column, const_cast<Node *>(node));
|
||||
return createIndex(row, column, const_cast<Node*>(node));
|
||||
}
|
||||
|
||||
QModelIndex MemSpecModel::parent(const QModelIndex &index) const
|
||||
QModelIndex MemSpecModel::parent(const QModelIndex& index) const
|
||||
{
|
||||
if (!index.isValid())
|
||||
return QModelIndex();
|
||||
|
||||
const Node *childNode = static_cast<const Node *>(index.internalPointer());
|
||||
const Node *parentNode = childNode->parent;
|
||||
const Node* childNode = static_cast<const Node*>(index.internalPointer());
|
||||
const Node* parentNode = childNode->parent;
|
||||
|
||||
if (!parentNode || parentNode == rootNode.get())
|
||||
return QModelIndex();
|
||||
|
||||
return createIndex(parentNode->getRow(), 0, const_cast<Node *>(parentNode));
|
||||
return createIndex(parentNode->getRow(), 0, const_cast<Node*>(parentNode));
|
||||
}
|
||||
|
||||
@@ -40,22 +40,23 @@
|
||||
#include "phases/dependencyinfos.h"
|
||||
|
||||
#include <QAbstractTableModel>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
class McConfigModel : public QAbstractTableModel
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit McConfigModel(const TraceDB &traceFile, QObject *parent = nullptr);
|
||||
explicit McConfigModel(const TraceDB& traceFile, QObject* parent = nullptr);
|
||||
|
||||
protected:
|
||||
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||
int columnCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||
int rowCount(const QModelIndex& parent = QModelIndex()) const override;
|
||||
int columnCount(const QModelIndex& parent = QModelIndex()) const override;
|
||||
|
||||
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
|
||||
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
|
||||
QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override;
|
||||
QVariant
|
||||
headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
|
||||
|
||||
private:
|
||||
/**
|
||||
@@ -63,13 +64,13 @@ private:
|
||||
* In case of failure, nothing is added and therefore the model
|
||||
* will stay empty.
|
||||
*/
|
||||
void parseJson(const QString &jsonString);
|
||||
void parseJson(const QString& jsonString);
|
||||
|
||||
/**
|
||||
* Add additional infos about the tracefile which were
|
||||
* previously displayed in the fileDescription widget.
|
||||
*/
|
||||
void addAdditionalInfos(const GeneralInfo &generalInfo);
|
||||
void addAdditionalInfos(const GeneralInfo& generalInfo);
|
||||
|
||||
std::vector<std::pair<QString, QString>> entries;
|
||||
};
|
||||
@@ -79,17 +80,18 @@ class MemSpecModel : public QAbstractItemModel
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit MemSpecModel(const TraceDB &traceFile, QObject *parent = nullptr);
|
||||
explicit MemSpecModel(const TraceDB& traceFile, QObject* parent = nullptr);
|
||||
|
||||
protected:
|
||||
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||
int columnCount(const QModelIndex &parent) const override;
|
||||
int rowCount(const QModelIndex& parent = QModelIndex()) const override;
|
||||
int columnCount(const QModelIndex& parent) const override;
|
||||
|
||||
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
|
||||
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
|
||||
QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override;
|
||||
QVariant
|
||||
headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
|
||||
|
||||
QModelIndex index(int row, int column, const QModelIndex &parent) const override;
|
||||
QModelIndex parent(const QModelIndex &index) const override;
|
||||
QModelIndex index(int row, int column, const QModelIndex& parent) const override;
|
||||
QModelIndex parent(const QModelIndex& index) const override;
|
||||
|
||||
private:
|
||||
/**
|
||||
@@ -97,7 +99,7 @@ private:
|
||||
* In case of failure, nothing is added and therefore the model
|
||||
* will stay empty.
|
||||
*/
|
||||
void parseJson(const QString &jsonString);
|
||||
void parseJson(const QString& jsonString);
|
||||
|
||||
struct Node
|
||||
{
|
||||
@@ -108,7 +110,7 @@ private:
|
||||
*/
|
||||
Node() = default;
|
||||
|
||||
Node(NodeData data, const Node *parent) : data(data), parent(parent) {}
|
||||
Node(NodeData data, const Node* parent) : data(data), parent(parent) {}
|
||||
|
||||
/**
|
||||
* Gets the row relative to its parent.
|
||||
@@ -118,7 +120,7 @@ private:
|
||||
|
||||
NodeData data;
|
||||
|
||||
const Node *parent = nullptr;
|
||||
const Node* parent = nullptr;
|
||||
std::vector<std::unique_ptr<Node>> children;
|
||||
};
|
||||
|
||||
|
||||
@@ -35,7 +35,8 @@
|
||||
|
||||
#include "dependencymodels.h"
|
||||
|
||||
DependencyInfosModel::DependencyInfosModel(TraceDB &traceFile, QObject *parent) : QAbstractItemModel(parent)
|
||||
DependencyInfosModel::DependencyInfosModel(TraceDB& traceFile, QObject* parent) :
|
||||
QAbstractItemModel(parent)
|
||||
{
|
||||
mDepInfosDepType = traceFile.getDependencyInfos(DependencyInfos::Type::DependencyType);
|
||||
mDepInfosTimeDep = traceFile.getDependencyInfos(DependencyInfos::Type::TimeDependency);
|
||||
@@ -53,9 +54,11 @@ int DependencyInfosModel::Node::getRow() const
|
||||
if (!parent)
|
||||
return 0;
|
||||
|
||||
const auto &siblings = parent->children;
|
||||
const auto siblingsIt = std::find_if(siblings.begin(), siblings.end(),
|
||||
[this](const std::unique_ptr<Node> &node) { return node.get() == this; });
|
||||
const auto& siblings = parent->children;
|
||||
const auto siblingsIt =
|
||||
std::find_if(siblings.begin(),
|
||||
siblings.end(),
|
||||
[this](const std::unique_ptr<Node>& node) { return node.get() == this; });
|
||||
|
||||
Q_ASSERT(siblingsIt != siblings.end());
|
||||
|
||||
@@ -65,48 +68,51 @@ int DependencyInfosModel::Node::getRow() const
|
||||
void DependencyInfosModel::parseInfos()
|
||||
{
|
||||
|
||||
std::vector<std::pair<QString, DependencyInfos &>> infos = {{"Dependency Granularity", mDepInfosDepType},
|
||||
{"Time Dependencies", mDepInfosTimeDep},
|
||||
{"Delayed Phases", mDepInfosDelPhase},
|
||||
{"Dependency Phases", mDepInfosDepPhase}};
|
||||
std::vector<std::pair<QString, DependencyInfos&>> infos = {
|
||||
{"Dependency Granularity", mDepInfosDepType},
|
||||
{"Time Dependencies", mDepInfosTimeDep},
|
||||
{"Delayed Phases", mDepInfosDelPhase},
|
||||
{"Dependency Phases", mDepInfosDepPhase}};
|
||||
|
||||
for (auto pair : infos)
|
||||
{
|
||||
std::unique_ptr<Node> node = std::unique_ptr<Node>(new Node({pair.first, ""}, rootNode.get()));
|
||||
std::unique_ptr<Node> node =
|
||||
std::unique_ptr<Node>(new Node({pair.first, ""}, rootNode.get()));
|
||||
|
||||
for (auto v : pair.second.getInfos())
|
||||
{
|
||||
QString value = QString::number(v.value) + " %";
|
||||
node->children.push_back(std::move(std::unique_ptr<Node>(new Node({v.id, value}, node.get()))));
|
||||
node->children.push_back(
|
||||
std::move(std::unique_ptr<Node>(new Node({v.id, value}, node.get()))));
|
||||
}
|
||||
|
||||
rootNode->children.push_back(std::move(node));
|
||||
}
|
||||
}
|
||||
|
||||
int DependencyInfosModel::rowCount(const QModelIndex &parent) const
|
||||
int DependencyInfosModel::rowCount(const QModelIndex& parent) const
|
||||
{
|
||||
if (parent.column() > 0)
|
||||
return 0;
|
||||
|
||||
const Node *parentNode;
|
||||
const Node* parentNode;
|
||||
|
||||
if (!parent.isValid())
|
||||
parentNode = rootNode.get();
|
||||
else
|
||||
parentNode = static_cast<const Node *>(parent.internalPointer());
|
||||
parentNode = static_cast<const Node*>(parent.internalPointer());
|
||||
|
||||
return parentNode->childCount();
|
||||
}
|
||||
|
||||
int DependencyInfosModel::columnCount(const QModelIndex &parent) const
|
||||
int DependencyInfosModel::columnCount(const QModelIndex& parent) const
|
||||
{
|
||||
Q_UNUSED(parent)
|
||||
|
||||
return 2;
|
||||
}
|
||||
|
||||
QVariant DependencyInfosModel::data(const QModelIndex &index, int role) const
|
||||
QVariant DependencyInfosModel::data(const QModelIndex& index, int role) const
|
||||
{
|
||||
if (!index.isValid())
|
||||
return QVariant();
|
||||
@@ -114,7 +120,7 @@ QVariant DependencyInfosModel::data(const QModelIndex &index, int role) const
|
||||
if (role != Qt::DisplayRole && role != Qt::ToolTipRole)
|
||||
return QVariant();
|
||||
|
||||
auto *node = static_cast<const Node *>(index.internalPointer());
|
||||
auto* node = static_cast<const Node*>(index.internalPointer());
|
||||
|
||||
if (index.column() == 0)
|
||||
return QVariant(node->data.first);
|
||||
@@ -143,33 +149,33 @@ QVariant DependencyInfosModel::headerData(int section, Qt::Orientation orientati
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
QModelIndex DependencyInfosModel::index(int row, int column, const QModelIndex &parent) const
|
||||
QModelIndex DependencyInfosModel::index(int row, int column, const QModelIndex& parent) const
|
||||
{
|
||||
if (!hasIndex(row, column, parent))
|
||||
return QModelIndex();
|
||||
|
||||
const Node *parentNode;
|
||||
const Node* parentNode;
|
||||
|
||||
if (!parent.isValid())
|
||||
parentNode = rootNode.get();
|
||||
else
|
||||
parentNode = static_cast<const Node *>(parent.internalPointer());
|
||||
parentNode = static_cast<const Node*>(parent.internalPointer());
|
||||
|
||||
const Node *node = parentNode->children[row].get();
|
||||
const Node* node = parentNode->children[row].get();
|
||||
|
||||
return createIndex(row, column, const_cast<Node *>(node));
|
||||
return createIndex(row, column, const_cast<Node*>(node));
|
||||
}
|
||||
|
||||
QModelIndex DependencyInfosModel::parent(const QModelIndex &index) const
|
||||
QModelIndex DependencyInfosModel::parent(const QModelIndex& index) const
|
||||
{
|
||||
if (!index.isValid())
|
||||
return QModelIndex();
|
||||
|
||||
const Node *childNode = static_cast<const Node *>(index.internalPointer());
|
||||
const Node *parentNode = childNode->parent;
|
||||
const Node* childNode = static_cast<const Node*>(index.internalPointer());
|
||||
const Node* parentNode = childNode->parent;
|
||||
|
||||
if (!parentNode)
|
||||
return QModelIndex();
|
||||
|
||||
return createIndex(parentNode->getRow(), 0, const_cast<Node *>(parentNode));
|
||||
return createIndex(parentNode->getRow(), 0, const_cast<Node*>(parentNode));
|
||||
}
|
||||
|
||||
@@ -40,27 +40,26 @@
|
||||
|
||||
#include <QAbstractTableModel>
|
||||
#include <QListWidget>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
class DependencyInfosModel : public QAbstractItemModel
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit DependencyInfosModel(TraceDB &traceFile, QObject *parent = nullptr);
|
||||
~DependencyInfosModel()
|
||||
{
|
||||
}
|
||||
explicit DependencyInfosModel(TraceDB& traceFile, QObject* parent = nullptr);
|
||||
~DependencyInfosModel() {}
|
||||
|
||||
protected:
|
||||
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||
int columnCount(const QModelIndex &parent) const override;
|
||||
int rowCount(const QModelIndex& parent = QModelIndex()) const override;
|
||||
int columnCount(const QModelIndex& parent) const override;
|
||||
|
||||
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
|
||||
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
|
||||
QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override;
|
||||
QVariant
|
||||
headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
|
||||
|
||||
QModelIndex index(int row, int column, const QModelIndex &parent) const override;
|
||||
QModelIndex parent(const QModelIndex &index) const override;
|
||||
QModelIndex index(int row, int column, const QModelIndex& parent) const override;
|
||||
QModelIndex parent(const QModelIndex& index) const override;
|
||||
|
||||
private:
|
||||
DependencyInfos mDepInfosDepType;
|
||||
@@ -73,25 +72,18 @@ private:
|
||||
{
|
||||
using NodeData = std::pair<QString, QString>;
|
||||
|
||||
Node()
|
||||
{
|
||||
}
|
||||
Node(NodeData data, const Node *parent) : data(data), parent(parent)
|
||||
{
|
||||
}
|
||||
Node() {}
|
||||
Node(NodeData data, const Node* parent) : data(data), parent(parent) {}
|
||||
|
||||
/**
|
||||
* Gets the row relative to its parent.
|
||||
*/
|
||||
int getRow() const;
|
||||
int childCount() const
|
||||
{
|
||||
return children.size();
|
||||
}
|
||||
int childCount() const { return children.size(); }
|
||||
|
||||
NodeData data;
|
||||
|
||||
const Node *parent = nullptr;
|
||||
const Node* parent = nullptr;
|
||||
std::vector<std::unique_ptr<Node>> children;
|
||||
};
|
||||
|
||||
|
||||
@@ -35,10 +35,12 @@
|
||||
|
||||
#include "QStringComparator.h"
|
||||
|
||||
bool QStringsComparator::operator()(const QString& s1, const QString& s2) const {
|
||||
bool QStringsComparator::operator()(const QString& s1, const QString& s2) const
|
||||
{
|
||||
return s1.compare(s2) < 0;
|
||||
}
|
||||
|
||||
bool QStringsComparator::compareQStrings(const QString& s1, const QString& s2) {
|
||||
bool QStringsComparator::compareQStrings(const QString& s1, const QString& s2)
|
||||
{
|
||||
return s1.compare(s2) < 0;
|
||||
}
|
||||
@@ -37,7 +37,8 @@
|
||||
|
||||
#include <QString>
|
||||
|
||||
struct QStringsComparator {
|
||||
struct QStringsComparator
|
||||
{
|
||||
bool operator()(const QString& s1, const QString& s2) const;
|
||||
static bool compareQStrings(const QString& s1, const QString& s2);
|
||||
};
|
||||
@@ -35,15 +35,16 @@
|
||||
|
||||
#include "StringMapper.h"
|
||||
|
||||
StringMapper::StringMapper(const QString& name) {
|
||||
StringMapper::StringMapper(const QString& name)
|
||||
{
|
||||
mIDEnum = getIDEnum(name);
|
||||
mIDStr = name;
|
||||
mIsPool = mAuxIsPool(mIDEnum);
|
||||
|
||||
}
|
||||
|
||||
QString StringMapper::getIDStr(StringMapper::Identifier id) {
|
||||
static const std::map<StringMapper::Identifier, QString> enumToStr {
|
||||
QString StringMapper::getIDStr(StringMapper::Identifier id)
|
||||
{
|
||||
static const std::map<StringMapper::Identifier, QString> enumToStr{
|
||||
{StringMapper::Identifier::CMD_BUS, "CMD_BUS"},
|
||||
{StringMapper::Identifier::RAS_BUS, "RAS_BUS"},
|
||||
{StringMapper::Identifier::CAS_BUS, "CAS_BUS"},
|
||||
@@ -77,13 +78,16 @@ QString StringMapper::getIDStr(StringMapper::Identifier id) {
|
||||
};
|
||||
|
||||
auto it = enumToStr.find(id);
|
||||
if (it != enumToStr.end()) return it->second;
|
||||
else throw std::invalid_argument("The provided StringMapper::StringMapper::Identifier is not valid.");
|
||||
|
||||
if (it != enumToStr.end())
|
||||
return it->second;
|
||||
else
|
||||
throw std::invalid_argument(
|
||||
"The provided StringMapper::StringMapper::Identifier is not valid.");
|
||||
}
|
||||
|
||||
StringMapper::Identifier StringMapper::getIDEnum(const QString& id) {
|
||||
static const std::map<QString, StringMapper::Identifier, QStringsComparator> strToEnum {
|
||||
StringMapper::Identifier StringMapper::getIDEnum(const QString& id)
|
||||
{
|
||||
static const std::map<QString, StringMapper::Identifier, QStringsComparator> strToEnum{
|
||||
{"CMD_BUS", StringMapper::Identifier::CMD_BUS},
|
||||
{"RAS_BUS", StringMapper::Identifier::RAS_BUS},
|
||||
{"CAS_BUS", StringMapper::Identifier::CAS_BUS},
|
||||
@@ -117,43 +121,48 @@ StringMapper::Identifier StringMapper::getIDEnum(const QString& id) {
|
||||
};
|
||||
|
||||
auto it = strToEnum.find(id);
|
||||
if (it != strToEnum.end()) return it->second;
|
||||
else throw std::invalid_argument("The provided StringMapper::Identifier '" + id.toStdString() + "' is not valid.");
|
||||
|
||||
if (it != strToEnum.end())
|
||||
return it->second;
|
||||
else
|
||||
throw std::invalid_argument("The provided StringMapper::Identifier '" + id.toStdString() +
|
||||
"' is not valid.");
|
||||
}
|
||||
|
||||
bool StringMapper::mAuxIsPool(StringMapper::Identifier id) {
|
||||
return id == StringMapper::Identifier::CMD_BUS
|
||||
|| id == StringMapper::Identifier::RAS_BUS
|
||||
|| id == StringMapper::Identifier::CAS_BUS
|
||||
|| id == StringMapper::Identifier::NAW
|
||||
|| id == StringMapper::Identifier::FAW
|
||||
|| id == StringMapper::Identifier::_32AW
|
||||
|| id == StringMapper::Identifier::FAW_LOGICAL
|
||||
|| id == StringMapper::Identifier::FAW_PHYSICAL;
|
||||
|
||||
bool StringMapper::mAuxIsPool(StringMapper::Identifier id)
|
||||
{
|
||||
return id == StringMapper::Identifier::CMD_BUS || id == StringMapper::Identifier::RAS_BUS ||
|
||||
id == StringMapper::Identifier::CAS_BUS || id == StringMapper::Identifier::NAW ||
|
||||
id == StringMapper::Identifier::FAW || id == StringMapper::Identifier::_32AW ||
|
||||
id == StringMapper::Identifier::FAW_LOGICAL ||
|
||||
id == StringMapper::Identifier::FAW_PHYSICAL;
|
||||
}
|
||||
|
||||
bool StringMapper::operator==(const StringMapper& str2) const {
|
||||
bool StringMapper::operator==(const StringMapper& str2) const
|
||||
{
|
||||
return mIDEnum == str2.mIDEnum;
|
||||
}
|
||||
|
||||
bool StringMapper::operator!=(const StringMapper& str2) const {
|
||||
bool StringMapper::operator!=(const StringMapper& str2) const
|
||||
{
|
||||
return mIDEnum != str2.mIDEnum;
|
||||
}
|
||||
|
||||
bool StringMapper::operator<(const StringMapper& str2) const {
|
||||
bool StringMapper::operator<(const StringMapper& str2) const
|
||||
{
|
||||
return mIDEnum < str2.mIDEnum;
|
||||
}
|
||||
|
||||
bool StringMapper::compare(const StringMapper& str1, const StringMapper& str2) {
|
||||
bool StringMapper::compare(const StringMapper& str1, const StringMapper& str2)
|
||||
{
|
||||
return str1.getIDEnum() < str2.getIDEnum();
|
||||
}
|
||||
|
||||
bool StringMapper::operator==(const StringMapper::Identifier& id) const {
|
||||
bool StringMapper::operator==(const StringMapper::Identifier& id) const
|
||||
{
|
||||
return mIDEnum == id;
|
||||
}
|
||||
|
||||
bool StringMapper::operator!=(const StringMapper::Identifier& id) const {
|
||||
bool StringMapper::operator!=(const StringMapper::Identifier& id) const
|
||||
{
|
||||
return mIDEnum != id;
|
||||
}
|
||||
|
||||
@@ -35,73 +35,75 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <map>
|
||||
#include "QStringComparator.h"
|
||||
#include <map>
|
||||
|
||||
class StringMapper {
|
||||
public:
|
||||
enum Identifier {
|
||||
None,
|
||||
CMD_BUS,
|
||||
RAS_BUS,
|
||||
CAS_BUS,
|
||||
NAW,
|
||||
FAW,
|
||||
_32AW,
|
||||
FAW_LOGICAL,
|
||||
FAW_PHYSICAL,
|
||||
REFAB,
|
||||
PREAB,
|
||||
PDEP,
|
||||
PDXP,
|
||||
SREFEN,
|
||||
SREFEX,
|
||||
PDEA,
|
||||
PDXA,
|
||||
SRPDEN,
|
||||
SRPDEX,
|
||||
ACT,
|
||||
RD,
|
||||
WR,
|
||||
PREPB,
|
||||
RDA,
|
||||
WRA,
|
||||
REFPB,
|
||||
REFP2B,
|
||||
PRESB,
|
||||
RFMAB,
|
||||
REFSB,
|
||||
RFMSB
|
||||
};
|
||||
class StringMapper
|
||||
{
|
||||
public:
|
||||
enum Identifier
|
||||
{
|
||||
None,
|
||||
CMD_BUS,
|
||||
RAS_BUS,
|
||||
CAS_BUS,
|
||||
NAW,
|
||||
FAW,
|
||||
_32AW,
|
||||
FAW_LOGICAL,
|
||||
FAW_PHYSICAL,
|
||||
REFAB,
|
||||
PREAB,
|
||||
PDEP,
|
||||
PDXP,
|
||||
SREFEN,
|
||||
SREFEX,
|
||||
PDEA,
|
||||
PDXA,
|
||||
SRPDEN,
|
||||
SRPDEX,
|
||||
ACT,
|
||||
RD,
|
||||
WR,
|
||||
PREPB,
|
||||
RDA,
|
||||
WRA,
|
||||
REFPB,
|
||||
REFP2B,
|
||||
PRESB,
|
||||
RFMAB,
|
||||
REFSB,
|
||||
RFMSB
|
||||
};
|
||||
|
||||
public:
|
||||
StringMapper() = default;
|
||||
StringMapper(const QString& id);
|
||||
StringMapper(const char* str) : StringMapper(std::forward<QString>(str)) {}
|
||||
~StringMapper() = default;
|
||||
public:
|
||||
StringMapper() = default;
|
||||
StringMapper(const QString& id);
|
||||
StringMapper(const char* str) : StringMapper(std::forward<QString>(str)) {}
|
||||
~StringMapper() = default;
|
||||
|
||||
Identifier getIDEnum() const { return mIDEnum; }
|
||||
const QString getIDStr() const { return mIDStr; }
|
||||
Identifier getIDEnum() const { return mIDEnum; }
|
||||
const QString getIDStr() const { return mIDStr; }
|
||||
|
||||
bool isPool() const { return mIsPool; }
|
||||
bool isPool() const { return mIsPool; }
|
||||
|
||||
static QString getIDStr(Identifier);
|
||||
static Identifier getIDEnum(const QString&);
|
||||
static QString getIDStr(Identifier);
|
||||
static Identifier getIDEnum(const QString&);
|
||||
|
||||
bool operator==(const StringMapper&) const;
|
||||
bool operator!=(const StringMapper&) const;
|
||||
bool operator<(const StringMapper&) const;
|
||||
|
||||
bool operator==(const Identifier&) const;
|
||||
bool operator!=(const Identifier&) const;
|
||||
bool operator==(const StringMapper&) const;
|
||||
bool operator!=(const StringMapper&) const;
|
||||
bool operator<(const StringMapper&) const;
|
||||
|
||||
static bool compare(const StringMapper&, const StringMapper&);
|
||||
bool operator==(const Identifier&) const;
|
||||
bool operator!=(const Identifier&) const;
|
||||
|
||||
protected:
|
||||
Identifier mIDEnum = None;
|
||||
QString mIDStr = "";
|
||||
bool mIsPool = false;
|
||||
static bool compare(const StringMapper&, const StringMapper&);
|
||||
|
||||
protected:
|
||||
static bool mAuxIsPool(Identifier);
|
||||
protected:
|
||||
Identifier mIDEnum = None;
|
||||
QString mIDStr = "";
|
||||
bool mIsPool = false;
|
||||
|
||||
protected:
|
||||
static bool mAuxIsPool(Identifier);
|
||||
};
|
||||
|
||||
@@ -36,19 +36,20 @@
|
||||
#pragma once
|
||||
|
||||
#include <algorithm>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
#include <vector>
|
||||
|
||||
#include <QString>
|
||||
#include <QJsonDocument>
|
||||
#include <QJsonValue>
|
||||
#include <QJsonArray>
|
||||
#include <QJsonDocument>
|
||||
#include <QJsonObject>
|
||||
#include <QJsonValue>
|
||||
#include <QString>
|
||||
|
||||
#include "businessObjects/phases/phasedependency.h"
|
||||
#include "timedependency.h"
|
||||
|
||||
struct PhaseTimeDependencies {
|
||||
struct PhaseTimeDependencies
|
||||
{
|
||||
explicit PhaseTimeDependencies(std::initializer_list<TimeDependency> d) : dependencies(d) {}
|
||||
|
||||
std::vector<TimeDependency> dependencies;
|
||||
@@ -57,7 +58,8 @@ struct PhaseTimeDependencies {
|
||||
|
||||
typedef std::map<StringMapper, PhaseTimeDependencies> DependencyMap;
|
||||
|
||||
struct DBDependencyEntry {
|
||||
struct DBDependencyEntry
|
||||
{
|
||||
size_t delayedPhaseID;
|
||||
QString delayedPhaseName;
|
||||
QString dependencyType;
|
||||
|
||||
@@ -35,29 +35,41 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "StringMapper.h"
|
||||
#include <QString>
|
||||
#include <memory>
|
||||
#include "StringMapper.h"
|
||||
|
||||
class DBPhaseEntryBase;
|
||||
|
||||
#define PASSFUNCTIONDECL (const std::shared_ptr<DBPhaseEntryBase> thisPhase, const std::shared_ptr<DBPhaseEntryBase> otherPhase)
|
||||
struct PassFunction {
|
||||
using Fn = std::function<bool PASSFUNCTIONDECL>;
|
||||
PassFunction(Fn passFunction) : mPassFn{std::move(passFunction)} {}
|
||||
#define PASSFUNCTIONDECL \
|
||||
(const std::shared_ptr<DBPhaseEntryBase> thisPhase, \
|
||||
const std::shared_ptr<DBPhaseEntryBase> otherPhase)
|
||||
struct PassFunction
|
||||
{
|
||||
using Fn = std::function<bool PASSFUNCTIONDECL>;
|
||||
PassFunction(Fn passFunction) : mPassFn{std::move(passFunction)} {}
|
||||
|
||||
bool execute PASSFUNCTIONDECL { return mPassFn(thisPhase, otherPhase); }
|
||||
bool execute PASSFUNCTIONDECL { return mPassFn(thisPhase, otherPhase); }
|
||||
|
||||
Fn mPassFn;
|
||||
Fn mPassFn;
|
||||
};
|
||||
|
||||
class TimeDependency {
|
||||
class TimeDependency
|
||||
{
|
||||
public:
|
||||
TimeDependency() = default;
|
||||
TimeDependency(size_t timeValue, QString phaseDep, DependencyType depType,
|
||||
QString timeDepName, std::shared_ptr<PassFunction> pass=nullptr)
|
||||
: timeValue{timeValue}, phaseDep{phaseDep}, depType{depType},
|
||||
timeDepName{timeDepName}, passFunction{pass} {}
|
||||
TimeDependency(size_t timeValue,
|
||||
QString phaseDep,
|
||||
DependencyType depType,
|
||||
QString timeDepName,
|
||||
std::shared_ptr<PassFunction> pass = nullptr) :
|
||||
timeValue{timeValue},
|
||||
phaseDep{phaseDep},
|
||||
depType{depType},
|
||||
timeDepName{timeDepName},
|
||||
passFunction{pass}
|
||||
{
|
||||
}
|
||||
|
||||
size_t timeValue;
|
||||
StringMapper phaseDep;
|
||||
|
||||
@@ -35,32 +35,40 @@
|
||||
|
||||
#include "configurationBase.h"
|
||||
|
||||
const uint ConfigurationBase::getClk() const {
|
||||
if (!mDeviceDeps)
|
||||
throw std::invalid_argument("Invalid DRAMTimeDependenciesBase object in 'ConfigurationBase::getClk'.");
|
||||
const uint ConfigurationBase::getClk() const
|
||||
{
|
||||
if (!mDeviceDeps)
|
||||
throw std::invalid_argument(
|
||||
"Invalid DRAMTimeDependenciesBase object in 'ConfigurationBase::getClk'.");
|
||||
|
||||
return mDeviceDeps->getClk();
|
||||
}
|
||||
|
||||
DependencyMap ConfigurationBase::getDependencies(std::vector<QString>& commands) const {
|
||||
if (!mDeviceDeps)
|
||||
throw std::invalid_argument("Invalid DRAMTimeDependenciesBase object in 'ConfigurationBase::getDependencies'.");
|
||||
DependencyMap ConfigurationBase::getDependencies(std::vector<QString>& commands) const
|
||||
{
|
||||
if (!mDeviceDeps)
|
||||
throw std::invalid_argument(
|
||||
"Invalid DRAMTimeDependenciesBase object in 'ConfigurationBase::getDependencies'.");
|
||||
|
||||
return mDeviceDeps->getDependencies(commands);
|
||||
}
|
||||
|
||||
PoolControllerMap ConfigurationBase::getPools() const {
|
||||
if (!mDeviceDeps)
|
||||
throw std::invalid_argument("Invalid DRAMTimeDependenciesBase object in 'ConfigurationBase::getAWPools'.");
|
||||
PoolControllerMap ConfigurationBase::getPools() const
|
||||
{
|
||||
if (!mDeviceDeps)
|
||||
throw std::invalid_argument(
|
||||
"Invalid DRAMTimeDependenciesBase object in 'ConfigurationBase::getAWPools'.");
|
||||
|
||||
return mDeviceDeps->getPools();
|
||||
}
|
||||
|
||||
const QString ConfigurationBase::getDeviceName(const TraceDB& tdb) {
|
||||
const QString ConfigurationBase::getDeviceName(const TraceDB& tdb)
|
||||
{
|
||||
return mGetMemspec(tdb)["memoryType"].toString();
|
||||
}
|
||||
|
||||
const uint ConfigurationBase::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 +80,8 @@ const uint ConfigurationBase::mGetClk(const TraceDB& tdb) {
|
||||
return clock;
|
||||
}
|
||||
|
||||
const QJsonObject ConfigurationBase::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);
|
||||
|
||||
@@ -37,30 +37,30 @@
|
||||
|
||||
#include <QSqlQuery>
|
||||
|
||||
#include "businessObjects/dramTimeDependencies/deviceDependencies/dramtimedependenciesbase.h"
|
||||
#include "businessObjects/dramTimeDependencies/dbEntries/dbphaseentryBase.h"
|
||||
#include "businessObjects/dramTimeDependencies/deviceDependencies/dramtimedependenciesbase.h"
|
||||
|
||||
class ConfigurationBase {
|
||||
class ConfigurationBase
|
||||
{
|
||||
public:
|
||||
ConfigurationBase() {};
|
||||
virtual ~ConfigurationBase() = default;
|
||||
ConfigurationBase(){};
|
||||
virtual ~ConfigurationBase() = default;
|
||||
|
||||
virtual QString getQueryStr(const std::vector<QString>& commands) const = 0;
|
||||
virtual std::shared_ptr<DBPhaseEntryBase> makePhaseEntry(const QSqlQuery&) const = 0;
|
||||
|
||||
// Delegated methods
|
||||
const uint getClk() const;
|
||||
DependencyMap getDependencies(std::vector<QString>& commands) const;
|
||||
PoolControllerMap getPools() const;
|
||||
virtual QString getQueryStr(const std::vector<QString>& commands) const = 0;
|
||||
virtual std::shared_ptr<DBPhaseEntryBase> makePhaseEntry(const QSqlQuery&) const = 0;
|
||||
|
||||
static const QString getDeviceName(const TraceDB& tdb);
|
||||
// Delegated methods
|
||||
const uint getClk() const;
|
||||
DependencyMap getDependencies(std::vector<QString>& commands) const;
|
||||
PoolControllerMap getPools() const;
|
||||
|
||||
static const QString getDeviceName(const TraceDB& tdb);
|
||||
|
||||
protected:
|
||||
std::shared_ptr<DRAMTimeDependenciesBase> mDeviceDeps = nullptr;
|
||||
std::shared_ptr<DRAMTimeDependenciesBase> mDeviceDeps = nullptr;
|
||||
|
||||
static const uint mGetClk(const TraceDB& tdb);
|
||||
static const QJsonObject mGetMemspec(const TraceDB& tdb);
|
||||
|
||||
QSqlQuery mExecuteQuery(const QString& queryStr);
|
||||
static const uint mGetClk(const TraceDB& tdb);
|
||||
static const QJsonObject mGetMemspec(const TraceDB& tdb);
|
||||
|
||||
QSqlQuery mExecuteQuery(const QString& queryStr);
|
||||
};
|
||||
|
||||
@@ -35,88 +35,111 @@
|
||||
|
||||
#include "configurationfactory.h"
|
||||
|
||||
std::shared_ptr<ConfigurationBase> ConfigurationFactory::make(const TraceDB& tdb) {
|
||||
std::shared_ptr<ConfigurationBase> ConfigurationFactory::make(const TraceDB& tdb)
|
||||
{
|
||||
const QString deviceName = ConfigurationBase::getDeviceName(tdb);
|
||||
|
||||
if (deviceName == "DDR3") {
|
||||
|
||||
if (deviceName == "DDR3")
|
||||
{
|
||||
return std::make_shared<DDR3Configuration>(tdb);
|
||||
|
||||
} else if (deviceName == "DDR4") {
|
||||
return std::make_shared<DDR4Configuration>(tdb);
|
||||
|
||||
} else if (deviceName == "HBM2") {
|
||||
return std::make_shared<HBM2Configuration>(tdb);
|
||||
|
||||
} else if (deviceName == "LPDDR4") {
|
||||
return std::make_shared<LPDDR4Configuration>(tdb);
|
||||
|
||||
} else if (deviceName == "DDR5") {
|
||||
return std::make_shared<DDR5Configuration>(tdb);
|
||||
|
||||
} else if (deviceName == "LPDDR5") {
|
||||
return std::make_shared<LPDDR5Configuration>(tdb);
|
||||
|
||||
} else {
|
||||
// TODO maybe throw?
|
||||
throw std::invalid_argument("Could not find the device type '" + deviceName.toStdString() + '\'');
|
||||
|
||||
}
|
||||
|
||||
else if (deviceName == "DDR4")
|
||||
{
|
||||
return std::make_shared<DDR4Configuration>(tdb);
|
||||
}
|
||||
else if (deviceName == "HBM2")
|
||||
{
|
||||
return std::make_shared<HBM2Configuration>(tdb);
|
||||
}
|
||||
else if (deviceName == "LPDDR4")
|
||||
{
|
||||
return std::make_shared<LPDDR4Configuration>(tdb);
|
||||
}
|
||||
else if (deviceName == "DDR5")
|
||||
{
|
||||
return std::make_shared<DDR5Configuration>(tdb);
|
||||
}
|
||||
else if (deviceName == "LPDDR5")
|
||||
{
|
||||
return std::make_shared<LPDDR5Configuration>(tdb);
|
||||
}
|
||||
else
|
||||
{
|
||||
// TODO maybe throw?
|
||||
throw std::invalid_argument("Could not find the device type '" + deviceName.toStdString() +
|
||||
'\'');
|
||||
}
|
||||
}
|
||||
|
||||
const std::vector<QString> ConfigurationFactory::possiblePhases(const TraceDB& tdb) {
|
||||
const std::vector<QString> ConfigurationFactory::possiblePhases(const TraceDB& tdb)
|
||||
{
|
||||
const QString deviceName = ConfigurationBase::getDeviceName(tdb);
|
||||
|
||||
if (deviceName == "DDR3") {
|
||||
|
||||
if (deviceName == "DDR3")
|
||||
{
|
||||
// return DDR3TimeDependencies::getPossiblePhases();
|
||||
return TimeDependenciesInfoDDR3::getPossiblePhases();
|
||||
|
||||
} else if (deviceName == "DDR4") {
|
||||
}
|
||||
else if (deviceName == "DDR4")
|
||||
{
|
||||
return TimeDependenciesInfoDDR4::getPossiblePhases();
|
||||
|
||||
} else if (deviceName == "HBM2") {
|
||||
}
|
||||
else if (deviceName == "HBM2")
|
||||
{
|
||||
return TimeDependenciesInfoHBM2::getPossiblePhases();
|
||||
|
||||
} else if (deviceName == "LPDDR4") {
|
||||
}
|
||||
else if (deviceName == "LPDDR4")
|
||||
{
|
||||
return TimeDependenciesInfoLPDDR4::getPossiblePhases();
|
||||
|
||||
} else if (deviceName == "DDR5") {
|
||||
}
|
||||
else if (deviceName == "DDR5")
|
||||
{
|
||||
return TimeDependenciesInfoDDR5::getPossiblePhases();
|
||||
|
||||
} else if (deviceName == "LPDDR5") {
|
||||
}
|
||||
else if (deviceName == "LPDDR5")
|
||||
{
|
||||
return TimeDependenciesInfoLPDDR5::getPossiblePhases();
|
||||
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
// TODO maybe throw?
|
||||
// throw std::invalid_argument("Could not find the device type '" + deviceName.toStdString() + '\'');
|
||||
// throw std::invalid_argument("Could not find the device type '" + deviceName.toStdString()
|
||||
// + '\'');
|
||||
return {""};
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
bool ConfigurationFactory::deviceSupported(const TraceDB& tdb) {
|
||||
bool ConfigurationFactory::deviceSupported(const TraceDB& tdb)
|
||||
{
|
||||
uint clk; // Not used
|
||||
const QString deviceName = ConfigurationBase::getDeviceName(tdb);
|
||||
|
||||
if (deviceName == "DDR3") {
|
||||
if (deviceName == "DDR3")
|
||||
{
|
||||
return true;
|
||||
|
||||
} else if (deviceName == "DDR4") {
|
||||
}
|
||||
else if (deviceName == "DDR4")
|
||||
{
|
||||
return true;
|
||||
|
||||
} else if (deviceName == "HBM2") {
|
||||
}
|
||||
else if (deviceName == "HBM2")
|
||||
{
|
||||
return true;
|
||||
|
||||
} else if (deviceName == "LPDDR4") {
|
||||
}
|
||||
else if (deviceName == "LPDDR4")
|
||||
{
|
||||
return true;
|
||||
|
||||
} else if (deviceName == "DDR5") {
|
||||
}
|
||||
else if (deviceName == "DDR5")
|
||||
{
|
||||
return true;
|
||||
|
||||
} else if (deviceName == "LPDDR5") {
|
||||
}
|
||||
else if (deviceName == "LPDDR5")
|
||||
{
|
||||
return true;
|
||||
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,14 +41,15 @@
|
||||
|
||||
#include "specialized/DDR3Configuration.h"
|
||||
#include "specialized/DDR4Configuration.h"
|
||||
#include "specialized/DDR5Configuration.h"
|
||||
#include "specialized/HBM2Configuration.h"
|
||||
#include "specialized/LPDDR4Configuration.h"
|
||||
#include "specialized/DDR5Configuration.h"
|
||||
#include "specialized/LPDDR5Configuration.h"
|
||||
|
||||
#include "data/tracedb.h"
|
||||
|
||||
class ConfigurationFactory {
|
||||
class ConfigurationFactory
|
||||
{
|
||||
public:
|
||||
static std::shared_ptr<ConfigurationBase> make(const TraceDB& tdb);
|
||||
|
||||
|
||||
@@ -35,27 +35,32 @@
|
||||
|
||||
#include "DDR3Configuration.h"
|
||||
|
||||
DDR3Configuration::DDR3Configuration(const TraceDB& tdb) {
|
||||
// mDeviceDeps = std::make_shared<DDR3TimeDependencies>(std::forward<const QJsonObject>(mGetMemspec(tdb)), mGetClk(tdb));
|
||||
mDeviceDeps = std::make_shared<TimeDependenciesInfoDDR3>(std::forward<const QJsonObject>(mGetMemspec(tdb)), mGetClk(tdb));
|
||||
|
||||
DDR3Configuration::DDR3Configuration(const TraceDB& tdb)
|
||||
{
|
||||
// mDeviceDeps = std::make_shared<DDR3TimeDependencies>(std::forward<const
|
||||
// QJsonObject>(mGetMemspec(tdb)), mGetClk(tdb));
|
||||
mDeviceDeps = std::make_shared<TimeDependenciesInfoDDR3>(
|
||||
std::forward<const QJsonObject>(mGetMemspec(tdb)), mGetClk(tdb));
|
||||
}
|
||||
|
||||
QString DDR3Configuration::getQueryStr(const std::vector<QString>& commands) const
|
||||
{
|
||||
QString queryStr = "SELECT Phases.ID, Phases.PhaseName, Phases.PhaseBegin, Phases.PhaseEnd, Phases.Transact, Phases.Bank, Phases.Rank "
|
||||
" FROM Phases "
|
||||
" WHERE PhaseName IN (";
|
||||
|
||||
for (const auto& cmd : commands) {
|
||||
QString queryStr = "SELECT Phases.ID, Phases.PhaseName, Phases.PhaseBegin, Phases.PhaseEnd, "
|
||||
"Phases.Transact, Phases.Bank, Phases.Rank "
|
||||
" FROM Phases "
|
||||
" WHERE PhaseName IN (";
|
||||
|
||||
for (const auto& cmd : commands)
|
||||
{
|
||||
queryStr = queryStr + '\"' + cmd + "\",";
|
||||
}
|
||||
queryStr.back() = ')';
|
||||
queryStr.back() = ')';
|
||||
queryStr += " ORDER BY PhaseBegin; ";
|
||||
|
||||
return queryStr;
|
||||
}
|
||||
|
||||
std::shared_ptr<DBPhaseEntryBase> DDR3Configuration::makePhaseEntry(const QSqlQuery& query) const {
|
||||
std::shared_ptr<DBPhaseEntryBase> DDR3Configuration::makePhaseEntry(const QSqlQuery& query) const
|
||||
{
|
||||
return std::make_shared<DDR3DBPhaseEntry>(query);
|
||||
}
|
||||
|
||||
@@ -36,15 +36,16 @@
|
||||
#pragma once
|
||||
|
||||
#include "businessObjects/dramTimeDependencies/configurations/configurationBase.h"
|
||||
// #include "businessObjects/dramTimeDependencies/deviceDependencies/specialized/DDR3TimeDependencies.h"
|
||||
#include "businessObjects/dramTimeDependencies/deviceDependencies/specialized/TimeDependenciesInfoDDR3.h"
|
||||
// #include
|
||||
// "businessObjects/dramTimeDependencies/deviceDependencies/specialized/DDR3TimeDependencies.h"
|
||||
#include "businessObjects/dramTimeDependencies/dbEntries/specialized/DDR3dbphaseentry.h"
|
||||
#include "businessObjects/dramTimeDependencies/deviceDependencies/specialized/TimeDependenciesInfoDDR3.h"
|
||||
|
||||
class DDR3Configuration : public ConfigurationBase {
|
||||
public:
|
||||
class DDR3Configuration : public ConfigurationBase
|
||||
{
|
||||
public:
|
||||
DDR3Configuration(const TraceDB& tdb);
|
||||
|
||||
QString getQueryStr(const std::vector<QString>& commands) const override;
|
||||
std::shared_ptr<DBPhaseEntryBase> makePhaseEntry(const QSqlQuery&) const override;
|
||||
|
||||
};
|
||||
|
||||
@@ -37,24 +37,28 @@
|
||||
|
||||
DDR4Configuration::DDR4Configuration(const TraceDB& tdb)
|
||||
{
|
||||
mDeviceDeps = std::make_shared<TimeDependenciesInfoDDR4>(std::forward<const QJsonObject>(mGetMemspec(tdb)), mGetClk(tdb));
|
||||
mDeviceDeps = std::make_shared<TimeDependenciesInfoDDR4>(
|
||||
std::forward<const QJsonObject>(mGetMemspec(tdb)), mGetClk(tdb));
|
||||
}
|
||||
|
||||
QString DDR4Configuration::getQueryStr(const std::vector<QString>& commands) const
|
||||
{
|
||||
QString queryStr = "SELECT Phases.ID, Phases.PhaseName, Phases.PhaseBegin, Phases.PhaseEnd, Phases.Transact, Phases.Bank, Phases.Bankgroup, Phases.Rank "
|
||||
" FROM Phases "
|
||||
" WHERE PhaseName IN (";
|
||||
|
||||
for (const auto& cmd : commands) {
|
||||
QString queryStr = "SELECT Phases.ID, Phases.PhaseName, Phases.PhaseBegin, Phases.PhaseEnd, "
|
||||
"Phases.Transact, Phases.Bank, Phases.Bankgroup, Phases.Rank "
|
||||
" FROM Phases "
|
||||
" WHERE PhaseName IN (";
|
||||
|
||||
for (const auto& cmd : commands)
|
||||
{
|
||||
queryStr = queryStr + '\"' + cmd + "\",";
|
||||
}
|
||||
queryStr.back() = ')';
|
||||
queryStr.back() = ')';
|
||||
queryStr += " ORDER BY PhaseBegin; ";
|
||||
|
||||
return queryStr;
|
||||
}
|
||||
|
||||
std::shared_ptr<DBPhaseEntryBase> DDR4Configuration::makePhaseEntry(const QSqlQuery& query) const {
|
||||
std::shared_ptr<DBPhaseEntryBase> DDR4Configuration::makePhaseEntry(const QSqlQuery& query) const
|
||||
{
|
||||
return std::make_shared<DDR4DBPhaseEntry>(query);
|
||||
}
|
||||
|
||||
@@ -36,14 +36,14 @@
|
||||
#pragma once
|
||||
|
||||
#include "businessObjects/dramTimeDependencies/configurations/configurationBase.h"
|
||||
#include "businessObjects/dramTimeDependencies/deviceDependencies/specialized/TimeDependenciesInfoDDR4.h"
|
||||
#include "businessObjects/dramTimeDependencies/dbEntries/specialized/DDR4dbphaseentry.h"
|
||||
#include "businessObjects/dramTimeDependencies/deviceDependencies/specialized/TimeDependenciesInfoDDR4.h"
|
||||
|
||||
class DDR4Configuration : public ConfigurationBase {
|
||||
public:
|
||||
class DDR4Configuration : public ConfigurationBase
|
||||
{
|
||||
public:
|
||||
DDR4Configuration(const TraceDB& tdb);
|
||||
|
||||
QString getQueryStr(const std::vector<QString>& commands) const override;
|
||||
std::shared_ptr<DBPhaseEntryBase> makePhaseEntry(const QSqlQuery&) const override;
|
||||
|
||||
};
|
||||
|
||||
@@ -36,31 +36,37 @@
|
||||
#include "DDR5Configuration.h"
|
||||
#include <memory>
|
||||
|
||||
DDR5Configuration::DDR5Configuration(const TraceDB& tdb) {
|
||||
mDeviceDeps = std::make_shared<TimeDependenciesInfoDDR5>(std::forward<const QJsonObject>(mGetMemspec(tdb)), mGetClk(tdb));
|
||||
|
||||
DDR5Configuration::DDR5Configuration(const TraceDB& tdb)
|
||||
{
|
||||
mDeviceDeps = std::make_shared<TimeDependenciesInfoDDR5>(
|
||||
std::forward<const QJsonObject>(mGetMemspec(tdb)), mGetClk(tdb));
|
||||
}
|
||||
|
||||
QString DDR5Configuration::getQueryStr(const std::vector<QString>& commands) const
|
||||
{
|
||||
QString queryStr = "SELECT Phases.ID, Phases.PhaseName, Phases.PhaseBegin, Phases.PhaseEnd, Phases.Transact, Phases.Bank, Phases.Bankgroup, Phases.Rank, Phases.BurstLength "
|
||||
" FROM Phases "
|
||||
" WHERE PhaseName IN (";
|
||||
|
||||
for (const auto& cmd : commands) {
|
||||
QString queryStr =
|
||||
"SELECT Phases.ID, Phases.PhaseName, Phases.PhaseBegin, Phases.PhaseEnd, Phases.Transact, "
|
||||
"Phases.Bank, Phases.Bankgroup, Phases.Rank, Phases.BurstLength "
|
||||
" FROM Phases "
|
||||
" WHERE PhaseName IN (";
|
||||
|
||||
for (const auto& cmd : commands)
|
||||
{
|
||||
queryStr = queryStr + '\"' + cmd + "\",";
|
||||
}
|
||||
queryStr.back() = ')';
|
||||
queryStr.back() = ')';
|
||||
queryStr += " ORDER BY PhaseBegin; ";
|
||||
|
||||
return queryStr;
|
||||
}
|
||||
|
||||
std::shared_ptr<DBPhaseEntryBase> DDR5Configuration::makePhaseEntry(const QSqlQuery& query) const {
|
||||
std::shared_ptr<DBPhaseEntryBase> DDR5Configuration::makePhaseEntry(const QSqlQuery& query) const
|
||||
{
|
||||
auto phase = std::make_shared<DDR5DBPhaseEntry>(query);
|
||||
|
||||
|
||||
auto device = std::dynamic_pointer_cast<TimeDependenciesInfoDDR5>(mDeviceDeps);
|
||||
device->rankIDToRankIDs(phase->tRank, phase->tLogicalRank, phase->tPhysicalRank, phase->tDIMMRank);
|
||||
device->rankIDToRankIDs(
|
||||
phase->tRank, phase->tLogicalRank, phase->tPhysicalRank, phase->tDIMMRank);
|
||||
device->bankIDToBankInGroup(phase->tLogicalRank, phase->tBank, phase->tBankInGroup);
|
||||
|
||||
return phase;
|
||||
|
||||
@@ -36,14 +36,14 @@
|
||||
#pragma once
|
||||
|
||||
#include "businessObjects/dramTimeDependencies/configurations/configurationBase.h"
|
||||
#include "businessObjects/dramTimeDependencies/deviceDependencies/specialized/TimeDependenciesInfoDDR5.h"
|
||||
#include "businessObjects/dramTimeDependencies/dbEntries/specialized/DDR5dbphaseentry.h"
|
||||
#include "businessObjects/dramTimeDependencies/deviceDependencies/specialized/TimeDependenciesInfoDDR5.h"
|
||||
|
||||
class DDR5Configuration : public ConfigurationBase {
|
||||
public:
|
||||
class DDR5Configuration : public ConfigurationBase
|
||||
{
|
||||
public:
|
||||
DDR5Configuration(const TraceDB& tdb);
|
||||
|
||||
QString getQueryStr(const std::vector<QString>& commands) const override;
|
||||
std::shared_ptr<DBPhaseEntryBase> makePhaseEntry(const QSqlQuery&) const override;
|
||||
|
||||
};
|
||||
|
||||
@@ -35,26 +35,30 @@
|
||||
|
||||
#include "HBM2Configuration.h"
|
||||
|
||||
HBM2Configuration::HBM2Configuration(const TraceDB& tdb) {
|
||||
mDeviceDeps = std::make_shared<TimeDependenciesInfoHBM2>(std::forward<const QJsonObject>(mGetMemspec(tdb)), mGetClk(tdb));
|
||||
|
||||
HBM2Configuration::HBM2Configuration(const TraceDB& tdb)
|
||||
{
|
||||
mDeviceDeps = std::make_shared<TimeDependenciesInfoHBM2>(
|
||||
std::forward<const QJsonObject>(mGetMemspec(tdb)), mGetClk(tdb));
|
||||
}
|
||||
|
||||
QString HBM2Configuration::getQueryStr(const std::vector<QString>& commands) const
|
||||
{
|
||||
QString queryStr = "SELECT Phases.ID, Phases.PhaseName, Phases.PhaseBegin, Phases.PhaseEnd, Phases.Transact, Phases.Bank, Phases.Bankgroup, Phases.Rank "
|
||||
" FROM Phases "
|
||||
" WHERE PhaseName IN (";
|
||||
|
||||
for (const auto& cmd : commands) {
|
||||
QString queryStr = "SELECT Phases.ID, Phases.PhaseName, Phases.PhaseBegin, Phases.PhaseEnd, "
|
||||
"Phases.Transact, Phases.Bank, Phases.Bankgroup, Phases.Rank "
|
||||
" FROM Phases "
|
||||
" WHERE PhaseName IN (";
|
||||
|
||||
for (const auto& cmd : commands)
|
||||
{
|
||||
queryStr = queryStr + '\"' + cmd + "\",";
|
||||
}
|
||||
queryStr.back() = ')';
|
||||
queryStr.back() = ')';
|
||||
queryStr += " ORDER BY PhaseBegin; ";
|
||||
|
||||
return queryStr;
|
||||
}
|
||||
|
||||
std::shared_ptr<DBPhaseEntryBase> HBM2Configuration::makePhaseEntry(const QSqlQuery& query) const {
|
||||
std::shared_ptr<DBPhaseEntryBase> HBM2Configuration::makePhaseEntry(const QSqlQuery& query) const
|
||||
{
|
||||
return std::make_shared<HBM2DBPhaseEntry>(query);
|
||||
}
|
||||
|
||||
@@ -36,14 +36,14 @@
|
||||
#pragma once
|
||||
|
||||
#include "businessObjects/dramTimeDependencies/configurations/configurationBase.h"
|
||||
#include "businessObjects/dramTimeDependencies/deviceDependencies/specialized/TimeDependenciesInfoHBM2.h"
|
||||
#include "businessObjects/dramTimeDependencies/dbEntries/specialized/HBM2dbphaseentry.h"
|
||||
#include "businessObjects/dramTimeDependencies/deviceDependencies/specialized/TimeDependenciesInfoHBM2.h"
|
||||
|
||||
class HBM2Configuration : public ConfigurationBase {
|
||||
public:
|
||||
class HBM2Configuration : public ConfigurationBase
|
||||
{
|
||||
public:
|
||||
HBM2Configuration(const TraceDB& tdb);
|
||||
|
||||
QString getQueryStr(const std::vector<QString>& commands) const override;
|
||||
std::shared_ptr<DBPhaseEntryBase> makePhaseEntry(const QSqlQuery&) const override;
|
||||
|
||||
};
|
||||
|
||||
@@ -35,27 +35,32 @@
|
||||
|
||||
#include "LPDDR4Configuration.h"
|
||||
|
||||
LPDDR4Configuration::LPDDR4Configuration(const TraceDB& tdb) {
|
||||
// mDeviceDeps = std::make_shared<LPDDR4TimeDependencies>(std::forward<const QJsonObject>(mGetMemspec(tdb)), mGetClk(tdb));
|
||||
mDeviceDeps = std::make_shared<TimeDependenciesInfoLPDDR4>(std::forward<const QJsonObject>(mGetMemspec(tdb)), mGetClk(tdb));
|
||||
|
||||
LPDDR4Configuration::LPDDR4Configuration(const TraceDB& tdb)
|
||||
{
|
||||
// mDeviceDeps = std::make_shared<LPDDR4TimeDependencies>(std::forward<const
|
||||
// QJsonObject>(mGetMemspec(tdb)), mGetClk(tdb));
|
||||
mDeviceDeps = std::make_shared<TimeDependenciesInfoLPDDR4>(
|
||||
std::forward<const QJsonObject>(mGetMemspec(tdb)), mGetClk(tdb));
|
||||
}
|
||||
|
||||
QString LPDDR4Configuration::getQueryStr(const std::vector<QString>& commands) const
|
||||
{
|
||||
QString queryStr = "SELECT Phases.ID, Phases.PhaseName, Phases.PhaseBegin, Phases.PhaseEnd, Phases.Transact, Phases.Bank, Phases.Rank "
|
||||
" FROM Phases "
|
||||
" WHERE PhaseName IN (";
|
||||
|
||||
for (const auto& cmd : commands) {
|
||||
QString queryStr = "SELECT Phases.ID, Phases.PhaseName, Phases.PhaseBegin, Phases.PhaseEnd, "
|
||||
"Phases.Transact, Phases.Bank, Phases.Rank "
|
||||
" FROM Phases "
|
||||
" WHERE PhaseName IN (";
|
||||
|
||||
for (const auto& cmd : commands)
|
||||
{
|
||||
queryStr = queryStr + '\"' + cmd + "\",";
|
||||
}
|
||||
queryStr.back() = ')';
|
||||
queryStr.back() = ')';
|
||||
queryStr += " ORDER BY PhaseBegin; ";
|
||||
|
||||
return queryStr;
|
||||
}
|
||||
|
||||
std::shared_ptr<DBPhaseEntryBase> LPDDR4Configuration::makePhaseEntry(const QSqlQuery& query) const {
|
||||
std::shared_ptr<DBPhaseEntryBase> LPDDR4Configuration::makePhaseEntry(const QSqlQuery& query) const
|
||||
{
|
||||
return std::make_shared<LPDDR4DBPhaseEntry>(query);
|
||||
}
|
||||
|
||||
@@ -36,14 +36,14 @@
|
||||
#pragma once
|
||||
|
||||
#include "businessObjects/dramTimeDependencies/configurations/configurationBase.h"
|
||||
#include "businessObjects/dramTimeDependencies/deviceDependencies/specialized/TimeDependenciesInfoLPDDR4.h"
|
||||
#include "businessObjects/dramTimeDependencies/dbEntries/specialized/LPDDR4dbphaseentry.h"
|
||||
#include "businessObjects/dramTimeDependencies/deviceDependencies/specialized/TimeDependenciesInfoLPDDR4.h"
|
||||
|
||||
class LPDDR4Configuration : public ConfigurationBase {
|
||||
public:
|
||||
class LPDDR4Configuration : public ConfigurationBase
|
||||
{
|
||||
public:
|
||||
LPDDR4Configuration(const TraceDB& tdb);
|
||||
|
||||
QString getQueryStr(const std::vector<QString>& commands) const override;
|
||||
std::shared_ptr<DBPhaseEntryBase> makePhaseEntry(const QSqlQuery&) const override;
|
||||
|
||||
};
|
||||
|
||||
@@ -36,29 +36,34 @@
|
||||
#include "LPDDR5Configuration.h"
|
||||
#include <memory>
|
||||
|
||||
LPDDR5Configuration::LPDDR5Configuration(const TraceDB& tdb) {
|
||||
mDeviceDeps = std::make_shared<TimeDependenciesInfoLPDDR5>(std::forward<const QJsonObject>(mGetMemspec(tdb)), mGetClk(tdb));
|
||||
|
||||
LPDDR5Configuration::LPDDR5Configuration(const TraceDB& tdb)
|
||||
{
|
||||
mDeviceDeps = std::make_shared<TimeDependenciesInfoLPDDR5>(
|
||||
std::forward<const QJsonObject>(mGetMemspec(tdb)), mGetClk(tdb));
|
||||
}
|
||||
|
||||
QString LPDDR5Configuration::getQueryStr(const std::vector<QString>& commands) const
|
||||
{
|
||||
QString queryStr = "SELECT Phases.ID, Phases.PhaseName, Phases.PhaseBegin, Phases.PhaseEnd, Phases.Transact, Phases.Bank, Phases.Bankgroup, Phases.Rank, Phases.BurstLength "
|
||||
" FROM Phases "
|
||||
" WHERE PhaseName IN (";
|
||||
|
||||
for (const auto& cmd : commands) {
|
||||
QString queryStr =
|
||||
"SELECT Phases.ID, Phases.PhaseName, Phases.PhaseBegin, Phases.PhaseEnd, Phases.Transact, "
|
||||
"Phases.Bank, Phases.Bankgroup, Phases.Rank, Phases.BurstLength "
|
||||
" FROM Phases "
|
||||
" WHERE PhaseName IN (";
|
||||
|
||||
for (const auto& cmd : commands)
|
||||
{
|
||||
queryStr = queryStr + '\"' + cmd + "\",";
|
||||
}
|
||||
queryStr.back() = ')';
|
||||
queryStr.back() = ')';
|
||||
queryStr += " ORDER BY PhaseBegin; ";
|
||||
|
||||
return queryStr;
|
||||
}
|
||||
|
||||
std::shared_ptr<DBPhaseEntryBase> LPDDR5Configuration::makePhaseEntry(const QSqlQuery& query) const {
|
||||
std::shared_ptr<DBPhaseEntryBase> LPDDR5Configuration::makePhaseEntry(const QSqlQuery& query) const
|
||||
{
|
||||
auto phase = std::make_shared<LPDDR5DBPhaseEntry>(query);
|
||||
|
||||
|
||||
auto device = std::dynamic_pointer_cast<TimeDependenciesInfoLPDDR5>(mDeviceDeps);
|
||||
phase->bankOffsetREFP2B = device->getPer2BankOffset();
|
||||
|
||||
|
||||
@@ -36,14 +36,14 @@
|
||||
#pragma once
|
||||
|
||||
#include "businessObjects/dramTimeDependencies/configurations/configurationBase.h"
|
||||
#include "businessObjects/dramTimeDependencies/deviceDependencies/specialized/TimeDependenciesInfoLPDDR5.h"
|
||||
#include "businessObjects/dramTimeDependencies/dbEntries/specialized/LPDDR5dbphaseentry.h"
|
||||
#include "businessObjects/dramTimeDependencies/deviceDependencies/specialized/TimeDependenciesInfoLPDDR5.h"
|
||||
|
||||
class LPDDR5Configuration : public ConfigurationBase {
|
||||
public:
|
||||
class LPDDR5Configuration : public ConfigurationBase
|
||||
{
|
||||
public:
|
||||
LPDDR5Configuration(const TraceDB& tdb);
|
||||
|
||||
QString getQueryStr(const std::vector<QString>& commands) const override;
|
||||
std::shared_ptr<DBPhaseEntryBase> makePhaseEntry(const QSqlQuery&) const override;
|
||||
|
||||
};
|
||||
|
||||
@@ -37,15 +37,20 @@
|
||||
|
||||
#include <QSqlQuery>
|
||||
|
||||
#include "businessObjects/phases/phasedependency.h"
|
||||
#include "businessObjects/dramTimeDependencies/common/common.h"
|
||||
#include "businessObjects/phases/phasedependency.h"
|
||||
|
||||
class DBPhaseEntryBase : public std::enable_shared_from_this<DBPhaseEntryBase>{
|
||||
public:
|
||||
class DBPhaseEntryBase : public std::enable_shared_from_this<DBPhaseEntryBase>
|
||||
{
|
||||
public:
|
||||
DBPhaseEntryBase() = default;
|
||||
virtual ~DBPhaseEntryBase() = default;
|
||||
|
||||
virtual bool potentialDependency(const TimeDependency& dep, const std::shared_ptr<DBPhaseEntryBase> otherPhase) { return false; }
|
||||
|
||||
virtual bool potentialDependency(const TimeDependency& dep,
|
||||
const std::shared_ptr<DBPhaseEntryBase> otherPhase)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
size_t id;
|
||||
StringMapper phaseName;
|
||||
|
||||
@@ -35,7 +35,8 @@
|
||||
|
||||
#include "DDR3dbphaseentry.h"
|
||||
|
||||
DDR3DBPhaseEntry::DDR3DBPhaseEntry(const QSqlQuery& query) {
|
||||
DDR3DBPhaseEntry::DDR3DBPhaseEntry(const QSqlQuery& query)
|
||||
{
|
||||
id = query.value(0).toLongLong();
|
||||
phaseName = StringMapper(query.value(1).toString());
|
||||
phaseBegin = query.value(2).toLongLong();
|
||||
@@ -45,25 +46,22 @@ DDR3DBPhaseEntry::DDR3DBPhaseEntry(const QSqlQuery& query) {
|
||||
tRank = query.value(6).toLongLong();
|
||||
}
|
||||
|
||||
bool DDR3DBPhaseEntry::potentialDependency(const TimeDependency& dep, const std::shared_ptr<DBPhaseEntryBase> otherPhase) {
|
||||
bool DDR3DBPhaseEntry::potentialDependency(const TimeDependency& dep,
|
||||
const std::shared_ptr<DBPhaseEntryBase> otherPhase)
|
||||
{
|
||||
auto other = std::dynamic_pointer_cast<DDR3DBPhaseEntry>(otherPhase);
|
||||
if (!other) return false;
|
||||
if (!other)
|
||||
return false;
|
||||
|
||||
bool isCmdPool = dep.phaseDep == StringMapper::Identifier::CMD_BUS;
|
||||
|
||||
bool const skipOnIntraBankAndDifferentBanks = {
|
||||
dep.depType == DependencyType::IntraBank
|
||||
&& tBank != other->tBank
|
||||
};
|
||||
bool const skipOnIntraRankAndDifferentRanks = {
|
||||
dep.depType == DependencyType::IntraRank
|
||||
&& tRank != other->tRank
|
||||
};
|
||||
bool const skipOnInterRankAndSameRank = {
|
||||
dep.depType == DependencyType::InterRank
|
||||
&& tRank == other->tRank
|
||||
&& !isCmdPool
|
||||
};
|
||||
|
||||
return !(skipOnIntraBankAndDifferentBanks || skipOnIntraRankAndDifferentRanks || skipOnInterRankAndSameRank);
|
||||
bool const skipOnIntraBankAndDifferentBanks = {dep.depType == DependencyType::IntraBank &&
|
||||
tBank != other->tBank};
|
||||
bool const skipOnIntraRankAndDifferentRanks = {dep.depType == DependencyType::IntraRank &&
|
||||
tRank != other->tRank};
|
||||
bool const skipOnInterRankAndSameRank = {dep.depType == DependencyType::InterRank &&
|
||||
tRank == other->tRank && !isCmdPool};
|
||||
|
||||
return !(skipOnIntraBankAndDifferentBanks || skipOnIntraRankAndDifferentRanks ||
|
||||
skipOnInterRankAndSameRank);
|
||||
}
|
||||
|
||||
@@ -37,11 +37,13 @@
|
||||
|
||||
#include "businessObjects/dramTimeDependencies/dbEntries/dbphaseentryBase.h"
|
||||
|
||||
class DDR3DBPhaseEntry : public DBPhaseEntryBase {
|
||||
public:
|
||||
class DDR3DBPhaseEntry : public DBPhaseEntryBase
|
||||
{
|
||||
public:
|
||||
DDR3DBPhaseEntry(const QSqlQuery&);
|
||||
|
||||
size_t tRank;
|
||||
|
||||
bool potentialDependency(const TimeDependency& dep, const std::shared_ptr<DBPhaseEntryBase> otherPhase) override;
|
||||
bool potentialDependency(const TimeDependency& dep,
|
||||
const std::shared_ptr<DBPhaseEntryBase> otherPhase) override;
|
||||
};
|
||||
|
||||
@@ -35,7 +35,8 @@
|
||||
|
||||
#include "DDR4dbphaseentry.h"
|
||||
|
||||
DDR4DBPhaseEntry::DDR4DBPhaseEntry(const QSqlQuery& query) {
|
||||
DDR4DBPhaseEntry::DDR4DBPhaseEntry(const QSqlQuery& query)
|
||||
{
|
||||
id = query.value(0).toLongLong();
|
||||
phaseName = StringMapper(query.value(1).toString());
|
||||
phaseBegin = query.value(2).toLongLong();
|
||||
@@ -46,34 +47,24 @@ DDR4DBPhaseEntry::DDR4DBPhaseEntry(const QSqlQuery& query) {
|
||||
tRank = query.value(7).toLongLong();
|
||||
}
|
||||
|
||||
bool DDR4DBPhaseEntry::potentialDependency(const TimeDependency& dep, const std::shared_ptr<DBPhaseEntryBase> otherPhase) {
|
||||
bool DDR4DBPhaseEntry::potentialDependency(const TimeDependency& dep,
|
||||
const std::shared_ptr<DBPhaseEntryBase> otherPhase)
|
||||
{
|
||||
auto other = std::dynamic_pointer_cast<DDR4DBPhaseEntry>(otherPhase);
|
||||
if (!other) return false;
|
||||
if (!other)
|
||||
return false;
|
||||
|
||||
bool isCmdPool = dep.phaseDep == StringMapper::Identifier::CMD_BUS;
|
||||
|
||||
bool const skipOnIntraBankAndDifferentBanks = {
|
||||
dep.depType == DependencyType::IntraBank
|
||||
&& tBank != other->tBank
|
||||
};
|
||||
bool const skipOnIntraBankAndDifferentBanks = {dep.depType == DependencyType::IntraBank &&
|
||||
tBank != other->tBank};
|
||||
bool const skipOnIntraBankgroupAndDifferentBankgroup = {
|
||||
dep.depType == DependencyType::IntraBankGroup
|
||||
&& tBankgroup != other->tBankgroup
|
||||
};
|
||||
bool const skipOnIntraRankAndDifferentRanks = {
|
||||
dep.depType == DependencyType::IntraRank
|
||||
&& tRank != other->tRank
|
||||
};
|
||||
bool const skipOnInterRankAndSameRank = {
|
||||
dep.depType == DependencyType::InterRank
|
||||
&& tRank == other->tRank
|
||||
&& !isCmdPool
|
||||
};
|
||||
|
||||
return !(
|
||||
skipOnIntraBankAndDifferentBanks
|
||||
|| skipOnIntraBankgroupAndDifferentBankgroup
|
||||
|| skipOnIntraRankAndDifferentRanks
|
||||
|| skipOnInterRankAndSameRank
|
||||
);
|
||||
dep.depType == DependencyType::IntraBankGroup && tBankgroup != other->tBankgroup};
|
||||
bool const skipOnIntraRankAndDifferentRanks = {dep.depType == DependencyType::IntraRank &&
|
||||
tRank != other->tRank};
|
||||
bool const skipOnInterRankAndSameRank = {dep.depType == DependencyType::InterRank &&
|
||||
tRank == other->tRank && !isCmdPool};
|
||||
|
||||
return !(skipOnIntraBankAndDifferentBanks || skipOnIntraBankgroupAndDifferentBankgroup ||
|
||||
skipOnIntraRankAndDifferentRanks || skipOnInterRankAndSameRank);
|
||||
}
|
||||
|
||||
@@ -37,12 +37,14 @@
|
||||
|
||||
#include "businessObjects/dramTimeDependencies/dbEntries/dbphaseentryBase.h"
|
||||
|
||||
class DDR4DBPhaseEntry : public DBPhaseEntryBase {
|
||||
public:
|
||||
class DDR4DBPhaseEntry : public DBPhaseEntryBase
|
||||
{
|
||||
public:
|
||||
DDR4DBPhaseEntry(const QSqlQuery&);
|
||||
|
||||
size_t tBankgroup;
|
||||
size_t tRank;
|
||||
|
||||
bool potentialDependency(const TimeDependency& dep, const std::shared_ptr<DBPhaseEntryBase> otherPhase) override;
|
||||
bool potentialDependency(const TimeDependency& dep,
|
||||
const std::shared_ptr<DBPhaseEntryBase> otherPhase) override;
|
||||
};
|
||||
|
||||
@@ -35,7 +35,8 @@
|
||||
|
||||
#include "DDR5dbphaseentry.h"
|
||||
|
||||
DDR5DBPhaseEntry::DDR5DBPhaseEntry(const QSqlQuery& query) {
|
||||
DDR5DBPhaseEntry::DDR5DBPhaseEntry(const QSqlQuery& query)
|
||||
{
|
||||
id = query.value(0).toLongLong();
|
||||
phaseName = StringMapper(query.value(1).toString());
|
||||
phaseBegin = query.value(2).toLongLong();
|
||||
@@ -45,54 +46,37 @@ DDR5DBPhaseEntry::DDR5DBPhaseEntry(const QSqlQuery& query) {
|
||||
tBankgroup = query.value(6).toLongLong();
|
||||
tRank = query.value(7).toLongLong();
|
||||
tBurstLength = query.value(8).toLongLong();
|
||||
|
||||
}
|
||||
|
||||
bool DDR5DBPhaseEntry::potentialDependency(const TimeDependency& dep, const std::shared_ptr<DBPhaseEntryBase> otherPhase) {
|
||||
bool DDR5DBPhaseEntry::potentialDependency(const TimeDependency& dep,
|
||||
const std::shared_ptr<DBPhaseEntryBase> otherPhase)
|
||||
{
|
||||
auto other = std::dynamic_pointer_cast<DDR5DBPhaseEntry>(otherPhase);
|
||||
if (!other) return false;
|
||||
if (!other)
|
||||
return false;
|
||||
|
||||
if (dep.passFunction && !dep.passFunction->execute(shared_from_this(), other)) return false;
|
||||
if (dep.passFunction && !dep.passFunction->execute(shared_from_this(), other))
|
||||
return false;
|
||||
|
||||
bool isCmdPool = dep.phaseDep == StringMapper::Identifier::CMD_BUS;
|
||||
|
||||
bool const skipOnIntraBankAndDifferentBanks = {
|
||||
dep.depType == DependencyType::IntraBank
|
||||
&& tBank != other->tBank
|
||||
};
|
||||
bool const skipOnIntraBankAndDifferentBanks = {dep.depType == DependencyType::IntraBank &&
|
||||
tBank != other->tBank};
|
||||
bool const skipOnIntraBankgroupAndDifferentBankgroup = {
|
||||
dep.depType == DependencyType::IntraBankGroup
|
||||
&& tBankgroup != other->tBankgroup
|
||||
};
|
||||
dep.depType == DependencyType::IntraBankGroup && tBankgroup != other->tBankgroup};
|
||||
bool const skipOnIntraBankInGroupAndDifferentBankInGroup = {
|
||||
dep.depType == DependencyType::IntraBankInGroup
|
||||
&& tBankInGroup != other->tBankInGroup
|
||||
};
|
||||
dep.depType == DependencyType::IntraBankInGroup && tBankInGroup != other->tBankInGroup};
|
||||
bool const skipOnIntraLogRankAndDifferentRanks = {
|
||||
dep.depType == DependencyType::IntraLogicalRank
|
||||
&& tLogicalRank != other->tLogicalRank
|
||||
};
|
||||
dep.depType == DependencyType::IntraLogicalRank && tLogicalRank != other->tLogicalRank};
|
||||
bool const skipOnIntraPhysRankAndDifferentRanks = {
|
||||
dep.depType == DependencyType::IntraPhysicalRank
|
||||
&& tPhysicalRank != other->tPhysicalRank
|
||||
};
|
||||
dep.depType == DependencyType::IntraPhysicalRank && tPhysicalRank != other->tPhysicalRank};
|
||||
bool const skipOnIntraDIMMRankAndDifferentRanks = {
|
||||
dep.depType == DependencyType::IntraDIMMRank
|
||||
&& tDIMMRank != other->tDIMMRank
|
||||
};
|
||||
bool const skipOnInterDIMMRankAndSameRank = {
|
||||
dep.depType == DependencyType::InterDIMMRank
|
||||
&& tDIMMRank == other->tDIMMRank
|
||||
&& !isCmdPool
|
||||
};
|
||||
|
||||
return !(
|
||||
skipOnIntraBankAndDifferentBanks
|
||||
|| skipOnIntraBankgroupAndDifferentBankgroup
|
||||
|| skipOnIntraBankInGroupAndDifferentBankInGroup
|
||||
|| skipOnIntraLogRankAndDifferentRanks
|
||||
|| skipOnIntraPhysRankAndDifferentRanks
|
||||
|| skipOnIntraDIMMRankAndDifferentRanks
|
||||
|| skipOnInterDIMMRankAndSameRank
|
||||
);
|
||||
dep.depType == DependencyType::IntraDIMMRank && tDIMMRank != other->tDIMMRank};
|
||||
bool const skipOnInterDIMMRankAndSameRank = {dep.depType == DependencyType::InterDIMMRank &&
|
||||
tDIMMRank == other->tDIMMRank && !isCmdPool};
|
||||
|
||||
return !(skipOnIntraBankAndDifferentBanks || skipOnIntraBankgroupAndDifferentBankgroup ||
|
||||
skipOnIntraBankInGroupAndDifferentBankInGroup || skipOnIntraLogRankAndDifferentRanks ||
|
||||
skipOnIntraPhysRankAndDifferentRanks || skipOnIntraDIMMRankAndDifferentRanks ||
|
||||
skipOnInterDIMMRankAndSameRank);
|
||||
}
|
||||
|
||||
@@ -37,8 +37,9 @@
|
||||
|
||||
#include "businessObjects/dramTimeDependencies/dbEntries/dbphaseentryBase.h"
|
||||
|
||||
class DDR5DBPhaseEntry : public DBPhaseEntryBase {
|
||||
public:
|
||||
class DDR5DBPhaseEntry : public DBPhaseEntryBase
|
||||
{
|
||||
public:
|
||||
DDR5DBPhaseEntry(const QSqlQuery&);
|
||||
|
||||
size_t tBankgroup;
|
||||
@@ -50,5 +51,6 @@ class DDR5DBPhaseEntry : public DBPhaseEntryBase {
|
||||
size_t tPhysicalRank;
|
||||
size_t tDIMMRank;
|
||||
|
||||
bool potentialDependency(const TimeDependency& dep, const std::shared_ptr<DBPhaseEntryBase> otherPhase) override;
|
||||
bool potentialDependency(const TimeDependency& dep,
|
||||
const std::shared_ptr<DBPhaseEntryBase> otherPhase) override;
|
||||
};
|
||||
|
||||
@@ -35,7 +35,8 @@
|
||||
|
||||
#include "HBM2dbphaseentry.h"
|
||||
|
||||
HBM2DBPhaseEntry::HBM2DBPhaseEntry(const QSqlQuery& query) {
|
||||
HBM2DBPhaseEntry::HBM2DBPhaseEntry(const QSqlQuery& query)
|
||||
{
|
||||
id = query.value(0).toLongLong();
|
||||
phaseName = StringMapper(query.value(1).toString());
|
||||
phaseBegin = query.value(2).toLongLong();
|
||||
@@ -46,34 +47,24 @@ HBM2DBPhaseEntry::HBM2DBPhaseEntry(const QSqlQuery& query) {
|
||||
tRank = query.value(7).toLongLong();
|
||||
}
|
||||
|
||||
bool HBM2DBPhaseEntry::potentialDependency(const TimeDependency& dep, const std::shared_ptr<DBPhaseEntryBase> otherPhase) {
|
||||
bool HBM2DBPhaseEntry::potentialDependency(const TimeDependency& dep,
|
||||
const std::shared_ptr<DBPhaseEntryBase> otherPhase)
|
||||
{
|
||||
auto other = std::dynamic_pointer_cast<HBM2DBPhaseEntry>(otherPhase);
|
||||
if (!other) return false;
|
||||
if (!other)
|
||||
return false;
|
||||
|
||||
bool isCmdPool = dep.phaseDep == StringMapper::Identifier::CMD_BUS;
|
||||
|
||||
bool const skipOnIntraBankAndDifferentBanks = {
|
||||
dep.depType == DependencyType::IntraBank
|
||||
&& tBank != other->tBank
|
||||
};
|
||||
bool const skipOnIntraBankAndDifferentBanks = {dep.depType == DependencyType::IntraBank &&
|
||||
tBank != other->tBank};
|
||||
bool const skipOnIntraBankgroupAndDifferentBankgroup = {
|
||||
dep.depType == DependencyType::IntraBankGroup
|
||||
&& tBankgroup != other->tBankgroup
|
||||
};
|
||||
bool const skipOnIntraRankAndDifferentRanks = {
|
||||
dep.depType == DependencyType::IntraRank
|
||||
&& tRank != other->tRank
|
||||
};
|
||||
bool const skipOnInterRankAndSameRank = {
|
||||
dep.depType == DependencyType::InterRank
|
||||
&& tRank == other->tRank
|
||||
&& !isCmdPool
|
||||
};
|
||||
|
||||
return !(
|
||||
skipOnIntraBankAndDifferentBanks
|
||||
|| skipOnIntraBankgroupAndDifferentBankgroup
|
||||
|| skipOnIntraRankAndDifferentRanks
|
||||
|| skipOnInterRankAndSameRank
|
||||
);
|
||||
dep.depType == DependencyType::IntraBankGroup && tBankgroup != other->tBankgroup};
|
||||
bool const skipOnIntraRankAndDifferentRanks = {dep.depType == DependencyType::IntraRank &&
|
||||
tRank != other->tRank};
|
||||
bool const skipOnInterRankAndSameRank = {dep.depType == DependencyType::InterRank &&
|
||||
tRank == other->tRank && !isCmdPool};
|
||||
|
||||
return !(skipOnIntraBankAndDifferentBanks || skipOnIntraBankgroupAndDifferentBankgroup ||
|
||||
skipOnIntraRankAndDifferentRanks || skipOnInterRankAndSameRank);
|
||||
}
|
||||
|
||||
@@ -37,12 +37,14 @@
|
||||
|
||||
#include "businessObjects/dramTimeDependencies/dbEntries/dbphaseentryBase.h"
|
||||
|
||||
class HBM2DBPhaseEntry : public DBPhaseEntryBase {
|
||||
public:
|
||||
class HBM2DBPhaseEntry : public DBPhaseEntryBase
|
||||
{
|
||||
public:
|
||||
HBM2DBPhaseEntry(const QSqlQuery&);
|
||||
|
||||
size_t tBankgroup;
|
||||
size_t tRank;
|
||||
|
||||
bool potentialDependency(const TimeDependency& dep, const std::shared_ptr<DBPhaseEntryBase> otherPhase) override;
|
||||
bool potentialDependency(const TimeDependency& dep,
|
||||
const std::shared_ptr<DBPhaseEntryBase> otherPhase) override;
|
||||
};
|
||||
|
||||
@@ -35,7 +35,8 @@
|
||||
|
||||
#include "LPDDR4dbphaseentry.h"
|
||||
|
||||
LPDDR4DBPhaseEntry::LPDDR4DBPhaseEntry(const QSqlQuery& query) {
|
||||
LPDDR4DBPhaseEntry::LPDDR4DBPhaseEntry(const QSqlQuery& query)
|
||||
{
|
||||
id = query.value(0).toLongLong();
|
||||
phaseName = StringMapper(query.value(1).toString());
|
||||
phaseBegin = query.value(2).toLongLong();
|
||||
@@ -45,25 +46,22 @@ LPDDR4DBPhaseEntry::LPDDR4DBPhaseEntry(const QSqlQuery& query) {
|
||||
tRank = query.value(6).toLongLong();
|
||||
}
|
||||
|
||||
bool LPDDR4DBPhaseEntry::potentialDependency(const TimeDependency& dep, const std::shared_ptr<DBPhaseEntryBase> otherPhase) {
|
||||
bool LPDDR4DBPhaseEntry::potentialDependency(const TimeDependency& dep,
|
||||
const std::shared_ptr<DBPhaseEntryBase> otherPhase)
|
||||
{
|
||||
auto other = std::dynamic_pointer_cast<LPDDR4DBPhaseEntry>(otherPhase);
|
||||
if (!other) return false;
|
||||
if (!other)
|
||||
return false;
|
||||
|
||||
bool isCmdPool = dep.phaseDep == StringMapper::Identifier::CMD_BUS;
|
||||
|
||||
bool const skipOnIntraBankAndDifferentBanks = {
|
||||
dep.depType == DependencyType::IntraBank
|
||||
&& tBank != other->tBank
|
||||
};
|
||||
bool const skipOnIntraRankAndDifferentRanks = {
|
||||
dep.depType == DependencyType::IntraRank
|
||||
&& tRank != other->tRank
|
||||
};
|
||||
bool const skipOnInterRankAndSameRank = {
|
||||
dep.depType == DependencyType::InterRank
|
||||
&& tRank == other->tRank
|
||||
&& !isCmdPool
|
||||
};
|
||||
|
||||
return !(skipOnIntraBankAndDifferentBanks || skipOnIntraRankAndDifferentRanks || skipOnInterRankAndSameRank);
|
||||
bool const skipOnIntraBankAndDifferentBanks = {dep.depType == DependencyType::IntraBank &&
|
||||
tBank != other->tBank};
|
||||
bool const skipOnIntraRankAndDifferentRanks = {dep.depType == DependencyType::IntraRank &&
|
||||
tRank != other->tRank};
|
||||
bool const skipOnInterRankAndSameRank = {dep.depType == DependencyType::InterRank &&
|
||||
tRank == other->tRank && !isCmdPool};
|
||||
|
||||
return !(skipOnIntraBankAndDifferentBanks || skipOnIntraRankAndDifferentRanks ||
|
||||
skipOnInterRankAndSameRank);
|
||||
}
|
||||
|
||||
@@ -38,11 +38,13 @@
|
||||
|
||||
#include "businessObjects/dramTimeDependencies/dbEntries/dbphaseentryBase.h"
|
||||
|
||||
class LPDDR4DBPhaseEntry : public DBPhaseEntryBase {
|
||||
public:
|
||||
class LPDDR4DBPhaseEntry : public DBPhaseEntryBase
|
||||
{
|
||||
public:
|
||||
LPDDR4DBPhaseEntry(const QSqlQuery&);
|
||||
|
||||
size_t tRank;
|
||||
|
||||
bool potentialDependency(const TimeDependency& dep, const std::shared_ptr<DBPhaseEntryBase> otherPhase) override;
|
||||
bool potentialDependency(const TimeDependency& dep,
|
||||
const std::shared_ptr<DBPhaseEntryBase> otherPhase) override;
|
||||
};
|
||||
|
||||
@@ -35,7 +35,8 @@
|
||||
|
||||
#include "LPDDR5dbphaseentry.h"
|
||||
|
||||
LPDDR5DBPhaseEntry::LPDDR5DBPhaseEntry(const QSqlQuery& query) {
|
||||
LPDDR5DBPhaseEntry::LPDDR5DBPhaseEntry(const QSqlQuery& query)
|
||||
{
|
||||
id = query.value(0).toLongLong();
|
||||
phaseName = StringMapper(query.value(1).toString());
|
||||
phaseBegin = query.value(2).toLongLong();
|
||||
@@ -47,54 +48,36 @@ LPDDR5DBPhaseEntry::LPDDR5DBPhaseEntry(const QSqlQuery& query) {
|
||||
tBurstLength = query.value(8).toLongLong();
|
||||
}
|
||||
|
||||
bool LPDDR5DBPhaseEntry::potentialDependency(const TimeDependency& dep, const std::shared_ptr<DBPhaseEntryBase> otherPhase) {
|
||||
bool LPDDR5DBPhaseEntry::potentialDependency(const TimeDependency& dep,
|
||||
const std::shared_ptr<DBPhaseEntryBase> otherPhase)
|
||||
{
|
||||
auto other = std::dynamic_pointer_cast<LPDDR5DBPhaseEntry>(otherPhase);
|
||||
if (!other) return false;
|
||||
|
||||
if (dep.passFunction && !dep.passFunction->execute(shared_from_this(), other)) return false;
|
||||
if (!other)
|
||||
return false;
|
||||
|
||||
if (dep.passFunction && !dep.passFunction->execute(shared_from_this(), other))
|
||||
return false;
|
||||
|
||||
bool isCmdPool = dep.phaseDep == StringMapper::Identifier::CMD_BUS;
|
||||
bool thisIsREFP2B = phaseName == StringMapper::Identifier::REFP2B;
|
||||
bool otherIsREFP2B = dep.phaseDep == StringMapper::Identifier::REFP2B;
|
||||
|
||||
bool const skipOnIntraBankAndNoBankDep = {
|
||||
dep.depType == DependencyType::IntraBank
|
||||
&&
|
||||
(
|
||||
( // If phase is not REFP2B or both are REFP2B, intra bank dependency must occur in the same bank
|
||||
(!thisIsREFP2B || (thisIsREFP2B && otherIsREFP2B))
|
||||
&& tBank != other->tBank
|
||||
)
|
||||
||
|
||||
( // If phase is REFP2B, "intra bank" dependency must occur in the same bank or in the offset bank
|
||||
(thisIsREFP2B && !otherIsREFP2B)
|
||||
&&
|
||||
(
|
||||
tBank != other->tBank
|
||||
&& tBank != (other->tBank - bankOffsetREFP2B)
|
||||
)
|
||||
)
|
||||
)
|
||||
};
|
||||
dep.depType == DependencyType::IntraBank &&
|
||||
(( // If phase is not REFP2B or both are REFP2B, intra bank dependency must occur in the
|
||||
// same bank
|
||||
(!thisIsREFP2B || (thisIsREFP2B && otherIsREFP2B)) && tBank != other->tBank) ||
|
||||
( // If phase is REFP2B, "intra bank" dependency must occur in the same bank or in the
|
||||
// offset bank
|
||||
(thisIsREFP2B && !otherIsREFP2B) &&
|
||||
(tBank != other->tBank && tBank != (other->tBank - bankOffsetREFP2B))))};
|
||||
bool const skipOnIntraBankgroupAndDifferentBankgroup = {
|
||||
dep.depType == DependencyType::IntraBankGroup
|
||||
&& tBankgroup != other->tBankgroup
|
||||
};
|
||||
bool const skipOnIntraRankAndDifferentRanks = {
|
||||
dep.depType == DependencyType::IntraRank
|
||||
&& tRank != other->tRank
|
||||
};
|
||||
bool const skipOnInterRankAndSameRank = {
|
||||
dep.depType == DependencyType::InterRank
|
||||
&& tRank == other->tRank
|
||||
&& !isCmdPool
|
||||
};
|
||||
|
||||
return !(
|
||||
skipOnIntraBankAndNoBankDep
|
||||
|| skipOnIntraBankgroupAndDifferentBankgroup
|
||||
|| skipOnIntraRankAndDifferentRanks
|
||||
|| skipOnInterRankAndSameRank
|
||||
);
|
||||
dep.depType == DependencyType::IntraBankGroup && tBankgroup != other->tBankgroup};
|
||||
bool const skipOnIntraRankAndDifferentRanks = {dep.depType == DependencyType::IntraRank &&
|
||||
tRank != other->tRank};
|
||||
bool const skipOnInterRankAndSameRank = {dep.depType == DependencyType::InterRank &&
|
||||
tRank == other->tRank && !isCmdPool};
|
||||
|
||||
return !(skipOnIntraBankAndNoBankDep || skipOnIntraBankgroupAndDifferentBankgroup ||
|
||||
skipOnIntraRankAndDifferentRanks || skipOnInterRankAndSameRank);
|
||||
}
|
||||
|
||||
@@ -37,8 +37,9 @@
|
||||
|
||||
#include "businessObjects/dramTimeDependencies/dbEntries/dbphaseentryBase.h"
|
||||
|
||||
class LPDDR5DBPhaseEntry : public DBPhaseEntryBase {
|
||||
public:
|
||||
class LPDDR5DBPhaseEntry : public DBPhaseEntryBase
|
||||
{
|
||||
public:
|
||||
LPDDR5DBPhaseEntry(const QSqlQuery&);
|
||||
|
||||
size_t tBankgroup;
|
||||
@@ -46,5 +47,6 @@ class LPDDR5DBPhaseEntry : public DBPhaseEntryBase {
|
||||
size_t tBurstLength;
|
||||
size_t bankOffsetREFP2B;
|
||||
|
||||
bool potentialDependency(const TimeDependency& dep, const std::shared_ptr<DBPhaseEntryBase> otherPhase) override;
|
||||
bool potentialDependency(const TimeDependency& dep,
|
||||
const std::shared_ptr<DBPhaseEntryBase> otherPhase) override;
|
||||
};
|
||||
|
||||
@@ -37,28 +37,28 @@
|
||||
|
||||
#include <QJsonDocument>
|
||||
|
||||
DRAMTimeDependenciesBase::DRAMTimeDependenciesBase(const QJsonObject& memspec, const uint inTCK) {
|
||||
DRAMTimeDependenciesBase::DRAMTimeDependenciesBase(const QJsonObject& memspec, const uint inTCK)
|
||||
{
|
||||
mMemspecJson = memspec;
|
||||
tCK = inTCK;
|
||||
|
||||
}
|
||||
|
||||
DependencyMap
|
||||
DRAMTimeDependenciesBase::getDependencies(std::vector<QString>& dependencyFilter) const {
|
||||
DRAMTimeDependenciesBase::getDependencies(std::vector<QString>& dependencyFilter) const
|
||||
{
|
||||
DependencyMap dependenciesMap;
|
||||
|
||||
std::vector<StringMapper> dependencyFilterStrMapper(dependencyFilter.begin(), dependencyFilter.end());
|
||||
std::sort(
|
||||
dependencyFilterStrMapper.begin(),
|
||||
dependencyFilterStrMapper.end()
|
||||
);
|
||||
|
||||
std::vector<StringMapper> dependencyFilterStrMapper(dependencyFilter.begin(),
|
||||
dependencyFilter.end());
|
||||
std::sort(dependencyFilterStrMapper.begin(), dependencyFilterStrMapper.end());
|
||||
|
||||
dependenciesMap = mSpecializedGetDependencies();
|
||||
|
||||
|
||||
mFilterDependencyMap(dependenciesMap, dependencyFilterStrMapper);
|
||||
|
||||
auto it = dependenciesMap.begin();
|
||||
while (it != dependenciesMap.end()) {
|
||||
while (it != dependenciesMap.end())
|
||||
{
|
||||
mFilterDependencyList(it->second.dependencies, dependencyFilterStrMapper);
|
||||
it->second.maxTime = mFindVectorMaximum(it->second.dependencies);
|
||||
|
||||
@@ -68,13 +68,17 @@ DRAMTimeDependenciesBase::getDependencies(std::vector<QString>& dependencyFilter
|
||||
return dependenciesMap;
|
||||
}
|
||||
|
||||
PoolControllerMap DRAMTimeDependenciesBase::getPools() const {
|
||||
PoolControllerMap DRAMTimeDependenciesBase::getPools() const
|
||||
{
|
||||
return PoolControllerMap(mPools);
|
||||
}
|
||||
|
||||
void DRAMTimeDependenciesBase::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,
|
||||
// although the lists are not to be greater than 20-50 elements
|
||||
|
||||
@@ -82,93 +86,87 @@ void DRAMTimeDependenciesBase::mFilterDependencyList(std::vector<TimeDependency>
|
||||
dependencyList.begin(),
|
||||
dependencyList.end(),
|
||||
newDepList.begin(),
|
||||
[ dependencyFilter ](const TimeDependency& dep) {
|
||||
auto it = std::lower_bound(
|
||||
dependencyFilter.begin(),
|
||||
dependencyFilter.end(),
|
||||
dep.phaseDep,
|
||||
[](const StringMapper& cmd, const StringMapper& depName){
|
||||
return depName.isPool() || cmd < depName;
|
||||
}
|
||||
);
|
||||
[dependencyFilter](const TimeDependency& dep)
|
||||
{
|
||||
auto it = std::lower_bound(dependencyFilter.begin(),
|
||||
dependencyFilter.end(),
|
||||
dep.phaseDep,
|
||||
[](const StringMapper& cmd, const StringMapper& depName)
|
||||
{ return depName.isPool() || cmd < depName; });
|
||||
|
||||
if (dep.phaseDep.isPool() || it != dependencyFilter.end() && *it == dep.phaseDep)
|
||||
if (dep.phaseDep.isPool() || it != dependencyFilter.end() && *it == dep.phaseDep)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
newDepList.shrink_to_fit();
|
||||
|
||||
dependencyList = newDepList;
|
||||
|
||||
std::sort(
|
||||
dependencyList.begin(),
|
||||
dependencyList.end(),
|
||||
[](const TimeDependency& v1, const TimeDependency& v2) {
|
||||
return v1.timeValue < v2.timeValue;
|
||||
}
|
||||
);
|
||||
|
||||
std::sort(dependencyList.begin(),
|
||||
dependencyList.end(),
|
||||
[](const TimeDependency& v1, const TimeDependency& v2)
|
||||
{ return v1.timeValue < v2.timeValue; });
|
||||
}
|
||||
|
||||
void DRAMTimeDependenciesBase::mFilterDependencyMap(DependencyMap& dependencyMap, const std::vector<StringMapper>& dependencyFilter) const {
|
||||
if (!dependencyMap.empty()) {
|
||||
void DRAMTimeDependenciesBase::mFilterDependencyMap(
|
||||
DependencyMap& dependencyMap, const std::vector<StringMapper>& dependencyFilter) const
|
||||
{
|
||||
if (!dependencyMap.empty())
|
||||
{
|
||||
|
||||
auto itFilter = dependencyFilter.begin();
|
||||
auto itFilterLast = std::lower_bound(
|
||||
dependencyFilter.begin(),
|
||||
dependencyFilter.end(),
|
||||
dependencyMap.rbegin()->first
|
||||
);
|
||||
dependencyFilter.begin(), dependencyFilter.end(), dependencyMap.rbegin()->first);
|
||||
|
||||
auto itDependencyMap = dependencyMap.begin();
|
||||
|
||||
while (true) {
|
||||
while (true)
|
||||
{
|
||||
|
||||
auto pair = std::mismatch(
|
||||
itFilter,
|
||||
itFilterLast,
|
||||
itDependencyMap,
|
||||
[](const StringMapper& cmd, const std::pair<StringMapper, PhaseTimeDependencies>& vpair) {
|
||||
return cmd == vpair.first;
|
||||
}
|
||||
);
|
||||
auto pair =
|
||||
std::mismatch(itFilter,
|
||||
itFilterLast,
|
||||
itDependencyMap,
|
||||
[](const StringMapper& cmd,
|
||||
const std::pair<StringMapper, PhaseTimeDependencies>& vpair)
|
||||
{ return cmd == vpair.first; });
|
||||
|
||||
if (pair.first == dependencyFilter.end() || pair.second == dependencyMap.end()) {
|
||||
if (pair.first == dependencyFilter.end() || pair.second == dependencyMap.end())
|
||||
{
|
||||
dependencyMap.erase(pair.second, dependencyMap.end());
|
||||
break;
|
||||
|
||||
} else if (*(pair.first) < pair.second->first) {
|
||||
}
|
||||
else if (*(pair.first) < pair.second->first)
|
||||
{
|
||||
++(pair.first);
|
||||
|
||||
} else if (*(pair.first) == pair.second->first) {
|
||||
}
|
||||
else if (*(pair.first) == pair.second->first)
|
||||
{
|
||||
++(pair.second);
|
||||
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
pair.second = dependencyMap.erase(pair.second);
|
||||
|
||||
}
|
||||
|
||||
itFilter = pair.first;
|
||||
itDependencyMap = pair.second;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
uint DRAMTimeDependenciesBase::mFindVectorMaximum(const std::vector<TimeDependency>& dependencyList) const {
|
||||
auto maxElement = std::max_element(
|
||||
dependencyList.begin(),
|
||||
dependencyList.end(),
|
||||
[](const TimeDependency& dep1, const TimeDependency& dep2) {
|
||||
return dep1.timeValue < dep2.timeValue;
|
||||
}
|
||||
);
|
||||
uint DRAMTimeDependenciesBase::mFindVectorMaximum(
|
||||
const std::vector<TimeDependency>& dependencyList) const
|
||||
{
|
||||
auto maxElement = std::max_element(dependencyList.begin(),
|
||||
dependencyList.end(),
|
||||
[](const TimeDependency& dep1, const TimeDependency& dep2)
|
||||
{ return dep1.timeValue < dep2.timeValue; });
|
||||
|
||||
if (maxElement == dependencyList.end()) return 0;
|
||||
if (maxElement == dependencyList.end())
|
||||
return 0;
|
||||
|
||||
return maxElement->timeValue;
|
||||
}
|
||||
|
||||
@@ -35,11 +35,12 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "data/tracedb.h"
|
||||
#include "businessObjects/dramTimeDependencies/common/common.h"
|
||||
#include "data/tracedb.h"
|
||||
#include "poolcontrollermap.h"
|
||||
|
||||
class DRAMTimeDependenciesBase {
|
||||
class DRAMTimeDependenciesBase
|
||||
{
|
||||
public:
|
||||
DRAMTimeDependenciesBase(const QJsonObject& memspec, const uint tCK);
|
||||
virtual ~DRAMTimeDependenciesBase() = default;
|
||||
@@ -51,21 +52,25 @@ public:
|
||||
PoolControllerMap getPools() const;
|
||||
|
||||
protected:
|
||||
void mFilterDependencyList(std::vector<TimeDependency>& dependencyList, const std::vector<StringMapper>& dependencyFilter) const;
|
||||
void mFilterDependencyMap(DependencyMap& dependencyMap, const std::vector<StringMapper>& dependencyFilter) const;
|
||||
void mFilterDependencyList(std::vector<TimeDependency>& dependencyList,
|
||||
const std::vector<StringMapper>& dependencyFilter) const;
|
||||
void mFilterDependencyMap(DependencyMap& dependencyMap,
|
||||
const std::vector<StringMapper>& dependencyFilter) const;
|
||||
uint mFindVectorMaximum(const std::vector<TimeDependency>& dependencyList) const;
|
||||
|
||||
|
||||
protected:
|
||||
QJsonObject mMemspecJson;
|
||||
|
||||
// To be implemented by the specializing class
|
||||
// To be implemented by the specializing class
|
||||
protected:
|
||||
virtual void mInitializeValues() {} ;
|
||||
virtual DependencyMap mSpecializedGetDependencies() const { DependencyMap map; return map; } ;
|
||||
|
||||
virtual void mInitializeValues(){};
|
||||
virtual DependencyMap mSpecializedGetDependencies() const
|
||||
{
|
||||
DependencyMap map;
|
||||
return map;
|
||||
};
|
||||
|
||||
uint tCK = 0;
|
||||
|
||||
std::map<StringMapper, PoolController> mPools;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -36,62 +36,62 @@
|
||||
#include "poolcontroller.h"
|
||||
#include <algorithm>
|
||||
|
||||
PoolController::PoolController(const uint poolSize, const std::vector<PoolEntry>& dependencies)
|
||||
: mDependencies(mAuxSortInput(dependencies))
|
||||
PoolController::PoolController(const uint poolSize, const std::vector<PoolEntry>& dependencies) :
|
||||
mDependencies(mAuxSortInput(dependencies))
|
||||
{
|
||||
mPoolSize = poolSize;
|
||||
|
||||
}
|
||||
|
||||
void PoolController::clear() {
|
||||
void PoolController::clear()
|
||||
{
|
||||
mPool.clear();
|
||||
mCount = 0;
|
||||
|
||||
}
|
||||
|
||||
void PoolController::push(DBDependencyEntry dep) {
|
||||
void PoolController::push(DBDependencyEntry dep)
|
||||
{
|
||||
mPool.push_back(dep);
|
||||
mCount++;
|
||||
|
||||
}
|
||||
|
||||
void PoolController::increment() {
|
||||
void PoolController::increment()
|
||||
{
|
||||
mCount++;
|
||||
}
|
||||
|
||||
void PoolController::merge(std::vector<DBDependencyEntry>& depEntries) {
|
||||
if(mCount >= mPoolSize) {
|
||||
depEntries.insert( depEntries.end(), mPool.begin(), mPool.end() );
|
||||
void PoolController::merge(std::vector<DBDependencyEntry>& depEntries)
|
||||
{
|
||||
if (mCount >= mPoolSize)
|
||||
{
|
||||
depEntries.insert(depEntries.end(), mPool.begin(), mPool.end());
|
||||
}
|
||||
}
|
||||
|
||||
uint PoolController::getBusyTime(const StringMapper& phaseName) {
|
||||
uint PoolController::getBusyTime(const StringMapper& phaseName)
|
||||
{
|
||||
PoolEntry v{phaseName, 0};
|
||||
|
||||
auto entryIt = std::lower_bound(
|
||||
mDependencies.begin(),
|
||||
mDependencies.end(),
|
||||
v,
|
||||
[](const PoolEntry& e1, const PoolEntry& e2) {
|
||||
return e1.first < e2.first;
|
||||
}
|
||||
);
|
||||
auto entryIt = std::lower_bound(mDependencies.begin(),
|
||||
mDependencies.end(),
|
||||
v,
|
||||
[](const PoolEntry& e1, const PoolEntry& e2)
|
||||
{ return e1.first < e2.first; });
|
||||
|
||||
if (entryIt->first == phaseName) {
|
||||
if (entryIt->first == phaseName)
|
||||
{
|
||||
return entryIt->second;
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<PoolEntry> PoolController::mAuxSortInput(std::vector<PoolEntry> vec) {
|
||||
std::sort(
|
||||
vec.begin(),
|
||||
vec.end(),
|
||||
[](const PoolEntry& e1, const PoolEntry& e2) {
|
||||
return e1.first < e2.first;
|
||||
}
|
||||
);
|
||||
std::vector<PoolEntry> PoolController::mAuxSortInput(std::vector<PoolEntry> vec)
|
||||
{
|
||||
std::sort(vec.begin(),
|
||||
vec.end(),
|
||||
[](const PoolEntry& e1, const PoolEntry& e2) { return e1.first < e2.first; });
|
||||
|
||||
return vec;
|
||||
}
|
||||
@@ -39,7 +39,8 @@
|
||||
|
||||
typedef std::pair<StringMapper, uint> PoolEntry;
|
||||
|
||||
class PoolController {
|
||||
class PoolController
|
||||
{
|
||||
public:
|
||||
PoolController(const uint poolSize, const std::vector<PoolEntry>& dependencies);
|
||||
~PoolController() = default;
|
||||
@@ -49,7 +50,7 @@ public:
|
||||
void increment();
|
||||
void merge(std::vector<DBDependencyEntry>& depEntries);
|
||||
size_t count() { return mCount; }
|
||||
|
||||
|
||||
uint getBusyTime(const StringMapper& phaseName);
|
||||
|
||||
protected:
|
||||
|
||||
@@ -35,63 +35,77 @@
|
||||
|
||||
#include "poolcontrollermap.h"
|
||||
|
||||
PoolControllerMap::PoolControllerMap(const std::map<StringMapper, PoolController>& pools) {
|
||||
PoolControllerMap::PoolControllerMap(const std::map<StringMapper, PoolController>& pools)
|
||||
{
|
||||
mPools = pools;
|
||||
}
|
||||
|
||||
void PoolControllerMap::clear() {
|
||||
for (auto& p : mPools) {
|
||||
void PoolControllerMap::clear()
|
||||
{
|
||||
for (auto& p : mPools)
|
||||
{
|
||||
p.second.clear();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void PoolControllerMap::push(const StringMapper& poolName, DBDependencyEntry dep) {
|
||||
void PoolControllerMap::push(const StringMapper& poolName, DBDependencyEntry dep)
|
||||
{
|
||||
auto pool = mPools.find(poolName);
|
||||
if (pool != mPools.end()) {
|
||||
if (pool != mPools.end())
|
||||
{
|
||||
pool->second.push(dep);
|
||||
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
// TODO throw?
|
||||
}
|
||||
}
|
||||
|
||||
void PoolControllerMap::increment(const StringMapper& poolName) {
|
||||
void PoolControllerMap::increment(const StringMapper& poolName)
|
||||
{
|
||||
auto pool = mPools.find(poolName);
|
||||
if (pool != mPools.end()) {
|
||||
if (pool != mPools.end())
|
||||
{
|
||||
pool->second.increment();
|
||||
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
// TODO throw?
|
||||
}
|
||||
}
|
||||
|
||||
void PoolControllerMap::merge(std::vector<DBDependencyEntry>& depEntries) {
|
||||
for (auto& p : mPools) {
|
||||
void PoolControllerMap::merge(std::vector<DBDependencyEntry>& depEntries)
|
||||
{
|
||||
for (auto& p : mPools)
|
||||
{
|
||||
p.second.merge(depEntries);
|
||||
}
|
||||
}
|
||||
|
||||
uint PoolControllerMap::getBusyTime(const StringMapper& poolName, const StringMapper& phaseName) {
|
||||
uint PoolControllerMap::getBusyTime(const StringMapper& poolName, const StringMapper& phaseName)
|
||||
{
|
||||
auto pool = mPools.find(poolName);
|
||||
if (pool != mPools.end()) {
|
||||
if (pool != mPools.end())
|
||||
{
|
||||
return pool->second.getBusyTime(phaseName);
|
||||
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
// TODO throw?
|
||||
return 0;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
size_t PoolControllerMap::count(const StringMapper& poolName) {
|
||||
size_t PoolControllerMap::count(const StringMapper& poolName)
|
||||
{
|
||||
auto pool = mPools.find(poolName);
|
||||
if (pool != mPools.end()) {
|
||||
if (pool != mPools.end())
|
||||
{
|
||||
return pool->second.count();
|
||||
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
// TODO throw?
|
||||
return 0;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,7 +37,8 @@
|
||||
|
||||
#include "poolcontroller.h"
|
||||
|
||||
class PoolControllerMap {
|
||||
class PoolControllerMap
|
||||
{
|
||||
public:
|
||||
PoolControllerMap(const std::map<StringMapper, PoolController>& pools);
|
||||
~PoolControllerMap() = default;
|
||||
@@ -50,8 +51,6 @@ public:
|
||||
|
||||
uint getBusyTime(const StringMapper& poolName, const StringMapper& phaseName);
|
||||
|
||||
|
||||
protected:
|
||||
std::map<StringMapper, PoolController> mPools;
|
||||
|
||||
};
|
||||
|
||||
@@ -37,11 +37,14 @@
|
||||
|
||||
using namespace std;
|
||||
|
||||
DDR3TimeDependencies::DDR3TimeDependencies(const QJsonObject& memspec, const uint tCK) : DRAMTimeDependenciesBase(memspec, tCK) {
|
||||
DDR3TimeDependencies::DDR3TimeDependencies(const QJsonObject& memspec, const uint tCK) :
|
||||
DRAMTimeDependenciesBase(memspec, tCK)
|
||||
{
|
||||
mInitializeValues();
|
||||
}
|
||||
|
||||
void DDR3TimeDependencies::mInitializeValues() {
|
||||
void DDR3TimeDependencies::mInitializeValues()
|
||||
{
|
||||
burstLength = mMemspecJson["memarchitecturespec"].toObject()["burstLength"].toInt();
|
||||
dataRate = mMemspecJson["memarchitecturespec"].toObject()["dataRate"].toInt();
|
||||
|
||||
@@ -71,9 +74,9 @@ void DDR3TimeDependencies::mInitializeValues() {
|
||||
tPRPDEN = tCK * mMemspecJson["memtimingspec"].toObject()["PRPDEN"].toInt();
|
||||
tREFPDEN = tCK * mMemspecJson["memtimingspec"].toObject()["REFPDEN"].toInt();
|
||||
tCKE = tCK * mMemspecJson["memtimingspec"].toObject()["CKE"].toInt();
|
||||
|
||||
|
||||
tPD = tCKE;
|
||||
tBURST = (uint) ((burstLength / (float) dataRate) * tCK);
|
||||
tBURST = (uint)((burstLength / (float)dataRate) * tCK);
|
||||
tRDWR = tRL + tBURST + 2 * tCK - tWL;
|
||||
tRDWR_R = tRL + tBURST + tRTRS - tWL;
|
||||
tWRRD = tWL + tBURST + tWTR;
|
||||
@@ -83,31 +86,29 @@ void DDR3TimeDependencies::mInitializeValues() {
|
||||
tWRPDEN = tWL + tBURST + tWR;
|
||||
tWRAPDEN = tWL + tBURST + tWR + tCK;
|
||||
|
||||
mPools.insert({
|
||||
"CMD_BUS", {
|
||||
1, {
|
||||
{"ACT", tCK},
|
||||
{"RD", tCK},
|
||||
{"WR", tCK},
|
||||
{"PREPB", tCK},
|
||||
{"RDA", tCK},
|
||||
{"WRA", tCK},
|
||||
{"REFAB", tCK},
|
||||
{"PREAB", tCK},
|
||||
{"PDEP", tCK},
|
||||
{"PDXP", tCK},
|
||||
{"SREFEN", tCK},
|
||||
{"SREFEX", tCK},
|
||||
{"PDEA", tCK},
|
||||
{"PDXA", tCK},
|
||||
}
|
||||
}
|
||||
});
|
||||
mPools.insert({"CMD_BUS",
|
||||
{1,
|
||||
{
|
||||
{"ACT", tCK},
|
||||
{"RD", tCK},
|
||||
{"WR", tCK},
|
||||
{"PREPB", tCK},
|
||||
{"RDA", tCK},
|
||||
{"WRA", tCK},
|
||||
{"REFAB", tCK},
|
||||
{"PREAB", tCK},
|
||||
{"PDEP", tCK},
|
||||
{"PDXP", tCK},
|
||||
{"SREFEN", tCK},
|
||||
{"SREFEX", tCK},
|
||||
{"PDEA", tCK},
|
||||
{"PDXA", tCK},
|
||||
}}});
|
||||
mPools.insert({"NAW", {4, {{"ACT", tFAW}}}});
|
||||
|
||||
}
|
||||
|
||||
const vector<QString> DDR3TimeDependencies::getPossiblePhases() {
|
||||
const vector<QString> DDR3TimeDependencies::getPossiblePhases()
|
||||
{
|
||||
return {"ACT",
|
||||
"RD",
|
||||
"RDA",
|
||||
@@ -121,252 +122,202 @@ const vector<QString> DDR3TimeDependencies::getPossiblePhases() {
|
||||
"PDEP",
|
||||
"PDXP",
|
||||
"SREFEN",
|
||||
"SREFEX"
|
||||
};
|
||||
"SREFEX"};
|
||||
}
|
||||
|
||||
DependencyMap DDR3TimeDependencies::mSpecializedGetDependencies() const {
|
||||
DependencyMap DDR3TimeDependencies::mSpecializedGetDependencies() const
|
||||
{
|
||||
DependencyMap dmap;
|
||||
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("ACT"),
|
||||
forward_as_tuple(
|
||||
initializer_list<TimeDependency>{
|
||||
{tRC, "ACT", DependencyType::IntraBank, "tRC"},
|
||||
{tAL + tRTP + tRP, "RDA", DependencyType::IntraBank, "tAL + tRTP + tRP"},
|
||||
{tWRPRE + tRP, "WRA", DependencyType::IntraBank, "tWRPRE + tRP"},
|
||||
{tRP, "PREPB", DependencyType::IntraBank, "tRP"},
|
||||
{tRRD, "ACT", DependencyType::IntraRank, "tRRD"},
|
||||
{tRP, "PREAB", DependencyType::IntraRank, "tRP"},
|
||||
{tXP, "PDXA", DependencyType::IntraRank, "tXP"},
|
||||
{tXP, "PDXP", DependencyType::IntraRank, "tXP"},
|
||||
{tRFC, "REFAB", DependencyType::IntraRank, "tRFC"},
|
||||
{tXS, "SREFEX", DependencyType::IntraRank, "tXS"},
|
||||
{tCK, "CMD_BUS", DependencyType::InterRank, "CMD_BUS"},
|
||||
{tFAW, "NAW", DependencyType::IntraRank, "tFAW"},
|
||||
}
|
||||
)
|
||||
);
|
||||
dmap.emplace(piecewise_construct,
|
||||
forward_as_tuple("ACT"),
|
||||
forward_as_tuple(initializer_list<TimeDependency>{
|
||||
{tRC, "ACT", DependencyType::IntraBank, "tRC"},
|
||||
{tAL + tRTP + tRP, "RDA", DependencyType::IntraBank, "tAL + tRTP + tRP"},
|
||||
{tWRPRE + tRP, "WRA", DependencyType::IntraBank, "tWRPRE + tRP"},
|
||||
{tRP, "PREPB", DependencyType::IntraBank, "tRP"},
|
||||
{tRRD, "ACT", DependencyType::IntraRank, "tRRD"},
|
||||
{tRP, "PREAB", DependencyType::IntraRank, "tRP"},
|
||||
{tXP, "PDXA", DependencyType::IntraRank, "tXP"},
|
||||
{tXP, "PDXP", DependencyType::IntraRank, "tXP"},
|
||||
{tRFC, "REFAB", DependencyType::IntraRank, "tRFC"},
|
||||
{tXS, "SREFEX", DependencyType::IntraRank, "tXS"},
|
||||
{tCK, "CMD_BUS", DependencyType::InterRank, "CMD_BUS"},
|
||||
{tFAW, "NAW", DependencyType::IntraRank, "tFAW"},
|
||||
}));
|
||||
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("RD"),
|
||||
forward_as_tuple(
|
||||
initializer_list<TimeDependency>{
|
||||
{tRCD - tAL, "ACT", DependencyType::IntraBank, "tRCD - tAL"},
|
||||
{tCCD, "RD", DependencyType::IntraRank, "tCCD"},
|
||||
{tCCD, "RDA", DependencyType::IntraRank, "tCCD"},
|
||||
{tWRRD, "WR", DependencyType::IntraRank, "tWRRD"},
|
||||
{tWRRD, "WRA", DependencyType::IntraRank, "tWRRD"},
|
||||
{tXP, "PDXA", DependencyType::IntraRank, "tXP"},
|
||||
{tXSDLL, "SREFEX", DependencyType::IntraRank, "tXSDLL"},
|
||||
{tBURST + tRTRS, "RD", DependencyType::InterRank, "tBURST + tRTRS"},
|
||||
{tBURST + tRTRS, "RDA", DependencyType::InterRank, "tBURST + tRTRS"},
|
||||
{tWRRD_R, "WR", DependencyType::InterRank, "tWRRD_R"},
|
||||
{tWRRD_R, "WRA", DependencyType::InterRank, "tWRRD_R"},
|
||||
{tCK, "CMD_BUS", DependencyType::InterRank, "CMD_BUS"},
|
||||
}
|
||||
)
|
||||
);
|
||||
dmap.emplace(piecewise_construct,
|
||||
forward_as_tuple("RD"),
|
||||
forward_as_tuple(initializer_list<TimeDependency>{
|
||||
{tRCD - tAL, "ACT", DependencyType::IntraBank, "tRCD - tAL"},
|
||||
{tCCD, "RD", DependencyType::IntraRank, "tCCD"},
|
||||
{tCCD, "RDA", DependencyType::IntraRank, "tCCD"},
|
||||
{tWRRD, "WR", DependencyType::IntraRank, "tWRRD"},
|
||||
{tWRRD, "WRA", DependencyType::IntraRank, "tWRRD"},
|
||||
{tXP, "PDXA", DependencyType::IntraRank, "tXP"},
|
||||
{tXSDLL, "SREFEX", DependencyType::IntraRank, "tXSDLL"},
|
||||
{tBURST + tRTRS, "RD", DependencyType::InterRank, "tBURST + tRTRS"},
|
||||
{tBURST + tRTRS, "RDA", DependencyType::InterRank, "tBURST + tRTRS"},
|
||||
{tWRRD_R, "WR", DependencyType::InterRank, "tWRRD_R"},
|
||||
{tWRRD_R, "WRA", DependencyType::InterRank, "tWRRD_R"},
|
||||
{tCK, "CMD_BUS", DependencyType::InterRank, "CMD_BUS"},
|
||||
}));
|
||||
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("RDA"),
|
||||
forward_as_tuple(
|
||||
initializer_list<TimeDependency>{
|
||||
{tRCD - tAL, "ACT", DependencyType::IntraBank, "tRCD - tAL"},
|
||||
{tWRPRE - tRTP, "WR", DependencyType::IntraBank, "tWRPRE - tRTP"},
|
||||
{tCCD, "RD", DependencyType::IntraRank, "tCCD"},
|
||||
{tCCD, "RDA", DependencyType::IntraRank, "tCCD"},
|
||||
{tWRRD, "WR", DependencyType::IntraRank, "tWRRD"},
|
||||
{tWRRD, "WRA", DependencyType::IntraRank, "tWRRD"},
|
||||
{tXP, "PDXA", DependencyType::IntraRank, "tXP"},
|
||||
{tXSDLL, "SREFEX", DependencyType::IntraRank, "tXSDLL"},
|
||||
{tBURST + tRTRS, "RD", DependencyType::InterRank, "tBURST + tRTRS"},
|
||||
{tBURST + tRTRS, "RDA", DependencyType::InterRank, "tBURST + tRTRS"},
|
||||
{tWRRD_R, "WR", DependencyType::InterRank, "tWRRD_R"},
|
||||
{tWRRD_R, "WRA", DependencyType::InterRank, "tWRRD_R"},
|
||||
{tCK, "CMD_BUS", DependencyType::InterRank, "CMD_BUS"},
|
||||
}
|
||||
)
|
||||
);
|
||||
dmap.emplace(piecewise_construct,
|
||||
forward_as_tuple("RDA"),
|
||||
forward_as_tuple(initializer_list<TimeDependency>{
|
||||
{tRCD - tAL, "ACT", DependencyType::IntraBank, "tRCD - tAL"},
|
||||
{tWRPRE - tRTP, "WR", DependencyType::IntraBank, "tWRPRE - tRTP"},
|
||||
{tCCD, "RD", DependencyType::IntraRank, "tCCD"},
|
||||
{tCCD, "RDA", DependencyType::IntraRank, "tCCD"},
|
||||
{tWRRD, "WR", DependencyType::IntraRank, "tWRRD"},
|
||||
{tWRRD, "WRA", DependencyType::IntraRank, "tWRRD"},
|
||||
{tXP, "PDXA", DependencyType::IntraRank, "tXP"},
|
||||
{tXSDLL, "SREFEX", DependencyType::IntraRank, "tXSDLL"},
|
||||
{tBURST + tRTRS, "RD", DependencyType::InterRank, "tBURST + tRTRS"},
|
||||
{tBURST + tRTRS, "RDA", DependencyType::InterRank, "tBURST + tRTRS"},
|
||||
{tWRRD_R, "WR", DependencyType::InterRank, "tWRRD_R"},
|
||||
{tWRRD_R, "WRA", DependencyType::InterRank, "tWRRD_R"},
|
||||
{tCK, "CMD_BUS", DependencyType::InterRank, "CMD_BUS"},
|
||||
}));
|
||||
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("WR"),
|
||||
forward_as_tuple(
|
||||
initializer_list<TimeDependency>{
|
||||
{tRCD - tAL, "ACT", DependencyType::IntraBank, "tRCD - tAL"},
|
||||
{tRDWR, "RD", DependencyType::IntraRank, "tRDWR"},
|
||||
{tRDWR, "RDA", DependencyType::IntraRank, "tRDWR"},
|
||||
{tCCD, "WR", DependencyType::IntraRank, "tCCD"},
|
||||
{tCCD, "WRA", DependencyType::IntraRank, "tCCD"},
|
||||
{tXP, "PDXA", DependencyType::IntraRank, "tXP"},
|
||||
{tXSDLL, "SREFEX", DependencyType::IntraRank, "tXSDLL"},
|
||||
{tRDWR_R, "RD", DependencyType::InterRank, "tRDWR_R"},
|
||||
{tRDWR_R, "RDA", DependencyType::InterRank, "tRDWR_R"},
|
||||
{tBURST + tRTRS, "WR", DependencyType::InterRank, "tBURST + tRTRS"},
|
||||
{tBURST + tRTRS, "WRA", DependencyType::InterRank, "tBURST + tRTRS"},
|
||||
{tCK, "CMD_BUS", DependencyType::InterRank, "CMD_BUS"},
|
||||
}
|
||||
)
|
||||
);
|
||||
dmap.emplace(piecewise_construct,
|
||||
forward_as_tuple("WR"),
|
||||
forward_as_tuple(initializer_list<TimeDependency>{
|
||||
{tRCD - tAL, "ACT", DependencyType::IntraBank, "tRCD - tAL"},
|
||||
{tRDWR, "RD", DependencyType::IntraRank, "tRDWR"},
|
||||
{tRDWR, "RDA", DependencyType::IntraRank, "tRDWR"},
|
||||
{tCCD, "WR", DependencyType::IntraRank, "tCCD"},
|
||||
{tCCD, "WRA", DependencyType::IntraRank, "tCCD"},
|
||||
{tXP, "PDXA", DependencyType::IntraRank, "tXP"},
|
||||
{tXSDLL, "SREFEX", DependencyType::IntraRank, "tXSDLL"},
|
||||
{tRDWR_R, "RD", DependencyType::InterRank, "tRDWR_R"},
|
||||
{tRDWR_R, "RDA", DependencyType::InterRank, "tRDWR_R"},
|
||||
{tBURST + tRTRS, "WR", DependencyType::InterRank, "tBURST + tRTRS"},
|
||||
{tBURST + tRTRS, "WRA", DependencyType::InterRank, "tBURST + tRTRS"},
|
||||
{tCK, "CMD_BUS", DependencyType::InterRank, "CMD_BUS"},
|
||||
}));
|
||||
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("WRA"),
|
||||
forward_as_tuple(
|
||||
initializer_list<TimeDependency>{
|
||||
{tRCD - tAL, "ACT", DependencyType::IntraBank, "tRCD - tAL"},
|
||||
{tRDWR, "RD", DependencyType::IntraRank, "tRDWR"},
|
||||
{tRDWR, "RDA", DependencyType::IntraRank, "tRDWR"},
|
||||
{tCCD, "WR", DependencyType::IntraRank, "tCCD"},
|
||||
{tCCD, "WRA", DependencyType::IntraRank, "tCCD"},
|
||||
{tXP, "PDXA", DependencyType::IntraRank, "tXP"},
|
||||
{tXSDLL, "SREFEX", DependencyType::IntraRank, "tXSDLL"},
|
||||
{tRDWR_R, "RD", DependencyType::InterRank, "tRDWR_R"},
|
||||
{tRDWR_R, "RDA", DependencyType::InterRank, "tRDWR_R"},
|
||||
{tBURST + tRTRS, "WR", DependencyType::InterRank, "tBURST + tRTRS"},
|
||||
{tBURST + tRTRS, "WRA", DependencyType::InterRank, "tBURST + tRTRS"},
|
||||
{tCK, "CMD_BUS", DependencyType::InterRank, "CMD_BUS"},
|
||||
}
|
||||
)
|
||||
);
|
||||
dmap.emplace(piecewise_construct,
|
||||
forward_as_tuple("WRA"),
|
||||
forward_as_tuple(initializer_list<TimeDependency>{
|
||||
{tRCD - tAL, "ACT", DependencyType::IntraBank, "tRCD - tAL"},
|
||||
{tRDWR, "RD", DependencyType::IntraRank, "tRDWR"},
|
||||
{tRDWR, "RDA", DependencyType::IntraRank, "tRDWR"},
|
||||
{tCCD, "WR", DependencyType::IntraRank, "tCCD"},
|
||||
{tCCD, "WRA", DependencyType::IntraRank, "tCCD"},
|
||||
{tXP, "PDXA", DependencyType::IntraRank, "tXP"},
|
||||
{tXSDLL, "SREFEX", DependencyType::IntraRank, "tXSDLL"},
|
||||
{tRDWR_R, "RD", DependencyType::InterRank, "tRDWR_R"},
|
||||
{tRDWR_R, "RDA", DependencyType::InterRank, "tRDWR_R"},
|
||||
{tBURST + tRTRS, "WR", DependencyType::InterRank, "tBURST + tRTRS"},
|
||||
{tBURST + tRTRS, "WRA", DependencyType::InterRank, "tBURST + tRTRS"},
|
||||
{tCK, "CMD_BUS", DependencyType::InterRank, "CMD_BUS"},
|
||||
}));
|
||||
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("PREPB"),
|
||||
forward_as_tuple(
|
||||
initializer_list<TimeDependency>{
|
||||
{tRAS, "ACT", DependencyType::IntraBank, "tRAS"},
|
||||
{tAL + tRTP, "RD", DependencyType::IntraBank, "tAL + tRTP"},
|
||||
{tWRPRE, "WR", DependencyType::IntraBank, "tWRPRE"},
|
||||
{tXP, "PDXA", DependencyType::IntraRank, "tXP"},
|
||||
{tCK, "CMD_BUS", DependencyType::InterRank, "CMD_BUS"},
|
||||
}
|
||||
)
|
||||
);
|
||||
dmap.emplace(piecewise_construct,
|
||||
forward_as_tuple("PREPB"),
|
||||
forward_as_tuple(initializer_list<TimeDependency>{
|
||||
{tRAS, "ACT", DependencyType::IntraBank, "tRAS"},
|
||||
{tAL + tRTP, "RD", DependencyType::IntraBank, "tAL + tRTP"},
|
||||
{tWRPRE, "WR", DependencyType::IntraBank, "tWRPRE"},
|
||||
{tXP, "PDXA", DependencyType::IntraRank, "tXP"},
|
||||
{tCK, "CMD_BUS", DependencyType::InterRank, "CMD_BUS"},
|
||||
}));
|
||||
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("PREAB"),
|
||||
forward_as_tuple(
|
||||
initializer_list<TimeDependency>{
|
||||
{tRAS, "ACT", DependencyType::IntraRank, "tRAS"},
|
||||
{tAL + tRTP, "RD", DependencyType::IntraRank, "tAL + tRTP"},
|
||||
{tAL + tRTP, "RDA", DependencyType::IntraRank, "tAL + tRTP"},
|
||||
{tWRPRE, "WR", DependencyType::IntraRank, "tWRPRE"},
|
||||
{tWRPRE, "WRA", DependencyType::IntraRank, "tWRPRE"},
|
||||
{tXP, "PDXA", DependencyType::IntraRank, "tXP"},
|
||||
{tCK, "CMD_BUS", DependencyType::InterRank, "CMD_BUS"},
|
||||
}
|
||||
)
|
||||
);
|
||||
dmap.emplace(piecewise_construct,
|
||||
forward_as_tuple("PREAB"),
|
||||
forward_as_tuple(initializer_list<TimeDependency>{
|
||||
{tRAS, "ACT", DependencyType::IntraRank, "tRAS"},
|
||||
{tAL + tRTP, "RD", DependencyType::IntraRank, "tAL + tRTP"},
|
||||
{tAL + tRTP, "RDA", DependencyType::IntraRank, "tAL + tRTP"},
|
||||
{tWRPRE, "WR", DependencyType::IntraRank, "tWRPRE"},
|
||||
{tWRPRE, "WRA", DependencyType::IntraRank, "tWRPRE"},
|
||||
{tXP, "PDXA", DependencyType::IntraRank, "tXP"},
|
||||
{tCK, "CMD_BUS", DependencyType::InterRank, "CMD_BUS"},
|
||||
}));
|
||||
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("REFAB"),
|
||||
forward_as_tuple(
|
||||
initializer_list<TimeDependency>{
|
||||
{tRC, "ACT", DependencyType::IntraRank, "tRC"},
|
||||
{tAL + tRTP + tRP, "RDA", DependencyType::IntraRank, "tAL + tRTP + tRP"},
|
||||
{tWRPRE + tRP, "WRA", DependencyType::IntraRank, "tWRPRE + tRP"},
|
||||
{tRP, "PREPB", DependencyType::IntraRank, "tRP"},
|
||||
{tRP, "PREAB", DependencyType::IntraRank, "tRP"},
|
||||
{tXP, "PDXP", DependencyType::IntraRank, "tXP"},
|
||||
{tRFC, "REFAB", DependencyType::IntraRank, "tRFC"},
|
||||
{tXS, "SREFEX", DependencyType::IntraRank, "tXS"},
|
||||
{tCK, "CMD_BUS", DependencyType::InterRank, "CMD_BUS"},
|
||||
}
|
||||
)
|
||||
);
|
||||
dmap.emplace(piecewise_construct,
|
||||
forward_as_tuple("REFAB"),
|
||||
forward_as_tuple(initializer_list<TimeDependency>{
|
||||
{tRC, "ACT", DependencyType::IntraRank, "tRC"},
|
||||
{tAL + tRTP + tRP, "RDA", DependencyType::IntraRank, "tAL + tRTP + tRP"},
|
||||
{tWRPRE + tRP, "WRA", DependencyType::IntraRank, "tWRPRE + tRP"},
|
||||
{tRP, "PREPB", DependencyType::IntraRank, "tRP"},
|
||||
{tRP, "PREAB", DependencyType::IntraRank, "tRP"},
|
||||
{tXP, "PDXP", DependencyType::IntraRank, "tXP"},
|
||||
{tRFC, "REFAB", DependencyType::IntraRank, "tRFC"},
|
||||
{tXS, "SREFEX", DependencyType::IntraRank, "tXS"},
|
||||
{tCK, "CMD_BUS", DependencyType::InterRank, "CMD_BUS"},
|
||||
}));
|
||||
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("PDEA"),
|
||||
forward_as_tuple(
|
||||
initializer_list<TimeDependency>{
|
||||
{tACTPDEN, "ACT", DependencyType::IntraRank, "tACTPDEN"},
|
||||
{tRDPDEN, "RD", DependencyType::IntraRank, "tRDPDEN"},
|
||||
{tRDPDEN, "RDA", DependencyType::IntraRank, "tRDPDEN"},
|
||||
{tWRPDEN, "WR", DependencyType::IntraRank, "tWRPDEN"},
|
||||
{tWRAPDEN, "WRA", DependencyType::IntraRank, "tWRAPDEN"},
|
||||
{tPRPDEN, "PREPB", DependencyType::IntraRank, "tPRPDEN"},
|
||||
{tCKE, "PDXA", DependencyType::IntraRank, "tCKE"},
|
||||
{tCK, "CMD_BUS", DependencyType::InterRank, "CMD_BUS"},
|
||||
}
|
||||
)
|
||||
);
|
||||
dmap.emplace(piecewise_construct,
|
||||
forward_as_tuple("PDEA"),
|
||||
forward_as_tuple(initializer_list<TimeDependency>{
|
||||
{tACTPDEN, "ACT", DependencyType::IntraRank, "tACTPDEN"},
|
||||
{tRDPDEN, "RD", DependencyType::IntraRank, "tRDPDEN"},
|
||||
{tRDPDEN, "RDA", DependencyType::IntraRank, "tRDPDEN"},
|
||||
{tWRPDEN, "WR", DependencyType::IntraRank, "tWRPDEN"},
|
||||
{tWRAPDEN, "WRA", DependencyType::IntraRank, "tWRAPDEN"},
|
||||
{tPRPDEN, "PREPB", DependencyType::IntraRank, "tPRPDEN"},
|
||||
{tCKE, "PDXA", DependencyType::IntraRank, "tCKE"},
|
||||
{tCK, "CMD_BUS", DependencyType::InterRank, "CMD_BUS"},
|
||||
}));
|
||||
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("PDXA"),
|
||||
forward_as_tuple(
|
||||
initializer_list<TimeDependency>{
|
||||
{tPD, "PDEA", DependencyType::IntraRank, "tPD"},
|
||||
{tCK, "CMD_BUS", DependencyType::InterRank, "CMD_BUS"},
|
||||
}
|
||||
)
|
||||
);
|
||||
dmap.emplace(piecewise_construct,
|
||||
forward_as_tuple("PDXA"),
|
||||
forward_as_tuple(initializer_list<TimeDependency>{
|
||||
{tPD, "PDEA", DependencyType::IntraRank, "tPD"},
|
||||
{tCK, "CMD_BUS", DependencyType::InterRank, "CMD_BUS"},
|
||||
}));
|
||||
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("PDEP"),
|
||||
forward_as_tuple(
|
||||
initializer_list<TimeDependency>{
|
||||
{tRDPDEN, "RD", DependencyType::IntraRank, "tRDPDEN"},
|
||||
{tRDPDEN, "RDA", DependencyType::IntraRank, "tRDPDEN"},
|
||||
{tWRAPDEN, "WRA", DependencyType::IntraRank, "tWRAPDEN"},
|
||||
{tPRPDEN, "PREPB", DependencyType::IntraRank, "tPRPDEN"},
|
||||
{tPRPDEN, "PREAB", DependencyType::IntraRank, "tPRPDEN"},
|
||||
{tCKE, "PDXP", DependencyType::IntraRank, "tCKE"},
|
||||
{tREFPDEN, "REFAB", DependencyType::IntraRank, "tREFPDEN"},
|
||||
{tXS, "SREFEX", DependencyType::IntraRank, "tXS"},
|
||||
{tCK, "CMD_BUS", DependencyType::InterRank, "CMD_BUS"},
|
||||
}
|
||||
)
|
||||
);
|
||||
dmap.emplace(piecewise_construct,
|
||||
forward_as_tuple("PDEP"),
|
||||
forward_as_tuple(initializer_list<TimeDependency>{
|
||||
{tRDPDEN, "RD", DependencyType::IntraRank, "tRDPDEN"},
|
||||
{tRDPDEN, "RDA", DependencyType::IntraRank, "tRDPDEN"},
|
||||
{tWRAPDEN, "WRA", DependencyType::IntraRank, "tWRAPDEN"},
|
||||
{tPRPDEN, "PREPB", DependencyType::IntraRank, "tPRPDEN"},
|
||||
{tPRPDEN, "PREAB", DependencyType::IntraRank, "tPRPDEN"},
|
||||
{tCKE, "PDXP", DependencyType::IntraRank, "tCKE"},
|
||||
{tREFPDEN, "REFAB", DependencyType::IntraRank, "tREFPDEN"},
|
||||
{tXS, "SREFEX", DependencyType::IntraRank, "tXS"},
|
||||
{tCK, "CMD_BUS", DependencyType::InterRank, "CMD_BUS"},
|
||||
}));
|
||||
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("PDXP"),
|
||||
forward_as_tuple(
|
||||
initializer_list<TimeDependency>{
|
||||
{tPD, "PDEP", DependencyType::IntraRank, "tPD"},
|
||||
{tCK, "CMD_BUS", DependencyType::InterRank, "CMD_BUS"},
|
||||
}
|
||||
)
|
||||
);
|
||||
dmap.emplace(piecewise_construct,
|
||||
forward_as_tuple("PDXP"),
|
||||
forward_as_tuple(initializer_list<TimeDependency>{
|
||||
{tPD, "PDEP", DependencyType::IntraRank, "tPD"},
|
||||
{tCK, "CMD_BUS", DependencyType::InterRank, "CMD_BUS"},
|
||||
}));
|
||||
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("SREFEN"),
|
||||
forward_as_tuple(
|
||||
initializer_list<TimeDependency>{
|
||||
{tRC, "ACT", DependencyType::IntraRank, "tRC"},
|
||||
{max({tRDPDEN, tAL + tRTP + tRP}), "RDA", DependencyType::IntraRank, "max(tRDPDEN, tAL + tRTP + tRP)"},
|
||||
{max({tWRAPDEN, tWRPRE + tRP}), "WRA", DependencyType::IntraRank, "max(tWRAPDEN, tWRPRE + tRP)"},
|
||||
{tRP, "PREPB", DependencyType::IntraRank, "tRP"},
|
||||
{tRP, "PREAB", DependencyType::IntraRank, "tRP"},
|
||||
{tXP, "PDXP", DependencyType::IntraRank, "tXP"},
|
||||
{tRFC, "REFAB", DependencyType::IntraRank, "tRFC"},
|
||||
{tXS, "SREFEX", DependencyType::IntraRank, "tXS"},
|
||||
{tCK, "CMD_BUS", DependencyType::InterRank, "CMD_BUS"},
|
||||
}
|
||||
)
|
||||
);
|
||||
dmap.emplace(piecewise_construct,
|
||||
forward_as_tuple("SREFEN"),
|
||||
forward_as_tuple(initializer_list<TimeDependency>{
|
||||
{tRC, "ACT", DependencyType::IntraRank, "tRC"},
|
||||
{max({tRDPDEN, tAL + tRTP + tRP}),
|
||||
"RDA",
|
||||
DependencyType::IntraRank,
|
||||
"max(tRDPDEN, tAL + tRTP + tRP)"},
|
||||
{max({tWRAPDEN, tWRPRE + tRP}),
|
||||
"WRA",
|
||||
DependencyType::IntraRank,
|
||||
"max(tWRAPDEN, tWRPRE + tRP)"},
|
||||
{tRP, "PREPB", DependencyType::IntraRank, "tRP"},
|
||||
{tRP, "PREAB", DependencyType::IntraRank, "tRP"},
|
||||
{tXP, "PDXP", DependencyType::IntraRank, "tXP"},
|
||||
{tRFC, "REFAB", DependencyType::IntraRank, "tRFC"},
|
||||
{tXS, "SREFEX", DependencyType::IntraRank, "tXS"},
|
||||
{tCK, "CMD_BUS", DependencyType::InterRank, "CMD_BUS"},
|
||||
}));
|
||||
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("SREFEX"),
|
||||
forward_as_tuple(
|
||||
initializer_list<TimeDependency>{
|
||||
{tCKESR, "SREFEN", DependencyType::IntraRank, "tCKESR"},
|
||||
{tCK, "CMD_BUS", DependencyType::InterRank, "CMD_BUS"},
|
||||
}
|
||||
)
|
||||
);
|
||||
dmap.emplace(piecewise_construct,
|
||||
forward_as_tuple("SREFEX"),
|
||||
forward_as_tuple(initializer_list<TimeDependency>{
|
||||
{tCKESR, "SREFEN", DependencyType::IntraRank, "tCKESR"},
|
||||
{tCK, "CMD_BUS", DependencyType::InterRank, "CMD_BUS"},
|
||||
}));
|
||||
|
||||
return dmap;
|
||||
}
|
||||
|
||||
@@ -37,7 +37,8 @@
|
||||
|
||||
#include "businessObjects/dramTimeDependencies/deviceDependencies/dramtimedependenciesbase.h"
|
||||
|
||||
class DDR3TimeDependencies final : public DRAMTimeDependenciesBase {
|
||||
class DDR3TimeDependencies final : public DRAMTimeDependenciesBase
|
||||
{
|
||||
public:
|
||||
DDR3TimeDependencies(const QJsonObject& memspec, const uint tCK);
|
||||
|
||||
@@ -46,7 +47,7 @@ public:
|
||||
protected:
|
||||
void mInitializeValues() override;
|
||||
DependencyMap mSpecializedGetDependencies() const override;
|
||||
|
||||
|
||||
protected:
|
||||
uint burstLength;
|
||||
uint dataRate;
|
||||
@@ -88,5 +89,4 @@ protected:
|
||||
uint tRDPDEN;
|
||||
uint tWRPDEN;
|
||||
uint tWRAPDEN;
|
||||
|
||||
};
|
||||
|
||||
@@ -37,351 +37,304 @@
|
||||
|
||||
using namespace std;
|
||||
|
||||
TimeDependenciesInfoDDR3::TimeDependenciesInfoDDR3(const QJsonObject& memspec, const uint tCK) : DRAMTimeDependenciesBase(memspec, tCK) {
|
||||
mInitializeValues();
|
||||
TimeDependenciesInfoDDR3::TimeDependenciesInfoDDR3(const QJsonObject& memspec, const uint tCK) :
|
||||
DRAMTimeDependenciesBase(memspec, tCK)
|
||||
{
|
||||
mInitializeValues();
|
||||
}
|
||||
|
||||
void TimeDependenciesInfoDDR3::mInitializeValues() {
|
||||
burstLength = mMemspecJson["memarchitecturespec"].toObject()["burstLength"].toInt();
|
||||
dataRate = mMemspecJson["memarchitecturespec"].toObject()["dataRate"].toInt();
|
||||
void TimeDependenciesInfoDDR3::mInitializeValues()
|
||||
{
|
||||
burstLength = mMemspecJson["memarchitecturespec"].toObject()["burstLength"].toInt();
|
||||
dataRate = mMemspecJson["memarchitecturespec"].toObject()["dataRate"].toInt();
|
||||
|
||||
tCCD = tCK * mMemspecJson["memtimingspec"].toObject()["CCD"].toInt();
|
||||
tRCD = tCK * mMemspecJson["memtimingspec"].toObject()["RCD"].toInt();
|
||||
tRP = tCK * mMemspecJson["memtimingspec"].toObject()["RP"].toInt();
|
||||
tRAS = tCK * mMemspecJson["memtimingspec"].toObject()["RAS"].toInt();
|
||||
tCL = tCK * mMemspecJson["memtimingspec"].toObject()["CL"].toInt();
|
||||
tCWL = tCK * mMemspecJson["memtimingspec"].toObject()["CWL"].toInt();
|
||||
tAL = tCK * mMemspecJson["memtimingspec"].toObject()["AL"].toInt();
|
||||
tRL = tCK * mMemspecJson["memtimingspec"].toObject()["RL"].toInt();
|
||||
tWL = tCK * mMemspecJson["memtimingspec"].toObject()["WL"].toInt();
|
||||
tRTP = tCK * mMemspecJson["memtimingspec"].toObject()["RTP"].toInt();
|
||||
tWTR = tCK * mMemspecJson["memtimingspec"].toObject()["WTR"].toInt();
|
||||
tRRD = tCK * mMemspecJson["memtimingspec"].toObject()["RRD"].toInt();
|
||||
tWR = tCK * mMemspecJson["memtimingspec"].toObject()["WR"].toInt();
|
||||
tFAW = tCK * mMemspecJson["memtimingspec"].toObject()["FAW"].toInt();
|
||||
tRFC = tCK * mMemspecJson["memtimingspec"].toObject()["RFC"].toInt();
|
||||
tRC = tCK * mMemspecJson["memtimingspec"].toObject()["RC"].toInt();
|
||||
tXP = tCK * mMemspecJson["memtimingspec"].toObject()["XP"].toInt();
|
||||
tXS = tCK * mMemspecJson["memtimingspec"].toObject()["XS"].toInt();
|
||||
tXSDLL = tCK * mMemspecJson["memtimingspec"].toObject()["XSDLL"].toInt();
|
||||
tCKE = tCK * mMemspecJson["memtimingspec"].toObject()["CKE"].toInt();
|
||||
tCKESR = tCK * mMemspecJson["memtimingspec"].toObject()["CKESR"].toInt();
|
||||
tREFPDEN = tCK * mMemspecJson["memtimingspec"].toObject()["REFPDEN"].toInt();
|
||||
tACTPDEN = tCK * mMemspecJson["memtimingspec"].toObject()["ACTPDEN"].toInt();
|
||||
tPRPDEN = tCK * mMemspecJson["memtimingspec"].toObject()["PRPDEN"].toInt();
|
||||
tRTRS = tCK * mMemspecJson["memtimingspec"].toObject()["RTRS"].toInt();
|
||||
tCCD = tCK * mMemspecJson["memtimingspec"].toObject()["CCD"].toInt();
|
||||
tRCD = tCK * mMemspecJson["memtimingspec"].toObject()["RCD"].toInt();
|
||||
tRP = tCK * mMemspecJson["memtimingspec"].toObject()["RP"].toInt();
|
||||
tRAS = tCK * mMemspecJson["memtimingspec"].toObject()["RAS"].toInt();
|
||||
tCL = tCK * mMemspecJson["memtimingspec"].toObject()["CL"].toInt();
|
||||
tCWL = tCK * mMemspecJson["memtimingspec"].toObject()["CWL"].toInt();
|
||||
tAL = tCK * mMemspecJson["memtimingspec"].toObject()["AL"].toInt();
|
||||
tRL = tCK * mMemspecJson["memtimingspec"].toObject()["RL"].toInt();
|
||||
tWL = tCK * mMemspecJson["memtimingspec"].toObject()["WL"].toInt();
|
||||
tRTP = tCK * mMemspecJson["memtimingspec"].toObject()["RTP"].toInt();
|
||||
tWTR = tCK * mMemspecJson["memtimingspec"].toObject()["WTR"].toInt();
|
||||
tRRD = tCK * mMemspecJson["memtimingspec"].toObject()["RRD"].toInt();
|
||||
tWR = tCK * mMemspecJson["memtimingspec"].toObject()["WR"].toInt();
|
||||
tFAW = tCK * mMemspecJson["memtimingspec"].toObject()["FAW"].toInt();
|
||||
tRFC = tCK * mMemspecJson["memtimingspec"].toObject()["RFC"].toInt();
|
||||
tRC = tCK * mMemspecJson["memtimingspec"].toObject()["RC"].toInt();
|
||||
tXP = tCK * mMemspecJson["memtimingspec"].toObject()["XP"].toInt();
|
||||
tXS = tCK * mMemspecJson["memtimingspec"].toObject()["XS"].toInt();
|
||||
tXSDLL = tCK * mMemspecJson["memtimingspec"].toObject()["XSDLL"].toInt();
|
||||
tCKE = tCK * mMemspecJson["memtimingspec"].toObject()["CKE"].toInt();
|
||||
tCKESR = tCK * mMemspecJson["memtimingspec"].toObject()["CKESR"].toInt();
|
||||
tREFPDEN = tCK * mMemspecJson["memtimingspec"].toObject()["REFPDEN"].toInt();
|
||||
tACTPDEN = tCK * mMemspecJson["memtimingspec"].toObject()["ACTPDEN"].toInt();
|
||||
tPRPDEN = tCK * mMemspecJson["memtimingspec"].toObject()["PRPDEN"].toInt();
|
||||
tRTRS = tCK * mMemspecJson["memtimingspec"].toObject()["RTRS"].toInt();
|
||||
|
||||
tPD = tCKE;
|
||||
tPD = tCKE;
|
||||
|
||||
tBURST = (uint) (burstLength / (float) dataRate) * tCK;
|
||||
tRDWR = tRL + tBURST + 2 * tCK - tWL;
|
||||
tRDWR_R = tRL + tBURST + tRTRS - tWL;
|
||||
tWRRD = tWL + tBURST + tWTR - tAL;
|
||||
tWRPRE = tWL + tBURST + tWR;
|
||||
tWRRD_R = tWL + tBURST + tRTRS - tRL;
|
||||
tRDPDEN = tRL + tBURST + tCK;
|
||||
tWRPDEN = tWL + tBURST + tWR;
|
||||
tWRAPDEN = tWL + tBURST + tWR + tCK;
|
||||
tBURST = (uint)(burstLength / (float)dataRate) * tCK;
|
||||
tRDWR = tRL + tBURST + 2 * tCK - tWL;
|
||||
tRDWR_R = tRL + tBURST + tRTRS - tWL;
|
||||
tWRRD = tWL + tBURST + tWTR - tAL;
|
||||
tWRPRE = tWL + tBURST + tWR;
|
||||
tWRRD_R = tWL + tBURST + tRTRS - tRL;
|
||||
tRDPDEN = tRL + tBURST + tCK;
|
||||
tWRPDEN = tWL + tBURST + tWR;
|
||||
tWRAPDEN = tWL + tBURST + tWR + tCK;
|
||||
|
||||
mPools.insert({
|
||||
"CMD_BUS", {
|
||||
1, {
|
||||
{"ACT", tCK},
|
||||
{"RD", tCK},
|
||||
{"WR", tCK},
|
||||
{"PREPB", tCK},
|
||||
{"RDA", tCK},
|
||||
{"WRA", tCK},
|
||||
{"REFAB", tCK},
|
||||
{"PREAB", tCK},
|
||||
{"PDEP", tCK},
|
||||
{"PDXP", tCK},
|
||||
{"SREFEN", tCK},
|
||||
{"SREFEX", tCK},
|
||||
{"PDEA", tCK},
|
||||
{"PDXA", tCK},
|
||||
}
|
||||
}
|
||||
});
|
||||
mPools.insert({"CMD_BUS",
|
||||
{1,
|
||||
{
|
||||
{"ACT", tCK},
|
||||
{"RD", tCK},
|
||||
{"WR", tCK},
|
||||
{"PREPB", tCK},
|
||||
{"RDA", tCK},
|
||||
{"WRA", tCK},
|
||||
{"REFAB", tCK},
|
||||
{"PREAB", tCK},
|
||||
{"PDEP", tCK},
|
||||
{"PDXP", tCK},
|
||||
{"SREFEN", tCK},
|
||||
{"SREFEX", tCK},
|
||||
{"PDEA", tCK},
|
||||
{"PDXA", tCK},
|
||||
}}});
|
||||
|
||||
mPools.insert({
|
||||
"NAW", {
|
||||
4, {
|
||||
{"ACT", tFAW},
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
mPools.insert({"NAW",
|
||||
{4,
|
||||
{
|
||||
{"ACT", tFAW},
|
||||
}}});
|
||||
}
|
||||
|
||||
const std::vector<QString> TimeDependenciesInfoDDR3::getPossiblePhases() {
|
||||
return {
|
||||
"ACT",
|
||||
"RD",
|
||||
"WR",
|
||||
"PREPB",
|
||||
"RDA",
|
||||
"WRA",
|
||||
"REFAB",
|
||||
"PREAB",
|
||||
"PDEP",
|
||||
"PDXP",
|
||||
"SREFEN",
|
||||
"SREFEX",
|
||||
"PDEA",
|
||||
"PDXA",
|
||||
};
|
||||
const std::vector<QString> TimeDependenciesInfoDDR3::getPossiblePhases()
|
||||
{
|
||||
return {
|
||||
"ACT",
|
||||
"RD",
|
||||
"WR",
|
||||
"PREPB",
|
||||
"RDA",
|
||||
"WRA",
|
||||
"REFAB",
|
||||
"PREAB",
|
||||
"PDEP",
|
||||
"PDXP",
|
||||
"SREFEN",
|
||||
"SREFEX",
|
||||
"PDEA",
|
||||
"PDXA",
|
||||
};
|
||||
}
|
||||
|
||||
DependencyMap TimeDependenciesInfoDDR3::mSpecializedGetDependencies() const {
|
||||
DependencyMap dmap;
|
||||
DependencyMap TimeDependenciesInfoDDR3::mSpecializedGetDependencies() const
|
||||
{
|
||||
DependencyMap dmap;
|
||||
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("ACT"),
|
||||
forward_as_tuple(
|
||||
initializer_list<TimeDependency>{
|
||||
{tRC, "ACT", DependencyType::IntraBank, "tRC"},
|
||||
{tRRD, "ACT", DependencyType::IntraRank, "tRRD"},
|
||||
{tAL + tRTP + tRP, "RDA", DependencyType::IntraBank, "tAL + tRTP + tRP"},
|
||||
{tWRPRE + tRP, "WRA", DependencyType::IntraBank, "tWRPRE + tRP"},
|
||||
{tRP, "PREPB", DependencyType::IntraBank, "tRP"},
|
||||
{tRP, "PREAB", DependencyType::IntraRank, "tRP"},
|
||||
{tXP, "PDXA", DependencyType::IntraRank, "tXP"},
|
||||
{tXP, "PDXP", DependencyType::IntraRank, "tXP"},
|
||||
{tRFC, "REFAB", DependencyType::IntraRank, "tRFC"},
|
||||
{tXS, "SREFEX", DependencyType::IntraRank, "tXS"},
|
||||
{tCK, "CMD_BUS", DependencyType::InterRank, "CommandBus"},
|
||||
{tFAW, "NAW", DependencyType::IntraRank, "tFAW"},
|
||||
}
|
||||
)
|
||||
);
|
||||
dmap.emplace(piecewise_construct,
|
||||
forward_as_tuple("ACT"),
|
||||
forward_as_tuple(initializer_list<TimeDependency>{
|
||||
{tRC, "ACT", DependencyType::IntraBank, "tRC"},
|
||||
{tRRD, "ACT", DependencyType::IntraRank, "tRRD"},
|
||||
{tAL + tRTP + tRP, "RDA", DependencyType::IntraBank, "tAL + tRTP + tRP"},
|
||||
{tWRPRE + tRP, "WRA", DependencyType::IntraBank, "tWRPRE + tRP"},
|
||||
{tRP, "PREPB", DependencyType::IntraBank, "tRP"},
|
||||
{tRP, "PREAB", DependencyType::IntraRank, "tRP"},
|
||||
{tXP, "PDXA", DependencyType::IntraRank, "tXP"},
|
||||
{tXP, "PDXP", DependencyType::IntraRank, "tXP"},
|
||||
{tRFC, "REFAB", DependencyType::IntraRank, "tRFC"},
|
||||
{tXS, "SREFEX", DependencyType::IntraRank, "tXS"},
|
||||
{tCK, "CMD_BUS", DependencyType::InterRank, "CommandBus"},
|
||||
{tFAW, "NAW", DependencyType::IntraRank, "tFAW"},
|
||||
}));
|
||||
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("RD"),
|
||||
forward_as_tuple(
|
||||
initializer_list<TimeDependency>{
|
||||
{tRCD - tAL, "ACT", DependencyType::IntraBank, "tRCD - tAL"},
|
||||
{tCCD, "RD", DependencyType::IntraBank, "tCCD"},
|
||||
{tCCD, "RD", DependencyType::IntraRank, "tCCD"},
|
||||
{tBURST + tRTRS, "RD", DependencyType::InterRank, "tBURST + tRTRS"},
|
||||
{tCCD, "RDA", DependencyType::IntraRank, "tCCD"},
|
||||
{tBURST + tRTRS, "RDA", DependencyType::InterRank, "tBURST + tRTRS"},
|
||||
{tWRRD, "WR", DependencyType::IntraBank, "tWRRD"},
|
||||
{tWRRD, "WR", DependencyType::IntraRank, "tWRRD"},
|
||||
{tWRRD_R, "WR", DependencyType::InterRank, "tWRRD_R"},
|
||||
{tWRRD, "WRA", DependencyType::IntraRank, "tWRRD"},
|
||||
{tWRRD_R, "WRA", DependencyType::InterRank, "tWRRD_R"},
|
||||
{tXP, "PDXA", DependencyType::IntraRank, "tXP"},
|
||||
{tXSDLL, "SREFEX", DependencyType::IntraRank, "tXSDLL"},
|
||||
{tCK, "CMD_BUS", DependencyType::InterRank, "CommandBus"},
|
||||
}
|
||||
)
|
||||
);
|
||||
dmap.emplace(piecewise_construct,
|
||||
forward_as_tuple("RD"),
|
||||
forward_as_tuple(initializer_list<TimeDependency>{
|
||||
{tRCD - tAL, "ACT", DependencyType::IntraBank, "tRCD - tAL"},
|
||||
{tCCD, "RD", DependencyType::IntraBank, "tCCD"},
|
||||
{tCCD, "RD", DependencyType::IntraRank, "tCCD"},
|
||||
{tBURST + tRTRS, "RD", DependencyType::InterRank, "tBURST + tRTRS"},
|
||||
{tCCD, "RDA", DependencyType::IntraRank, "tCCD"},
|
||||
{tBURST + tRTRS, "RDA", DependencyType::InterRank, "tBURST + tRTRS"},
|
||||
{tWRRD, "WR", DependencyType::IntraBank, "tWRRD"},
|
||||
{tWRRD, "WR", DependencyType::IntraRank, "tWRRD"},
|
||||
{tWRRD_R, "WR", DependencyType::InterRank, "tWRRD_R"},
|
||||
{tWRRD, "WRA", DependencyType::IntraRank, "tWRRD"},
|
||||
{tWRRD_R, "WRA", DependencyType::InterRank, "tWRRD_R"},
|
||||
{tXP, "PDXA", DependencyType::IntraRank, "tXP"},
|
||||
{tXSDLL, "SREFEX", DependencyType::IntraRank, "tXSDLL"},
|
||||
{tCK, "CMD_BUS", DependencyType::InterRank, "CommandBus"},
|
||||
}));
|
||||
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("WR"),
|
||||
forward_as_tuple(
|
||||
initializer_list<TimeDependency>{
|
||||
{tRCD - tAL, "ACT", DependencyType::IntraBank, "tRCD - tAL"},
|
||||
{tRDWR, "RD", DependencyType::IntraBank, "tRDWR"},
|
||||
{tRDWR, "RD", DependencyType::IntraRank, "tRDWR"},
|
||||
{tRDWR_R, "RD", DependencyType::InterRank, "tRDWR_R"},
|
||||
{tRDWR, "RDA", DependencyType::IntraRank, "tRDWR"},
|
||||
{tRDWR_R, "RDA", DependencyType::InterRank, "tRDWR_R"},
|
||||
{tCCD, "WR", DependencyType::IntraBank, "tCCD"},
|
||||
{tCCD, "WR", DependencyType::IntraRank, "tCCD"},
|
||||
{tBURST + tRTRS, "WR", DependencyType::InterRank, "tBURST + tRTRS"},
|
||||
{tCCD, "WRA", DependencyType::IntraRank, "tCCD"},
|
||||
{tBURST + tRTRS, "WRA", DependencyType::InterRank, "tBURST + tRTRS"},
|
||||
{tXP, "PDXA", DependencyType::IntraRank, "tXP"},
|
||||
{tXSDLL, "SREFEX", DependencyType::IntraRank, "tXSDLL"},
|
||||
{tCK, "CMD_BUS", DependencyType::InterRank, "CommandBus"},
|
||||
}
|
||||
)
|
||||
);
|
||||
dmap.emplace(piecewise_construct,
|
||||
forward_as_tuple("WR"),
|
||||
forward_as_tuple(initializer_list<TimeDependency>{
|
||||
{tRCD - tAL, "ACT", DependencyType::IntraBank, "tRCD - tAL"},
|
||||
{tRDWR, "RD", DependencyType::IntraBank, "tRDWR"},
|
||||
{tRDWR, "RD", DependencyType::IntraRank, "tRDWR"},
|
||||
{tRDWR_R, "RD", DependencyType::InterRank, "tRDWR_R"},
|
||||
{tRDWR, "RDA", DependencyType::IntraRank, "tRDWR"},
|
||||
{tRDWR_R, "RDA", DependencyType::InterRank, "tRDWR_R"},
|
||||
{tCCD, "WR", DependencyType::IntraBank, "tCCD"},
|
||||
{tCCD, "WR", DependencyType::IntraRank, "tCCD"},
|
||||
{tBURST + tRTRS, "WR", DependencyType::InterRank, "tBURST + tRTRS"},
|
||||
{tCCD, "WRA", DependencyType::IntraRank, "tCCD"},
|
||||
{tBURST + tRTRS, "WRA", DependencyType::InterRank, "tBURST + tRTRS"},
|
||||
{tXP, "PDXA", DependencyType::IntraRank, "tXP"},
|
||||
{tXSDLL, "SREFEX", DependencyType::IntraRank, "tXSDLL"},
|
||||
{tCK, "CMD_BUS", DependencyType::InterRank, "CommandBus"},
|
||||
}));
|
||||
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("PREPB"),
|
||||
forward_as_tuple(
|
||||
initializer_list<TimeDependency>{
|
||||
{tRAS, "ACT", DependencyType::IntraBank, "tRAS"},
|
||||
{tAL + tRTP, "RD", DependencyType::IntraBank, "tAL + tRTP"},
|
||||
{tWRPRE, "WR", DependencyType::IntraBank, "tWRPRE"},
|
||||
{tXP, "PDXA", DependencyType::IntraRank, "tXP"},
|
||||
{tCK, "CMD_BUS", DependencyType::InterRank, "CommandBus"},
|
||||
}
|
||||
)
|
||||
);
|
||||
dmap.emplace(piecewise_construct,
|
||||
forward_as_tuple("PREPB"),
|
||||
forward_as_tuple(initializer_list<TimeDependency>{
|
||||
{tRAS, "ACT", DependencyType::IntraBank, "tRAS"},
|
||||
{tAL + tRTP, "RD", DependencyType::IntraBank, "tAL + tRTP"},
|
||||
{tWRPRE, "WR", DependencyType::IntraBank, "tWRPRE"},
|
||||
{tXP, "PDXA", DependencyType::IntraRank, "tXP"},
|
||||
{tCK, "CMD_BUS", DependencyType::InterRank, "CommandBus"},
|
||||
}));
|
||||
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("RDA"),
|
||||
forward_as_tuple(
|
||||
initializer_list<TimeDependency>{
|
||||
{tRCD - tAL, "ACT", DependencyType::IntraBank, "tRCD - tAL"},
|
||||
{tCCD, "RD", DependencyType::IntraBank, "tCCD"},
|
||||
{tCCD, "RD", DependencyType::IntraRank, "tCCD"},
|
||||
{tBURST + tRTRS, "RD", DependencyType::InterRank, "tBURST + tRTRS"},
|
||||
{tCCD, "RDA", DependencyType::IntraRank, "tCCD"},
|
||||
{tBURST + tRTRS, "RDA", DependencyType::InterRank, "tBURST + tRTRS"},
|
||||
{max({tWRRD, tWRPRE - tRTP - tAL}), "WR", DependencyType::IntraBank, "max(tWRRD, tWRPRE - tRTP - tAL)"},
|
||||
{tWRRD, "WR", DependencyType::IntraRank, "tWRRD"},
|
||||
{tWRRD_R, "WR", DependencyType::InterRank, "tWRRD_R"},
|
||||
{tWRRD, "WRA", DependencyType::IntraRank, "tWRRD"},
|
||||
{tWRRD_R, "WRA", DependencyType::InterRank, "tWRRD_R"},
|
||||
{tXP, "PDXA", DependencyType::IntraRank, "tXP"},
|
||||
{tXSDLL, "SREFEX", DependencyType::IntraRank, "tXSDLL"},
|
||||
{tCK, "CMD_BUS", DependencyType::InterRank, "CommandBus"},
|
||||
}
|
||||
)
|
||||
);
|
||||
dmap.emplace(piecewise_construct,
|
||||
forward_as_tuple("RDA"),
|
||||
forward_as_tuple(initializer_list<TimeDependency>{
|
||||
{tRCD - tAL, "ACT", DependencyType::IntraBank, "tRCD - tAL"},
|
||||
{tCCD, "RD", DependencyType::IntraBank, "tCCD"},
|
||||
{tCCD, "RD", DependencyType::IntraRank, "tCCD"},
|
||||
{tBURST + tRTRS, "RD", DependencyType::InterRank, "tBURST + tRTRS"},
|
||||
{tCCD, "RDA", DependencyType::IntraRank, "tCCD"},
|
||||
{tBURST + tRTRS, "RDA", DependencyType::InterRank, "tBURST + tRTRS"},
|
||||
{max({tWRRD, tWRPRE - tRTP - tAL}),
|
||||
"WR",
|
||||
DependencyType::IntraBank,
|
||||
"max(tWRRD, tWRPRE - tRTP - tAL)"},
|
||||
{tWRRD, "WR", DependencyType::IntraRank, "tWRRD"},
|
||||
{tWRRD_R, "WR", DependencyType::InterRank, "tWRRD_R"},
|
||||
{tWRRD, "WRA", DependencyType::IntraRank, "tWRRD"},
|
||||
{tWRRD_R, "WRA", DependencyType::InterRank, "tWRRD_R"},
|
||||
{tXP, "PDXA", DependencyType::IntraRank, "tXP"},
|
||||
{tXSDLL, "SREFEX", DependencyType::IntraRank, "tXSDLL"},
|
||||
{tCK, "CMD_BUS", DependencyType::InterRank, "CommandBus"},
|
||||
}));
|
||||
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("WRA"),
|
||||
forward_as_tuple(
|
||||
initializer_list<TimeDependency>{
|
||||
{tRCD - tAL, "ACT", DependencyType::IntraBank, "tRCD - tAL"},
|
||||
{tRDWR, "RD", DependencyType::IntraBank, "tRDWR"},
|
||||
{tRDWR, "RD", DependencyType::IntraRank, "tRDWR"},
|
||||
{tRDWR_R, "RD", DependencyType::InterRank, "tRDWR_R"},
|
||||
{tRDWR, "RDA", DependencyType::IntraRank, "tRDWR"},
|
||||
{tRDWR_R, "RDA", DependencyType::InterRank, "tRDWR_R"},
|
||||
{tCCD, "WR", DependencyType::IntraBank, "tCCD"},
|
||||
{tCCD, "WR", DependencyType::IntraRank, "tCCD"},
|
||||
{tBURST + tRTRS, "WR", DependencyType::InterRank, "tBURST + tRTRS"},
|
||||
{tCCD, "WRA", DependencyType::IntraRank, "tCCD"},
|
||||
{tBURST + tRTRS, "WRA", DependencyType::InterRank, "tBURST + tRTRS"},
|
||||
{tXP, "PDXA", DependencyType::IntraRank, "tXP"},
|
||||
{tXSDLL, "SREFEX", DependencyType::IntraRank, "tXSDLL"},
|
||||
{tCK, "CMD_BUS", DependencyType::InterRank, "CommandBus"},
|
||||
}
|
||||
)
|
||||
);
|
||||
dmap.emplace(piecewise_construct,
|
||||
forward_as_tuple("WRA"),
|
||||
forward_as_tuple(initializer_list<TimeDependency>{
|
||||
{tRCD - tAL, "ACT", DependencyType::IntraBank, "tRCD - tAL"},
|
||||
{tRDWR, "RD", DependencyType::IntraBank, "tRDWR"},
|
||||
{tRDWR, "RD", DependencyType::IntraRank, "tRDWR"},
|
||||
{tRDWR_R, "RD", DependencyType::InterRank, "tRDWR_R"},
|
||||
{tRDWR, "RDA", DependencyType::IntraRank, "tRDWR"},
|
||||
{tRDWR_R, "RDA", DependencyType::InterRank, "tRDWR_R"},
|
||||
{tCCD, "WR", DependencyType::IntraBank, "tCCD"},
|
||||
{tCCD, "WR", DependencyType::IntraRank, "tCCD"},
|
||||
{tBURST + tRTRS, "WR", DependencyType::InterRank, "tBURST + tRTRS"},
|
||||
{tCCD, "WRA", DependencyType::IntraRank, "tCCD"},
|
||||
{tBURST + tRTRS, "WRA", DependencyType::InterRank, "tBURST + tRTRS"},
|
||||
{tXP, "PDXA", DependencyType::IntraRank, "tXP"},
|
||||
{tXSDLL, "SREFEX", DependencyType::IntraRank, "tXSDLL"},
|
||||
{tCK, "CMD_BUS", DependencyType::InterRank, "CommandBus"},
|
||||
}));
|
||||
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("REFAB"),
|
||||
forward_as_tuple(
|
||||
initializer_list<TimeDependency>{
|
||||
{tRC, "ACT", DependencyType::IntraRank, "tRC"},
|
||||
{tAL + tRTP + tRP, "RDA", DependencyType::IntraRank, "tAL + tRTP + tRP"},
|
||||
{tWRPRE + tRP, "WRA", DependencyType::IntraRank, "tWRPRE + tRP"},
|
||||
{tRP, "PREPB", DependencyType::IntraRank, "tRP"},
|
||||
{tRP, "PREAB", DependencyType::IntraRank, "tRP"},
|
||||
{tXP, "PDXP", DependencyType::IntraRank, "tXP"},
|
||||
{tRFC, "REFAB", DependencyType::IntraRank, "tRFC"},
|
||||
{tXS, "SREFEX", DependencyType::IntraRank, "tXS"},
|
||||
{tCK, "CMD_BUS", DependencyType::InterRank, "CommandBus"},
|
||||
}
|
||||
)
|
||||
);
|
||||
dmap.emplace(piecewise_construct,
|
||||
forward_as_tuple("REFAB"),
|
||||
forward_as_tuple(initializer_list<TimeDependency>{
|
||||
{tRC, "ACT", DependencyType::IntraRank, "tRC"},
|
||||
{tAL + tRTP + tRP, "RDA", DependencyType::IntraRank, "tAL + tRTP + tRP"},
|
||||
{tWRPRE + tRP, "WRA", DependencyType::IntraRank, "tWRPRE + tRP"},
|
||||
{tRP, "PREPB", DependencyType::IntraRank, "tRP"},
|
||||
{tRP, "PREAB", DependencyType::IntraRank, "tRP"},
|
||||
{tXP, "PDXP", DependencyType::IntraRank, "tXP"},
|
||||
{tRFC, "REFAB", DependencyType::IntraRank, "tRFC"},
|
||||
{tXS, "SREFEX", DependencyType::IntraRank, "tXS"},
|
||||
{tCK, "CMD_BUS", DependencyType::InterRank, "CommandBus"},
|
||||
}));
|
||||
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("PREAB"),
|
||||
forward_as_tuple(
|
||||
initializer_list<TimeDependency>{
|
||||
{tRAS, "ACT", DependencyType::IntraRank, "tRAS"},
|
||||
{tAL + tRTP, "RD", DependencyType::IntraRank, "tAL + tRTP"},
|
||||
{tAL + tRTP, "RDA", DependencyType::IntraRank, "tAL + tRTP"},
|
||||
{tWRPRE, "WR", DependencyType::IntraRank, "tWRPRE"},
|
||||
{tWRPRE, "WRA", DependencyType::IntraRank, "tWRPRE"},
|
||||
{tXP, "PDXA", DependencyType::IntraRank, "tXP"},
|
||||
{tCK, "CMD_BUS", DependencyType::InterRank, "CommandBus"},
|
||||
}
|
||||
)
|
||||
);
|
||||
dmap.emplace(piecewise_construct,
|
||||
forward_as_tuple("PREAB"),
|
||||
forward_as_tuple(initializer_list<TimeDependency>{
|
||||
{tRAS, "ACT", DependencyType::IntraRank, "tRAS"},
|
||||
{tAL + tRTP, "RD", DependencyType::IntraRank, "tAL + tRTP"},
|
||||
{tAL + tRTP, "RDA", DependencyType::IntraRank, "tAL + tRTP"},
|
||||
{tWRPRE, "WR", DependencyType::IntraRank, "tWRPRE"},
|
||||
{tWRPRE, "WRA", DependencyType::IntraRank, "tWRPRE"},
|
||||
{tXP, "PDXA", DependencyType::IntraRank, "tXP"},
|
||||
{tCK, "CMD_BUS", DependencyType::InterRank, "CommandBus"},
|
||||
}));
|
||||
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("PDEP"),
|
||||
forward_as_tuple(
|
||||
initializer_list<TimeDependency>{
|
||||
{tRDPDEN, "RD", DependencyType::IntraRank, "tRDPDEN"},
|
||||
{tRDPDEN, "RDA", DependencyType::IntraRank, "tRDPDEN"},
|
||||
{tWRAPDEN, "WRA", DependencyType::IntraRank, "tWRAPDEN"},
|
||||
{tPRPDEN, "PREPB", DependencyType::IntraRank, "tPRPDEN"},
|
||||
{tPRPDEN, "PREAB", DependencyType::IntraRank, "tPRPDEN"},
|
||||
{tCKE, "PDXP", DependencyType::IntraRank, "tCKE"},
|
||||
{tREFPDEN, "REFAB", DependencyType::IntraRank, "tREFPDEN"},
|
||||
{tXS, "SREFEX", DependencyType::IntraRank, "tXS"},
|
||||
{tCK, "CMD_BUS", DependencyType::InterRank, "CommandBus"},
|
||||
}
|
||||
)
|
||||
);
|
||||
dmap.emplace(piecewise_construct,
|
||||
forward_as_tuple("PDEP"),
|
||||
forward_as_tuple(initializer_list<TimeDependency>{
|
||||
{tRDPDEN, "RD", DependencyType::IntraRank, "tRDPDEN"},
|
||||
{tRDPDEN, "RDA", DependencyType::IntraRank, "tRDPDEN"},
|
||||
{tWRAPDEN, "WRA", DependencyType::IntraRank, "tWRAPDEN"},
|
||||
{tPRPDEN, "PREPB", DependencyType::IntraRank, "tPRPDEN"},
|
||||
{tPRPDEN, "PREAB", DependencyType::IntraRank, "tPRPDEN"},
|
||||
{tCKE, "PDXP", DependencyType::IntraRank, "tCKE"},
|
||||
{tREFPDEN, "REFAB", DependencyType::IntraRank, "tREFPDEN"},
|
||||
{tXS, "SREFEX", DependencyType::IntraRank, "tXS"},
|
||||
{tCK, "CMD_BUS", DependencyType::InterRank, "CommandBus"},
|
||||
}));
|
||||
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("PDXP"),
|
||||
forward_as_tuple(
|
||||
initializer_list<TimeDependency>{
|
||||
{tPD, "PDEP", DependencyType::IntraRank, "tPD"},
|
||||
{tCK, "CMD_BUS", DependencyType::InterRank, "CommandBus"},
|
||||
}
|
||||
)
|
||||
);
|
||||
dmap.emplace(piecewise_construct,
|
||||
forward_as_tuple("PDXP"),
|
||||
forward_as_tuple(initializer_list<TimeDependency>{
|
||||
{tPD, "PDEP", DependencyType::IntraRank, "tPD"},
|
||||
{tCK, "CMD_BUS", DependencyType::InterRank, "CommandBus"},
|
||||
}));
|
||||
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("SREFEN"),
|
||||
forward_as_tuple(
|
||||
initializer_list<TimeDependency>{
|
||||
{tRC, "ACT", DependencyType::IntraRank, "tRC"},
|
||||
{max({tRDPDEN, tAL + tRTP + tRP}), "RDA", DependencyType::IntraRank, "max(tRDPDEN, tAL + tRTP + tRP)"},
|
||||
{max({tWRAPDEN, tWRPRE + tRP}), "WRA", DependencyType::IntraRank, "max(tWRAPDEN, tWRPRE + tRP)"},
|
||||
{tRP, "PREPB", DependencyType::IntraRank, "tRP"},
|
||||
{tRP, "PREAB", DependencyType::IntraRank, "tRP"},
|
||||
{tXP, "PDXP", DependencyType::IntraRank, "tXP"},
|
||||
{tRFC, "REFAB", DependencyType::IntraRank, "tRFC"},
|
||||
{tXS, "SREFEX", DependencyType::IntraRank, "tXS"},
|
||||
{tCK, "CMD_BUS", DependencyType::InterRank, "CommandBus"},
|
||||
}
|
||||
)
|
||||
);
|
||||
dmap.emplace(piecewise_construct,
|
||||
forward_as_tuple("SREFEN"),
|
||||
forward_as_tuple(initializer_list<TimeDependency>{
|
||||
{tRC, "ACT", DependencyType::IntraRank, "tRC"},
|
||||
{max({tRDPDEN, tAL + tRTP + tRP}),
|
||||
"RDA",
|
||||
DependencyType::IntraRank,
|
||||
"max(tRDPDEN, tAL + tRTP + tRP)"},
|
||||
{max({tWRAPDEN, tWRPRE + tRP}),
|
||||
"WRA",
|
||||
DependencyType::IntraRank,
|
||||
"max(tWRAPDEN, tWRPRE + tRP)"},
|
||||
{tRP, "PREPB", DependencyType::IntraRank, "tRP"},
|
||||
{tRP, "PREAB", DependencyType::IntraRank, "tRP"},
|
||||
{tXP, "PDXP", DependencyType::IntraRank, "tXP"},
|
||||
{tRFC, "REFAB", DependencyType::IntraRank, "tRFC"},
|
||||
{tXS, "SREFEX", DependencyType::IntraRank, "tXS"},
|
||||
{tCK, "CMD_BUS", DependencyType::InterRank, "CommandBus"},
|
||||
}));
|
||||
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("SREFEX"),
|
||||
forward_as_tuple(
|
||||
initializer_list<TimeDependency>{
|
||||
{tCKESR, "SREFEN", DependencyType::IntraRank, "tCKESR"},
|
||||
{tCK, "CMD_BUS", DependencyType::InterRank, "CommandBus"},
|
||||
}
|
||||
)
|
||||
);
|
||||
dmap.emplace(piecewise_construct,
|
||||
forward_as_tuple("SREFEX"),
|
||||
forward_as_tuple(initializer_list<TimeDependency>{
|
||||
{tCKESR, "SREFEN", DependencyType::IntraRank, "tCKESR"},
|
||||
{tCK, "CMD_BUS", DependencyType::InterRank, "CommandBus"},
|
||||
}));
|
||||
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("PDEA"),
|
||||
forward_as_tuple(
|
||||
initializer_list<TimeDependency>{
|
||||
{tACTPDEN, "ACT", DependencyType::IntraRank, "tACTPDEN"},
|
||||
{tRDPDEN, "RD", DependencyType::IntraRank, "tRDPDEN"},
|
||||
{tRDPDEN, "RDA", DependencyType::IntraRank, "tRDPDEN"},
|
||||
{tWRPDEN, "WR", DependencyType::IntraRank, "tWRPDEN"},
|
||||
{tWRAPDEN, "WRA", DependencyType::IntraRank, "tWRAPDEN"},
|
||||
{tPRPDEN, "PREPB", DependencyType::IntraRank, "tPRPDEN"},
|
||||
{tCKE, "PDXA", DependencyType::IntraRank, "tCKE"},
|
||||
{tCK, "CMD_BUS", DependencyType::InterRank, "CommandBus"},
|
||||
}
|
||||
)
|
||||
);
|
||||
dmap.emplace(piecewise_construct,
|
||||
forward_as_tuple("PDEA"),
|
||||
forward_as_tuple(initializer_list<TimeDependency>{
|
||||
{tACTPDEN, "ACT", DependencyType::IntraRank, "tACTPDEN"},
|
||||
{tRDPDEN, "RD", DependencyType::IntraRank, "tRDPDEN"},
|
||||
{tRDPDEN, "RDA", DependencyType::IntraRank, "tRDPDEN"},
|
||||
{tWRPDEN, "WR", DependencyType::IntraRank, "tWRPDEN"},
|
||||
{tWRAPDEN, "WRA", DependencyType::IntraRank, "tWRAPDEN"},
|
||||
{tPRPDEN, "PREPB", DependencyType::IntraRank, "tPRPDEN"},
|
||||
{tCKE, "PDXA", DependencyType::IntraRank, "tCKE"},
|
||||
{tCK, "CMD_BUS", DependencyType::InterRank, "CommandBus"},
|
||||
}));
|
||||
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("PDXA"),
|
||||
forward_as_tuple(
|
||||
initializer_list<TimeDependency>{
|
||||
{tPD, "PDEA", DependencyType::IntraRank, "tPD"},
|
||||
{tCK, "CMD_BUS", DependencyType::InterRank, "CommandBus"},
|
||||
}
|
||||
)
|
||||
);
|
||||
dmap.emplace(piecewise_construct,
|
||||
forward_as_tuple("PDXA"),
|
||||
forward_as_tuple(initializer_list<TimeDependency>{
|
||||
{tPD, "PDEA", DependencyType::IntraRank, "tPD"},
|
||||
{tCK, "CMD_BUS", DependencyType::InterRank, "CommandBus"},
|
||||
}));
|
||||
|
||||
return dmap;
|
||||
return dmap;
|
||||
}
|
||||
|
||||
@@ -37,17 +37,18 @@
|
||||
|
||||
#include "../dramtimedependenciesbase.h"
|
||||
|
||||
class TimeDependenciesInfoDDR3 final : public DRAMTimeDependenciesBase {
|
||||
public:
|
||||
class TimeDependenciesInfoDDR3 final : public DRAMTimeDependenciesBase
|
||||
{
|
||||
public:
|
||||
TimeDependenciesInfoDDR3(const QJsonObject& memspec, const uint clk);
|
||||
|
||||
static const std::vector<QString> getPossiblePhases();
|
||||
|
||||
protected:
|
||||
protected:
|
||||
void mInitializeValues() override;
|
||||
DependencyMap mSpecializedGetDependencies() const override;
|
||||
|
||||
protected:
|
||||
protected:
|
||||
uint burstLength;
|
||||
uint dataRate;
|
||||
|
||||
@@ -87,5 +88,4 @@ class TimeDependenciesInfoDDR3 final : public DRAMTimeDependenciesBase {
|
||||
uint tRDPDEN;
|
||||
uint tWRPDEN;
|
||||
uint tWRAPDEN;
|
||||
|
||||
};
|
||||
|
||||
@@ -37,384 +37,333 @@
|
||||
|
||||
using namespace std;
|
||||
|
||||
TimeDependenciesInfoDDR4::TimeDependenciesInfoDDR4(const QJsonObject& memspec, const uint tCK) : DRAMTimeDependenciesBase(memspec, tCK) {
|
||||
mInitializeValues();
|
||||
TimeDependenciesInfoDDR4::TimeDependenciesInfoDDR4(const QJsonObject& memspec, const uint tCK) :
|
||||
DRAMTimeDependenciesBase(memspec, tCK)
|
||||
{
|
||||
mInitializeValues();
|
||||
}
|
||||
|
||||
void TimeDependenciesInfoDDR4::mInitializeValues() {
|
||||
burstLength = mMemspecJson["memarchitecturespec"].toObject()["burstLength"].toInt();
|
||||
dataRate = mMemspecJson["memarchitecturespec"].toObject()["dataRate"].toInt();
|
||||
void TimeDependenciesInfoDDR4::mInitializeValues()
|
||||
{
|
||||
burstLength = mMemspecJson["memarchitecturespec"].toObject()["burstLength"].toInt();
|
||||
dataRate = mMemspecJson["memarchitecturespec"].toObject()["dataRate"].toInt();
|
||||
|
||||
tRCD = tCK * mMemspecJson["memtimingspec"].toObject()["RCD"].toInt();
|
||||
tRP = tCK * mMemspecJson["memtimingspec"].toObject()["RP"].toInt();
|
||||
tRAS = tCK * mMemspecJson["memtimingspec"].toObject()["RAS"].toInt();
|
||||
tRC = tCK * mMemspecJson["memtimingspec"].toObject()["RC"].toInt();
|
||||
tCL = tCK * mMemspecJson["memtimingspec"].toObject()["CL"].toInt();
|
||||
tCWL = tCK * mMemspecJson["memtimingspec"].toObject()["CWL"].toInt();
|
||||
tAL = tCK * mMemspecJson["memtimingspec"].toObject()["AL"].toInt();
|
||||
tRL = tCK * mMemspecJson["memtimingspec"].toObject()["RL"].toInt();
|
||||
tRPRE = tCK * mMemspecJson["memtimingspec"].toObject()["RPRE"].toInt();
|
||||
tWPRE = tCK * mMemspecJson["memtimingspec"].toObject()["WPRE"].toInt();
|
||||
tWL = tCK * mMemspecJson["memtimingspec"].toObject()["WL"].toInt();
|
||||
tCCD_S = tCK * mMemspecJson["memtimingspec"].toObject()["CCD_S"].toInt();
|
||||
tCCD_L = tCK * mMemspecJson["memtimingspec"].toObject()["CCD_L"].toInt();
|
||||
tRRD_S = tCK * mMemspecJson["memtimingspec"].toObject()["RRD_S"].toInt();
|
||||
tRRD_L = tCK * mMemspecJson["memtimingspec"].toObject()["RRD_L"].toInt();
|
||||
tFAW = tCK * mMemspecJson["memtimingspec"].toObject()["FAW"].toInt();
|
||||
tWTR_S = tCK * mMemspecJson["memtimingspec"].toObject()["WTR_S"].toInt();
|
||||
tWTR_L = tCK * mMemspecJson["memtimingspec"].toObject()["WTR_L"].toInt();
|
||||
tRTP = tCK * mMemspecJson["memtimingspec"].toObject()["RTP"].toInt();
|
||||
tWR = tCK * mMemspecJson["memtimingspec"].toObject()["WR"].toInt();
|
||||
tXS = tCK * mMemspecJson["memtimingspec"].toObject()["XS"].toInt();
|
||||
tXSDLL = tCK * mMemspecJson["memtimingspec"].toObject()["XSDLL"].toInt();
|
||||
tXP = tCK * mMemspecJson["memtimingspec"].toObject()["XP"].toInt();
|
||||
tCKE = tCK * mMemspecJson["memtimingspec"].toObject()["CKE"].toInt();
|
||||
tCKESR = tCK * mMemspecJson["memtimingspec"].toObject()["CKESR"].toInt();
|
||||
tACTPDEN = tCK * mMemspecJson["memtimingspec"].toObject()["ACTPDEN"].toInt();
|
||||
tPRPDEN = tCK * mMemspecJson["memtimingspec"].toObject()["PRPDEN"].toInt();
|
||||
tREFPDEN = tCK * mMemspecJson["memtimingspec"].toObject()["REFPDEN"].toInt();
|
||||
tRTRS = tCK * mMemspecJson["memtimingspec"].toObject()["RTRS"].toInt();
|
||||
tRCD = tCK * mMemspecJson["memtimingspec"].toObject()["RCD"].toInt();
|
||||
tRP = tCK * mMemspecJson["memtimingspec"].toObject()["RP"].toInt();
|
||||
tRAS = tCK * mMemspecJson["memtimingspec"].toObject()["RAS"].toInt();
|
||||
tRC = tCK * mMemspecJson["memtimingspec"].toObject()["RC"].toInt();
|
||||
tCL = tCK * mMemspecJson["memtimingspec"].toObject()["CL"].toInt();
|
||||
tCWL = tCK * mMemspecJson["memtimingspec"].toObject()["CWL"].toInt();
|
||||
tAL = tCK * mMemspecJson["memtimingspec"].toObject()["AL"].toInt();
|
||||
tRL = tCK * mMemspecJson["memtimingspec"].toObject()["RL"].toInt();
|
||||
tRPRE = tCK * mMemspecJson["memtimingspec"].toObject()["RPRE"].toInt();
|
||||
tWPRE = tCK * mMemspecJson["memtimingspec"].toObject()["WPRE"].toInt();
|
||||
tWL = tCK * mMemspecJson["memtimingspec"].toObject()["WL"].toInt();
|
||||
tCCD_S = tCK * mMemspecJson["memtimingspec"].toObject()["CCD_S"].toInt();
|
||||
tCCD_L = tCK * mMemspecJson["memtimingspec"].toObject()["CCD_L"].toInt();
|
||||
tRRD_S = tCK * mMemspecJson["memtimingspec"].toObject()["RRD_S"].toInt();
|
||||
tRRD_L = tCK * mMemspecJson["memtimingspec"].toObject()["RRD_L"].toInt();
|
||||
tFAW = tCK * mMemspecJson["memtimingspec"].toObject()["FAW"].toInt();
|
||||
tWTR_S = tCK * mMemspecJson["memtimingspec"].toObject()["WTR_S"].toInt();
|
||||
tWTR_L = tCK * mMemspecJson["memtimingspec"].toObject()["WTR_L"].toInt();
|
||||
tRTP = tCK * mMemspecJson["memtimingspec"].toObject()["RTP"].toInt();
|
||||
tWR = tCK * mMemspecJson["memtimingspec"].toObject()["WR"].toInt();
|
||||
tXS = tCK * mMemspecJson["memtimingspec"].toObject()["XS"].toInt();
|
||||
tXSDLL = tCK * mMemspecJson["memtimingspec"].toObject()["XSDLL"].toInt();
|
||||
tXP = tCK * mMemspecJson["memtimingspec"].toObject()["XP"].toInt();
|
||||
tCKE = tCK * mMemspecJson["memtimingspec"].toObject()["CKE"].toInt();
|
||||
tCKESR = tCK * mMemspecJson["memtimingspec"].toObject()["CKESR"].toInt();
|
||||
tACTPDEN = tCK * mMemspecJson["memtimingspec"].toObject()["ACTPDEN"].toInt();
|
||||
tPRPDEN = tCK * mMemspecJson["memtimingspec"].toObject()["PRPDEN"].toInt();
|
||||
tREFPDEN = tCK * mMemspecJson["memtimingspec"].toObject()["REFPDEN"].toInt();
|
||||
tRTRS = tCK * mMemspecJson["memtimingspec"].toObject()["RTRS"].toInt();
|
||||
|
||||
tPD = tCKE;
|
||||
tRFC = tCK * (
|
||||
(mMemspecJson["memtimingspec"].toObject()["REFM"].toInt() == 4) ?
|
||||
(mMemspecJson["memtimingspec"].toObject()["RFC4"].toInt(1)) :
|
||||
(
|
||||
(mMemspecJson["memtimingspec"].toObject()["REFM"].toInt() == 2) ?
|
||||
(mMemspecJson["memtimingspec"].toObject()["RFC2"].toInt(1)) :
|
||||
(mMemspecJson["memtimingspec"].toObject()["RFC"].toInt(1))
|
||||
)
|
||||
);
|
||||
|
||||
tBURST = (uint) (burstLength / (float) dataRate) * tCK;
|
||||
tRDWR = tRL + tBURST + tCK - tWL + tWPRE;
|
||||
tRDWR_R = tRL + tBURST + tRTRS - tWL + tWPRE;
|
||||
tWRRD_S = tWL + tBURST + tWTR_S - tAL;
|
||||
tWRRD_L = tWL + tBURST + tWTR_L - tAL;
|
||||
tWRRD_R = tWL + tBURST + tRTRS - tRL + tRPRE;
|
||||
tRDAACT = tAL + tRTP + tRP;
|
||||
tWRPRE = tWL + tBURST + tWR;
|
||||
tWRAACT = tWRPRE + tRP;
|
||||
tRDPDEN = tRL + tBURST + tCK;
|
||||
tWRPDEN = tWL + tBURST + tWR;
|
||||
tWRAPDEN = tWL + tBURST + tWR + tCK;
|
||||
tPD = tCKE;
|
||||
tRFC = tCK * ((mMemspecJson["memtimingspec"].toObject()["REFM"].toInt() == 4)
|
||||
? (mMemspecJson["memtimingspec"].toObject()["RFC4"].toInt(1))
|
||||
: ((mMemspecJson["memtimingspec"].toObject()["REFM"].toInt() == 2)
|
||||
? (mMemspecJson["memtimingspec"].toObject()["RFC2"].toInt(1))
|
||||
: (mMemspecJson["memtimingspec"].toObject()["RFC"].toInt(1))));
|
||||
|
||||
mPools.insert({
|
||||
"CMD_BUS", {
|
||||
1, {
|
||||
{"ACT", tCK},
|
||||
{"RD", tCK},
|
||||
{"WR", tCK},
|
||||
{"PREPB", tCK},
|
||||
{"RDA", tCK},
|
||||
{"WRA", tCK},
|
||||
{"REFAB", tCK},
|
||||
{"PREAB", tCK},
|
||||
{"PDEP", tCK},
|
||||
{"PDXP", tCK},
|
||||
{"SREFEN", tCK},
|
||||
{"SREFEX", tCK},
|
||||
{"PDEA", tCK},
|
||||
{"PDXA", tCK},
|
||||
}
|
||||
}
|
||||
});
|
||||
tBURST = (uint)(burstLength / (float)dataRate) * tCK;
|
||||
tRDWR = tRL + tBURST + tCK - tWL + tWPRE;
|
||||
tRDWR_R = tRL + tBURST + tRTRS - tWL + tWPRE;
|
||||
tWRRD_S = tWL + tBURST + tWTR_S - tAL;
|
||||
tWRRD_L = tWL + tBURST + tWTR_L - tAL;
|
||||
tWRRD_R = tWL + tBURST + tRTRS - tRL + tRPRE;
|
||||
tRDAACT = tAL + tRTP + tRP;
|
||||
tWRPRE = tWL + tBURST + tWR;
|
||||
tWRAACT = tWRPRE + tRP;
|
||||
tRDPDEN = tRL + tBURST + tCK;
|
||||
tWRPDEN = tWL + tBURST + tWR;
|
||||
tWRAPDEN = tWL + tBURST + tWR + tCK;
|
||||
|
||||
mPools.insert({
|
||||
"NAW", {
|
||||
4, {
|
||||
{"ACT", tFAW},
|
||||
}
|
||||
}
|
||||
});
|
||||
mPools.insert({"CMD_BUS",
|
||||
{1,
|
||||
{
|
||||
{"ACT", tCK},
|
||||
{"RD", tCK},
|
||||
{"WR", tCK},
|
||||
{"PREPB", tCK},
|
||||
{"RDA", tCK},
|
||||
{"WRA", tCK},
|
||||
{"REFAB", tCK},
|
||||
{"PREAB", tCK},
|
||||
{"PDEP", tCK},
|
||||
{"PDXP", tCK},
|
||||
{"SREFEN", tCK},
|
||||
{"SREFEX", tCK},
|
||||
{"PDEA", tCK},
|
||||
{"PDXA", tCK},
|
||||
}}});
|
||||
|
||||
mPools.insert({"NAW",
|
||||
{4,
|
||||
{
|
||||
{"ACT", tFAW},
|
||||
}}});
|
||||
}
|
||||
|
||||
const std::vector<QString> TimeDependenciesInfoDDR4::getPossiblePhases() {
|
||||
return {
|
||||
"ACT",
|
||||
"RD",
|
||||
"WR",
|
||||
"PREPB",
|
||||
"RDA",
|
||||
"WRA",
|
||||
"REFAB",
|
||||
"PREAB",
|
||||
"PDEP",
|
||||
"PDXP",
|
||||
"SREFEN",
|
||||
"SREFEX",
|
||||
"PDEA",
|
||||
"PDXA",
|
||||
};
|
||||
const std::vector<QString> TimeDependenciesInfoDDR4::getPossiblePhases()
|
||||
{
|
||||
return {
|
||||
"ACT",
|
||||
"RD",
|
||||
"WR",
|
||||
"PREPB",
|
||||
"RDA",
|
||||
"WRA",
|
||||
"REFAB",
|
||||
"PREAB",
|
||||
"PDEP",
|
||||
"PDXP",
|
||||
"SREFEN",
|
||||
"SREFEX",
|
||||
"PDEA",
|
||||
"PDXA",
|
||||
};
|
||||
}
|
||||
|
||||
DependencyMap TimeDependenciesInfoDDR4::mSpecializedGetDependencies() const {
|
||||
DependencyMap dmap;
|
||||
DependencyMap TimeDependenciesInfoDDR4::mSpecializedGetDependencies() const
|
||||
{
|
||||
DependencyMap dmap;
|
||||
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("ACT"),
|
||||
forward_as_tuple(
|
||||
initializer_list<TimeDependency>{
|
||||
{tRC, "ACT", DependencyType::IntraBank, "tRC"},
|
||||
{tRRD_L, "ACT", DependencyType::IntraBankGroup, "tRRD_L"},
|
||||
{tRRD_S, "ACT", DependencyType::IntraRank, "tRRD_S"},
|
||||
{tRDAACT, "RDA", DependencyType::IntraBank, "tRDAACT"},
|
||||
{tWRAACT, "WRA", DependencyType::IntraBank, "tWRAACT"},
|
||||
{tRP, "PREPB", DependencyType::IntraBank, "tRP"},
|
||||
{tRP, "PREAB", DependencyType::IntraRank, "tRP"},
|
||||
{tXP, "PDXA", DependencyType::IntraRank, "tXP"},
|
||||
{tXP, "PDXP", DependencyType::IntraRank, "tXP"},
|
||||
{tRFC, "REFAB", DependencyType::IntraRank, "tRFC"},
|
||||
{tXS, "SREFEX", DependencyType::IntraRank, "tXS"},
|
||||
{tCK, "CMD_BUS", DependencyType::InterRank, "CommandBus"},
|
||||
{tFAW, "NAW", DependencyType::IntraRank, "tFAW"},
|
||||
}
|
||||
)
|
||||
);
|
||||
dmap.emplace(piecewise_construct,
|
||||
forward_as_tuple("ACT"),
|
||||
forward_as_tuple(initializer_list<TimeDependency>{
|
||||
{tRC, "ACT", DependencyType::IntraBank, "tRC"},
|
||||
{tRRD_L, "ACT", DependencyType::IntraBankGroup, "tRRD_L"},
|
||||
{tRRD_S, "ACT", DependencyType::IntraRank, "tRRD_S"},
|
||||
{tRDAACT, "RDA", DependencyType::IntraBank, "tRDAACT"},
|
||||
{tWRAACT, "WRA", DependencyType::IntraBank, "tWRAACT"},
|
||||
{tRP, "PREPB", DependencyType::IntraBank, "tRP"},
|
||||
{tRP, "PREAB", DependencyType::IntraRank, "tRP"},
|
||||
{tXP, "PDXA", DependencyType::IntraRank, "tXP"},
|
||||
{tXP, "PDXP", DependencyType::IntraRank, "tXP"},
|
||||
{tRFC, "REFAB", DependencyType::IntraRank, "tRFC"},
|
||||
{tXS, "SREFEX", DependencyType::IntraRank, "tXS"},
|
||||
{tCK, "CMD_BUS", DependencyType::InterRank, "CommandBus"},
|
||||
{tFAW, "NAW", DependencyType::IntraRank, "tFAW"},
|
||||
}));
|
||||
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("RD"),
|
||||
forward_as_tuple(
|
||||
initializer_list<TimeDependency>{
|
||||
{tRCD - tAL, "ACT", DependencyType::IntraBank, "tRCD - tAL"},
|
||||
{tCCD_L, "RD", DependencyType::IntraBank, "tCCD_L"}, //
|
||||
{tCCD_L, "RD", DependencyType::IntraBankGroup, "tCCD_L"},
|
||||
{tCCD_S, "RD", DependencyType::IntraRank, "tCCD_S"},
|
||||
{tBURST + tRTRS, "RD", DependencyType::InterRank, "tBURST + tRTRS"},
|
||||
{tCCD_L, "RDA", DependencyType::IntraBankGroup, "tCCD_L"},
|
||||
{tCCD_S, "RDA", DependencyType::IntraRank, "tCCD_S"},
|
||||
{tBURST + tRTRS, "RDA", DependencyType::InterRank, "tBURST + tRTRS"},
|
||||
{tWRRD_L, "WR", DependencyType::IntraBank, "tWRRD_L"}, //
|
||||
{tWRRD_L, "WR", DependencyType::IntraBankGroup, "tWRRD_L"},
|
||||
{tWRRD_S, "WR", DependencyType::IntraRank, "tWRRD_S"},
|
||||
{tWRRD_R, "WR", DependencyType::InterRank, "tWRRD_R"},
|
||||
{tWRRD_L, "WRA", DependencyType::IntraBankGroup, "tWRRD_L"},
|
||||
{tWRRD_S, "WRA", DependencyType::IntraRank, "tWRRD_S"},
|
||||
{tWRRD_R, "WRA", DependencyType::InterRank, "tWRRD_R"},
|
||||
{tXP, "PDXA", DependencyType::IntraRank, "tXP"},
|
||||
{tXSDLL, "SREFEX", DependencyType::IntraRank, "tXSDLL"},
|
||||
{tCK, "CMD_BUS", DependencyType::InterRank, "CommandBus"},
|
||||
}
|
||||
)
|
||||
);
|
||||
dmap.emplace(piecewise_construct,
|
||||
forward_as_tuple("RD"),
|
||||
forward_as_tuple(initializer_list<TimeDependency>{
|
||||
{tRCD - tAL, "ACT", DependencyType::IntraBank, "tRCD - tAL"},
|
||||
{tCCD_L, "RD", DependencyType::IntraBank, "tCCD_L"}, //
|
||||
{tCCD_L, "RD", DependencyType::IntraBankGroup, "tCCD_L"},
|
||||
{tCCD_S, "RD", DependencyType::IntraRank, "tCCD_S"},
|
||||
{tBURST + tRTRS, "RD", DependencyType::InterRank, "tBURST + tRTRS"},
|
||||
{tCCD_L, "RDA", DependencyType::IntraBankGroup, "tCCD_L"},
|
||||
{tCCD_S, "RDA", DependencyType::IntraRank, "tCCD_S"},
|
||||
{tBURST + tRTRS, "RDA", DependencyType::InterRank, "tBURST + tRTRS"},
|
||||
{tWRRD_L, "WR", DependencyType::IntraBank, "tWRRD_L"}, //
|
||||
{tWRRD_L, "WR", DependencyType::IntraBankGroup, "tWRRD_L"},
|
||||
{tWRRD_S, "WR", DependencyType::IntraRank, "tWRRD_S"},
|
||||
{tWRRD_R, "WR", DependencyType::InterRank, "tWRRD_R"},
|
||||
{tWRRD_L, "WRA", DependencyType::IntraBankGroup, "tWRRD_L"},
|
||||
{tWRRD_S, "WRA", DependencyType::IntraRank, "tWRRD_S"},
|
||||
{tWRRD_R, "WRA", DependencyType::InterRank, "tWRRD_R"},
|
||||
{tXP, "PDXA", DependencyType::IntraRank, "tXP"},
|
||||
{tXSDLL, "SREFEX", DependencyType::IntraRank, "tXSDLL"},
|
||||
{tCK, "CMD_BUS", DependencyType::InterRank, "CommandBus"},
|
||||
}));
|
||||
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("WR"),
|
||||
forward_as_tuple(
|
||||
initializer_list<TimeDependency>{
|
||||
{tRCD - tAL, "ACT", DependencyType::IntraBank, "tRCD - tAL"},
|
||||
{tRDWR, "RD", DependencyType::IntraBank, "tRDWR"}, //
|
||||
{tRDWR, "RD", DependencyType::IntraBankGroup, "tRDWR"}, //
|
||||
{tRDWR, "RD", DependencyType::IntraRank, "tRDWR"},
|
||||
{tRDWR_R, "RD", DependencyType::InterRank, "tRDWR_R"},
|
||||
{tRDWR, "RDA", DependencyType::IntraBankGroup, "tRDWR"}, //
|
||||
{tRDWR, "RDA", DependencyType::IntraRank, "tRDWR"},
|
||||
{tRDWR_R, "RDA", DependencyType::InterRank, "tRDWR_R"},
|
||||
{tCCD_L, "WR", DependencyType::IntraBank, "tCCD_L"}, //
|
||||
{tCCD_L, "WR", DependencyType::IntraBankGroup, "tCCD_L"},
|
||||
{tCCD_S, "WR", DependencyType::IntraRank, "tCCD_S"},
|
||||
{tBURST + tRTRS, "WR", DependencyType::InterRank, "tBURST + tRTRS"},
|
||||
{tCCD_L, "WRA", DependencyType::IntraBankGroup, "tCCD_L"},
|
||||
{tCCD_S, "WRA", DependencyType::IntraRank, "tCCD_S"},
|
||||
{tBURST + tRTRS, "WRA", DependencyType::InterRank, "tBURST + tRTRS"},
|
||||
{tXP, "PDXA", DependencyType::IntraRank, "tXP"},
|
||||
{tXSDLL, "SREFEX", DependencyType::IntraRank, "tXSDLL"},
|
||||
{tCK, "CMD_BUS", DependencyType::InterRank, "CommandBus"},
|
||||
}
|
||||
)
|
||||
);
|
||||
dmap.emplace(piecewise_construct,
|
||||
forward_as_tuple("WR"),
|
||||
forward_as_tuple(initializer_list<TimeDependency>{
|
||||
{tRCD - tAL, "ACT", DependencyType::IntraBank, "tRCD - tAL"},
|
||||
{tRDWR, "RD", DependencyType::IntraBank, "tRDWR"}, //
|
||||
{tRDWR, "RD", DependencyType::IntraBankGroup, "tRDWR"}, //
|
||||
{tRDWR, "RD", DependencyType::IntraRank, "tRDWR"},
|
||||
{tRDWR_R, "RD", DependencyType::InterRank, "tRDWR_R"},
|
||||
{tRDWR, "RDA", DependencyType::IntraBankGroup, "tRDWR"}, //
|
||||
{tRDWR, "RDA", DependencyType::IntraRank, "tRDWR"},
|
||||
{tRDWR_R, "RDA", DependencyType::InterRank, "tRDWR_R"},
|
||||
{tCCD_L, "WR", DependencyType::IntraBank, "tCCD_L"}, //
|
||||
{tCCD_L, "WR", DependencyType::IntraBankGroup, "tCCD_L"},
|
||||
{tCCD_S, "WR", DependencyType::IntraRank, "tCCD_S"},
|
||||
{tBURST + tRTRS, "WR", DependencyType::InterRank, "tBURST + tRTRS"},
|
||||
{tCCD_L, "WRA", DependencyType::IntraBankGroup, "tCCD_L"},
|
||||
{tCCD_S, "WRA", DependencyType::IntraRank, "tCCD_S"},
|
||||
{tBURST + tRTRS, "WRA", DependencyType::InterRank, "tBURST + tRTRS"},
|
||||
{tXP, "PDXA", DependencyType::IntraRank, "tXP"},
|
||||
{tXSDLL, "SREFEX", DependencyType::IntraRank, "tXSDLL"},
|
||||
{tCK, "CMD_BUS", DependencyType::InterRank, "CommandBus"},
|
||||
}));
|
||||
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("PREPB"),
|
||||
forward_as_tuple(
|
||||
initializer_list<TimeDependency>{
|
||||
{tRAS, "ACT", DependencyType::IntraBank, "tRAS"},
|
||||
{tAL + tRTP, "RD", DependencyType::IntraBank, "tAL + tRTP"},
|
||||
{tWRPRE, "WR", DependencyType::IntraBank, "tWRPRE"},
|
||||
{tXP, "PDXA", DependencyType::IntraRank, "tXP"},
|
||||
{tCK, "CMD_BUS", DependencyType::InterRank, "CommandBus"},
|
||||
}
|
||||
)
|
||||
);
|
||||
dmap.emplace(piecewise_construct,
|
||||
forward_as_tuple("PREPB"),
|
||||
forward_as_tuple(initializer_list<TimeDependency>{
|
||||
{tRAS, "ACT", DependencyType::IntraBank, "tRAS"},
|
||||
{tAL + tRTP, "RD", DependencyType::IntraBank, "tAL + tRTP"},
|
||||
{tWRPRE, "WR", DependencyType::IntraBank, "tWRPRE"},
|
||||
{tXP, "PDXA", DependencyType::IntraRank, "tXP"},
|
||||
{tCK, "CMD_BUS", DependencyType::InterRank, "CommandBus"},
|
||||
}));
|
||||
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("RDA"),
|
||||
forward_as_tuple(
|
||||
initializer_list<TimeDependency>{
|
||||
{tRCD - tAL, "ACT", DependencyType::IntraBank, "tRCD - tAL"},
|
||||
{tCCD_L, "RD", DependencyType::IntraBank, "tCCD_L"},
|
||||
{tCCD_L, "RD", DependencyType::IntraBankGroup, "tCCD_L"},
|
||||
{tCCD_S, "RD", DependencyType::IntraRank, "tCCD_S"},
|
||||
{tBURST + tRTRS, "RD", DependencyType::InterRank, "tBURST + tRTRS"},
|
||||
{tCCD_L, "RDA", DependencyType::IntraBankGroup, "tCCD_L"},
|
||||
{tCCD_S, "RDA", DependencyType::IntraRank, "tCCD_S"},
|
||||
{tBURST + tRTRS, "RDA", DependencyType::InterRank, "tBURST + tRTRS"},
|
||||
{max({tWRRD_L, tWRPRE - tRTP - tAL}), "WR", DependencyType::IntraBank, "max(tWRRD_L, tWRPRE - tRTP - tAL)"},
|
||||
{tWRRD_L, "WR", DependencyType::IntraBankGroup, "tWRRD_L"},
|
||||
{tWRRD_S, "WR", DependencyType::IntraRank, "tWRRD_S"},
|
||||
{tWRRD_R, "WR", DependencyType::InterRank, "tWRRD_R"},
|
||||
{tWRRD_L, "WRA", DependencyType::IntraBankGroup, "tWRRD_L"},
|
||||
{tWRRD_S, "WRA", DependencyType::IntraRank, "tWRRD_S"},
|
||||
{tWRRD_R, "WRA", DependencyType::InterRank, "tWRRD_R"},
|
||||
{tXP, "PDXA", DependencyType::IntraRank, "tXP"},
|
||||
{tXSDLL, "SREFEX", DependencyType::IntraRank, "tXSDLL"},
|
||||
{tCK, "CMD_BUS", DependencyType::InterRank, "CommandBus"},
|
||||
}
|
||||
)
|
||||
);
|
||||
dmap.emplace(piecewise_construct,
|
||||
forward_as_tuple("RDA"),
|
||||
forward_as_tuple(initializer_list<TimeDependency>{
|
||||
{tRCD - tAL, "ACT", DependencyType::IntraBank, "tRCD - tAL"},
|
||||
{tCCD_L, "RD", DependencyType::IntraBank, "tCCD_L"},
|
||||
{tCCD_L, "RD", DependencyType::IntraBankGroup, "tCCD_L"},
|
||||
{tCCD_S, "RD", DependencyType::IntraRank, "tCCD_S"},
|
||||
{tBURST + tRTRS, "RD", DependencyType::InterRank, "tBURST + tRTRS"},
|
||||
{tCCD_L, "RDA", DependencyType::IntraBankGroup, "tCCD_L"},
|
||||
{tCCD_S, "RDA", DependencyType::IntraRank, "tCCD_S"},
|
||||
{tBURST + tRTRS, "RDA", DependencyType::InterRank, "tBURST + tRTRS"},
|
||||
{max({tWRRD_L, tWRPRE - tRTP - tAL}),
|
||||
"WR",
|
||||
DependencyType::IntraBank,
|
||||
"max(tWRRD_L, tWRPRE - tRTP - tAL)"},
|
||||
{tWRRD_L, "WR", DependencyType::IntraBankGroup, "tWRRD_L"},
|
||||
{tWRRD_S, "WR", DependencyType::IntraRank, "tWRRD_S"},
|
||||
{tWRRD_R, "WR", DependencyType::InterRank, "tWRRD_R"},
|
||||
{tWRRD_L, "WRA", DependencyType::IntraBankGroup, "tWRRD_L"},
|
||||
{tWRRD_S, "WRA", DependencyType::IntraRank, "tWRRD_S"},
|
||||
{tWRRD_R, "WRA", DependencyType::InterRank, "tWRRD_R"},
|
||||
{tXP, "PDXA", DependencyType::IntraRank, "tXP"},
|
||||
{tXSDLL, "SREFEX", DependencyType::IntraRank, "tXSDLL"},
|
||||
{tCK, "CMD_BUS", DependencyType::InterRank, "CommandBus"},
|
||||
}));
|
||||
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("WRA"),
|
||||
forward_as_tuple(
|
||||
initializer_list<TimeDependency>{
|
||||
{tRCD - tAL, "ACT", DependencyType::IntraBank, "tRCD - tAL"},
|
||||
{tRDWR, "RD", DependencyType::IntraBank, "tRDWR"},
|
||||
{tRDWR, "RD", DependencyType::IntraBankGroup, "tRDWR"},
|
||||
{tRDWR, "RD", DependencyType::IntraRank, "tRDWR"},
|
||||
{tRDWR_R, "RD", DependencyType::InterRank, "tRDWR_R"},
|
||||
{tRDWR, "RDA", DependencyType::IntraBankGroup, "tRDWR"},
|
||||
{tRDWR, "RDA", DependencyType::IntraRank, "tRDWR"},
|
||||
{tRDWR_R, "RDA", DependencyType::InterRank, "tRDWR_R"},
|
||||
{tCCD_L, "WR", DependencyType::IntraBank, "tCCD_L"},
|
||||
{tCCD_L, "WR", DependencyType::IntraBankGroup, "tCCD_L"},
|
||||
{tCCD_S, "WR", DependencyType::IntraRank, "tCCD_S"},
|
||||
{tBURST + tRTRS, "WR", DependencyType::InterRank, "tBURST + tRTRS"},
|
||||
{tCCD_L, "WRA", DependencyType::IntraBankGroup, "tCCD_L"},
|
||||
{tCCD_S, "WRA", DependencyType::IntraRank, "tCCD_S"},
|
||||
{tBURST + tRTRS, "WRA", DependencyType::InterRank, "tBURST + tRTRS"},
|
||||
{tXP, "PDXA", DependencyType::IntraRank, "tXP"},
|
||||
{tXSDLL, "SREFEX", DependencyType::IntraRank, "tXSDLL"},
|
||||
{tCK, "CMD_BUS", DependencyType::InterRank, "CommandBus"},
|
||||
}
|
||||
)
|
||||
);
|
||||
dmap.emplace(piecewise_construct,
|
||||
forward_as_tuple("WRA"),
|
||||
forward_as_tuple(initializer_list<TimeDependency>{
|
||||
{tRCD - tAL, "ACT", DependencyType::IntraBank, "tRCD - tAL"},
|
||||
{tRDWR, "RD", DependencyType::IntraBank, "tRDWR"},
|
||||
{tRDWR, "RD", DependencyType::IntraBankGroup, "tRDWR"},
|
||||
{tRDWR, "RD", DependencyType::IntraRank, "tRDWR"},
|
||||
{tRDWR_R, "RD", DependencyType::InterRank, "tRDWR_R"},
|
||||
{tRDWR, "RDA", DependencyType::IntraBankGroup, "tRDWR"},
|
||||
{tRDWR, "RDA", DependencyType::IntraRank, "tRDWR"},
|
||||
{tRDWR_R, "RDA", DependencyType::InterRank, "tRDWR_R"},
|
||||
{tCCD_L, "WR", DependencyType::IntraBank, "tCCD_L"},
|
||||
{tCCD_L, "WR", DependencyType::IntraBankGroup, "tCCD_L"},
|
||||
{tCCD_S, "WR", DependencyType::IntraRank, "tCCD_S"},
|
||||
{tBURST + tRTRS, "WR", DependencyType::InterRank, "tBURST + tRTRS"},
|
||||
{tCCD_L, "WRA", DependencyType::IntraBankGroup, "tCCD_L"},
|
||||
{tCCD_S, "WRA", DependencyType::IntraRank, "tCCD_S"},
|
||||
{tBURST + tRTRS, "WRA", DependencyType::InterRank, "tBURST + tRTRS"},
|
||||
{tXP, "PDXA", DependencyType::IntraRank, "tXP"},
|
||||
{tXSDLL, "SREFEX", DependencyType::IntraRank, "tXSDLL"},
|
||||
{tCK, "CMD_BUS", DependencyType::InterRank, "CommandBus"},
|
||||
}));
|
||||
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("REFAB"),
|
||||
forward_as_tuple(
|
||||
initializer_list<TimeDependency>{
|
||||
{tRC, "ACT", DependencyType::IntraRank, "tRC"},
|
||||
{tRDAACT, "RDA", DependencyType::IntraRank, "tRDAACT"},
|
||||
{tWRPRE + tRP, "WRA", DependencyType::IntraRank, "tWRPRE + tRP"},
|
||||
{tRP, "PREPB", DependencyType::IntraRank, "tRP"},
|
||||
{tRP, "PREAB", DependencyType::IntraRank, "tRP"},
|
||||
{tXP, "PDXP", DependencyType::IntraRank, "tXP"},
|
||||
{tRFC, "REFAB", DependencyType::IntraRank, "tRFC"},
|
||||
{tXS, "SREFEX", DependencyType::IntraRank, "tXS"},
|
||||
{tCK, "CMD_BUS", DependencyType::InterRank, "CommandBus"},
|
||||
}
|
||||
)
|
||||
);
|
||||
dmap.emplace(piecewise_construct,
|
||||
forward_as_tuple("REFAB"),
|
||||
forward_as_tuple(initializer_list<TimeDependency>{
|
||||
{tRC, "ACT", DependencyType::IntraRank, "tRC"},
|
||||
{tRDAACT, "RDA", DependencyType::IntraRank, "tRDAACT"},
|
||||
{tWRPRE + tRP, "WRA", DependencyType::IntraRank, "tWRPRE + tRP"},
|
||||
{tRP, "PREPB", DependencyType::IntraRank, "tRP"},
|
||||
{tRP, "PREAB", DependencyType::IntraRank, "tRP"},
|
||||
{tXP, "PDXP", DependencyType::IntraRank, "tXP"},
|
||||
{tRFC, "REFAB", DependencyType::IntraRank, "tRFC"},
|
||||
{tXS, "SREFEX", DependencyType::IntraRank, "tXS"},
|
||||
{tCK, "CMD_BUS", DependencyType::InterRank, "CommandBus"},
|
||||
}));
|
||||
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("PREAB"),
|
||||
forward_as_tuple(
|
||||
initializer_list<TimeDependency>{
|
||||
{tRAS, "ACT", DependencyType::IntraRank, "tRAS"},
|
||||
{tAL + tRTP, "RD", DependencyType::IntraRank, "tAL + tRTP"},
|
||||
{tAL + tRTP, "RDA", DependencyType::IntraRank, "tAL + tRTP"},
|
||||
{tWRPRE, "WR", DependencyType::IntraRank, "tWRPRE"},
|
||||
{tWRPRE, "WRA", DependencyType::IntraRank, "tWRPRE"},
|
||||
{tXP, "PDXA", DependencyType::IntraRank, "tXP"},
|
||||
{tCK, "CMD_BUS", DependencyType::InterRank, "CommandBus"},
|
||||
}
|
||||
)
|
||||
);
|
||||
dmap.emplace(piecewise_construct,
|
||||
forward_as_tuple("PREAB"),
|
||||
forward_as_tuple(initializer_list<TimeDependency>{
|
||||
{tRAS, "ACT", DependencyType::IntraRank, "tRAS"},
|
||||
{tAL + tRTP, "RD", DependencyType::IntraRank, "tAL + tRTP"},
|
||||
{tAL + tRTP, "RDA", DependencyType::IntraRank, "tAL + tRTP"},
|
||||
{tWRPRE, "WR", DependencyType::IntraRank, "tWRPRE"},
|
||||
{tWRPRE, "WRA", DependencyType::IntraRank, "tWRPRE"},
|
||||
{tXP, "PDXA", DependencyType::IntraRank, "tXP"},
|
||||
{tCK, "CMD_BUS", DependencyType::InterRank, "CommandBus"},
|
||||
}));
|
||||
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("PDEP"),
|
||||
forward_as_tuple(
|
||||
initializer_list<TimeDependency>{
|
||||
{tRDPDEN, "RD", DependencyType::IntraRank, "tRDPDEN"},
|
||||
{tRDPDEN, "RDA", DependencyType::IntraRank, "tRDPDEN"},
|
||||
{tWRAPDEN, "WRA", DependencyType::IntraRank, "tWRAPDEN"},
|
||||
{tPRPDEN, "PREPB", DependencyType::IntraRank, "tPRPDEN"},
|
||||
{tPRPDEN, "PREAB", DependencyType::IntraRank, "tPRPDEN"},
|
||||
{tCKE, "PDXP", DependencyType::IntraRank, "tCKE"},
|
||||
{tREFPDEN, "REFAB", DependencyType::IntraRank, "tREFPDEN"},
|
||||
{tXS, "SREFEX", DependencyType::IntraRank, "tXS"},
|
||||
{tCK, "CMD_BUS", DependencyType::InterRank, "CommandBus"},
|
||||
}
|
||||
)
|
||||
);
|
||||
dmap.emplace(piecewise_construct,
|
||||
forward_as_tuple("PDEP"),
|
||||
forward_as_tuple(initializer_list<TimeDependency>{
|
||||
{tRDPDEN, "RD", DependencyType::IntraRank, "tRDPDEN"},
|
||||
{tRDPDEN, "RDA", DependencyType::IntraRank, "tRDPDEN"},
|
||||
{tWRAPDEN, "WRA", DependencyType::IntraRank, "tWRAPDEN"},
|
||||
{tPRPDEN, "PREPB", DependencyType::IntraRank, "tPRPDEN"},
|
||||
{tPRPDEN, "PREAB", DependencyType::IntraRank, "tPRPDEN"},
|
||||
{tCKE, "PDXP", DependencyType::IntraRank, "tCKE"},
|
||||
{tREFPDEN, "REFAB", DependencyType::IntraRank, "tREFPDEN"},
|
||||
{tXS, "SREFEX", DependencyType::IntraRank, "tXS"},
|
||||
{tCK, "CMD_BUS", DependencyType::InterRank, "CommandBus"},
|
||||
}));
|
||||
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("PDXP"),
|
||||
forward_as_tuple(
|
||||
initializer_list<TimeDependency>{
|
||||
{tPD, "PDEP", DependencyType::IntraRank, "tPD"},
|
||||
{tCK, "CMD_BUS", DependencyType::InterRank, "CommandBus"},
|
||||
}
|
||||
)
|
||||
);
|
||||
dmap.emplace(piecewise_construct,
|
||||
forward_as_tuple("PDXP"),
|
||||
forward_as_tuple(initializer_list<TimeDependency>{
|
||||
{tPD, "PDEP", DependencyType::IntraRank, "tPD"},
|
||||
{tCK, "CMD_BUS", DependencyType::InterRank, "CommandBus"},
|
||||
}));
|
||||
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("SREFEN"),
|
||||
forward_as_tuple(
|
||||
initializer_list<TimeDependency>{
|
||||
{tRC, "ACT", DependencyType::IntraRank, "tRC"},
|
||||
{max({tRDPDEN, tAL + tRTP + tRP}), "RDA", DependencyType::IntraRank, "max(tRDPDEN, tAL + tRTP + tRP)"},
|
||||
{max({tWRAPDEN, tWRPRE + tRP}), "WRA", DependencyType::IntraRank, "max(tWRAPDEN, tWRPRE + tRP)"},
|
||||
{tRP, "PREPB", DependencyType::IntraRank, "tRP"},
|
||||
{tRP, "PREAB", DependencyType::IntraRank, "tRP"},
|
||||
{tXP, "PDXP", DependencyType::IntraRank, "tXP"},
|
||||
{tRFC, "REFAB", DependencyType::IntraRank, "tRFC"},
|
||||
{tXS, "SREFEX", DependencyType::IntraRank, "tXS"},
|
||||
{tCK, "CMD_BUS", DependencyType::InterRank, "CommandBus"},
|
||||
}
|
||||
)
|
||||
);
|
||||
dmap.emplace(piecewise_construct,
|
||||
forward_as_tuple("SREFEN"),
|
||||
forward_as_tuple(initializer_list<TimeDependency>{
|
||||
{tRC, "ACT", DependencyType::IntraRank, "tRC"},
|
||||
{max({tRDPDEN, tAL + tRTP + tRP}),
|
||||
"RDA",
|
||||
DependencyType::IntraRank,
|
||||
"max(tRDPDEN, tAL + tRTP + tRP)"},
|
||||
{max({tWRAPDEN, tWRPRE + tRP}),
|
||||
"WRA",
|
||||
DependencyType::IntraRank,
|
||||
"max(tWRAPDEN, tWRPRE + tRP)"},
|
||||
{tRP, "PREPB", DependencyType::IntraRank, "tRP"},
|
||||
{tRP, "PREAB", DependencyType::IntraRank, "tRP"},
|
||||
{tXP, "PDXP", DependencyType::IntraRank, "tXP"},
|
||||
{tRFC, "REFAB", DependencyType::IntraRank, "tRFC"},
|
||||
{tXS, "SREFEX", DependencyType::IntraRank, "tXS"},
|
||||
{tCK, "CMD_BUS", DependencyType::InterRank, "CommandBus"},
|
||||
}));
|
||||
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("SREFEX"),
|
||||
forward_as_tuple(
|
||||
initializer_list<TimeDependency>{
|
||||
{tCKESR, "SREFEN", DependencyType::IntraRank, "tCKESR"},
|
||||
{tCK, "CMD_BUS", DependencyType::InterRank, "CommandBus"},
|
||||
}
|
||||
)
|
||||
);
|
||||
dmap.emplace(piecewise_construct,
|
||||
forward_as_tuple("SREFEX"),
|
||||
forward_as_tuple(initializer_list<TimeDependency>{
|
||||
{tCKESR, "SREFEN", DependencyType::IntraRank, "tCKESR"},
|
||||
{tCK, "CMD_BUS", DependencyType::InterRank, "CommandBus"},
|
||||
}));
|
||||
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("PDEA"),
|
||||
forward_as_tuple(
|
||||
initializer_list<TimeDependency>{
|
||||
{tACTPDEN, "ACT", DependencyType::IntraRank, "tACTPDEN"},
|
||||
{tRDPDEN, "RD", DependencyType::IntraRank, "tRDPDEN"},
|
||||
{tRDPDEN, "RDA", DependencyType::IntraRank, "tRDPDEN"},
|
||||
{tWRPDEN, "WR", DependencyType::IntraRank, "tWRPDEN"},
|
||||
{tWRAPDEN, "WRA", DependencyType::IntraRank, "tWRAPDEN"},
|
||||
{tPRPDEN, "PREPB", DependencyType::IntraRank, "tPRPDEN"},
|
||||
{tCKE, "PDXA", DependencyType::IntraRank, "tCKE"},
|
||||
{tCK, "CMD_BUS", DependencyType::InterRank, "CommandBus"},
|
||||
}
|
||||
)
|
||||
);
|
||||
dmap.emplace(piecewise_construct,
|
||||
forward_as_tuple("PDEA"),
|
||||
forward_as_tuple(initializer_list<TimeDependency>{
|
||||
{tACTPDEN, "ACT", DependencyType::IntraRank, "tACTPDEN"},
|
||||
{tRDPDEN, "RD", DependencyType::IntraRank, "tRDPDEN"},
|
||||
{tRDPDEN, "RDA", DependencyType::IntraRank, "tRDPDEN"},
|
||||
{tWRPDEN, "WR", DependencyType::IntraRank, "tWRPDEN"},
|
||||
{tWRAPDEN, "WRA", DependencyType::IntraRank, "tWRAPDEN"},
|
||||
{tPRPDEN, "PREPB", DependencyType::IntraRank, "tPRPDEN"},
|
||||
{tCKE, "PDXA", DependencyType::IntraRank, "tCKE"},
|
||||
{tCK, "CMD_BUS", DependencyType::InterRank, "CommandBus"},
|
||||
}));
|
||||
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("PDXA"),
|
||||
forward_as_tuple(
|
||||
initializer_list<TimeDependency>{
|
||||
{tPD, "PDEA", DependencyType::IntraRank, "tPD"},
|
||||
{tCK, "CMD_BUS", DependencyType::InterRank, "CommandBus"},
|
||||
}
|
||||
)
|
||||
);
|
||||
dmap.emplace(piecewise_construct,
|
||||
forward_as_tuple("PDXA"),
|
||||
forward_as_tuple(initializer_list<TimeDependency>{
|
||||
{tPD, "PDEA", DependencyType::IntraRank, "tPD"},
|
||||
{tCK, "CMD_BUS", DependencyType::InterRank, "CommandBus"},
|
||||
}));
|
||||
|
||||
return dmap;
|
||||
return dmap;
|
||||
}
|
||||
|
||||
@@ -37,17 +37,18 @@
|
||||
|
||||
#include "../dramtimedependenciesbase.h"
|
||||
|
||||
class TimeDependenciesInfoDDR4 final : public DRAMTimeDependenciesBase {
|
||||
public:
|
||||
class TimeDependenciesInfoDDR4 final : public DRAMTimeDependenciesBase
|
||||
{
|
||||
public:
|
||||
TimeDependenciesInfoDDR4(const QJsonObject& memspec, const uint clk);
|
||||
|
||||
static const std::vector<QString> getPossiblePhases();
|
||||
|
||||
protected:
|
||||
protected:
|
||||
void mInitializeValues() override;
|
||||
DependencyMap mSpecializedGetDependencies() const override;
|
||||
|
||||
protected:
|
||||
protected:
|
||||
uint burstLength;
|
||||
uint dataRate;
|
||||
|
||||
@@ -95,5 +96,4 @@ class TimeDependenciesInfoDDR4 final : public DRAMTimeDependenciesBase {
|
||||
uint tRDPDEN;
|
||||
uint tWRPDEN;
|
||||
uint tWRAPDEN;
|
||||
|
||||
};
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -38,8 +38,9 @@
|
||||
#include "../dramtimedependenciesbase.h"
|
||||
#include "businessObjects/dramTimeDependencies/dbEntries/specialized/DDR5dbphaseentry.h"
|
||||
|
||||
class TimeDependenciesInfoDDR5 final : public DRAMTimeDependenciesBase {
|
||||
public:
|
||||
class TimeDependenciesInfoDDR5 final : public DRAMTimeDependenciesBase
|
||||
{
|
||||
public:
|
||||
TimeDependenciesInfoDDR5(const QJsonObject& memspec, const uint clk);
|
||||
|
||||
static const std::vector<QString> getPossiblePhases();
|
||||
@@ -47,11 +48,11 @@ class TimeDependenciesInfoDDR5 final : public DRAMTimeDependenciesBase {
|
||||
void rankIDToRankIDs(size_t rankID, size_t& dimmRID, size_t& physRID, size_t& logRID) const;
|
||||
void bankIDToBankInGroup(size_t logicalRankID, size_t bankID, size_t& bankInGroup) const;
|
||||
|
||||
protected:
|
||||
protected:
|
||||
void mInitializeValues() override;
|
||||
DependencyMap mSpecializedGetDependencies() const override;
|
||||
|
||||
protected:
|
||||
protected:
|
||||
uint mNumOfRanks;
|
||||
uint mNumOfDIMMRanks;
|
||||
uint mNumLogicalRanksPerPhysicalRank;
|
||||
@@ -143,5 +144,4 @@ class TimeDependenciesInfoDDR5 final : public DRAMTimeDependenciesBase {
|
||||
|
||||
uint tBURST16;
|
||||
uint tBURST32;
|
||||
|
||||
};
|
||||
|
||||
@@ -37,395 +37,339 @@
|
||||
|
||||
using namespace std;
|
||||
|
||||
TimeDependenciesInfoHBM2::TimeDependenciesInfoHBM2(const QJsonObject& memspec, const uint tCK) : DRAMTimeDependenciesBase(memspec, tCK) {
|
||||
mInitializeValues();
|
||||
TimeDependenciesInfoHBM2::TimeDependenciesInfoHBM2(const QJsonObject& memspec, const uint tCK) :
|
||||
DRAMTimeDependenciesBase(memspec, tCK)
|
||||
{
|
||||
mInitializeValues();
|
||||
}
|
||||
|
||||
void TimeDependenciesInfoHBM2::mInitializeValues() {
|
||||
burstLength = mMemspecJson["memarchitecturespec"].toObject()["burstLength"].toInt();
|
||||
dataRate = mMemspecJson["memarchitecturespec"].toObject()["dataRate"].toInt();
|
||||
void TimeDependenciesInfoHBM2::mInitializeValues()
|
||||
{
|
||||
burstLength = mMemspecJson["memarchitecturespec"].toObject()["burstLength"].toInt();
|
||||
dataRate = mMemspecJson["memarchitecturespec"].toObject()["dataRate"].toInt();
|
||||
|
||||
tRP = tCK * mMemspecJson["memtimingspec"].toObject()["RP"].toInt();
|
||||
tRAS = tCK * mMemspecJson["memtimingspec"].toObject()["RAS"].toInt();
|
||||
tRC = tCK * mMemspecJson["memtimingspec"].toObject()["RC"].toInt();
|
||||
tRCDRD = tCK * mMemspecJson["memtimingspec"].toObject()["RCDRD"].toInt();
|
||||
tRCDWR = tCK * mMemspecJson["memtimingspec"].toObject()["RCDWR"].toInt();
|
||||
tRTP = tCK * mMemspecJson["memtimingspec"].toObject()["RTP"].toInt();
|
||||
tRRDS = tCK * mMemspecJson["memtimingspec"].toObject()["RRDS"].toInt();
|
||||
tRRDL = tCK * mMemspecJson["memtimingspec"].toObject()["RRDL"].toInt();
|
||||
tRL = tCK * mMemspecJson["memtimingspec"].toObject()["RL"].toInt();
|
||||
tPL = tCK * mMemspecJson["memtimingspec"].toObject()["PL"].toInt();
|
||||
tCCDS = tCK * mMemspecJson["memtimingspec"].toObject()["CCDS"].toInt();
|
||||
tCCDL = tCK * mMemspecJson["memtimingspec"].toObject()["CCDL"].toInt();
|
||||
tRTW = tCK * mMemspecJson["memtimingspec"].toObject()["RTW"].toInt();
|
||||
tWL = tCK * mMemspecJson["memtimingspec"].toObject()["WL"].toInt();
|
||||
tWR = tCK * mMemspecJson["memtimingspec"].toObject()["WR"].toInt();
|
||||
tWTRS = tCK * mMemspecJson["memtimingspec"].toObject()["WTRS"].toInt();
|
||||
tWTRL = tCK * mMemspecJson["memtimingspec"].toObject()["WTRL"].toInt();
|
||||
tCKE = tCK * mMemspecJson["memtimingspec"].toObject()["CKE"].toInt();
|
||||
tXP = tCK * mMemspecJson["memtimingspec"].toObject()["XP"].toInt();
|
||||
tRFC = tCK * mMemspecJson["memtimingspec"].toObject()["RFC"].toInt();
|
||||
tRFCSB = tCK * mMemspecJson["memtimingspec"].toObject()["RFCSB"].toInt();
|
||||
tRREFD = tCK * mMemspecJson["memtimingspec"].toObject()["RREFD"].toInt();
|
||||
tXS = tCK * mMemspecJson["memtimingspec"].toObject()["XS"].toInt();
|
||||
tFAW = tCK * mMemspecJson["memtimingspec"].toObject()["FAW"].toInt();
|
||||
tRP = tCK * mMemspecJson["memtimingspec"].toObject()["RP"].toInt();
|
||||
tRAS = tCK * mMemspecJson["memtimingspec"].toObject()["RAS"].toInt();
|
||||
tRC = tCK * mMemspecJson["memtimingspec"].toObject()["RC"].toInt();
|
||||
tRCDRD = tCK * mMemspecJson["memtimingspec"].toObject()["RCDRD"].toInt();
|
||||
tRCDWR = tCK * mMemspecJson["memtimingspec"].toObject()["RCDWR"].toInt();
|
||||
tRTP = tCK * mMemspecJson["memtimingspec"].toObject()["RTP"].toInt();
|
||||
tRRDS = tCK * mMemspecJson["memtimingspec"].toObject()["RRDS"].toInt();
|
||||
tRRDL = tCK * mMemspecJson["memtimingspec"].toObject()["RRDL"].toInt();
|
||||
tRL = tCK * mMemspecJson["memtimingspec"].toObject()["RL"].toInt();
|
||||
tPL = tCK * mMemspecJson["memtimingspec"].toObject()["PL"].toInt();
|
||||
tCCDS = tCK * mMemspecJson["memtimingspec"].toObject()["CCDS"].toInt();
|
||||
tCCDL = tCK * mMemspecJson["memtimingspec"].toObject()["CCDL"].toInt();
|
||||
tRTW = tCK * mMemspecJson["memtimingspec"].toObject()["RTW"].toInt();
|
||||
tWL = tCK * mMemspecJson["memtimingspec"].toObject()["WL"].toInt();
|
||||
tWR = tCK * mMemspecJson["memtimingspec"].toObject()["WR"].toInt();
|
||||
tWTRS = tCK * mMemspecJson["memtimingspec"].toObject()["WTRS"].toInt();
|
||||
tWTRL = tCK * mMemspecJson["memtimingspec"].toObject()["WTRL"].toInt();
|
||||
tCKE = tCK * mMemspecJson["memtimingspec"].toObject()["CKE"].toInt();
|
||||
tXP = tCK * mMemspecJson["memtimingspec"].toObject()["XP"].toInt();
|
||||
tRFC = tCK * mMemspecJson["memtimingspec"].toObject()["RFC"].toInt();
|
||||
tRFCSB = tCK * mMemspecJson["memtimingspec"].toObject()["RFCSB"].toInt();
|
||||
tRREFD = tCK * mMemspecJson["memtimingspec"].toObject()["RREFD"].toInt();
|
||||
tXS = tCK * mMemspecJson["memtimingspec"].toObject()["XS"].toInt();
|
||||
tFAW = tCK * mMemspecJson["memtimingspec"].toObject()["FAW"].toInt();
|
||||
|
||||
tPD = tCKE;
|
||||
tCKESR = tCKE + tCK;
|
||||
tPD = tCKE;
|
||||
tCKESR = tCKE + tCK;
|
||||
|
||||
tBURST = (uint) (burstLength / (float) dataRate) * tCK;
|
||||
tRDPDE = tRL + tPL + tBURST + tCK;
|
||||
tRDSRE = tRDPDE;
|
||||
tWRPRE = tWL + tBURST + tWR;
|
||||
tWRPDE = tWL + tPL + tBURST + tCK + tWR;
|
||||
tWRAPDE = tWL + tPL + tBURST + tCK + tWR;
|
||||
tWRRDS = tWL + tBURST + tWTRS;
|
||||
tWRRDL = tWL + tBURST + tWTRL;
|
||||
tBURST = (uint)(burstLength / (float)dataRate) * tCK;
|
||||
tRDPDE = tRL + tPL + tBURST + tCK;
|
||||
tRDSRE = tRDPDE;
|
||||
tWRPRE = tWL + tBURST + tWR;
|
||||
tWRPDE = tWL + tPL + tBURST + tCK + tWR;
|
||||
tWRAPDE = tWL + tPL + tBURST + tCK + tWR;
|
||||
tWRRDS = tWL + tBURST + tWTRS;
|
||||
tWRRDL = tWL + tBURST + tWTRL;
|
||||
|
||||
mPools.insert({
|
||||
"RAS_BUS", {
|
||||
1, {
|
||||
{"ACT", 2*tCK},
|
||||
{"PREPB", tCK},
|
||||
{"PREAB", tCK},
|
||||
{"REFPB", tCK},
|
||||
{"REFAB", tCK},
|
||||
{"PDEA", tCK},
|
||||
{"PDXA", tCK},
|
||||
{"PDEP", tCK},
|
||||
{"PDXP", tCK},
|
||||
{"SREFEN", tCK},
|
||||
{"SREFEX", tCK},
|
||||
}
|
||||
}
|
||||
});
|
||||
mPools.insert({"RAS_BUS",
|
||||
{1,
|
||||
{
|
||||
{"ACT", 2 * tCK},
|
||||
{"PREPB", tCK},
|
||||
{"PREAB", tCK},
|
||||
{"REFPB", tCK},
|
||||
{"REFAB", tCK},
|
||||
{"PDEA", tCK},
|
||||
{"PDXA", tCK},
|
||||
{"PDEP", tCK},
|
||||
{"PDXP", tCK},
|
||||
{"SREFEN", tCK},
|
||||
{"SREFEX", tCK},
|
||||
}}});
|
||||
|
||||
mPools.insert({
|
||||
"CAS_BUS", {
|
||||
1, {
|
||||
{"RD", tCK},
|
||||
{"RDA", tCK},
|
||||
{"WR", tCK},
|
||||
{"WRA", tCK},
|
||||
{"PDEA", tCK},
|
||||
{"PDXA", tCK},
|
||||
{"PDEP", tCK},
|
||||
{"PDXP", tCK},
|
||||
{"SREFEN", tCK},
|
||||
{"SREFEX", tCK},
|
||||
}
|
||||
}
|
||||
});
|
||||
mPools.insert({"CAS_BUS",
|
||||
{1,
|
||||
{
|
||||
{"RD", tCK},
|
||||
{"RDA", tCK},
|
||||
{"WR", tCK},
|
||||
{"WRA", tCK},
|
||||
{"PDEA", tCK},
|
||||
{"PDXA", tCK},
|
||||
{"PDEP", tCK},
|
||||
{"PDXP", tCK},
|
||||
{"SREFEN", tCK},
|
||||
{"SREFEX", tCK},
|
||||
}}});
|
||||
|
||||
mPools.insert({
|
||||
"NAW", {
|
||||
4, {
|
||||
{"ACT", tFAW},
|
||||
{"REFPB", tFAW},
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
mPools.insert({"NAW",
|
||||
{4,
|
||||
{
|
||||
{"ACT", tFAW},
|
||||
{"REFPB", tFAW},
|
||||
}}});
|
||||
}
|
||||
|
||||
const std::vector<QString> TimeDependenciesInfoHBM2::getPossiblePhases() {
|
||||
return {
|
||||
"ACT",
|
||||
"RD",
|
||||
"WR",
|
||||
"PREPB",
|
||||
"RDA",
|
||||
"WRA",
|
||||
"REFPB",
|
||||
"REFAB",
|
||||
"PREAB",
|
||||
"PDEP",
|
||||
"PDXP",
|
||||
"SREFEN",
|
||||
"SREFEX",
|
||||
"PDEA",
|
||||
"PDXA",
|
||||
};
|
||||
const std::vector<QString> TimeDependenciesInfoHBM2::getPossiblePhases()
|
||||
{
|
||||
return {
|
||||
"ACT",
|
||||
"RD",
|
||||
"WR",
|
||||
"PREPB",
|
||||
"RDA",
|
||||
"WRA",
|
||||
"REFPB",
|
||||
"REFAB",
|
||||
"PREAB",
|
||||
"PDEP",
|
||||
"PDXP",
|
||||
"SREFEN",
|
||||
"SREFEX",
|
||||
"PDEA",
|
||||
"PDXA",
|
||||
};
|
||||
}
|
||||
|
||||
DependencyMap TimeDependenciesInfoHBM2::mSpecializedGetDependencies() const {
|
||||
DependencyMap dmap;
|
||||
DependencyMap TimeDependenciesInfoHBM2::mSpecializedGetDependencies() const
|
||||
{
|
||||
DependencyMap dmap;
|
||||
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("ACT"),
|
||||
forward_as_tuple(
|
||||
initializer_list<TimeDependency>{
|
||||
{tRC, "ACT", DependencyType::IntraBank, "tRC"},
|
||||
{tRRDL, "ACT", DependencyType::IntraBankGroup, "tRRDL"},
|
||||
{tRRDS, "ACT", DependencyType::IntraRank, "tRRDS"},
|
||||
{tRTP + tRP - tCK, "RDA", DependencyType::IntraBank, "tRTP + tRP - tCK"},
|
||||
{tWRPRE + tRP - tCK, "WRA", DependencyType::IntraBank, "tWRPRE + tRP - tCK"},
|
||||
{tRP - tCK, "PREPB", DependencyType::IntraBank, "tRP - tCK"},
|
||||
{tRP - tCK, "PREAB", DependencyType::IntraRank, "tRP - tCK"},
|
||||
{tXP - tCK, "PDXA", DependencyType::IntraRank, "tXP - tCK"},
|
||||
{tXP - tCK, "PDXP", DependencyType::IntraRank, "tXP - tCK"},
|
||||
{tRFC - tCK, "REFAB", DependencyType::IntraRank, "tRFC - tCK"},
|
||||
{tRFCSB - tCK, "REFPB", DependencyType::IntraBank, "tRFCSB - tCK"},
|
||||
{tRREFD - tCK, "REFPB", DependencyType::IntraBankGroup, "tRREFD - tCK"},
|
||||
{tRREFD - tCK, "REFPB", DependencyType::IntraRank, "tRREFD - tCK"},
|
||||
{tXS - tCK, "SREFEX", DependencyType::IntraRank, "tXS - tCK"},
|
||||
{2 * tCK, "RAS_BUS", DependencyType::InterRank, "2 * tCK"},
|
||||
{tFAW, "NAW", DependencyType::IntraRank, "tFAW"},
|
||||
}
|
||||
)
|
||||
);
|
||||
dmap.emplace(piecewise_construct,
|
||||
forward_as_tuple("ACT"),
|
||||
forward_as_tuple(initializer_list<TimeDependency>{
|
||||
{tRC, "ACT", DependencyType::IntraBank, "tRC"},
|
||||
{tRRDL, "ACT", DependencyType::IntraBankGroup, "tRRDL"},
|
||||
{tRRDS, "ACT", DependencyType::IntraRank, "tRRDS"},
|
||||
{tRTP + tRP - tCK, "RDA", DependencyType::IntraBank, "tRTP + tRP - tCK"},
|
||||
{tWRPRE + tRP - tCK, "WRA", DependencyType::IntraBank, "tWRPRE + tRP - tCK"},
|
||||
{tRP - tCK, "PREPB", DependencyType::IntraBank, "tRP - tCK"},
|
||||
{tRP - tCK, "PREAB", DependencyType::IntraRank, "tRP - tCK"},
|
||||
{tXP - tCK, "PDXA", DependencyType::IntraRank, "tXP - tCK"},
|
||||
{tXP - tCK, "PDXP", DependencyType::IntraRank, "tXP - tCK"},
|
||||
{tRFC - tCK, "REFAB", DependencyType::IntraRank, "tRFC - tCK"},
|
||||
{tRFCSB - tCK, "REFPB", DependencyType::IntraBank, "tRFCSB - tCK"},
|
||||
{tRREFD - tCK, "REFPB", DependencyType::IntraBankGroup, "tRREFD - tCK"},
|
||||
{tRREFD - tCK, "REFPB", DependencyType::IntraRank, "tRREFD - tCK"},
|
||||
{tXS - tCK, "SREFEX", DependencyType::IntraRank, "tXS - tCK"},
|
||||
{2 * tCK, "RAS_BUS", DependencyType::InterRank, "2 * tCK"},
|
||||
{tFAW, "NAW", DependencyType::IntraRank, "tFAW"},
|
||||
}));
|
||||
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("RD"),
|
||||
forward_as_tuple(
|
||||
initializer_list<TimeDependency>{
|
||||
{tRCDRD + tCK, "ACT", DependencyType::IntraBank, "tRCDRD + tCK"},
|
||||
{tCCDL, "RD", DependencyType::IntraBank, "tCCDL"},
|
||||
{tCCDL, "RD", DependencyType::IntraBankGroup, "tCCDL"},
|
||||
{tCCDS, "RD", DependencyType::IntraRank, "tCCDS"},
|
||||
{tCCDL, "RDA", DependencyType::IntraBankGroup, "tCCDL"},
|
||||
{tCCDS, "RDA", DependencyType::IntraRank, "tCCDS"},
|
||||
{tWRRDL, "WR", DependencyType::IntraBank, "tWRRDL"},
|
||||
{tWRRDL, "WR", DependencyType::IntraBankGroup, "tWRRDL"},
|
||||
{tWRRDS, "WR", DependencyType::IntraRank, "tWRRDS"},
|
||||
{tWRRDL, "WRA", DependencyType::IntraBankGroup, "tWRRDL"},
|
||||
{tWRRDS, "WRA", DependencyType::IntraRank, "tWRRDS"},
|
||||
{tXP, "PDXA", DependencyType::IntraRank, "tXP"},
|
||||
{tCK, "CAS_BUS", DependencyType::InterRank, "tCK"},
|
||||
}
|
||||
)
|
||||
);
|
||||
dmap.emplace(piecewise_construct,
|
||||
forward_as_tuple("RD"),
|
||||
forward_as_tuple(initializer_list<TimeDependency>{
|
||||
{tRCDRD + tCK, "ACT", DependencyType::IntraBank, "tRCDRD + tCK"},
|
||||
{tCCDL, "RD", DependencyType::IntraBank, "tCCDL"},
|
||||
{tCCDL, "RD", DependencyType::IntraBankGroup, "tCCDL"},
|
||||
{tCCDS, "RD", DependencyType::IntraRank, "tCCDS"},
|
||||
{tCCDL, "RDA", DependencyType::IntraBankGroup, "tCCDL"},
|
||||
{tCCDS, "RDA", DependencyType::IntraRank, "tCCDS"},
|
||||
{tWRRDL, "WR", DependencyType::IntraBank, "tWRRDL"},
|
||||
{tWRRDL, "WR", DependencyType::IntraBankGroup, "tWRRDL"},
|
||||
{tWRRDS, "WR", DependencyType::IntraRank, "tWRRDS"},
|
||||
{tWRRDL, "WRA", DependencyType::IntraBankGroup, "tWRRDL"},
|
||||
{tWRRDS, "WRA", DependencyType::IntraRank, "tWRRDS"},
|
||||
{tXP, "PDXA", DependencyType::IntraRank, "tXP"},
|
||||
{tCK, "CAS_BUS", DependencyType::InterRank, "tCK"},
|
||||
}));
|
||||
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("WR"),
|
||||
forward_as_tuple(
|
||||
initializer_list<TimeDependency>{
|
||||
{tRCDWR + tCK, "ACT", DependencyType::IntraBank, "tRCDWR + tCK"},
|
||||
{tRTW, "RD", DependencyType::IntraBank, "tRTW"},
|
||||
{tRTW, "RD", DependencyType::IntraBankGroup, "tRTW"},
|
||||
{tRTW, "RD", DependencyType::IntraRank, "tRTW"},
|
||||
{tRTW, "RDA", DependencyType::IntraBankGroup, "tRTW"},
|
||||
{tRTW, "RDA", DependencyType::IntraRank, "tRTW"},
|
||||
{tCCDL, "WR", DependencyType::IntraBank, "tCCDL"},
|
||||
{tCCDL, "WR", DependencyType::IntraBankGroup, "tCCDL"},
|
||||
{tCCDS, "WR", DependencyType::IntraRank, "tCCDS"},
|
||||
{tCCDL, "WRA", DependencyType::IntraBankGroup, "tCCDL"},
|
||||
{tCCDS, "WRA", DependencyType::IntraRank, "tCCDS"},
|
||||
{tXP, "PDXA", DependencyType::IntraRank, "tXP"},
|
||||
{tCK, "CAS_BUS", DependencyType::InterRank, "tCK"},
|
||||
}
|
||||
)
|
||||
);
|
||||
dmap.emplace(piecewise_construct,
|
||||
forward_as_tuple("WR"),
|
||||
forward_as_tuple(initializer_list<TimeDependency>{
|
||||
{tRCDWR + tCK, "ACT", DependencyType::IntraBank, "tRCDWR + tCK"},
|
||||
{tRTW, "RD", DependencyType::IntraBank, "tRTW"},
|
||||
{tRTW, "RD", DependencyType::IntraBankGroup, "tRTW"},
|
||||
{tRTW, "RD", DependencyType::IntraRank, "tRTW"},
|
||||
{tRTW, "RDA", DependencyType::IntraBankGroup, "tRTW"},
|
||||
{tRTW, "RDA", DependencyType::IntraRank, "tRTW"},
|
||||
{tCCDL, "WR", DependencyType::IntraBank, "tCCDL"},
|
||||
{tCCDL, "WR", DependencyType::IntraBankGroup, "tCCDL"},
|
||||
{tCCDS, "WR", DependencyType::IntraRank, "tCCDS"},
|
||||
{tCCDL, "WRA", DependencyType::IntraBankGroup, "tCCDL"},
|
||||
{tCCDS, "WRA", DependencyType::IntraRank, "tCCDS"},
|
||||
{tXP, "PDXA", DependencyType::IntraRank, "tXP"},
|
||||
{tCK, "CAS_BUS", DependencyType::InterRank, "tCK"},
|
||||
}));
|
||||
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("PREPB"),
|
||||
forward_as_tuple(
|
||||
initializer_list<TimeDependency>{
|
||||
{tRAS + tCK, "ACT", DependencyType::IntraBank, "tRAS + tCK"},
|
||||
{tRTP, "RD", DependencyType::IntraBank, "tRTP"},
|
||||
{tWRPRE, "WR", DependencyType::IntraBank, "tWRPRE"},
|
||||
{tXP, "PDXA", DependencyType::IntraRank, "tXP"},
|
||||
{tCK, "RAS_BUS", DependencyType::InterRank, "tCK"},
|
||||
}
|
||||
)
|
||||
);
|
||||
dmap.emplace(piecewise_construct,
|
||||
forward_as_tuple("PREPB"),
|
||||
forward_as_tuple(initializer_list<TimeDependency>{
|
||||
{tRAS + tCK, "ACT", DependencyType::IntraBank, "tRAS + tCK"},
|
||||
{tRTP, "RD", DependencyType::IntraBank, "tRTP"},
|
||||
{tWRPRE, "WR", DependencyType::IntraBank, "tWRPRE"},
|
||||
{tXP, "PDXA", DependencyType::IntraRank, "tXP"},
|
||||
{tCK, "RAS_BUS", DependencyType::InterRank, "tCK"},
|
||||
}));
|
||||
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("RDA"),
|
||||
forward_as_tuple(
|
||||
initializer_list<TimeDependency>{
|
||||
{tRCDRD + tCK, "ACT", DependencyType::IntraBank, "tRCDRD + tCK"},
|
||||
{tCCDL, "RD", DependencyType::IntraBank, "tCCDL"},
|
||||
{tCCDL, "RD", DependencyType::IntraBankGroup, "tCCDL"},
|
||||
{tCCDS, "RD", DependencyType::IntraRank, "tCCDS"},
|
||||
{tCCDL, "RDA", DependencyType::IntraBankGroup, "tCCDL"},
|
||||
{tCCDS, "RDA", DependencyType::IntraRank, "tCCDS"},
|
||||
{tWL + tBURST + max({tWR - tRTP, tWTRL}), "WR", DependencyType::IntraBank, "tWL + tBURST + max(tWR - tRTP, tWTRL)"},
|
||||
{tWRRDL, "WR", DependencyType::IntraBankGroup, "tWRRDL"},
|
||||
{tWRRDS, "WR", DependencyType::IntraRank, "tWRRDS"},
|
||||
{tWRRDL, "WRA", DependencyType::IntraBankGroup, "tWRRDL"},
|
||||
{tWRRDS, "WRA", DependencyType::IntraRank, "tWRRDS"},
|
||||
{tXP, "PDXA", DependencyType::IntraRank, "tXP"},
|
||||
{tCK, "CAS_BUS", DependencyType::InterRank, "tCK"},
|
||||
}
|
||||
)
|
||||
);
|
||||
dmap.emplace(piecewise_construct,
|
||||
forward_as_tuple("RDA"),
|
||||
forward_as_tuple(initializer_list<TimeDependency>{
|
||||
{tRCDRD + tCK, "ACT", DependencyType::IntraBank, "tRCDRD + tCK"},
|
||||
{tCCDL, "RD", DependencyType::IntraBank, "tCCDL"},
|
||||
{tCCDL, "RD", DependencyType::IntraBankGroup, "tCCDL"},
|
||||
{tCCDS, "RD", DependencyType::IntraRank, "tCCDS"},
|
||||
{tCCDL, "RDA", DependencyType::IntraBankGroup, "tCCDL"},
|
||||
{tCCDS, "RDA", DependencyType::IntraRank, "tCCDS"},
|
||||
{tWL + tBURST + max({tWR - tRTP, tWTRL}),
|
||||
"WR",
|
||||
DependencyType::IntraBank,
|
||||
"tWL + tBURST + max(tWR - tRTP, tWTRL)"},
|
||||
{tWRRDL, "WR", DependencyType::IntraBankGroup, "tWRRDL"},
|
||||
{tWRRDS, "WR", DependencyType::IntraRank, "tWRRDS"},
|
||||
{tWRRDL, "WRA", DependencyType::IntraBankGroup, "tWRRDL"},
|
||||
{tWRRDS, "WRA", DependencyType::IntraRank, "tWRRDS"},
|
||||
{tXP, "PDXA", DependencyType::IntraRank, "tXP"},
|
||||
{tCK, "CAS_BUS", DependencyType::InterRank, "tCK"},
|
||||
}));
|
||||
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("WRA"),
|
||||
forward_as_tuple(
|
||||
initializer_list<TimeDependency>{
|
||||
{tRCDWR + tCK, "ACT", DependencyType::IntraBank, "tRCDWR + tCK"},
|
||||
{tRTW, "RD", DependencyType::IntraBank, "tRTW"},
|
||||
{tRTW, "RD", DependencyType::IntraBankGroup, "tRTW"},
|
||||
{tRTW, "RD", DependencyType::IntraRank, "tRTW"},
|
||||
{tRTW, "RDA", DependencyType::IntraBankGroup, "tRTW"},
|
||||
{tRTW, "RDA", DependencyType::IntraRank, "tRTW"},
|
||||
{tCCDL, "WR", DependencyType::IntraBank, "tCCDL"},
|
||||
{tCCDL, "WR", DependencyType::IntraBankGroup, "tCCDL"},
|
||||
{tCCDS, "WR", DependencyType::IntraRank, "tCCDS"},
|
||||
{tCCDL, "WRA", DependencyType::IntraBankGroup, "tCCDL"},
|
||||
{tCCDS, "WRA", DependencyType::IntraRank, "tCCDS"},
|
||||
{tXP, "PDXA", DependencyType::IntraRank, "tXP"},
|
||||
{tCK, "CAS_BUS", DependencyType::InterRank, "tCK"},
|
||||
}
|
||||
)
|
||||
);
|
||||
dmap.emplace(piecewise_construct,
|
||||
forward_as_tuple("WRA"),
|
||||
forward_as_tuple(initializer_list<TimeDependency>{
|
||||
{tRCDWR + tCK, "ACT", DependencyType::IntraBank, "tRCDWR + tCK"},
|
||||
{tRTW, "RD", DependencyType::IntraBank, "tRTW"},
|
||||
{tRTW, "RD", DependencyType::IntraBankGroup, "tRTW"},
|
||||
{tRTW, "RD", DependencyType::IntraRank, "tRTW"},
|
||||
{tRTW, "RDA", DependencyType::IntraBankGroup, "tRTW"},
|
||||
{tRTW, "RDA", DependencyType::IntraRank, "tRTW"},
|
||||
{tCCDL, "WR", DependencyType::IntraBank, "tCCDL"},
|
||||
{tCCDL, "WR", DependencyType::IntraBankGroup, "tCCDL"},
|
||||
{tCCDS, "WR", DependencyType::IntraRank, "tCCDS"},
|
||||
{tCCDL, "WRA", DependencyType::IntraBankGroup, "tCCDL"},
|
||||
{tCCDS, "WRA", DependencyType::IntraRank, "tCCDS"},
|
||||
{tXP, "PDXA", DependencyType::IntraRank, "tXP"},
|
||||
{tCK, "CAS_BUS", DependencyType::InterRank, "tCK"},
|
||||
}));
|
||||
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("REFPB"),
|
||||
forward_as_tuple(
|
||||
initializer_list<TimeDependency>{
|
||||
{tRC + tCK, "ACT", DependencyType::IntraBank, "tRC + tCK"},
|
||||
{tRRDL + tCK, "ACT", DependencyType::IntraBankGroup, "tRRDL + tCK"},
|
||||
{tRRDS + tCK, "ACT", DependencyType::IntraRank, "tRRDS + tCK"},
|
||||
{tRTP + tRP, "RDA", DependencyType::IntraBank, "tRTP + tRP"},
|
||||
{tWRPRE + tRP, "WRA", DependencyType::IntraBank, "tWRPRE + tRP"},
|
||||
{tRP, "PREPB", DependencyType::IntraBank, "tRP"},
|
||||
{tRP, "PREAB", DependencyType::IntraRank, "tRP"},
|
||||
{tXP, "PDXA", DependencyType::IntraRank, "tXP"},
|
||||
{tXP, "PDXP", DependencyType::IntraRank, "tXP"},
|
||||
{tRFC, "REFAB", DependencyType::IntraRank, "tRFC"},
|
||||
{tRFCSB, "REFPB", DependencyType::IntraBank, "tRFCSB"},
|
||||
{tRREFD, "REFPB", DependencyType::IntraBankGroup, "tRREFD"},
|
||||
{tRREFD, "REFPB", DependencyType::IntraRank, "tRREFD"},
|
||||
{tXS, "SREFEX", DependencyType::IntraRank, "tXS"},
|
||||
{tCK, "RAS_BUS", DependencyType::InterRank, "tCK"},
|
||||
{tFAW, "NAW", DependencyType::IntraRank, "tFAW"},
|
||||
}
|
||||
)
|
||||
);
|
||||
dmap.emplace(piecewise_construct,
|
||||
forward_as_tuple("REFPB"),
|
||||
forward_as_tuple(initializer_list<TimeDependency>{
|
||||
{tRC + tCK, "ACT", DependencyType::IntraBank, "tRC + tCK"},
|
||||
{tRRDL + tCK, "ACT", DependencyType::IntraBankGroup, "tRRDL + tCK"},
|
||||
{tRRDS + tCK, "ACT", DependencyType::IntraRank, "tRRDS + tCK"},
|
||||
{tRTP + tRP, "RDA", DependencyType::IntraBank, "tRTP + tRP"},
|
||||
{tWRPRE + tRP, "WRA", DependencyType::IntraBank, "tWRPRE + tRP"},
|
||||
{tRP, "PREPB", DependencyType::IntraBank, "tRP"},
|
||||
{tRP, "PREAB", DependencyType::IntraRank, "tRP"},
|
||||
{tXP, "PDXA", DependencyType::IntraRank, "tXP"},
|
||||
{tXP, "PDXP", DependencyType::IntraRank, "tXP"},
|
||||
{tRFC, "REFAB", DependencyType::IntraRank, "tRFC"},
|
||||
{tRFCSB, "REFPB", DependencyType::IntraBank, "tRFCSB"},
|
||||
{tRREFD, "REFPB", DependencyType::IntraBankGroup, "tRREFD"},
|
||||
{tRREFD, "REFPB", DependencyType::IntraRank, "tRREFD"},
|
||||
{tXS, "SREFEX", DependencyType::IntraRank, "tXS"},
|
||||
{tCK, "RAS_BUS", DependencyType::InterRank, "tCK"},
|
||||
{tFAW, "NAW", DependencyType::IntraRank, "tFAW"},
|
||||
}));
|
||||
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("REFAB"),
|
||||
forward_as_tuple(
|
||||
initializer_list<TimeDependency>{
|
||||
{tRC + tCK, "ACT", DependencyType::IntraRank, "tRC + tCK"},
|
||||
{tRTP + tRP, "RDA", DependencyType::IntraRank, "tRTP + tRP"},
|
||||
{tWRPRE + tRP, "WRA", DependencyType::IntraRank, "tWRPRE + tRP"},
|
||||
{tRP, "PREPB", DependencyType::IntraRank, "tRP"},
|
||||
{tRP, "PREAB", DependencyType::IntraRank, "tRP"},
|
||||
{tXP, "PDXP", DependencyType::IntraRank, "tXP"},
|
||||
{tRFC, "REFAB", DependencyType::IntraRank, "tRFC"},
|
||||
{tRFCSB, "REFPB", DependencyType::IntraRank, "tRFCSB"},
|
||||
{tXS, "SREFEX", DependencyType::IntraRank, "tXS"},
|
||||
{tCK, "RAS_BUS", DependencyType::InterRank, "tCK"},
|
||||
}
|
||||
)
|
||||
);
|
||||
dmap.emplace(piecewise_construct,
|
||||
forward_as_tuple("REFAB"),
|
||||
forward_as_tuple(initializer_list<TimeDependency>{
|
||||
{tRC + tCK, "ACT", DependencyType::IntraRank, "tRC + tCK"},
|
||||
{tRTP + tRP, "RDA", DependencyType::IntraRank, "tRTP + tRP"},
|
||||
{tWRPRE + tRP, "WRA", DependencyType::IntraRank, "tWRPRE + tRP"},
|
||||
{tRP, "PREPB", DependencyType::IntraRank, "tRP"},
|
||||
{tRP, "PREAB", DependencyType::IntraRank, "tRP"},
|
||||
{tXP, "PDXP", DependencyType::IntraRank, "tXP"},
|
||||
{tRFC, "REFAB", DependencyType::IntraRank, "tRFC"},
|
||||
{tRFCSB, "REFPB", DependencyType::IntraRank, "tRFCSB"},
|
||||
{tXS, "SREFEX", DependencyType::IntraRank, "tXS"},
|
||||
{tCK, "RAS_BUS", DependencyType::InterRank, "tCK"},
|
||||
}));
|
||||
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("PREAB"),
|
||||
forward_as_tuple(
|
||||
initializer_list<TimeDependency>{
|
||||
{tRAS + tCK, "ACT", DependencyType::IntraRank, "tRAS + tCK"},
|
||||
{tRTP, "RD", DependencyType::IntraRank, "tRTP"},
|
||||
{tRTP, "RDA", DependencyType::IntraRank, "tRTP"},
|
||||
{tWRPRE, "WR", DependencyType::IntraRank, "tWRPRE"},
|
||||
{tWRPRE, "WRA", DependencyType::IntraRank, "tWRPRE"},
|
||||
{tXP, "PDXA", DependencyType::IntraRank, "tXP"},
|
||||
{tRFCSB, "REFPB", DependencyType::IntraRank, "tRFCSB"},
|
||||
{tCK, "RAS_BUS", DependencyType::InterRank, "tCK"},
|
||||
}
|
||||
)
|
||||
);
|
||||
dmap.emplace(piecewise_construct,
|
||||
forward_as_tuple("PREAB"),
|
||||
forward_as_tuple(initializer_list<TimeDependency>{
|
||||
{tRAS + tCK, "ACT", DependencyType::IntraRank, "tRAS + tCK"},
|
||||
{tRTP, "RD", DependencyType::IntraRank, "tRTP"},
|
||||
{tRTP, "RDA", DependencyType::IntraRank, "tRTP"},
|
||||
{tWRPRE, "WR", DependencyType::IntraRank, "tWRPRE"},
|
||||
{tWRPRE, "WRA", DependencyType::IntraRank, "tWRPRE"},
|
||||
{tXP, "PDXA", DependencyType::IntraRank, "tXP"},
|
||||
{tRFCSB, "REFPB", DependencyType::IntraRank, "tRFCSB"},
|
||||
{tCK, "RAS_BUS", DependencyType::InterRank, "tCK"},
|
||||
}));
|
||||
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("PDEP"),
|
||||
forward_as_tuple(
|
||||
initializer_list<TimeDependency>{
|
||||
{tRDPDE, "RD", DependencyType::IntraRank, "tRDPDE"},
|
||||
{tRDPDE, "RDA", DependencyType::IntraRank, "tRDPDE"},
|
||||
{tWRAPDE, "WRA", DependencyType::IntraRank, "tWRAPDE"},
|
||||
{tCKE, "PDXP", DependencyType::IntraRank, "tCKE"},
|
||||
{tXS, "SREFEX", DependencyType::IntraRank, "tXS"},
|
||||
{tCK, "RAS_BUS", DependencyType::InterRank, "tCK"},
|
||||
{tCK, "CAS_BUS", DependencyType::InterRank, "tCK"},
|
||||
}
|
||||
)
|
||||
);
|
||||
dmap.emplace(piecewise_construct,
|
||||
forward_as_tuple("PDEP"),
|
||||
forward_as_tuple(initializer_list<TimeDependency>{
|
||||
{tRDPDE, "RD", DependencyType::IntraRank, "tRDPDE"},
|
||||
{tRDPDE, "RDA", DependencyType::IntraRank, "tRDPDE"},
|
||||
{tWRAPDE, "WRA", DependencyType::IntraRank, "tWRAPDE"},
|
||||
{tCKE, "PDXP", DependencyType::IntraRank, "tCKE"},
|
||||
{tXS, "SREFEX", DependencyType::IntraRank, "tXS"},
|
||||
{tCK, "RAS_BUS", DependencyType::InterRank, "tCK"},
|
||||
{tCK, "CAS_BUS", DependencyType::InterRank, "tCK"},
|
||||
}));
|
||||
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("PDXP"),
|
||||
forward_as_tuple(
|
||||
initializer_list<TimeDependency>{
|
||||
{tPD, "PDEP", DependencyType::IntraRank, "tPD"},
|
||||
{tCK, "RAS_BUS", DependencyType::InterRank, "tCK"},
|
||||
{tCK, "CAS_BUS", DependencyType::InterRank, "tCK"},
|
||||
}
|
||||
)
|
||||
);
|
||||
dmap.emplace(piecewise_construct,
|
||||
forward_as_tuple("PDXP"),
|
||||
forward_as_tuple(initializer_list<TimeDependency>{
|
||||
{tPD, "PDEP", DependencyType::IntraRank, "tPD"},
|
||||
{tCK, "RAS_BUS", DependencyType::InterRank, "tCK"},
|
||||
{tCK, "CAS_BUS", DependencyType::InterRank, "tCK"},
|
||||
}));
|
||||
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("SREFEN"),
|
||||
forward_as_tuple(
|
||||
initializer_list<TimeDependency>{
|
||||
{tRC + tCK, "ACT", DependencyType::IntraRank, "tRC + tCK"},
|
||||
{max({tRTP + tRP, tRDSRE}), "RDA", DependencyType::IntraRank, "max(tRTP + tRP, tRDSRE)"},
|
||||
{tWRPRE + tRP, "WRA", DependencyType::IntraRank, "tWRPRE + tRP"},
|
||||
{tRP, "PREPB", DependencyType::IntraRank, "tRP"},
|
||||
{tRP, "PREAB", DependencyType::IntraRank, "tRP"},
|
||||
{tXP, "PDXP", DependencyType::IntraRank, "tXP"},
|
||||
{tRFC, "REFAB", DependencyType::IntraRank, "tRFC"},
|
||||
{tRFCSB, "REFPB", DependencyType::IntraRank, "tRFCSB"},
|
||||
{tXS, "SREFEX", DependencyType::IntraRank, "tXS"},
|
||||
{tCK, "RAS_BUS", DependencyType::InterRank, "tCK"},
|
||||
{tCK, "CAS_BUS", DependencyType::InterRank, "tCK"},
|
||||
}
|
||||
)
|
||||
);
|
||||
dmap.emplace(piecewise_construct,
|
||||
forward_as_tuple("SREFEN"),
|
||||
forward_as_tuple(initializer_list<TimeDependency>{
|
||||
{tRC + tCK, "ACT", DependencyType::IntraRank, "tRC + tCK"},
|
||||
{max({tRTP + tRP, tRDSRE}),
|
||||
"RDA",
|
||||
DependencyType::IntraRank,
|
||||
"max(tRTP + tRP, tRDSRE)"},
|
||||
{tWRPRE + tRP, "WRA", DependencyType::IntraRank, "tWRPRE + tRP"},
|
||||
{tRP, "PREPB", DependencyType::IntraRank, "tRP"},
|
||||
{tRP, "PREAB", DependencyType::IntraRank, "tRP"},
|
||||
{tXP, "PDXP", DependencyType::IntraRank, "tXP"},
|
||||
{tRFC, "REFAB", DependencyType::IntraRank, "tRFC"},
|
||||
{tRFCSB, "REFPB", DependencyType::IntraRank, "tRFCSB"},
|
||||
{tXS, "SREFEX", DependencyType::IntraRank, "tXS"},
|
||||
{tCK, "RAS_BUS", DependencyType::InterRank, "tCK"},
|
||||
{tCK, "CAS_BUS", DependencyType::InterRank, "tCK"},
|
||||
}));
|
||||
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("SREFEX"),
|
||||
forward_as_tuple(
|
||||
initializer_list<TimeDependency>{
|
||||
{tCKESR, "SREFEN", DependencyType::IntraRank, "tCKESR"},
|
||||
{tCK, "RAS_BUS", DependencyType::InterRank, "tCK"},
|
||||
{tCK, "CAS_BUS", DependencyType::InterRank, "tCK"},
|
||||
}
|
||||
)
|
||||
);
|
||||
dmap.emplace(piecewise_construct,
|
||||
forward_as_tuple("SREFEX"),
|
||||
forward_as_tuple(initializer_list<TimeDependency>{
|
||||
{tCKESR, "SREFEN", DependencyType::IntraRank, "tCKESR"},
|
||||
{tCK, "RAS_BUS", DependencyType::InterRank, "tCK"},
|
||||
{tCK, "CAS_BUS", DependencyType::InterRank, "tCK"},
|
||||
}));
|
||||
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("PDEA"),
|
||||
forward_as_tuple(
|
||||
initializer_list<TimeDependency>{
|
||||
{tRDPDE, "RD", DependencyType::IntraRank, "tRDPDE"},
|
||||
{tRDPDE, "RDA", DependencyType::IntraRank, "tRDPDE"},
|
||||
{tWRPDE, "WR", DependencyType::IntraRank, "tWRPDE"},
|
||||
{tWRAPDE, "WRA", DependencyType::IntraRank, "tWRAPDE"},
|
||||
{tCKE, "PDXA", DependencyType::IntraRank, "tCKE"},
|
||||
{tCK, "RAS_BUS", DependencyType::InterRank, "tCK"},
|
||||
{tCK, "CAS_BUS", DependencyType::InterRank, "tCK"},
|
||||
}
|
||||
)
|
||||
);
|
||||
dmap.emplace(piecewise_construct,
|
||||
forward_as_tuple("PDEA"),
|
||||
forward_as_tuple(initializer_list<TimeDependency>{
|
||||
{tRDPDE, "RD", DependencyType::IntraRank, "tRDPDE"},
|
||||
{tRDPDE, "RDA", DependencyType::IntraRank, "tRDPDE"},
|
||||
{tWRPDE, "WR", DependencyType::IntraRank, "tWRPDE"},
|
||||
{tWRAPDE, "WRA", DependencyType::IntraRank, "tWRAPDE"},
|
||||
{tCKE, "PDXA", DependencyType::IntraRank, "tCKE"},
|
||||
{tCK, "RAS_BUS", DependencyType::InterRank, "tCK"},
|
||||
{tCK, "CAS_BUS", DependencyType::InterRank, "tCK"},
|
||||
}));
|
||||
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("PDXA"),
|
||||
forward_as_tuple(
|
||||
initializer_list<TimeDependency>{
|
||||
{tPD, "PDEA", DependencyType::IntraRank, "tPD"},
|
||||
{tCK, "RAS_BUS", DependencyType::InterRank, "tCK"},
|
||||
{tCK, "CAS_BUS", DependencyType::InterRank, "tCK"},
|
||||
}
|
||||
)
|
||||
);
|
||||
dmap.emplace(piecewise_construct,
|
||||
forward_as_tuple("PDXA"),
|
||||
forward_as_tuple(initializer_list<TimeDependency>{
|
||||
{tPD, "PDEA", DependencyType::IntraRank, "tPD"},
|
||||
{tCK, "RAS_BUS", DependencyType::InterRank, "tCK"},
|
||||
{tCK, "CAS_BUS", DependencyType::InterRank, "tCK"},
|
||||
}));
|
||||
|
||||
return dmap;
|
||||
return dmap;
|
||||
}
|
||||
|
||||
@@ -37,17 +37,18 @@
|
||||
|
||||
#include "../dramtimedependenciesbase.h"
|
||||
|
||||
class TimeDependenciesInfoHBM2 final : public DRAMTimeDependenciesBase {
|
||||
public:
|
||||
class TimeDependenciesInfoHBM2 final : public DRAMTimeDependenciesBase
|
||||
{
|
||||
public:
|
||||
TimeDependenciesInfoHBM2(const QJsonObject& memspec, const uint clk);
|
||||
|
||||
static const std::vector<QString> getPossiblePhases();
|
||||
|
||||
protected:
|
||||
protected:
|
||||
void mInitializeValues() override;
|
||||
DependencyMap mSpecializedGetDependencies() const override;
|
||||
|
||||
protected:
|
||||
protected:
|
||||
uint burstLength;
|
||||
uint dataRate;
|
||||
|
||||
@@ -86,5 +87,4 @@ class TimeDependenciesInfoHBM2 final : public DRAMTimeDependenciesBase {
|
||||
uint tWRAPDE;
|
||||
uint tWRRDS;
|
||||
uint tWRRDL;
|
||||
|
||||
};
|
||||
|
||||
@@ -37,406 +37,351 @@
|
||||
|
||||
using namespace std;
|
||||
|
||||
TimeDependenciesInfoLPDDR4::TimeDependenciesInfoLPDDR4(const QJsonObject& memspec, const uint tCK) : DRAMTimeDependenciesBase(memspec, tCK) {
|
||||
mInitializeValues();
|
||||
TimeDependenciesInfoLPDDR4::TimeDependenciesInfoLPDDR4(const QJsonObject& memspec, const uint tCK) :
|
||||
DRAMTimeDependenciesBase(memspec, tCK)
|
||||
{
|
||||
mInitializeValues();
|
||||
}
|
||||
|
||||
void TimeDependenciesInfoLPDDR4::mInitializeValues() {
|
||||
burstLength = mMemspecJson["memarchitecturespec"].toObject()["burstLength"].toInt();
|
||||
dataRate = mMemspecJson["memarchitecturespec"].toObject()["dataRate"].toInt();
|
||||
void TimeDependenciesInfoLPDDR4::mInitializeValues()
|
||||
{
|
||||
burstLength = mMemspecJson["memarchitecturespec"].toObject()["burstLength"].toInt();
|
||||
dataRate = mMemspecJson["memarchitecturespec"].toObject()["dataRate"].toInt();
|
||||
|
||||
tRRD = tCK * mMemspecJson["memtimingspec"].toObject()["RRD"].toInt();
|
||||
tRCD = tCK * mMemspecJson["memtimingspec"].toObject()["RCD"].toInt();
|
||||
tRAS = tCK * mMemspecJson["memtimingspec"].toObject()["RAS"].toInt();
|
||||
tFAW = tCK * mMemspecJson["memtimingspec"].toObject()["FAW"].toInt();
|
||||
tRPpb = tCK * mMemspecJson["memtimingspec"].toObject()["RPpb"].toInt();
|
||||
tRPab = tCK * mMemspecJson["memtimingspec"].toObject()["RPab"].toInt();
|
||||
tRCpb = tCK * mMemspecJson["memtimingspec"].toObject()["RCpb"].toInt();
|
||||
tRCab = tCK * mMemspecJson["memtimingspec"].toObject()["RCab"].toInt();
|
||||
tCCD = tCK * mMemspecJson["memtimingspec"].toObject()["CCD"].toInt();
|
||||
tRTP = tCK * mMemspecJson["memtimingspec"].toObject()["RTP"].toInt();
|
||||
tWR = tCK * mMemspecJson["memtimingspec"].toObject()["WR"].toInt();
|
||||
tWTR = tCK * mMemspecJson["memtimingspec"].toObject()["WTR"].toInt();
|
||||
tPPD = tCK * mMemspecJson["memtimingspec"].toObject()["PPD"].toInt();
|
||||
tWPRE = tCK * mMemspecJson["memtimingspec"].toObject()["WPRE"].toInt();
|
||||
tRPST = tCK * mMemspecJson["memtimingspec"].toObject()["RPST"].toInt();
|
||||
tDQSCK = tCK * mMemspecJson["memtimingspec"].toObject()["DQSCK"].toInt();
|
||||
tDQSS = tCK * mMemspecJson["memtimingspec"].toObject()["DQSS"].toInt();
|
||||
tDQS2DQ = tCK * mMemspecJson["memtimingspec"].toObject()["DQS2DQ"].toInt();
|
||||
tRL = tCK * mMemspecJson["memtimingspec"].toObject()["RL"].toInt();
|
||||
tWL = tCK * mMemspecJson["memtimingspec"].toObject()["WL"].toInt();
|
||||
tRFCab = tCK * mMemspecJson["memtimingspec"].toObject()["RFCab"].toInt();
|
||||
tRFCpb = tCK * mMemspecJson["memtimingspec"].toObject()["RFCpb"].toInt();
|
||||
tESCKE = tCK * mMemspecJson["memtimingspec"].toObject()["ESCKE"].toInt();
|
||||
tSR = tCK * mMemspecJson["memtimingspec"].toObject()["SR"].toInt();
|
||||
tXSR = tCK * mMemspecJson["memtimingspec"].toObject()["XSR"].toInt();
|
||||
tXP = tCK * mMemspecJson["memtimingspec"].toObject()["XP"].toInt();
|
||||
tCKE = tCK * mMemspecJson["memtimingspec"].toObject()["CKE"].toInt();
|
||||
tCMDCKE = tCK * mMemspecJson["memtimingspec"].toObject()["CMDCKE"].toInt();
|
||||
tRTRS = tCK * mMemspecJson["memtimingspec"].toObject()["RTRS"].toInt();
|
||||
tRRD = tCK * mMemspecJson["memtimingspec"].toObject()["RRD"].toInt();
|
||||
tRCD = tCK * mMemspecJson["memtimingspec"].toObject()["RCD"].toInt();
|
||||
tRAS = tCK * mMemspecJson["memtimingspec"].toObject()["RAS"].toInt();
|
||||
tFAW = tCK * mMemspecJson["memtimingspec"].toObject()["FAW"].toInt();
|
||||
tRPpb = tCK * mMemspecJson["memtimingspec"].toObject()["RPpb"].toInt();
|
||||
tRPab = tCK * mMemspecJson["memtimingspec"].toObject()["RPab"].toInt();
|
||||
tRCpb = tCK * mMemspecJson["memtimingspec"].toObject()["RCpb"].toInt();
|
||||
tRCab = tCK * mMemspecJson["memtimingspec"].toObject()["RCab"].toInt();
|
||||
tCCD = tCK * mMemspecJson["memtimingspec"].toObject()["CCD"].toInt();
|
||||
tRTP = tCK * mMemspecJson["memtimingspec"].toObject()["RTP"].toInt();
|
||||
tWR = tCK * mMemspecJson["memtimingspec"].toObject()["WR"].toInt();
|
||||
tWTR = tCK * mMemspecJson["memtimingspec"].toObject()["WTR"].toInt();
|
||||
tPPD = tCK * mMemspecJson["memtimingspec"].toObject()["PPD"].toInt();
|
||||
tWPRE = tCK * mMemspecJson["memtimingspec"].toObject()["WPRE"].toInt();
|
||||
tRPST = tCK * mMemspecJson["memtimingspec"].toObject()["RPST"].toInt();
|
||||
tDQSCK = tCK * mMemspecJson["memtimingspec"].toObject()["DQSCK"].toInt();
|
||||
tDQSS = tCK * mMemspecJson["memtimingspec"].toObject()["DQSS"].toInt();
|
||||
tDQS2DQ = tCK * mMemspecJson["memtimingspec"].toObject()["DQS2DQ"].toInt();
|
||||
tRL = tCK * mMemspecJson["memtimingspec"].toObject()["RL"].toInt();
|
||||
tWL = tCK * mMemspecJson["memtimingspec"].toObject()["WL"].toInt();
|
||||
tRFCab = tCK * mMemspecJson["memtimingspec"].toObject()["RFCab"].toInt();
|
||||
tRFCpb = tCK * mMemspecJson["memtimingspec"].toObject()["RFCpb"].toInt();
|
||||
tESCKE = tCK * mMemspecJson["memtimingspec"].toObject()["ESCKE"].toInt();
|
||||
tSR = tCK * mMemspecJson["memtimingspec"].toObject()["SR"].toInt();
|
||||
tXSR = tCK * mMemspecJson["memtimingspec"].toObject()["XSR"].toInt();
|
||||
tXP = tCK * mMemspecJson["memtimingspec"].toObject()["XP"].toInt();
|
||||
tCKE = tCK * mMemspecJson["memtimingspec"].toObject()["CKE"].toInt();
|
||||
tCMDCKE = tCK * mMemspecJson["memtimingspec"].toObject()["CMDCKE"].toInt();
|
||||
tRTRS = tCK * mMemspecJson["memtimingspec"].toObject()["RTRS"].toInt();
|
||||
|
||||
tBURST = (uint) (burstLength / (float) dataRate) * tCK;
|
||||
tRDWR = tRL + tDQSCK + tBURST - tWL + tWPRE + tRPST;
|
||||
tRDWR_R = tRL + tBURST + tRTRS - tWL;
|
||||
tWRRD = tWL + tCK + tBURST + tWTR;
|
||||
tWRRD_R = tWL + tBURST + tRTRS - tRL;
|
||||
tRDPRE = tRTP + tBURST - 6 * tCK;
|
||||
tRDAACT = tRTP + tRPpb + tBURST - 8 * tCK;
|
||||
tWRPRE = 2 * tCK + tWL + tCK + tBURST + tWR;
|
||||
tWRAACT = tWL + tBURST + tWR + tCK + tRPpb;
|
||||
tACTPDEN = 3 * tCK + tCMDCKE;
|
||||
tPRPDEN = tCK + tCMDCKE;
|
||||
tRDPDEN = 3 * tCK + tRL + tDQSCK + tBURST + tRPST;
|
||||
tWRPDEN = 3 * tCK + tWL + (ceil((uint) (tDQSS / (float) tCK)) + ceil((uint) (tDQS2DQ / (float) tCK))) * tCK + tBURST + tWR;
|
||||
tWRAPDEN = 3 * tCK + tWL + (ceil((uint) (tDQSS / (float) tCK)) + ceil((uint) (tDQS2DQ / (float) tCK))) * tCK + tBURST + tWR + 2 * tCK;
|
||||
tREFPDEN = tCK + tCMDCKE;
|
||||
tSREFPDEN = tCK + tESCKE;
|
||||
tBURST = (uint)(burstLength / (float)dataRate) * tCK;
|
||||
tRDWR = tRL + tDQSCK + tBURST - tWL + tWPRE + tRPST;
|
||||
tRDWR_R = tRL + tBURST + tRTRS - tWL;
|
||||
tWRRD = tWL + tCK + tBURST + tWTR;
|
||||
tWRRD_R = tWL + tBURST + tRTRS - tRL;
|
||||
tRDPRE = tRTP + tBURST - 6 * tCK;
|
||||
tRDAACT = tRTP + tRPpb + tBURST - 8 * tCK;
|
||||
tWRPRE = 2 * tCK + tWL + tCK + tBURST + tWR;
|
||||
tWRAACT = tWL + tBURST + tWR + tCK + tRPpb;
|
||||
tACTPDEN = 3 * tCK + tCMDCKE;
|
||||
tPRPDEN = tCK + tCMDCKE;
|
||||
tRDPDEN = 3 * tCK + tRL + tDQSCK + tBURST + tRPST;
|
||||
tWRPDEN = 3 * tCK + tWL +
|
||||
(ceil((uint)(tDQSS / (float)tCK)) + ceil((uint)(tDQS2DQ / (float)tCK))) * tCK +
|
||||
tBURST + tWR;
|
||||
tWRAPDEN = 3 * tCK + tWL +
|
||||
(ceil((uint)(tDQSS / (float)tCK)) + ceil((uint)(tDQS2DQ / (float)tCK))) * tCK +
|
||||
tBURST + tWR + 2 * tCK;
|
||||
tREFPDEN = tCK + tCMDCKE;
|
||||
tSREFPDEN = tCK + tESCKE;
|
||||
|
||||
mPools.insert({
|
||||
"CMD_BUS", {
|
||||
1, {
|
||||
{"ACT", 4 * tCK},
|
||||
{"RD", 4 * tCK},
|
||||
{"WR", 4 * tCK},
|
||||
{"RDA", 4 * tCK},
|
||||
{"WRA", 4 * tCK},
|
||||
{"PREPB", 2 * tCK},
|
||||
{"PREAB", 2 * tCK},
|
||||
{"REFAB", 2 * tCK},
|
||||
{"SREFEN", 2 * tCK},
|
||||
{"SREFEX", 2 * tCK},
|
||||
{"REFPB", 2 * tCK},
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
mPools.insert({
|
||||
"NAW", {
|
||||
4, {
|
||||
{"ACT", tFAW},
|
||||
{"REFPB", tFAW},
|
||||
}
|
||||
}
|
||||
});
|
||||
mPools.insert({"CMD_BUS",
|
||||
{1,
|
||||
{
|
||||
{"ACT", 4 * tCK},
|
||||
{"RD", 4 * tCK},
|
||||
{"WR", 4 * tCK},
|
||||
{"RDA", 4 * tCK},
|
||||
{"WRA", 4 * tCK},
|
||||
{"PREPB", 2 * tCK},
|
||||
{"PREAB", 2 * tCK},
|
||||
{"REFAB", 2 * tCK},
|
||||
{"SREFEN", 2 * tCK},
|
||||
{"SREFEX", 2 * tCK},
|
||||
{"REFPB", 2 * tCK},
|
||||
}}});
|
||||
|
||||
mPools.insert({"NAW",
|
||||
{4,
|
||||
{
|
||||
{"ACT", tFAW},
|
||||
{"REFPB", tFAW},
|
||||
}}});
|
||||
}
|
||||
|
||||
const std::vector<QString> TimeDependenciesInfoLPDDR4::getPossiblePhases() {
|
||||
return {
|
||||
"ACT",
|
||||
"RD",
|
||||
"WR",
|
||||
"PREPB",
|
||||
"RDA",
|
||||
"WRA",
|
||||
"REFPB",
|
||||
"REFAB",
|
||||
"PREAB",
|
||||
"PDEP",
|
||||
"PDXP",
|
||||
"SREFEN",
|
||||
"SREFEX",
|
||||
"PDEA",
|
||||
"PDXA",
|
||||
"SRPDEN",
|
||||
"SRPDEX",
|
||||
};
|
||||
const std::vector<QString> TimeDependenciesInfoLPDDR4::getPossiblePhases()
|
||||
{
|
||||
return {
|
||||
"ACT",
|
||||
"RD",
|
||||
"WR",
|
||||
"PREPB",
|
||||
"RDA",
|
||||
"WRA",
|
||||
"REFPB",
|
||||
"REFAB",
|
||||
"PREAB",
|
||||
"PDEP",
|
||||
"PDXP",
|
||||
"SREFEN",
|
||||
"SREFEX",
|
||||
"PDEA",
|
||||
"PDXA",
|
||||
"SRPDEN",
|
||||
"SRPDEX",
|
||||
};
|
||||
}
|
||||
|
||||
DependencyMap TimeDependenciesInfoLPDDR4::mSpecializedGetDependencies() const {
|
||||
DependencyMap dmap;
|
||||
DependencyMap TimeDependenciesInfoLPDDR4::mSpecializedGetDependencies() const
|
||||
{
|
||||
DependencyMap dmap;
|
||||
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("ACT"),
|
||||
forward_as_tuple(
|
||||
initializer_list<TimeDependency>{
|
||||
{tRCpb, "ACT", DependencyType::IntraBank, "tRCpb"},
|
||||
{tRRD, "ACT", DependencyType::IntraRank, "tRRD"},
|
||||
{tRDAACT, "RDA", DependencyType::IntraBank, "tRDAACT"},
|
||||
{tWRAACT, "WRA", DependencyType::IntraBank, "tWRAACT"},
|
||||
{tRPpb - 2 * tCK, "PREPB", DependencyType::IntraBank, "tRPpb - 2 * tCK"},
|
||||
{tRPab - 2 * tCK, "PREAB", DependencyType::IntraRank, "tRPab - 2 * tCK"},
|
||||
{tXP, "PDXA", DependencyType::IntraRank, "tXP"},
|
||||
{tXP, "PDXP", DependencyType::IntraRank, "tXP"},
|
||||
{tRFCab - 2 * tCK, "REFAB", DependencyType::IntraRank, "tRFCab - 2 * tCK"},
|
||||
{tRFCpb - 2 * tCK, "REFPB", DependencyType::IntraBank, "tRFCpb - 2 * tCK"},
|
||||
{tRRD - 2 * tCK, "REFPB", DependencyType::IntraRank, "tRRD - 2 * tCK"},
|
||||
{tXSR - 2 * tCK, "SREFEX", DependencyType::IntraRank, "tXSR - 2 * tCK"},
|
||||
{4 * tCK, "CMD_BUS", DependencyType::InterRank, "CommandBus"},
|
||||
{tFAW, "NAW", DependencyType::IntraRank, "tFAW"},
|
||||
}
|
||||
)
|
||||
);
|
||||
dmap.emplace(piecewise_construct,
|
||||
forward_as_tuple("ACT"),
|
||||
forward_as_tuple(initializer_list<TimeDependency>{
|
||||
{tRCpb, "ACT", DependencyType::IntraBank, "tRCpb"},
|
||||
{tRRD, "ACT", DependencyType::IntraRank, "tRRD"},
|
||||
{tRDAACT, "RDA", DependencyType::IntraBank, "tRDAACT"},
|
||||
{tWRAACT, "WRA", DependencyType::IntraBank, "tWRAACT"},
|
||||
{tRPpb - 2 * tCK, "PREPB", DependencyType::IntraBank, "tRPpb - 2 * tCK"},
|
||||
{tRPab - 2 * tCK, "PREAB", DependencyType::IntraRank, "tRPab - 2 * tCK"},
|
||||
{tXP, "PDXA", DependencyType::IntraRank, "tXP"},
|
||||
{tXP, "PDXP", DependencyType::IntraRank, "tXP"},
|
||||
{tRFCab - 2 * tCK, "REFAB", DependencyType::IntraRank, "tRFCab - 2 * tCK"},
|
||||
{tRFCpb - 2 * tCK, "REFPB", DependencyType::IntraBank, "tRFCpb - 2 * tCK"},
|
||||
{tRRD - 2 * tCK, "REFPB", DependencyType::IntraRank, "tRRD - 2 * tCK"},
|
||||
{tXSR - 2 * tCK, "SREFEX", DependencyType::IntraRank, "tXSR - 2 * tCK"},
|
||||
{4 * tCK, "CMD_BUS", DependencyType::InterRank, "CommandBus"},
|
||||
{tFAW, "NAW", DependencyType::IntraRank, "tFAW"},
|
||||
}));
|
||||
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("RD"),
|
||||
forward_as_tuple(
|
||||
initializer_list<TimeDependency>{
|
||||
{tRCD, "ACT", DependencyType::IntraBank, "tRCD"},
|
||||
{tCCD, "RD", DependencyType::IntraBank, "tCCD"}, //
|
||||
{tCCD, "RD", DependencyType::IntraRank, "tCCD"},
|
||||
{tBURST + tRTRS, "RD", DependencyType::InterRank, "tBURST + tRTRS"},
|
||||
{tCCD, "RDA", DependencyType::IntraRank, "tCCD"},
|
||||
{tBURST + tRTRS, "RDA", DependencyType::InterRank, "tBURST + tRTRS"},
|
||||
{tWRRD, "WR", DependencyType::IntraBank, "tWRRD"},
|
||||
{tWRRD, "WR", DependencyType::IntraRank, "tWRRD"},
|
||||
{tWRRD_R, "WR", DependencyType::InterRank, "tWRRD_R"},
|
||||
{tWRRD, "WRA", DependencyType::IntraRank, "tWRRD"},
|
||||
{tWRRD_R, "WRA", DependencyType::InterRank, "tWRRD_R"},
|
||||
{tXP, "PDXA", DependencyType::IntraRank, "tXP"},
|
||||
{4 * tCK, "CMD_BUS", DependencyType::InterRank, "CommandBus"},
|
||||
}
|
||||
)
|
||||
);
|
||||
dmap.emplace(piecewise_construct,
|
||||
forward_as_tuple("RD"),
|
||||
forward_as_tuple(initializer_list<TimeDependency>{
|
||||
{tRCD, "ACT", DependencyType::IntraBank, "tRCD"},
|
||||
{tCCD, "RD", DependencyType::IntraBank, "tCCD"}, //
|
||||
{tCCD, "RD", DependencyType::IntraRank, "tCCD"},
|
||||
{tBURST + tRTRS, "RD", DependencyType::InterRank, "tBURST + tRTRS"},
|
||||
{tCCD, "RDA", DependencyType::IntraRank, "tCCD"},
|
||||
{tBURST + tRTRS, "RDA", DependencyType::InterRank, "tBURST + tRTRS"},
|
||||
{tWRRD, "WR", DependencyType::IntraBank, "tWRRD"},
|
||||
{tWRRD, "WR", DependencyType::IntraRank, "tWRRD"},
|
||||
{tWRRD_R, "WR", DependencyType::InterRank, "tWRRD_R"},
|
||||
{tWRRD, "WRA", DependencyType::IntraRank, "tWRRD"},
|
||||
{tWRRD_R, "WRA", DependencyType::InterRank, "tWRRD_R"},
|
||||
{tXP, "PDXA", DependencyType::IntraRank, "tXP"},
|
||||
{4 * tCK, "CMD_BUS", DependencyType::InterRank, "CommandBus"},
|
||||
}));
|
||||
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("WR"),
|
||||
forward_as_tuple(
|
||||
initializer_list<TimeDependency>{
|
||||
{tRCD, "ACT", DependencyType::IntraBank, "tRCD"},
|
||||
{tRDWR, "RD", DependencyType::IntraBank, "tRDWR"}, //
|
||||
{tRDWR, "RD", DependencyType::IntraRank, "tRDWR"},
|
||||
{tRDWR_R, "RD", DependencyType::InterRank, "tRDWR_R"},
|
||||
{tRDWR, "RDA", DependencyType::IntraRank, "tRDWR"},
|
||||
{tRDWR_R, "RDA", DependencyType::InterRank, "tRDWR_R"},
|
||||
{tCCD, "WR", DependencyType::IntraBank, "tCCD"},
|
||||
{tCCD, "WR", DependencyType::IntraRank, "tCCD"},
|
||||
{tBURST + tRTRS, "WR", DependencyType::InterRank, "tBURST + tRTRS"},
|
||||
{tCCD, "WRA", DependencyType::IntraRank, "tCCD"},
|
||||
{tBURST + tRTRS, "WRA", DependencyType::InterRank, "tBURST + tRTRS"},
|
||||
{tXP, "PDXA", DependencyType::IntraRank, "tXP"},
|
||||
{4 * tCK, "CMD_BUS", DependencyType::InterRank, "CommandBus"},
|
||||
}
|
||||
)
|
||||
);
|
||||
dmap.emplace(piecewise_construct,
|
||||
forward_as_tuple("WR"),
|
||||
forward_as_tuple(initializer_list<TimeDependency>{
|
||||
{tRCD, "ACT", DependencyType::IntraBank, "tRCD"},
|
||||
{tRDWR, "RD", DependencyType::IntraBank, "tRDWR"}, //
|
||||
{tRDWR, "RD", DependencyType::IntraRank, "tRDWR"},
|
||||
{tRDWR_R, "RD", DependencyType::InterRank, "tRDWR_R"},
|
||||
{tRDWR, "RDA", DependencyType::IntraRank, "tRDWR"},
|
||||
{tRDWR_R, "RDA", DependencyType::InterRank, "tRDWR_R"},
|
||||
{tCCD, "WR", DependencyType::IntraBank, "tCCD"},
|
||||
{tCCD, "WR", DependencyType::IntraRank, "tCCD"},
|
||||
{tBURST + tRTRS, "WR", DependencyType::InterRank, "tBURST + tRTRS"},
|
||||
{tCCD, "WRA", DependencyType::IntraRank, "tCCD"},
|
||||
{tBURST + tRTRS, "WRA", DependencyType::InterRank, "tBURST + tRTRS"},
|
||||
{tXP, "PDXA", DependencyType::IntraRank, "tXP"},
|
||||
{4 * tCK, "CMD_BUS", DependencyType::InterRank, "CommandBus"},
|
||||
}));
|
||||
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("PREPB"),
|
||||
forward_as_tuple(
|
||||
initializer_list<TimeDependency>{
|
||||
{tRAS + 2 * tCK, "ACT", DependencyType::IntraBank, "tRAS + 2 * tCK"},
|
||||
{tRDPRE, "RD", DependencyType::IntraBank, "tRDPRE"},
|
||||
{tWRPRE, "WR", DependencyType::IntraBank, "tWRPRE"},
|
||||
{tPPD, "PREPB", DependencyType::IntraRank, "tPPD"},
|
||||
{tXP, "PDXA", DependencyType::IntraRank, "tXP"},
|
||||
{2 * tCK, "CMD_BUS", DependencyType::InterRank, "CommandBus"},
|
||||
}
|
||||
)
|
||||
);
|
||||
dmap.emplace(piecewise_construct,
|
||||
forward_as_tuple("PREPB"),
|
||||
forward_as_tuple(initializer_list<TimeDependency>{
|
||||
{tRAS + 2 * tCK, "ACT", DependencyType::IntraBank, "tRAS + 2 * tCK"},
|
||||
{tRDPRE, "RD", DependencyType::IntraBank, "tRDPRE"},
|
||||
{tWRPRE, "WR", DependencyType::IntraBank, "tWRPRE"},
|
||||
{tPPD, "PREPB", DependencyType::IntraRank, "tPPD"},
|
||||
{tXP, "PDXA", DependencyType::IntraRank, "tXP"},
|
||||
{2 * tCK, "CMD_BUS", DependencyType::InterRank, "CommandBus"},
|
||||
}));
|
||||
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("RDA"),
|
||||
forward_as_tuple(
|
||||
initializer_list<TimeDependency>{
|
||||
{tRCD, "ACT", DependencyType::IntraBank, "tRCD"},
|
||||
{tCCD, "RD", DependencyType::IntraBank, "tCCD"},
|
||||
{tCCD, "RD", DependencyType::IntraRank, "tCCD"},
|
||||
{tBURST + tRTRS, "RD", DependencyType::InterRank, "tBURST + tRTRS"},
|
||||
{tCCD, "RDA", DependencyType::IntraRank, "tCCD"},
|
||||
{tBURST + tRTRS, "RDA", DependencyType::InterRank, "tBURST + tRTRS"},
|
||||
{max({tWRRD, tWRPRE - tRDPRE}), "WR", DependencyType::IntraBank, "max(tWRRD, tWRPRE - tRDPRE)"},
|
||||
{tWRRD, "WR", DependencyType::IntraRank, "tWRRD"},
|
||||
{tWRRD_R, "WR", DependencyType::InterRank, "tWRRD_R"},
|
||||
{tWRRD, "WRA", DependencyType::IntraRank, "tWRRD"},
|
||||
{tWRRD_R, "WRA", DependencyType::InterRank, "tWRRD_R"},
|
||||
{tXP, "PDXA", DependencyType::IntraRank, "tXP"},
|
||||
{4 * tCK, "CMD_BUS", DependencyType::InterRank, "CommandBus"},
|
||||
}
|
||||
)
|
||||
);
|
||||
dmap.emplace(piecewise_construct,
|
||||
forward_as_tuple("RDA"),
|
||||
forward_as_tuple(initializer_list<TimeDependency>{
|
||||
{tRCD, "ACT", DependencyType::IntraBank, "tRCD"},
|
||||
{tCCD, "RD", DependencyType::IntraBank, "tCCD"},
|
||||
{tCCD, "RD", DependencyType::IntraRank, "tCCD"},
|
||||
{tBURST + tRTRS, "RD", DependencyType::InterRank, "tBURST + tRTRS"},
|
||||
{tCCD, "RDA", DependencyType::IntraRank, "tCCD"},
|
||||
{tBURST + tRTRS, "RDA", DependencyType::InterRank, "tBURST + tRTRS"},
|
||||
{max({tWRRD, tWRPRE - tRDPRE}),
|
||||
"WR",
|
||||
DependencyType::IntraBank,
|
||||
"max(tWRRD, tWRPRE - tRDPRE)"},
|
||||
{tWRRD, "WR", DependencyType::IntraRank, "tWRRD"},
|
||||
{tWRRD_R, "WR", DependencyType::InterRank, "tWRRD_R"},
|
||||
{tWRRD, "WRA", DependencyType::IntraRank, "tWRRD"},
|
||||
{tWRRD_R, "WRA", DependencyType::InterRank, "tWRRD_R"},
|
||||
{tXP, "PDXA", DependencyType::IntraRank, "tXP"},
|
||||
{4 * tCK, "CMD_BUS", DependencyType::InterRank, "CommandBus"},
|
||||
}));
|
||||
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("WRA"),
|
||||
forward_as_tuple(
|
||||
initializer_list<TimeDependency>{
|
||||
{tRCD, "ACT", DependencyType::IntraBank, "tRCD"},
|
||||
{tRDWR, "RD", DependencyType::IntraBank, "tRDWR"},
|
||||
{tRDWR, "RD", DependencyType::IntraRank, "tRDWR"},
|
||||
{tRDWR_R, "RD", DependencyType::InterRank, "tRDWR_R"},
|
||||
{tRDWR, "RDA", DependencyType::IntraRank, "tRDWR"},
|
||||
{tRDWR_R, "RDA", DependencyType::InterRank, "tRDWR_R"},
|
||||
{tCCD, "WR", DependencyType::IntraBank, "tCCD"},
|
||||
{tCCD, "WR", DependencyType::IntraRank, "tCCD"},
|
||||
{tBURST + tRTRS, "WR", DependencyType::InterRank, "tBURST + tRTRS"},
|
||||
{tCCD, "WRA", DependencyType::IntraRank, "tCCD"},
|
||||
{tBURST + tRTRS, "WRA", DependencyType::InterRank, "tBURST + tRTRS"},
|
||||
{tXP, "PDXA", DependencyType::IntraRank, "tXP"},
|
||||
{4 * tCK, "CMD_BUS", DependencyType::InterRank, "CommandBus"},
|
||||
}
|
||||
)
|
||||
);
|
||||
dmap.emplace(piecewise_construct,
|
||||
forward_as_tuple("WRA"),
|
||||
forward_as_tuple(initializer_list<TimeDependency>{
|
||||
{tRCD, "ACT", DependencyType::IntraBank, "tRCD"},
|
||||
{tRDWR, "RD", DependencyType::IntraBank, "tRDWR"},
|
||||
{tRDWR, "RD", DependencyType::IntraRank, "tRDWR"},
|
||||
{tRDWR_R, "RD", DependencyType::InterRank, "tRDWR_R"},
|
||||
{tRDWR, "RDA", DependencyType::IntraRank, "tRDWR"},
|
||||
{tRDWR_R, "RDA", DependencyType::InterRank, "tRDWR_R"},
|
||||
{tCCD, "WR", DependencyType::IntraBank, "tCCD"},
|
||||
{tCCD, "WR", DependencyType::IntraRank, "tCCD"},
|
||||
{tBURST + tRTRS, "WR", DependencyType::InterRank, "tBURST + tRTRS"},
|
||||
{tCCD, "WRA", DependencyType::IntraRank, "tCCD"},
|
||||
{tBURST + tRTRS, "WRA", DependencyType::InterRank, "tBURST + tRTRS"},
|
||||
{tXP, "PDXA", DependencyType::IntraRank, "tXP"},
|
||||
{4 * tCK, "CMD_BUS", DependencyType::InterRank, "CommandBus"},
|
||||
}));
|
||||
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("REFPB"),
|
||||
forward_as_tuple(
|
||||
initializer_list<TimeDependency>{
|
||||
{tRCpb + 2 * tCK, "ACT", DependencyType::IntraBank, "tRCpb + 2 * tCK"},
|
||||
{tRRD + 2 * tCK, "ACT", DependencyType::IntraRank, "tRRD + 2 * tCK"},
|
||||
{tRDPRE + tRPpb, "RDA", DependencyType::IntraBank, "tRDPRE + tRPpb"},
|
||||
{tWRPRE + tRPpb, "WRA", DependencyType::IntraBank, "tWRPRE + tRPpb"},
|
||||
{tRPpb, "PREPB", DependencyType::IntraBank, "tRPpb"},
|
||||
{tRPab, "PREAB", DependencyType::IntraRank, "tRPab"},
|
||||
{tXP, "PDXP", DependencyType::IntraRank, "tXP"},
|
||||
{tXP, "PDXA", DependencyType::IntraRank, "tXP"},
|
||||
{tRFCab, "REFAB", DependencyType::IntraRank, "tRFCab"},
|
||||
{tRFCpb, "REFPB", DependencyType::IntraBank, "tRFCpb"}, //
|
||||
{tRFCpb, "REFPB", DependencyType::IntraRank, "tRFCpb"},
|
||||
{tXSR, "SREFEX", DependencyType::IntraRank, "tXSR"},
|
||||
{2 * tCK, "CMD_BUS", DependencyType::InterRank, "CommandBus"},
|
||||
{tFAW, "NAW", DependencyType::IntraRank, "tFAW"},
|
||||
}
|
||||
)
|
||||
);
|
||||
dmap.emplace(piecewise_construct,
|
||||
forward_as_tuple("REFPB"),
|
||||
forward_as_tuple(initializer_list<TimeDependency>{
|
||||
{tRCpb + 2 * tCK, "ACT", DependencyType::IntraBank, "tRCpb + 2 * tCK"},
|
||||
{tRRD + 2 * tCK, "ACT", DependencyType::IntraRank, "tRRD + 2 * tCK"},
|
||||
{tRDPRE + tRPpb, "RDA", DependencyType::IntraBank, "tRDPRE + tRPpb"},
|
||||
{tWRPRE + tRPpb, "WRA", DependencyType::IntraBank, "tWRPRE + tRPpb"},
|
||||
{tRPpb, "PREPB", DependencyType::IntraBank, "tRPpb"},
|
||||
{tRPab, "PREAB", DependencyType::IntraRank, "tRPab"},
|
||||
{tXP, "PDXP", DependencyType::IntraRank, "tXP"},
|
||||
{tXP, "PDXA", DependencyType::IntraRank, "tXP"},
|
||||
{tRFCab, "REFAB", DependencyType::IntraRank, "tRFCab"},
|
||||
{tRFCpb, "REFPB", DependencyType::IntraBank, "tRFCpb"}, //
|
||||
{tRFCpb, "REFPB", DependencyType::IntraRank, "tRFCpb"},
|
||||
{tXSR, "SREFEX", DependencyType::IntraRank, "tXSR"},
|
||||
{2 * tCK, "CMD_BUS", DependencyType::InterRank, "CommandBus"},
|
||||
{tFAW, "NAW", DependencyType::IntraRank, "tFAW"},
|
||||
}));
|
||||
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("REFAB"),
|
||||
forward_as_tuple(
|
||||
initializer_list<TimeDependency>{
|
||||
{tRCpb + 2 * tCK, "ACT", DependencyType::IntraRank, "tRCpb + 2 * tCK"},
|
||||
{tRDPRE + tRPpb, "RDA", DependencyType::IntraRank, "tRDPRE + tRPpb"},
|
||||
{tWRPRE + tRPpb, "WRA", DependencyType::IntraRank, "tWRPRE + tRPpb"},
|
||||
{tRPpb, "PREPB", DependencyType::IntraRank, "tRPpb"},
|
||||
{tRPab, "PREAB", DependencyType::IntraRank, "tRPab"},
|
||||
{tXP, "PDXP", DependencyType::IntraRank, "tXP"},
|
||||
{tRFCab, "REFAB", DependencyType::IntraRank, "tRFCab"},
|
||||
{tRFCpb, "REFPB", DependencyType::IntraRank, "tRFCpb"},
|
||||
{tXSR, "SREFEX", DependencyType::IntraRank, "tXSR"},
|
||||
{2 * tCK, "CMD_BUS", DependencyType::InterRank, "CommandBus"},
|
||||
}
|
||||
)
|
||||
);
|
||||
dmap.emplace(piecewise_construct,
|
||||
forward_as_tuple("REFAB"),
|
||||
forward_as_tuple(initializer_list<TimeDependency>{
|
||||
{tRCpb + 2 * tCK, "ACT", DependencyType::IntraRank, "tRCpb + 2 * tCK"},
|
||||
{tRDPRE + tRPpb, "RDA", DependencyType::IntraRank, "tRDPRE + tRPpb"},
|
||||
{tWRPRE + tRPpb, "WRA", DependencyType::IntraRank, "tWRPRE + tRPpb"},
|
||||
{tRPpb, "PREPB", DependencyType::IntraRank, "tRPpb"},
|
||||
{tRPab, "PREAB", DependencyType::IntraRank, "tRPab"},
|
||||
{tXP, "PDXP", DependencyType::IntraRank, "tXP"},
|
||||
{tRFCab, "REFAB", DependencyType::IntraRank, "tRFCab"},
|
||||
{tRFCpb, "REFPB", DependencyType::IntraRank, "tRFCpb"},
|
||||
{tXSR, "SREFEX", DependencyType::IntraRank, "tXSR"},
|
||||
{2 * tCK, "CMD_BUS", DependencyType::InterRank, "CommandBus"},
|
||||
}));
|
||||
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("PREAB"),
|
||||
forward_as_tuple(
|
||||
initializer_list<TimeDependency>{
|
||||
{tRAS + 2 * tCK, "ACT", DependencyType::IntraRank, "tRAS + 2 * tCK"},
|
||||
{tRDPRE, "RD", DependencyType::IntraRank, "tRDPRE"},
|
||||
{tRDPRE, "RDA", DependencyType::IntraRank, "tRDPRE"},
|
||||
{tWRPRE, "WR", DependencyType::IntraRank, "tWRPRE"},
|
||||
{tWRPRE, "WRA", DependencyType::IntraRank, "tWRPRE"},
|
||||
{tPPD, "PREPB", DependencyType::IntraRank, "tPPD"},
|
||||
{tXP, "PDXA", DependencyType::IntraRank, "tXP"},
|
||||
{tRFCpb, "REFPB", DependencyType::IntraRank, "tRFCpb"},
|
||||
{2 * tCK, "CMD_BUS", DependencyType::InterRank, "CommandBus"},
|
||||
}
|
||||
)
|
||||
);
|
||||
dmap.emplace(piecewise_construct,
|
||||
forward_as_tuple("PREAB"),
|
||||
forward_as_tuple(initializer_list<TimeDependency>{
|
||||
{tRAS + 2 * tCK, "ACT", DependencyType::IntraRank, "tRAS + 2 * tCK"},
|
||||
{tRDPRE, "RD", DependencyType::IntraRank, "tRDPRE"},
|
||||
{tRDPRE, "RDA", DependencyType::IntraRank, "tRDPRE"},
|
||||
{tWRPRE, "WR", DependencyType::IntraRank, "tWRPRE"},
|
||||
{tWRPRE, "WRA", DependencyType::IntraRank, "tWRPRE"},
|
||||
{tPPD, "PREPB", DependencyType::IntraRank, "tPPD"},
|
||||
{tXP, "PDXA", DependencyType::IntraRank, "tXP"},
|
||||
{tRFCpb, "REFPB", DependencyType::IntraRank, "tRFCpb"},
|
||||
{2 * tCK, "CMD_BUS", DependencyType::InterRank, "CommandBus"},
|
||||
}));
|
||||
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("PDEP"),
|
||||
forward_as_tuple(
|
||||
initializer_list<TimeDependency>{
|
||||
{tRDPDEN, "RD", DependencyType::IntraRank, "tRDPDEN"},
|
||||
{tRDPDEN, "RDA", DependencyType::IntraRank, "tRDPDEN"},
|
||||
{tWRAPDEN, "WRA", DependencyType::IntraRank, "tWRAPDEN"},
|
||||
{tPRPDEN, "PREPB", DependencyType::IntraRank, "tPRPDEN"},
|
||||
{tPRPDEN, "PREAB", DependencyType::IntraRank, "tPRPDEN"},
|
||||
{tCKE, "PDXP", DependencyType::IntraRank, "tCKE"},
|
||||
{tREFPDEN, "REFAB", DependencyType::IntraRank, "tREFPDEN"},
|
||||
{tREFPDEN, "REFPB", DependencyType::IntraRank, "tREFPDEN"},
|
||||
{tXSR, "SREFEX", DependencyType::IntraRank, "tXSR"},
|
||||
}
|
||||
)
|
||||
);
|
||||
dmap.emplace(piecewise_construct,
|
||||
forward_as_tuple("PDEP"),
|
||||
forward_as_tuple(initializer_list<TimeDependency>{
|
||||
{tRDPDEN, "RD", DependencyType::IntraRank, "tRDPDEN"},
|
||||
{tRDPDEN, "RDA", DependencyType::IntraRank, "tRDPDEN"},
|
||||
{tWRAPDEN, "WRA", DependencyType::IntraRank, "tWRAPDEN"},
|
||||
{tPRPDEN, "PREPB", DependencyType::IntraRank, "tPRPDEN"},
|
||||
{tPRPDEN, "PREAB", DependencyType::IntraRank, "tPRPDEN"},
|
||||
{tCKE, "PDXP", DependencyType::IntraRank, "tCKE"},
|
||||
{tREFPDEN, "REFAB", DependencyType::IntraRank, "tREFPDEN"},
|
||||
{tREFPDEN, "REFPB", DependencyType::IntraRank, "tREFPDEN"},
|
||||
{tXSR, "SREFEX", DependencyType::IntraRank, "tXSR"},
|
||||
}));
|
||||
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("PDXP"),
|
||||
forward_as_tuple(
|
||||
initializer_list<TimeDependency>{
|
||||
{tCKE, "PDEP", DependencyType::IntraRank, "tCKE"},
|
||||
}
|
||||
)
|
||||
);
|
||||
dmap.emplace(piecewise_construct,
|
||||
forward_as_tuple("PDXP"),
|
||||
forward_as_tuple(initializer_list<TimeDependency>{
|
||||
{tCKE, "PDEP", DependencyType::IntraRank, "tCKE"},
|
||||
}));
|
||||
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("SREFEN"),
|
||||
forward_as_tuple(
|
||||
initializer_list<TimeDependency>{
|
||||
{tRCpb + 2 * tCK, "ACT", DependencyType::IntraRank, "tRCpb + 2 * tCK"},
|
||||
{max({tRDPDEN, tRDPRE + tRPpb}), "RDA", DependencyType::IntraRank, "max(tRDPDEN, tRDPRE + tRPpb)"},
|
||||
{max({tWRAPDEN, tWRPRE + tRPpb}), "WRA", DependencyType::IntraRank, "max(tWRAPDEN, tWRPRE + tRPpb)"},
|
||||
{tRPpb, "PREPB", DependencyType::IntraRank, "tRPpb"},
|
||||
{tRPab, "PREAB", DependencyType::IntraRank, "tRPab"},
|
||||
{tXP, "PDXP", DependencyType::IntraRank, "tXP"},
|
||||
{tRFCab, "REFAB", DependencyType::IntraRank, "tRFCab"},
|
||||
{tRFCpb, "REFPB", DependencyType::IntraRank, "tRFCpb"},
|
||||
{tXSR, "SREFEX", DependencyType::IntraRank, "tXSR"},
|
||||
{2 * tCK, "CMD_BUS", DependencyType::InterRank, "CommandBus"},
|
||||
}
|
||||
)
|
||||
);
|
||||
dmap.emplace(piecewise_construct,
|
||||
forward_as_tuple("SREFEN"),
|
||||
forward_as_tuple(initializer_list<TimeDependency>{
|
||||
{tRCpb + 2 * tCK, "ACT", DependencyType::IntraRank, "tRCpb + 2 * tCK"},
|
||||
{max({tRDPDEN, tRDPRE + tRPpb}),
|
||||
"RDA",
|
||||
DependencyType::IntraRank,
|
||||
"max(tRDPDEN, tRDPRE + tRPpb)"},
|
||||
{max({tWRAPDEN, tWRPRE + tRPpb}),
|
||||
"WRA",
|
||||
DependencyType::IntraRank,
|
||||
"max(tWRAPDEN, tWRPRE + tRPpb)"},
|
||||
{tRPpb, "PREPB", DependencyType::IntraRank, "tRPpb"},
|
||||
{tRPab, "PREAB", DependencyType::IntraRank, "tRPab"},
|
||||
{tXP, "PDXP", DependencyType::IntraRank, "tXP"},
|
||||
{tRFCab, "REFAB", DependencyType::IntraRank, "tRFCab"},
|
||||
{tRFCpb, "REFPB", DependencyType::IntraRank, "tRFCpb"},
|
||||
{tXSR, "SREFEX", DependencyType::IntraRank, "tXSR"},
|
||||
{2 * tCK, "CMD_BUS", DependencyType::InterRank, "CommandBus"},
|
||||
}));
|
||||
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("SREFEX"),
|
||||
forward_as_tuple(
|
||||
initializer_list<TimeDependency>{
|
||||
{tSR, "SREFEN", DependencyType::IntraRank, "tSR"},
|
||||
{tXP, "SRPDEX", DependencyType::IntraRank, "tXP"}, //
|
||||
{2 * tCK, "CMD_BUS", DependencyType::InterRank, "CommandBus"},
|
||||
}
|
||||
)
|
||||
);
|
||||
dmap.emplace(piecewise_construct,
|
||||
forward_as_tuple("SREFEX"),
|
||||
forward_as_tuple(initializer_list<TimeDependency>{
|
||||
{tSR, "SREFEN", DependencyType::IntraRank, "tSR"},
|
||||
{tXP, "SRPDEX", DependencyType::IntraRank, "tXP"}, //
|
||||
{2 * tCK, "CMD_BUS", DependencyType::InterRank, "CommandBus"},
|
||||
}));
|
||||
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("PDEA"),
|
||||
forward_as_tuple(
|
||||
initializer_list<TimeDependency>{
|
||||
{tACTPDEN, "ACT", DependencyType::IntraRank, "tACTPDEN"},
|
||||
{tRDPDEN, "RD", DependencyType::IntraRank, "tRDPDEN"},
|
||||
{tRDPDEN, "RDA", DependencyType::IntraRank, "tRDPDEN"},
|
||||
{tWRPDEN, "WR", DependencyType::IntraRank, "tWRPDEN"},
|
||||
{tWRAPDEN, "WRA", DependencyType::IntraRank, "tWRAPDEN"},
|
||||
{tPRPDEN, "PREPB", DependencyType::IntraRank, "tPRPDEN"},
|
||||
{tCKE, "PDXA", DependencyType::IntraRank, "tCKE"},
|
||||
{tREFPDEN, "REFPB", DependencyType::IntraRank, "tREFPDEN"},
|
||||
}
|
||||
)
|
||||
);
|
||||
dmap.emplace(piecewise_construct,
|
||||
forward_as_tuple("PDEA"),
|
||||
forward_as_tuple(initializer_list<TimeDependency>{
|
||||
{tACTPDEN, "ACT", DependencyType::IntraRank, "tACTPDEN"},
|
||||
{tRDPDEN, "RD", DependencyType::IntraRank, "tRDPDEN"},
|
||||
{tRDPDEN, "RDA", DependencyType::IntraRank, "tRDPDEN"},
|
||||
{tWRPDEN, "WR", DependencyType::IntraRank, "tWRPDEN"},
|
||||
{tWRAPDEN, "WRA", DependencyType::IntraRank, "tWRAPDEN"},
|
||||
{tPRPDEN, "PREPB", DependencyType::IntraRank, "tPRPDEN"},
|
||||
{tCKE, "PDXA", DependencyType::IntraRank, "tCKE"},
|
||||
{tREFPDEN, "REFPB", DependencyType::IntraRank, "tREFPDEN"},
|
||||
}));
|
||||
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("PDXA"),
|
||||
forward_as_tuple(
|
||||
initializer_list<TimeDependency>{
|
||||
{tCKE, "PDEA", DependencyType::IntraRank, "tCKE"},
|
||||
}
|
||||
)
|
||||
);
|
||||
dmap.emplace(piecewise_construct,
|
||||
forward_as_tuple("PDXA"),
|
||||
forward_as_tuple(initializer_list<TimeDependency>{
|
||||
{tCKE, "PDEA", DependencyType::IntraRank, "tCKE"},
|
||||
}));
|
||||
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("SRPDEN"),
|
||||
forward_as_tuple(
|
||||
initializer_list<TimeDependency>{
|
||||
{tSREFPDEN, "SREFEN", DependencyType::IntraRank, "tSREFPDEN"},
|
||||
}
|
||||
)
|
||||
);
|
||||
dmap.emplace(piecewise_construct,
|
||||
forward_as_tuple("SRPDEN"),
|
||||
forward_as_tuple(initializer_list<TimeDependency>{
|
||||
{tSREFPDEN, "SREFEN", DependencyType::IntraRank, "tSREFPDEN"},
|
||||
}));
|
||||
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("SRPDEX"),
|
||||
forward_as_tuple(
|
||||
initializer_list<TimeDependency>{
|
||||
{tCKE, "SRPDEN", DependencyType::IntraRank, "tCKE"},
|
||||
}
|
||||
)
|
||||
);
|
||||
dmap.emplace(piecewise_construct,
|
||||
forward_as_tuple("SRPDEX"),
|
||||
forward_as_tuple(initializer_list<TimeDependency>{
|
||||
{tCKE, "SRPDEN", DependencyType::IntraRank, "tCKE"},
|
||||
}));
|
||||
|
||||
return dmap;
|
||||
return dmap;
|
||||
}
|
||||
|
||||
@@ -37,17 +37,18 @@
|
||||
|
||||
#include "../dramtimedependenciesbase.h"
|
||||
|
||||
class TimeDependenciesInfoLPDDR4 final : public DRAMTimeDependenciesBase {
|
||||
public:
|
||||
class TimeDependenciesInfoLPDDR4 final : public DRAMTimeDependenciesBase
|
||||
{
|
||||
public:
|
||||
TimeDependenciesInfoLPDDR4(const QJsonObject& memspec, const uint clk);
|
||||
|
||||
static const std::vector<QString> getPossiblePhases();
|
||||
|
||||
protected:
|
||||
protected:
|
||||
void mInitializeValues() override;
|
||||
DependencyMap mSpecializedGetDependencies() const override;
|
||||
|
||||
protected:
|
||||
protected:
|
||||
uint burstLength;
|
||||
uint dataRate;
|
||||
|
||||
@@ -97,5 +98,4 @@ class TimeDependenciesInfoLPDDR4 final : public DRAMTimeDependenciesBase {
|
||||
uint tWRAPDEN;
|
||||
uint tREFPDEN;
|
||||
uint tSREFPDEN;
|
||||
|
||||
};
|
||||
|
||||
@@ -37,369 +37,639 @@
|
||||
|
||||
using namespace std;
|
||||
|
||||
TimeDependenciesInfoLPDDR5::TimeDependenciesInfoLPDDR5(const QJsonObject& memspec, const uint tCK) : DRAMTimeDependenciesBase(memspec, tCK) {
|
||||
mInitializeValues();
|
||||
TimeDependenciesInfoLPDDR5::TimeDependenciesInfoLPDDR5(const QJsonObject& memspec, const uint tCK) :
|
||||
DRAMTimeDependenciesBase(memspec, tCK)
|
||||
{
|
||||
mInitializeValues();
|
||||
}
|
||||
|
||||
void TimeDependenciesInfoLPDDR5::mInitializeValues() {
|
||||
burstLength = mMemspecJson["memarchitecturespec"].toObject()["burstLength"].toInt();
|
||||
dataRate = mMemspecJson["memarchitecturespec"].toObject()["dataRate"].toInt();
|
||||
per2BankOffset = mMemspecJson["memarchitecturespec"].toObject()["per2BankOffset"].toInt();
|
||||
void TimeDependenciesInfoLPDDR5::mInitializeValues()
|
||||
{
|
||||
burstLength = mMemspecJson["memarchitecturespec"].toObject()["burstLength"].toInt();
|
||||
dataRate = mMemspecJson["memarchitecturespec"].toObject()["dataRate"].toInt();
|
||||
per2BankOffset = mMemspecJson["memarchitecturespec"].toObject()["per2BankOffset"].toInt();
|
||||
|
||||
tRCD = tCK * mMemspecJson["memtimingspec"].toObject()["RCD"].toInt();
|
||||
tRPpb = tCK * mMemspecJson["memtimingspec"].toObject()["RPpb"].toInt();
|
||||
tRPab = tCK * mMemspecJson["memtimingspec"].toObject()["RPab"].toInt();
|
||||
tRAS = tCK * mMemspecJson["memtimingspec"].toObject()["RAS"].toInt();
|
||||
tRCpb = tCK * mMemspecJson["memtimingspec"].toObject()["RCpb"].toInt();
|
||||
tRCab = tCK * mMemspecJson["memtimingspec"].toObject()["RCab"].toInt();
|
||||
tCL = tCK * mMemspecJson["memtimingspec"].toObject()["CL"].toInt();
|
||||
tCWL = tCK * mMemspecJson["memtimingspec"].toObject()["CWL"].toInt();
|
||||
tAL = tCK * mMemspecJson["memtimingspec"].toObject()["AL"].toInt();
|
||||
tRL = tCK * mMemspecJson["memtimingspec"].toObject()["RL"].toInt();
|
||||
tRPRE = tCK * mMemspecJson["memtimingspec"].toObject()["RPRE"].toInt();
|
||||
tWPRE = tCK * mMemspecJson["memtimingspec"].toObject()["WPRE"].toInt();
|
||||
tWL = tCK * mMemspecJson["memtimingspec"].toObject()["WL"].toInt();
|
||||
tCCD_S = tCK * mMemspecJson["memtimingspec"].toObject()["CCD_S"].toInt();
|
||||
tCCD_L = tCK * mMemspecJson["memtimingspec"].toObject()["CCD_L"].toInt();
|
||||
tRRD = tCK * mMemspecJson["memtimingspec"].toObject()["RRD"].toInt();
|
||||
tFAW = tCK * mMemspecJson["memtimingspec"].toObject()["FAW"].toInt();
|
||||
tWTR_S = tCK * mMemspecJson["memtimingspec"].toObject()["WTR_S"].toInt();
|
||||
tWTR_L = tCK * mMemspecJson["memtimingspec"].toObject()["WTR_L"].toInt();
|
||||
tRTP = tCK * mMemspecJson["memtimingspec"].toObject()["RTP"].toInt();
|
||||
tWR = tCK * mMemspecJson["memtimingspec"].toObject()["WR"].toInt();
|
||||
tRFCab = tCK * mMemspecJson["memtimingspec"].toObject()["RFCab"].toInt();
|
||||
tRFCpb = tCK * mMemspecJson["memtimingspec"].toObject()["RFCpb"].toInt();
|
||||
tXS = tCK * mMemspecJson["memtimingspec"].toObject()["XS"].toInt();
|
||||
tXSDLL = tCK * mMemspecJson["memtimingspec"].toObject()["XSDLL"].toInt();
|
||||
tXP = tCK * mMemspecJson["memtimingspec"].toObject()["XP"].toInt();
|
||||
tCKE = tCK * mMemspecJson["memtimingspec"].toObject()["CKE"].toInt();
|
||||
tCKESR = tCK * mMemspecJson["memtimingspec"].toObject()["CKESR"].toInt();
|
||||
tPD = tCK * mMemspecJson["memtimingspec"].toObject()["PD"].toInt();
|
||||
tPRPDEN = tCK * mMemspecJson["memtimingspec"].toObject()["PRPDEN"].toInt();
|
||||
tREFPDEN = tCK * mMemspecJson["memtimingspec"].toObject()["REFPDEN"].toInt();
|
||||
tRTRS = tCK * mMemspecJson["memtimingspec"].toObject()["RTRS"].toInt();
|
||||
tRBTP = tCK * mMemspecJson["memtimingspec"].toObject()["RBTP"].toInt();
|
||||
BL_n_min_16 = tCK * mMemspecJson["memtimingspec"].toObject()["BL_n_min_16"].toInt();
|
||||
BL_n_min_32 = tCK * mMemspecJson["memtimingspec"].toObject()["BL_n_min_32"].toInt();
|
||||
BL_n_max_16 = tCK * mMemspecJson["memtimingspec"].toObject()["BL_n_max_16"].toInt();
|
||||
BL_n_max_32 = tCK * mMemspecJson["memtimingspec"].toObject()["BL_n_max_32"].toInt();
|
||||
BL_n_S_16 = tCK * mMemspecJson["memtimingspec"].toObject()["BL_n_S_16"].toInt();
|
||||
BL_n_S_32 = tCK * mMemspecJson["memtimingspec"].toObject()["BL_n_S_32"].toInt();
|
||||
BL_n_L_16 = tCK * mMemspecJson["memtimingspec"].toObject()["BL_n_L_16"].toInt();
|
||||
BL_n_L_32 = tCK * mMemspecJson["memtimingspec"].toObject()["BL_n_L_32"].toInt();
|
||||
tWCK2DQO = tCK * mMemspecJson["memtimingspec"].toObject()["WCK2DQO"].toInt();
|
||||
tPPD = tCK * mMemspecJson["memtimingspec"].toObject()["PPD"].toInt();
|
||||
tpbR2act = tCK * mMemspecJson["memtimingspec"].toObject()["pbR2act"].toInt();
|
||||
tpbR2pbR = tCK * mMemspecJson["memtimingspec"].toObject()["pbR2pbR"].toInt();
|
||||
tRCD = tCK * mMemspecJson["memtimingspec"].toObject()["RCD"].toInt();
|
||||
tRPpb = tCK * mMemspecJson["memtimingspec"].toObject()["RPpb"].toInt();
|
||||
tRPab = tCK * mMemspecJson["memtimingspec"].toObject()["RPab"].toInt();
|
||||
tRAS = tCK * mMemspecJson["memtimingspec"].toObject()["RAS"].toInt();
|
||||
tRCpb = tCK * mMemspecJson["memtimingspec"].toObject()["RCpb"].toInt();
|
||||
tRCab = tCK * mMemspecJson["memtimingspec"].toObject()["RCab"].toInt();
|
||||
tCL = tCK * mMemspecJson["memtimingspec"].toObject()["CL"].toInt();
|
||||
tCWL = tCK * mMemspecJson["memtimingspec"].toObject()["CWL"].toInt();
|
||||
tAL = tCK * mMemspecJson["memtimingspec"].toObject()["AL"].toInt();
|
||||
tRL = tCK * mMemspecJson["memtimingspec"].toObject()["RL"].toInt();
|
||||
tRPRE = tCK * mMemspecJson["memtimingspec"].toObject()["RPRE"].toInt();
|
||||
tWPRE = tCK * mMemspecJson["memtimingspec"].toObject()["WPRE"].toInt();
|
||||
tWL = tCK * mMemspecJson["memtimingspec"].toObject()["WL"].toInt();
|
||||
tCCD_S = tCK * mMemspecJson["memtimingspec"].toObject()["CCD_S"].toInt();
|
||||
tCCD_L = tCK * mMemspecJson["memtimingspec"].toObject()["CCD_L"].toInt();
|
||||
tRRD = tCK * mMemspecJson["memtimingspec"].toObject()["RRD"].toInt();
|
||||
tFAW = tCK * mMemspecJson["memtimingspec"].toObject()["FAW"].toInt();
|
||||
tWTR_S = tCK * mMemspecJson["memtimingspec"].toObject()["WTR_S"].toInt();
|
||||
tWTR_L = tCK * mMemspecJson["memtimingspec"].toObject()["WTR_L"].toInt();
|
||||
tRTP = tCK * mMemspecJson["memtimingspec"].toObject()["RTP"].toInt();
|
||||
tWR = tCK * mMemspecJson["memtimingspec"].toObject()["WR"].toInt();
|
||||
tRFCab = tCK * mMemspecJson["memtimingspec"].toObject()["RFCab"].toInt();
|
||||
tRFCpb = tCK * mMemspecJson["memtimingspec"].toObject()["RFCpb"].toInt();
|
||||
tXS = tCK * mMemspecJson["memtimingspec"].toObject()["XS"].toInt();
|
||||
tXSDLL = tCK * mMemspecJson["memtimingspec"].toObject()["XSDLL"].toInt();
|
||||
tXP = tCK * mMemspecJson["memtimingspec"].toObject()["XP"].toInt();
|
||||
tCKE = tCK * mMemspecJson["memtimingspec"].toObject()["CKE"].toInt();
|
||||
tCKESR = tCK * mMemspecJson["memtimingspec"].toObject()["CKESR"].toInt();
|
||||
tPD = tCK * mMemspecJson["memtimingspec"].toObject()["PD"].toInt();
|
||||
tPRPDEN = tCK * mMemspecJson["memtimingspec"].toObject()["PRPDEN"].toInt();
|
||||
tREFPDEN = tCK * mMemspecJson["memtimingspec"].toObject()["REFPDEN"].toInt();
|
||||
tRTRS = tCK * mMemspecJson["memtimingspec"].toObject()["RTRS"].toInt();
|
||||
tRBTP = tCK * mMemspecJson["memtimingspec"].toObject()["RBTP"].toInt();
|
||||
BL_n_min_16 = tCK * mMemspecJson["memtimingspec"].toObject()["BL_n_min_16"].toInt();
|
||||
BL_n_min_32 = tCK * mMemspecJson["memtimingspec"].toObject()["BL_n_min_32"].toInt();
|
||||
BL_n_max_16 = tCK * mMemspecJson["memtimingspec"].toObject()["BL_n_max_16"].toInt();
|
||||
BL_n_max_32 = tCK * mMemspecJson["memtimingspec"].toObject()["BL_n_max_32"].toInt();
|
||||
BL_n_S_16 = tCK * mMemspecJson["memtimingspec"].toObject()["BL_n_S_16"].toInt();
|
||||
BL_n_S_32 = tCK * mMemspecJson["memtimingspec"].toObject()["BL_n_S_32"].toInt();
|
||||
BL_n_L_16 = tCK * mMemspecJson["memtimingspec"].toObject()["BL_n_L_16"].toInt();
|
||||
BL_n_L_32 = tCK * mMemspecJson["memtimingspec"].toObject()["BL_n_L_32"].toInt();
|
||||
tWCK2DQO = tCK * mMemspecJson["memtimingspec"].toObject()["WCK2DQO"].toInt();
|
||||
tPPD = tCK * mMemspecJson["memtimingspec"].toObject()["PPD"].toInt();
|
||||
tpbR2act = tCK * mMemspecJson["memtimingspec"].toObject()["pbR2act"].toInt();
|
||||
tpbR2pbR = tCK * mMemspecJson["memtimingspec"].toObject()["pbR2pbR"].toInt();
|
||||
|
||||
tBURST16 = (uint) (16 / (float) dataRate) * tCK;
|
||||
tBURST32 = (uint) (32 / (float) dataRate) * tCK;
|
||||
tBURST16 = (uint)(16 / (float)dataRate) * tCK;
|
||||
tBURST32 = (uint)(32 / (float)dataRate) * tCK;
|
||||
|
||||
mPools.insert({
|
||||
"CMD_BUS", {
|
||||
1, {
|
||||
{"ACT", 2 * tCK},
|
||||
{"RD", tCK},
|
||||
{"WR", tCK},
|
||||
{"RDA", tCK},
|
||||
{"WRA", tCK},
|
||||
{"PREPB", tCK},
|
||||
{"PREAB", tCK},
|
||||
{"REFAB", tCK},
|
||||
{"REFPB", tCK},
|
||||
{"REFP2B", tCK},
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
mPools.insert({
|
||||
"NAW", {
|
||||
4, {
|
||||
{"ACT", tFAW},
|
||||
{"REFPB", tFAW},
|
||||
{"REFP2B", tFAW},
|
||||
}
|
||||
}
|
||||
});
|
||||
mPools.insert({"CMD_BUS",
|
||||
{1,
|
||||
{
|
||||
{"ACT", 2 * tCK},
|
||||
{"RD", tCK},
|
||||
{"WR", tCK},
|
||||
{"RDA", tCK},
|
||||
{"WRA", tCK},
|
||||
{"PREPB", tCK},
|
||||
{"PREAB", tCK},
|
||||
{"REFAB", tCK},
|
||||
{"REFPB", tCK},
|
||||
{"REFP2B", tCK},
|
||||
}}});
|
||||
|
||||
mPools.insert({"NAW",
|
||||
{4,
|
||||
{
|
||||
{"ACT", tFAW},
|
||||
{"REFPB", tFAW},
|
||||
{"REFP2B", tFAW},
|
||||
}}});
|
||||
}
|
||||
|
||||
const std::vector<QString> TimeDependenciesInfoLPDDR5::getPossiblePhases() {
|
||||
return {
|
||||
"ACT",
|
||||
"RD",
|
||||
"WR",
|
||||
"PREPB",
|
||||
"RDA",
|
||||
"WRA",
|
||||
"REFPB",
|
||||
"REFP2B",
|
||||
"REFAB",
|
||||
"PREAB",
|
||||
};
|
||||
const std::vector<QString> TimeDependenciesInfoLPDDR5::getPossiblePhases()
|
||||
{
|
||||
return {
|
||||
"ACT",
|
||||
"RD",
|
||||
"WR",
|
||||
"PREPB",
|
||||
"RDA",
|
||||
"WRA",
|
||||
"REFPB",
|
||||
"REFP2B",
|
||||
"REFAB",
|
||||
"PREAB",
|
||||
};
|
||||
}
|
||||
|
||||
DependencyMap TimeDependenciesInfoLPDDR5::mSpecializedGetDependencies() const {
|
||||
DependencyMap dmap;
|
||||
DependencyMap TimeDependenciesInfoLPDDR5::mSpecializedGetDependencies() const
|
||||
{
|
||||
DependencyMap dmap;
|
||||
|
||||
auto passBurstLength16 = std::make_shared<PassFunction>(
|
||||
[] PASSFUNCTIONDECL {
|
||||
auto other = std::dynamic_pointer_cast<LPDDR5DBPhaseEntry>(otherPhase);
|
||||
if (!other) return false;
|
||||
return other->tBurstLength == 16;
|
||||
}
|
||||
);
|
||||
auto passBurstLength32 = std::make_shared<PassFunction>(
|
||||
[] PASSFUNCTIONDECL {
|
||||
auto other = std::dynamic_pointer_cast<LPDDR5DBPhaseEntry>(otherPhase);
|
||||
if (!other) return false;
|
||||
return other->tBurstLength == 32;
|
||||
}
|
||||
);
|
||||
auto passBurstLength16 = std::make_shared<PassFunction>(
|
||||
[] PASSFUNCTIONDECL
|
||||
{
|
||||
auto other = std::dynamic_pointer_cast<LPDDR5DBPhaseEntry>(otherPhase);
|
||||
if (!other)
|
||||
return false;
|
||||
return other->tBurstLength == 16;
|
||||
});
|
||||
auto passBurstLength32 = std::make_shared<PassFunction>(
|
||||
[] PASSFUNCTIONDECL
|
||||
{
|
||||
auto other = std::dynamic_pointer_cast<LPDDR5DBPhaseEntry>(otherPhase);
|
||||
if (!other)
|
||||
return false;
|
||||
return other->tBurstLength == 32;
|
||||
});
|
||||
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("ACT"),
|
||||
forward_as_tuple(
|
||||
initializer_list<TimeDependency>{
|
||||
{tRCpb, "ACT", DependencyType::IntraBank, "tRCpb"},
|
||||
{tRRD, "ACT", DependencyType::IntraRank, "tRRD"},
|
||||
{BL_n_min_16 + tRBTP + tRPpb - tCK, "RDA", DependencyType::IntraBank, "BL_n_min_16 + tRBTP + tRPpb - tCK", passBurstLength16},
|
||||
{BL_n_min_32 + tRBTP + tRPpb - tCK, "RDA", DependencyType::IntraBank, "BL_n_min_32 + tRBTP + tRPpb - tCK", passBurstLength32},
|
||||
{tWL + BL_n_min_16 + tCK + tWR + tRPpb - tCK, "WRA", DependencyType::IntraBank, "tWL + BL_n_min_16 + tCK + tWR + tRPpb - tCK", passBurstLength16},
|
||||
{tWL + BL_n_min_32 + tCK + tWR + tRPpb - tCK, "WRA", DependencyType::IntraBank, "tWL + BL_n_min_32 + tCK + tWR + tRPpb - tCK", passBurstLength32},
|
||||
{tRPpb - tCK, "PREPB", DependencyType::IntraBank, "tRPpb - tCK"},
|
||||
{tRPab - tCK, "PREAB", DependencyType::IntraRank, "tRPab - tCK"},
|
||||
{tRFCab - tCK, "REFAB", DependencyType::IntraRank, "tRFCab - tCK"},
|
||||
{tpbR2act - tCK, "REFPB", DependencyType::IntraRank, "tpbR2act - tCK"},
|
||||
{tpbR2act - tCK, "REFP2B", DependencyType::IntraRank, "tpbR2act - tCK"},
|
||||
{tRFCpb - tCK, "REFPB", DependencyType::IntraBank, "tRFCpb - tCK"},
|
||||
{tRFCpb - tCK, "REFP2B", DependencyType::IntraBank, "tRFCpb - tCK"},
|
||||
{0, "CMD_BUS", DependencyType::InterRank, "CMDBus"},
|
||||
{0, "NAW", DependencyType::IntraRank, "tFAW"},
|
||||
}
|
||||
)
|
||||
);
|
||||
dmap.emplace(piecewise_construct,
|
||||
forward_as_tuple("ACT"),
|
||||
forward_as_tuple(initializer_list<TimeDependency>{
|
||||
{tRCpb, "ACT", DependencyType::IntraBank, "tRCpb"},
|
||||
{tRRD, "ACT", DependencyType::IntraRank, "tRRD"},
|
||||
{BL_n_min_16 + tRBTP + tRPpb - tCK,
|
||||
"RDA",
|
||||
DependencyType::IntraBank,
|
||||
"BL_n_min_16 + tRBTP + tRPpb - tCK",
|
||||
passBurstLength16},
|
||||
{BL_n_min_32 + tRBTP + tRPpb - tCK,
|
||||
"RDA",
|
||||
DependencyType::IntraBank,
|
||||
"BL_n_min_32 + tRBTP + tRPpb - tCK",
|
||||
passBurstLength32},
|
||||
{tWL + BL_n_min_16 + tCK + tWR + tRPpb - tCK,
|
||||
"WRA",
|
||||
DependencyType::IntraBank,
|
||||
"tWL + BL_n_min_16 + tCK + tWR + tRPpb - tCK",
|
||||
passBurstLength16},
|
||||
{tWL + BL_n_min_32 + tCK + tWR + tRPpb - tCK,
|
||||
"WRA",
|
||||
DependencyType::IntraBank,
|
||||
"tWL + BL_n_min_32 + tCK + tWR + tRPpb - tCK",
|
||||
passBurstLength32},
|
||||
{tRPpb - tCK, "PREPB", DependencyType::IntraBank, "tRPpb - tCK"},
|
||||
{tRPab - tCK, "PREAB", DependencyType::IntraRank, "tRPab - tCK"},
|
||||
{tRFCab - tCK, "REFAB", DependencyType::IntraRank, "tRFCab - tCK"},
|
||||
{tpbR2act - tCK, "REFPB", DependencyType::IntraRank, "tpbR2act - tCK"},
|
||||
{tpbR2act - tCK, "REFP2B", DependencyType::IntraRank, "tpbR2act - tCK"},
|
||||
{tRFCpb - tCK, "REFPB", DependencyType::IntraBank, "tRFCpb - tCK"},
|
||||
{tRFCpb - tCK, "REFP2B", DependencyType::IntraBank, "tRFCpb - tCK"},
|
||||
{0, "CMD_BUS", DependencyType::InterRank, "CMDBus"},
|
||||
{0, "NAW", DependencyType::IntraRank, "tFAW"},
|
||||
}));
|
||||
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("RD"),
|
||||
forward_as_tuple(
|
||||
initializer_list<TimeDependency>{
|
||||
{tRCD + tCK, "ACT", DependencyType::IntraBank, "tRCD + tCK"},
|
||||
{BL_n_L_16, "RD", DependencyType::IntraBankGroup, "BL_n_L_16", passBurstLength16},
|
||||
{BL_n_L_32, "RD", DependencyType::IntraBankGroup, "BL_n_L_32", passBurstLength32},
|
||||
{BL_n_S_16, "RD", DependencyType::IntraRank, "BL_n_S_16", passBurstLength16},
|
||||
{BL_n_S_32, "RD", DependencyType::IntraRank, "BL_n_S_32", passBurstLength32},
|
||||
{tBURST16 + tRTRS, "RD", DependencyType::InterRank, "tBURST16 + tRTRS", passBurstLength16},
|
||||
{tBURST32 + tRTRS, "RD", DependencyType::InterRank, "tBURST32 + tRTRS", passBurstLength32},
|
||||
{BL_n_L_16, "RDA", DependencyType::IntraBankGroup, "BL_n_L_16", passBurstLength16},
|
||||
{BL_n_L_32, "RDA", DependencyType::IntraBankGroup, "BL_n_L_32", passBurstLength32},
|
||||
{BL_n_S_16, "RDA", DependencyType::IntraRank, "BL_n_S_16", passBurstLength16},
|
||||
{BL_n_S_32, "RDA", DependencyType::IntraRank, "BL_n_S_32", passBurstLength32},
|
||||
{tBURST16 + tRTRS, "RDA", DependencyType::InterRank, "tBURST16 + tRTRS", passBurstLength16},
|
||||
{tBURST32 + tRTRS, "RDA", DependencyType::InterRank, "tBURST32 + tRTRS", passBurstLength32},
|
||||
{tWL + BL_n_max_16 + tWTR_L, "WR", DependencyType::IntraBankGroup, "tWL + BL_n_max_16 + tWTR_L", passBurstLength16},
|
||||
{tWL + BL_n_max_32 + tWTR_L, "WR", DependencyType::IntraBankGroup, "tWL + BL_n_max_32 + tWTR_L", passBurstLength32},
|
||||
{tWL + BL_n_min_16 + tWTR_S, "WR", DependencyType::IntraRank, "tWL + BL_n_min_16 + tWTR_S", passBurstLength16},
|
||||
{tWL + BL_n_min_32 + tWTR_S, "WR", DependencyType::IntraRank, "tWL + BL_n_min_32 + tWTR_S", passBurstLength32},
|
||||
{tWL + BL_n_max_16 + tWTR_L, "WRA", DependencyType::IntraBankGroup, "tWL + BL_n_max_16 + tWTR_L", passBurstLength16},
|
||||
{tWL + BL_n_max_32 + tWTR_L, "WRA", DependencyType::IntraBankGroup, "tWL + BL_n_max_32 + tWTR_L", passBurstLength32},
|
||||
{tWL + BL_n_min_16 + tWTR_S, "WRA", DependencyType::IntraRank, "tWL + BL_n_min_16 + tWTR_S", passBurstLength16},
|
||||
{tWL + BL_n_min_32 + tWTR_S, "WRA", DependencyType::IntraRank, "tWL + BL_n_min_32 + tWTR_S", passBurstLength32},
|
||||
{0, "CMD_BUS", DependencyType::InterRank, "CMDBus"},
|
||||
}
|
||||
)
|
||||
);
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("RD"),
|
||||
forward_as_tuple(initializer_list<TimeDependency>{
|
||||
{tRCD + tCK, "ACT", DependencyType::IntraBank, "tRCD + tCK"},
|
||||
{BL_n_L_16, "RD", DependencyType::IntraBankGroup, "BL_n_L_16", passBurstLength16},
|
||||
{BL_n_L_32, "RD", DependencyType::IntraBankGroup, "BL_n_L_32", passBurstLength32},
|
||||
{BL_n_S_16, "RD", DependencyType::IntraRank, "BL_n_S_16", passBurstLength16},
|
||||
{BL_n_S_32, "RD", DependencyType::IntraRank, "BL_n_S_32", passBurstLength32},
|
||||
{tBURST16 + tRTRS,
|
||||
"RD",
|
||||
DependencyType::InterRank,
|
||||
"tBURST16 + tRTRS",
|
||||
passBurstLength16},
|
||||
{tBURST32 + tRTRS,
|
||||
"RD",
|
||||
DependencyType::InterRank,
|
||||
"tBURST32 + tRTRS",
|
||||
passBurstLength32},
|
||||
{BL_n_L_16, "RDA", DependencyType::IntraBankGroup, "BL_n_L_16", passBurstLength16},
|
||||
{BL_n_L_32, "RDA", DependencyType::IntraBankGroup, "BL_n_L_32", passBurstLength32},
|
||||
{BL_n_S_16, "RDA", DependencyType::IntraRank, "BL_n_S_16", passBurstLength16},
|
||||
{BL_n_S_32, "RDA", DependencyType::IntraRank, "BL_n_S_32", passBurstLength32},
|
||||
{tBURST16 + tRTRS,
|
||||
"RDA",
|
||||
DependencyType::InterRank,
|
||||
"tBURST16 + tRTRS",
|
||||
passBurstLength16},
|
||||
{tBURST32 + tRTRS,
|
||||
"RDA",
|
||||
DependencyType::InterRank,
|
||||
"tBURST32 + tRTRS",
|
||||
passBurstLength32},
|
||||
{tWL + BL_n_max_16 + tWTR_L,
|
||||
"WR",
|
||||
DependencyType::IntraBankGroup,
|
||||
"tWL + BL_n_max_16 + tWTR_L",
|
||||
passBurstLength16},
|
||||
{tWL + BL_n_max_32 + tWTR_L,
|
||||
"WR",
|
||||
DependencyType::IntraBankGroup,
|
||||
"tWL + BL_n_max_32 + tWTR_L",
|
||||
passBurstLength32},
|
||||
{tWL + BL_n_min_16 + tWTR_S,
|
||||
"WR",
|
||||
DependencyType::IntraRank,
|
||||
"tWL + BL_n_min_16 + tWTR_S",
|
||||
passBurstLength16},
|
||||
{tWL + BL_n_min_32 + tWTR_S,
|
||||
"WR",
|
||||
DependencyType::IntraRank,
|
||||
"tWL + BL_n_min_32 + tWTR_S",
|
||||
passBurstLength32},
|
||||
{tWL + BL_n_max_16 + tWTR_L,
|
||||
"WRA",
|
||||
DependencyType::IntraBankGroup,
|
||||
"tWL + BL_n_max_16 + tWTR_L",
|
||||
passBurstLength16},
|
||||
{tWL + BL_n_max_32 + tWTR_L,
|
||||
"WRA",
|
||||
DependencyType::IntraBankGroup,
|
||||
"tWL + BL_n_max_32 + tWTR_L",
|
||||
passBurstLength32},
|
||||
{tWL + BL_n_min_16 + tWTR_S,
|
||||
"WRA",
|
||||
DependencyType::IntraRank,
|
||||
"tWL + BL_n_min_16 + tWTR_S",
|
||||
passBurstLength16},
|
||||
{tWL + BL_n_min_32 + tWTR_S,
|
||||
"WRA",
|
||||
DependencyType::IntraRank,
|
||||
"tWL + BL_n_min_32 + tWTR_S",
|
||||
passBurstLength32},
|
||||
{0, "CMD_BUS", DependencyType::InterRank, "CMDBus"},
|
||||
}));
|
||||
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("WR"),
|
||||
forward_as_tuple(
|
||||
initializer_list<TimeDependency>{
|
||||
{tRCD + tCK, "ACT", DependencyType::IntraBank, "tRCD + tCK"},
|
||||
{tRL + BL_n_max_16 + tWCK2DQO - tWL, "RD", DependencyType::IntraBankGroup, "tRL + BL_n_max_16 + tWCK2DQO - tWL", passBurstLength16},
|
||||
{tRL + BL_n_max_32 + tWCK2DQO - tWL, "RD", DependencyType::IntraBankGroup, "tRL + BL_n_max_32 + tWCK2DQO - tWL", passBurstLength32},
|
||||
{tRL + BL_n_min_16 + tWCK2DQO - tWL, "RD", DependencyType::IntraRank, "tRL + BL_n_min_16 + tWCK2DQO - tWL", passBurstLength16},
|
||||
{tRL + BL_n_min_32 + tWCK2DQO - tWL, "RD", DependencyType::IntraRank, "tRL + BL_n_min_32 + tWCK2DQO - tWL", passBurstLength32},
|
||||
{tRL + BL_n_max_16 + tWCK2DQO - tWL, "RDA", DependencyType::IntraBankGroup, "tRL + BL_n_max_16 + tWCK2DQO - tWL", passBurstLength16},
|
||||
{tRL + BL_n_max_32 + tWCK2DQO - tWL, "RDA", DependencyType::IntraBankGroup, "tRL + BL_n_max_32 + tWCK2DQO - tWL", passBurstLength32},
|
||||
{tRL + BL_n_min_16 + tWCK2DQO - tWL, "RDA", DependencyType::IntraRank, "tRL + BL_n_min_16 + tWCK2DQO - tWL", passBurstLength16},
|
||||
{tRL + BL_n_min_32 + tWCK2DQO - tWL, "RDA", DependencyType::IntraRank, "tRL + BL_n_min_32 + tWCK2DQO - tWL", passBurstLength32},
|
||||
{BL_n_L_16, "WR", DependencyType::IntraBankGroup, "BL_n_L_16", passBurstLength16},
|
||||
{BL_n_L_32, "WR", DependencyType::IntraBankGroup, "BL_n_L_32", passBurstLength32},
|
||||
{BL_n_S_16, "WR", DependencyType::IntraRank, "BL_n_S_16", passBurstLength16},
|
||||
{BL_n_S_32, "WR", DependencyType::IntraRank, "BL_n_S_32", passBurstLength32},
|
||||
{tBURST16 + tRTRS, "WR", DependencyType::InterRank, "tBURST16 + tRTRS", passBurstLength16},
|
||||
{tBURST32 + tRTRS, "WR", DependencyType::InterRank, "tBURST32 + tRTRS", passBurstLength32},
|
||||
{BL_n_L_16, "WRA", DependencyType::IntraBankGroup, "BL_n_L_16", passBurstLength16},
|
||||
{BL_n_L_32, "WRA", DependencyType::IntraBankGroup, "BL_n_L_32", passBurstLength32},
|
||||
{BL_n_S_16, "WRA", DependencyType::IntraRank, "BL_n_S_16", passBurstLength16},
|
||||
{BL_n_S_32, "WRA", DependencyType::IntraRank, "BL_n_S_32", passBurstLength32},
|
||||
{tBURST16 + tRTRS, "WRA", DependencyType::InterRank, "tBURST16 + tRTRS", passBurstLength16},
|
||||
{tBURST32 + tRTRS, "WRA", DependencyType::InterRank, "tBURST32 + tRTRS", passBurstLength32},
|
||||
{0, "CMD_BUS", DependencyType::InterRank, "CMDBus"},
|
||||
}
|
||||
)
|
||||
);
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("WR"),
|
||||
forward_as_tuple(initializer_list<TimeDependency>{
|
||||
{tRCD + tCK, "ACT", DependencyType::IntraBank, "tRCD + tCK"},
|
||||
{tRL + BL_n_max_16 + tWCK2DQO - tWL,
|
||||
"RD",
|
||||
DependencyType::IntraBankGroup,
|
||||
"tRL + BL_n_max_16 + tWCK2DQO - tWL",
|
||||
passBurstLength16},
|
||||
{tRL + BL_n_max_32 + tWCK2DQO - tWL,
|
||||
"RD",
|
||||
DependencyType::IntraBankGroup,
|
||||
"tRL + BL_n_max_32 + tWCK2DQO - tWL",
|
||||
passBurstLength32},
|
||||
{tRL + BL_n_min_16 + tWCK2DQO - tWL,
|
||||
"RD",
|
||||
DependencyType::IntraRank,
|
||||
"tRL + BL_n_min_16 + tWCK2DQO - tWL",
|
||||
passBurstLength16},
|
||||
{tRL + BL_n_min_32 + tWCK2DQO - tWL,
|
||||
"RD",
|
||||
DependencyType::IntraRank,
|
||||
"tRL + BL_n_min_32 + tWCK2DQO - tWL",
|
||||
passBurstLength32},
|
||||
{tRL + BL_n_max_16 + tWCK2DQO - tWL,
|
||||
"RDA",
|
||||
DependencyType::IntraBankGroup,
|
||||
"tRL + BL_n_max_16 + tWCK2DQO - tWL",
|
||||
passBurstLength16},
|
||||
{tRL + BL_n_max_32 + tWCK2DQO - tWL,
|
||||
"RDA",
|
||||
DependencyType::IntraBankGroup,
|
||||
"tRL + BL_n_max_32 + tWCK2DQO - tWL",
|
||||
passBurstLength32},
|
||||
{tRL + BL_n_min_16 + tWCK2DQO - tWL,
|
||||
"RDA",
|
||||
DependencyType::IntraRank,
|
||||
"tRL + BL_n_min_16 + tWCK2DQO - tWL",
|
||||
passBurstLength16},
|
||||
{tRL + BL_n_min_32 + tWCK2DQO - tWL,
|
||||
"RDA",
|
||||
DependencyType::IntraRank,
|
||||
"tRL + BL_n_min_32 + tWCK2DQO - tWL",
|
||||
passBurstLength32},
|
||||
{BL_n_L_16, "WR", DependencyType::IntraBankGroup, "BL_n_L_16", passBurstLength16},
|
||||
{BL_n_L_32, "WR", DependencyType::IntraBankGroup, "BL_n_L_32", passBurstLength32},
|
||||
{BL_n_S_16, "WR", DependencyType::IntraRank, "BL_n_S_16", passBurstLength16},
|
||||
{BL_n_S_32, "WR", DependencyType::IntraRank, "BL_n_S_32", passBurstLength32},
|
||||
{tBURST16 + tRTRS,
|
||||
"WR",
|
||||
DependencyType::InterRank,
|
||||
"tBURST16 + tRTRS",
|
||||
passBurstLength16},
|
||||
{tBURST32 + tRTRS,
|
||||
"WR",
|
||||
DependencyType::InterRank,
|
||||
"tBURST32 + tRTRS",
|
||||
passBurstLength32},
|
||||
{BL_n_L_16, "WRA", DependencyType::IntraBankGroup, "BL_n_L_16", passBurstLength16},
|
||||
{BL_n_L_32, "WRA", DependencyType::IntraBankGroup, "BL_n_L_32", passBurstLength32},
|
||||
{BL_n_S_16, "WRA", DependencyType::IntraRank, "BL_n_S_16", passBurstLength16},
|
||||
{BL_n_S_32, "WRA", DependencyType::IntraRank, "BL_n_S_32", passBurstLength32},
|
||||
{tBURST16 + tRTRS,
|
||||
"WRA",
|
||||
DependencyType::InterRank,
|
||||
"tBURST16 + tRTRS",
|
||||
passBurstLength16},
|
||||
{tBURST32 + tRTRS,
|
||||
"WRA",
|
||||
DependencyType::InterRank,
|
||||
"tBURST32 + tRTRS",
|
||||
passBurstLength32},
|
||||
{0, "CMD_BUS", DependencyType::InterRank, "CMDBus"},
|
||||
}));
|
||||
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("PREPB"),
|
||||
forward_as_tuple(
|
||||
initializer_list<TimeDependency>{
|
||||
{tRAS + tCK, "ACT", DependencyType::IntraBank, "tRAS + tCK"},
|
||||
{BL_n_min_16 + tRBTP, "RD", DependencyType::IntraBank, "BL_n_min_16 + tRBTP", passBurstLength16},
|
||||
{BL_n_min_32 + tRBTP, "RD", DependencyType::IntraBank, "BL_n_min_32 + tRBTP", passBurstLength32},
|
||||
{tWL + BL_n_min_16 + tCK + tWR, "WR", DependencyType::IntraBank, "tWL + BL_n_min_16 + tCK + tWR", passBurstLength16},
|
||||
{tWL + BL_n_min_32 + tCK + tWR, "WR", DependencyType::IntraBank, "tWL + BL_n_min_32 + tCK + tWR", passBurstLength32},
|
||||
{tPPD, "PREPB", DependencyType::IntraRank, "tPPD"},
|
||||
{0, "CMD_BUS", DependencyType::InterRank, "CMDBus"},
|
||||
}
|
||||
)
|
||||
);
|
||||
dmap.emplace(piecewise_construct,
|
||||
forward_as_tuple("PREPB"),
|
||||
forward_as_tuple(initializer_list<TimeDependency>{
|
||||
{tRAS + tCK, "ACT", DependencyType::IntraBank, "tRAS + tCK"},
|
||||
{BL_n_min_16 + tRBTP,
|
||||
"RD",
|
||||
DependencyType::IntraBank,
|
||||
"BL_n_min_16 + tRBTP",
|
||||
passBurstLength16},
|
||||
{BL_n_min_32 + tRBTP,
|
||||
"RD",
|
||||
DependencyType::IntraBank,
|
||||
"BL_n_min_32 + tRBTP",
|
||||
passBurstLength32},
|
||||
{tWL + BL_n_min_16 + tCK + tWR,
|
||||
"WR",
|
||||
DependencyType::IntraBank,
|
||||
"tWL + BL_n_min_16 + tCK + tWR",
|
||||
passBurstLength16},
|
||||
{tWL + BL_n_min_32 + tCK + tWR,
|
||||
"WR",
|
||||
DependencyType::IntraBank,
|
||||
"tWL + BL_n_min_32 + tCK + tWR",
|
||||
passBurstLength32},
|
||||
{tPPD, "PREPB", DependencyType::IntraRank, "tPPD"},
|
||||
{0, "CMD_BUS", DependencyType::InterRank, "CMDBus"},
|
||||
}));
|
||||
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("RDA"),
|
||||
forward_as_tuple(
|
||||
initializer_list<TimeDependency>{
|
||||
{tRCD + tCK, "ACT", DependencyType::IntraBank, "tRCD + tCK"},
|
||||
{BL_n_L_16, "RD", DependencyType::IntraBankGroup, "BL_n_L_16", passBurstLength16},
|
||||
{BL_n_L_32, "RD", DependencyType::IntraBankGroup, "BL_n_L_32", passBurstLength32},
|
||||
{BL_n_S_16, "RD", DependencyType::IntraRank, "BL_n_S_16", passBurstLength16},
|
||||
{BL_n_S_32, "RD", DependencyType::IntraRank, "BL_n_S_32", passBurstLength32},
|
||||
{tBURST16 + tRTRS, "RD", DependencyType::InterRank, "tBURST16 + tRTRS", passBurstLength16},
|
||||
{tBURST32 + tRTRS, "RD", DependencyType::InterRank, "tBURST32 + tRTRS", passBurstLength32},
|
||||
{BL_n_L_16, "RDA", DependencyType::IntraBankGroup, "BL_n_L_16", passBurstLength16},
|
||||
{BL_n_L_32, "RDA", DependencyType::IntraBankGroup, "BL_n_L_32", passBurstLength32},
|
||||
{BL_n_S_16, "RDA", DependencyType::IntraRank, "BL_n_S_16", passBurstLength16},
|
||||
{BL_n_S_32, "RDA", DependencyType::IntraRank, "BL_n_S_32", passBurstLength32},
|
||||
{tBURST16 + tRTRS, "RDA", DependencyType::InterRank, "tBURST16 + tRTRS", passBurstLength16},
|
||||
{tBURST32 + tRTRS, "RDA", DependencyType::InterRank, "tBURST32 + tRTRS", passBurstLength32},
|
||||
{tWL + BL_n_max_16 + tWTR_L, "WR", DependencyType::IntraBankGroup, "tWL + BL_n_max_16 + tWTR_L", passBurstLength16},
|
||||
{tWL + BL_n_max_32 + tWTR_L, "WR", DependencyType::IntraBankGroup, "tWL + BL_n_max_32 + tWTR_L", passBurstLength32},
|
||||
{tWL + BL_n_min_16 + tWTR_S, "WR", DependencyType::IntraRank, "tWL + BL_n_min_16 + tWTR_S", passBurstLength16},
|
||||
{tWL + BL_n_min_32 + tWTR_S, "WR", DependencyType::IntraRank, "tWL + BL_n_min_32 + tWTR_S", passBurstLength32},
|
||||
{tWL + BL_n_max_16 + tWTR_L, "WRA", DependencyType::IntraBankGroup, "tWL + BL_n_max_16 + tWTR_L", passBurstLength16},
|
||||
{tWL + BL_n_max_32 + tWTR_L, "WRA", DependencyType::IntraBankGroup, "tWL + BL_n_max_32 + tWTR_L", passBurstLength32},
|
||||
{tWL + BL_n_min_16 + tWTR_S, "WRA", DependencyType::IntraRank, "tWL + BL_n_min_16 + tWTR_S", passBurstLength16},
|
||||
{tWL + BL_n_min_32 + tWTR_S, "WRA", DependencyType::IntraRank, "tWL + BL_n_min_32 + tWTR_S", passBurstLength32},
|
||||
{0, "CMD_BUS", DependencyType::InterRank, "CMDBus"},
|
||||
}
|
||||
)
|
||||
);
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("RDA"),
|
||||
forward_as_tuple(initializer_list<TimeDependency>{
|
||||
{tRCD + tCK, "ACT", DependencyType::IntraBank, "tRCD + tCK"},
|
||||
{BL_n_L_16, "RD", DependencyType::IntraBankGroup, "BL_n_L_16", passBurstLength16},
|
||||
{BL_n_L_32, "RD", DependencyType::IntraBankGroup, "BL_n_L_32", passBurstLength32},
|
||||
{BL_n_S_16, "RD", DependencyType::IntraRank, "BL_n_S_16", passBurstLength16},
|
||||
{BL_n_S_32, "RD", DependencyType::IntraRank, "BL_n_S_32", passBurstLength32},
|
||||
{tBURST16 + tRTRS,
|
||||
"RD",
|
||||
DependencyType::InterRank,
|
||||
"tBURST16 + tRTRS",
|
||||
passBurstLength16},
|
||||
{tBURST32 + tRTRS,
|
||||
"RD",
|
||||
DependencyType::InterRank,
|
||||
"tBURST32 + tRTRS",
|
||||
passBurstLength32},
|
||||
{BL_n_L_16, "RDA", DependencyType::IntraBankGroup, "BL_n_L_16", passBurstLength16},
|
||||
{BL_n_L_32, "RDA", DependencyType::IntraBankGroup, "BL_n_L_32", passBurstLength32},
|
||||
{BL_n_S_16, "RDA", DependencyType::IntraRank, "BL_n_S_16", passBurstLength16},
|
||||
{BL_n_S_32, "RDA", DependencyType::IntraRank, "BL_n_S_32", passBurstLength32},
|
||||
{tBURST16 + tRTRS,
|
||||
"RDA",
|
||||
DependencyType::InterRank,
|
||||
"tBURST16 + tRTRS",
|
||||
passBurstLength16},
|
||||
{tBURST32 + tRTRS,
|
||||
"RDA",
|
||||
DependencyType::InterRank,
|
||||
"tBURST32 + tRTRS",
|
||||
passBurstLength32},
|
||||
{tWL + BL_n_max_16 + tWTR_L,
|
||||
"WR",
|
||||
DependencyType::IntraBankGroup,
|
||||
"tWL + BL_n_max_16 + tWTR_L",
|
||||
passBurstLength16},
|
||||
{tWL + BL_n_max_32 + tWTR_L,
|
||||
"WR",
|
||||
DependencyType::IntraBankGroup,
|
||||
"tWL + BL_n_max_32 + tWTR_L",
|
||||
passBurstLength32},
|
||||
{tWL + BL_n_min_16 + tWTR_S,
|
||||
"WR",
|
||||
DependencyType::IntraRank,
|
||||
"tWL + BL_n_min_16 + tWTR_S",
|
||||
passBurstLength16},
|
||||
{tWL + BL_n_min_32 + tWTR_S,
|
||||
"WR",
|
||||
DependencyType::IntraRank,
|
||||
"tWL + BL_n_min_32 + tWTR_S",
|
||||
passBurstLength32},
|
||||
{tWL + BL_n_max_16 + tWTR_L,
|
||||
"WRA",
|
||||
DependencyType::IntraBankGroup,
|
||||
"tWL + BL_n_max_16 + tWTR_L",
|
||||
passBurstLength16},
|
||||
{tWL + BL_n_max_32 + tWTR_L,
|
||||
"WRA",
|
||||
DependencyType::IntraBankGroup,
|
||||
"tWL + BL_n_max_32 + tWTR_L",
|
||||
passBurstLength32},
|
||||
{tWL + BL_n_min_16 + tWTR_S,
|
||||
"WRA",
|
||||
DependencyType::IntraRank,
|
||||
"tWL + BL_n_min_16 + tWTR_S",
|
||||
passBurstLength16},
|
||||
{tWL + BL_n_min_32 + tWTR_S,
|
||||
"WRA",
|
||||
DependencyType::IntraRank,
|
||||
"tWL + BL_n_min_32 + tWTR_S",
|
||||
passBurstLength32},
|
||||
{0, "CMD_BUS", DependencyType::InterRank, "CMDBus"},
|
||||
}));
|
||||
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("WRA"),
|
||||
forward_as_tuple(
|
||||
initializer_list<TimeDependency>{
|
||||
{tRCD + tCK, "ACT", DependencyType::IntraBank, "tRCD + tCK"},
|
||||
{tRL + BL_n_max_16 + tWCK2DQO - tWL, "RD", DependencyType::IntraBankGroup, "tRL + BL_n_max_16 + tWCK2DQO - tWL", passBurstLength16},
|
||||
{tRL + BL_n_max_32 + tWCK2DQO - tWL, "RD", DependencyType::IntraBankGroup, "tRL + BL_n_max_32 + tWCK2DQO - tWL", passBurstLength32},
|
||||
{tRL + BL_n_min_16 + tWCK2DQO - tWL, "RD", DependencyType::IntraRank, "tRL + BL_n_min_16 + tWCK2DQO - tWL", passBurstLength16},
|
||||
{tRL + BL_n_min_32 + tWCK2DQO - tWL, "RD", DependencyType::IntraRank, "tRL + BL_n_min_32 + tWCK2DQO - tWL", passBurstLength32},
|
||||
{tRL + BL_n_max_16 + tWCK2DQO - tWL, "RDA", DependencyType::IntraBankGroup, "tRL + BL_n_max_16 + tWCK2DQO - tWL", passBurstLength16},
|
||||
{tRL + BL_n_max_32 + tWCK2DQO - tWL, "RDA", DependencyType::IntraBankGroup, "tRL + BL_n_max_32 + tWCK2DQO - tWL", passBurstLength32},
|
||||
{tRL + BL_n_min_16 + tWCK2DQO - tWL, "RDA", DependencyType::IntraRank, "tRL + BL_n_min_16 + tWCK2DQO - tWL", passBurstLength16},
|
||||
{tRL + BL_n_min_32 + tWCK2DQO - tWL, "RDA", DependencyType::IntraRank, "tRL + BL_n_min_32 + tWCK2DQO - tWL", passBurstLength32},
|
||||
{BL_n_L_16, "WR", DependencyType::IntraBankGroup, "BL_n_L_16", passBurstLength16},
|
||||
{BL_n_L_32, "WR", DependencyType::IntraBankGroup, "BL_n_L_32", passBurstLength32},
|
||||
{BL_n_S_16, "WR", DependencyType::IntraRank, "BL_n_S_16", passBurstLength16},
|
||||
{BL_n_S_32, "WR", DependencyType::IntraRank, "BL_n_S_32", passBurstLength32},
|
||||
{tBURST16 + tRTRS, "WR", DependencyType::InterRank, "tBURST16 + tRTRS", passBurstLength16},
|
||||
{tBURST32 + tRTRS, "WR", DependencyType::InterRank, "tBURST32 + tRTRS", passBurstLength32},
|
||||
{BL_n_L_16, "WRA", DependencyType::IntraBankGroup, "BL_n_L_16", passBurstLength16},
|
||||
{BL_n_L_32, "WRA", DependencyType::IntraBankGroup, "BL_n_L_32", passBurstLength32},
|
||||
{BL_n_S_16, "WRA", DependencyType::IntraRank, "BL_n_S_16", passBurstLength16},
|
||||
{BL_n_S_32, "WRA", DependencyType::IntraRank, "BL_n_S_32", passBurstLength32},
|
||||
{tBURST16 + tRTRS, "WRA", DependencyType::InterRank, "tBURST16 + tRTRS", passBurstLength16},
|
||||
{tBURST32 + tRTRS, "WRA", DependencyType::InterRank, "tBURST32 + tRTRS", passBurstLength32},
|
||||
{0, "CMD_BUS", DependencyType::InterRank, "CMDBus"},
|
||||
}
|
||||
)
|
||||
);
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("WRA"),
|
||||
forward_as_tuple(initializer_list<TimeDependency>{
|
||||
{tRCD + tCK, "ACT", DependencyType::IntraBank, "tRCD + tCK"},
|
||||
{tRL + BL_n_max_16 + tWCK2DQO - tWL,
|
||||
"RD",
|
||||
DependencyType::IntraBankGroup,
|
||||
"tRL + BL_n_max_16 + tWCK2DQO - tWL",
|
||||
passBurstLength16},
|
||||
{tRL + BL_n_max_32 + tWCK2DQO - tWL,
|
||||
"RD",
|
||||
DependencyType::IntraBankGroup,
|
||||
"tRL + BL_n_max_32 + tWCK2DQO - tWL",
|
||||
passBurstLength32},
|
||||
{tRL + BL_n_min_16 + tWCK2DQO - tWL,
|
||||
"RD",
|
||||
DependencyType::IntraRank,
|
||||
"tRL + BL_n_min_16 + tWCK2DQO - tWL",
|
||||
passBurstLength16},
|
||||
{tRL + BL_n_min_32 + tWCK2DQO - tWL,
|
||||
"RD",
|
||||
DependencyType::IntraRank,
|
||||
"tRL + BL_n_min_32 + tWCK2DQO - tWL",
|
||||
passBurstLength32},
|
||||
{tRL + BL_n_max_16 + tWCK2DQO - tWL,
|
||||
"RDA",
|
||||
DependencyType::IntraBankGroup,
|
||||
"tRL + BL_n_max_16 + tWCK2DQO - tWL",
|
||||
passBurstLength16},
|
||||
{tRL + BL_n_max_32 + tWCK2DQO - tWL,
|
||||
"RDA",
|
||||
DependencyType::IntraBankGroup,
|
||||
"tRL + BL_n_max_32 + tWCK2DQO - tWL",
|
||||
passBurstLength32},
|
||||
{tRL + BL_n_min_16 + tWCK2DQO - tWL,
|
||||
"RDA",
|
||||
DependencyType::IntraRank,
|
||||
"tRL + BL_n_min_16 + tWCK2DQO - tWL",
|
||||
passBurstLength16},
|
||||
{tRL + BL_n_min_32 + tWCK2DQO - tWL,
|
||||
"RDA",
|
||||
DependencyType::IntraRank,
|
||||
"tRL + BL_n_min_32 + tWCK2DQO - tWL",
|
||||
passBurstLength32},
|
||||
{BL_n_L_16, "WR", DependencyType::IntraBankGroup, "BL_n_L_16", passBurstLength16},
|
||||
{BL_n_L_32, "WR", DependencyType::IntraBankGroup, "BL_n_L_32", passBurstLength32},
|
||||
{BL_n_S_16, "WR", DependencyType::IntraRank, "BL_n_S_16", passBurstLength16},
|
||||
{BL_n_S_32, "WR", DependencyType::IntraRank, "BL_n_S_32", passBurstLength32},
|
||||
{tBURST16 + tRTRS,
|
||||
"WR",
|
||||
DependencyType::InterRank,
|
||||
"tBURST16 + tRTRS",
|
||||
passBurstLength16},
|
||||
{tBURST32 + tRTRS,
|
||||
"WR",
|
||||
DependencyType::InterRank,
|
||||
"tBURST32 + tRTRS",
|
||||
passBurstLength32},
|
||||
{BL_n_L_16, "WRA", DependencyType::IntraBankGroup, "BL_n_L_16", passBurstLength16},
|
||||
{BL_n_L_32, "WRA", DependencyType::IntraBankGroup, "BL_n_L_32", passBurstLength32},
|
||||
{BL_n_S_16, "WRA", DependencyType::IntraRank, "BL_n_S_16", passBurstLength16},
|
||||
{BL_n_S_32, "WRA", DependencyType::IntraRank, "BL_n_S_32", passBurstLength32},
|
||||
{tBURST16 + tRTRS,
|
||||
"WRA",
|
||||
DependencyType::InterRank,
|
||||
"tBURST16 + tRTRS",
|
||||
passBurstLength16},
|
||||
{tBURST32 + tRTRS,
|
||||
"WRA",
|
||||
DependencyType::InterRank,
|
||||
"tBURST32 + tRTRS",
|
||||
passBurstLength32},
|
||||
{0, "CMD_BUS", DependencyType::InterRank, "CMDBus"},
|
||||
}));
|
||||
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("REFAB"),
|
||||
forward_as_tuple(
|
||||
initializer_list<TimeDependency>{
|
||||
{tRCpb + tCK, "ACT", DependencyType::IntraRank, "tRCpb + tCK"},
|
||||
{BL_n_min_16 + tRBTP + tRPpb, "RDA", DependencyType::IntraRank, "BL_n_min_16 + tRBTP + tRPpb", passBurstLength16},
|
||||
{BL_n_min_32 + tRBTP + tRPpb, "RDA", DependencyType::IntraRank, "BL_n_min_32 + tRBTP + tRPpb", passBurstLength32},
|
||||
{tWL + BL_n_min_16 + tCK + tWR + tRPpb, "WRA", DependencyType::IntraRank, "tWL + BL_n_min_16 + tCK + tWR + tRPpb", passBurstLength16},
|
||||
{tWL + BL_n_min_32 + tCK + tWR + tRPpb, "WRA", DependencyType::IntraRank, "tWL + BL_n_min_32 + tCK + tWR + tRPpb", passBurstLength32},
|
||||
{tRPpb, "PREPB", DependencyType::IntraRank, "tRPpb"},
|
||||
{tRPab, "PREAB", DependencyType::IntraRank, "tRPab"},
|
||||
{tRFCab, "REFAB", DependencyType::IntraRank, "tRFCab"},
|
||||
{0, "CMD_BUS", DependencyType::InterRank, "CMDBus"},
|
||||
}
|
||||
)
|
||||
);
|
||||
dmap.emplace(piecewise_construct,
|
||||
forward_as_tuple("REFAB"),
|
||||
forward_as_tuple(initializer_list<TimeDependency>{
|
||||
{tRCpb + tCK, "ACT", DependencyType::IntraRank, "tRCpb + tCK"},
|
||||
{BL_n_min_16 + tRBTP + tRPpb,
|
||||
"RDA",
|
||||
DependencyType::IntraRank,
|
||||
"BL_n_min_16 + tRBTP + tRPpb",
|
||||
passBurstLength16},
|
||||
{BL_n_min_32 + tRBTP + tRPpb,
|
||||
"RDA",
|
||||
DependencyType::IntraRank,
|
||||
"BL_n_min_32 + tRBTP + tRPpb",
|
||||
passBurstLength32},
|
||||
{tWL + BL_n_min_16 + tCK + tWR + tRPpb,
|
||||
"WRA",
|
||||
DependencyType::IntraRank,
|
||||
"tWL + BL_n_min_16 + tCK + tWR + tRPpb",
|
||||
passBurstLength16},
|
||||
{tWL + BL_n_min_32 + tCK + tWR + tRPpb,
|
||||
"WRA",
|
||||
DependencyType::IntraRank,
|
||||
"tWL + BL_n_min_32 + tCK + tWR + tRPpb",
|
||||
passBurstLength32},
|
||||
{tRPpb, "PREPB", DependencyType::IntraRank, "tRPpb"},
|
||||
{tRPab, "PREAB", DependencyType::IntraRank, "tRPab"},
|
||||
{tRFCab, "REFAB", DependencyType::IntraRank, "tRFCab"},
|
||||
{0, "CMD_BUS", DependencyType::InterRank, "CMDBus"},
|
||||
}));
|
||||
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("PREAB"),
|
||||
forward_as_tuple(
|
||||
initializer_list<TimeDependency>{
|
||||
{tRAS + tCK, "ACT", DependencyType::IntraRank, "tRAS + tCK"},
|
||||
{BL_n_min_16 + tRBTP, "RD", DependencyType::IntraRank, "BL_n_min_16 + tRBTP", passBurstLength16},
|
||||
{BL_n_min_32 + tRBTP, "RD", DependencyType::IntraRank, "BL_n_min_32 + tRBTP", passBurstLength32},
|
||||
{BL_n_min_16 + tRBTP, "RDA", DependencyType::IntraRank, "BL_n_min_16 + tRBTP", passBurstLength16},
|
||||
{BL_n_min_32 + tRBTP, "RDA", DependencyType::IntraRank, "BL_n_min_32 + tRBTP", passBurstLength32},
|
||||
{tWL + BL_n_min_16 + tCK + tWR, "WR", DependencyType::IntraRank, "tWL + BL_n_min_16 + tCK + tWR", passBurstLength16},
|
||||
{tWL + BL_n_min_32 + tCK + tWR, "WR", DependencyType::IntraRank, "tWL + BL_n_min_32 + tCK + tWR", passBurstLength32},
|
||||
{tWL + BL_n_min_16 + tCK + tWR, "WRA", DependencyType::IntraRank, "tWL + BL_n_min_16 + tCK + tWR", passBurstLength16},
|
||||
{tWL + BL_n_min_32 + tCK + tWR, "WRA", DependencyType::IntraRank, "tWL + BL_n_min_32 + tCK + tWR", passBurstLength32},
|
||||
{tPPD, "PREPB", DependencyType::IntraRank, "tPPD"},
|
||||
{0, "CMD_BUS", DependencyType::InterRank, "CMDBus"},
|
||||
}
|
||||
)
|
||||
);
|
||||
dmap.emplace(piecewise_construct,
|
||||
forward_as_tuple("PREAB"),
|
||||
forward_as_tuple(initializer_list<TimeDependency>{
|
||||
{tRAS + tCK, "ACT", DependencyType::IntraRank, "tRAS + tCK"},
|
||||
{BL_n_min_16 + tRBTP,
|
||||
"RD",
|
||||
DependencyType::IntraRank,
|
||||
"BL_n_min_16 + tRBTP",
|
||||
passBurstLength16},
|
||||
{BL_n_min_32 + tRBTP,
|
||||
"RD",
|
||||
DependencyType::IntraRank,
|
||||
"BL_n_min_32 + tRBTP",
|
||||
passBurstLength32},
|
||||
{BL_n_min_16 + tRBTP,
|
||||
"RDA",
|
||||
DependencyType::IntraRank,
|
||||
"BL_n_min_16 + tRBTP",
|
||||
passBurstLength16},
|
||||
{BL_n_min_32 + tRBTP,
|
||||
"RDA",
|
||||
DependencyType::IntraRank,
|
||||
"BL_n_min_32 + tRBTP",
|
||||
passBurstLength32},
|
||||
{tWL + BL_n_min_16 + tCK + tWR,
|
||||
"WR",
|
||||
DependencyType::IntraRank,
|
||||
"tWL + BL_n_min_16 + tCK + tWR",
|
||||
passBurstLength16},
|
||||
{tWL + BL_n_min_32 + tCK + tWR,
|
||||
"WR",
|
||||
DependencyType::IntraRank,
|
||||
"tWL + BL_n_min_32 + tCK + tWR",
|
||||
passBurstLength32},
|
||||
{tWL + BL_n_min_16 + tCK + tWR,
|
||||
"WRA",
|
||||
DependencyType::IntraRank,
|
||||
"tWL + BL_n_min_16 + tCK + tWR",
|
||||
passBurstLength16},
|
||||
{tWL + BL_n_min_32 + tCK + tWR,
|
||||
"WRA",
|
||||
DependencyType::IntraRank,
|
||||
"tWL + BL_n_min_32 + tCK + tWR",
|
||||
passBurstLength32},
|
||||
{tPPD, "PREPB", DependencyType::IntraRank, "tPPD"},
|
||||
{0, "CMD_BUS", DependencyType::InterRank, "CMDBus"},
|
||||
}));
|
||||
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("REFPB"),
|
||||
forward_as_tuple(
|
||||
initializer_list<TimeDependency>{
|
||||
{tRCpb + tCK, "ACT", DependencyType::IntraBank, "tRCpb + tCK"},
|
||||
{tRRD + tCK, "ACT", DependencyType::IntraRank, "tRRD + tCK"},
|
||||
{BL_n_min_16 + tRBTP + tRPpb, "RDA", DependencyType::IntraBank, "BL_n_min_16 + tRBTP + tRPpb", passBurstLength16},
|
||||
{BL_n_min_32 + tRBTP + tRPpb, "RDA", DependencyType::IntraBank, "BL_n_min_32 + tRBTP + tRPpb", passBurstLength32},
|
||||
{tWL + BL_n_min_16 + tCK + tWR + tRPpb, "WRA", DependencyType::IntraBank, "tWL + BL_n_min_16 + tCK + tWR + tRPpb", passBurstLength16},
|
||||
{tWL + BL_n_min_32 + tCK + tWR + tRPpb, "WRA", DependencyType::IntraBank, "tWL + BL_n_min_32 + tCK + tWR + tRPpb", passBurstLength32},
|
||||
{tRPpb, "PREPB", DependencyType::IntraBank, "tRPpb"},
|
||||
{tRPab, "PREAB", DependencyType::IntraRank, "tRPab"},
|
||||
{tRFCpb, "REFPB", DependencyType::IntraBank, "tRFCpb"},
|
||||
{tpbR2pbR, "REFPB", DependencyType::IntraRank, "tpbR2pbR"},
|
||||
{0, "CMD_BUS", DependencyType::InterRank, "CMDBus"},
|
||||
{0, "NAW", DependencyType::IntraRank, "tFAW"},
|
||||
}
|
||||
)
|
||||
);
|
||||
dmap.emplace(piecewise_construct,
|
||||
forward_as_tuple("REFPB"),
|
||||
forward_as_tuple(initializer_list<TimeDependency>{
|
||||
{tRCpb + tCK, "ACT", DependencyType::IntraBank, "tRCpb + tCK"},
|
||||
{tRRD + tCK, "ACT", DependencyType::IntraRank, "tRRD + tCK"},
|
||||
{BL_n_min_16 + tRBTP + tRPpb,
|
||||
"RDA",
|
||||
DependencyType::IntraBank,
|
||||
"BL_n_min_16 + tRBTP + tRPpb",
|
||||
passBurstLength16},
|
||||
{BL_n_min_32 + tRBTP + tRPpb,
|
||||
"RDA",
|
||||
DependencyType::IntraBank,
|
||||
"BL_n_min_32 + tRBTP + tRPpb",
|
||||
passBurstLength32},
|
||||
{tWL + BL_n_min_16 + tCK + tWR + tRPpb,
|
||||
"WRA",
|
||||
DependencyType::IntraBank,
|
||||
"tWL + BL_n_min_16 + tCK + tWR + tRPpb",
|
||||
passBurstLength16},
|
||||
{tWL + BL_n_min_32 + tCK + tWR + tRPpb,
|
||||
"WRA",
|
||||
DependencyType::IntraBank,
|
||||
"tWL + BL_n_min_32 + tCK + tWR + tRPpb",
|
||||
passBurstLength32},
|
||||
{tRPpb, "PREPB", DependencyType::IntraBank, "tRPpb"},
|
||||
{tRPab, "PREAB", DependencyType::IntraRank, "tRPab"},
|
||||
{tRFCpb, "REFPB", DependencyType::IntraBank, "tRFCpb"},
|
||||
{tpbR2pbR, "REFPB", DependencyType::IntraRank, "tpbR2pbR"},
|
||||
{0, "CMD_BUS", DependencyType::InterRank, "CMDBus"},
|
||||
{0, "NAW", DependencyType::IntraRank, "tFAW"},
|
||||
}));
|
||||
|
||||
dmap.emplace(
|
||||
piecewise_construct,
|
||||
forward_as_tuple("REFP2B"),
|
||||
forward_as_tuple(
|
||||
initializer_list<TimeDependency>{
|
||||
{tRCpb + tCK, "ACT", DependencyType::IntraBank, "tRCpb + tCK"},
|
||||
{tRRD + tCK, "ACT", DependencyType::IntraRank, "tRRD + tCK"},
|
||||
{BL_n_min_16 + tRBTP + tRPpb, "RDA", DependencyType::IntraBank, "BL_n_min_16 + tRBTP + tRPpb", passBurstLength16},
|
||||
{BL_n_min_32 + tRBTP + tRPpb, "RDA", DependencyType::IntraBank, "BL_n_min_32 + tRBTP + tRPpb", passBurstLength32},
|
||||
{tWL + BL_n_min_16 + tCK + tWR + tRPpb, "WRA", DependencyType::IntraBank, "tWL + BL_n_min_16 + tCK + tWR + tRPpb", passBurstLength16},
|
||||
{tWL + BL_n_min_32 + tCK + tWR + tRPpb, "WRA", DependencyType::IntraBank, "tWL + BL_n_min_32 + tCK + tWR + tRPpb", passBurstLength32},
|
||||
{tRPpb, "PREPB", DependencyType::IntraBank, "tRPpb"},
|
||||
{tRPab, "PREAB", DependencyType::IntraRank, "tRPab"},
|
||||
{tRFCpb, "REFP2B", DependencyType::IntraBank, "tRFCpb"},
|
||||
{tpbR2pbR, "REFP2B", DependencyType::IntraRank, "tpbR2pbR"},
|
||||
{0, "CMD_BUS", DependencyType::InterRank, "CMDBus"},
|
||||
{0, "NAW", DependencyType::IntraRank, "tFAW"},
|
||||
}
|
||||
)
|
||||
);
|
||||
dmap.emplace(piecewise_construct,
|
||||
forward_as_tuple("REFP2B"),
|
||||
forward_as_tuple(initializer_list<TimeDependency>{
|
||||
{tRCpb + tCK, "ACT", DependencyType::IntraBank, "tRCpb + tCK"},
|
||||
{tRRD + tCK, "ACT", DependencyType::IntraRank, "tRRD + tCK"},
|
||||
{BL_n_min_16 + tRBTP + tRPpb,
|
||||
"RDA",
|
||||
DependencyType::IntraBank,
|
||||
"BL_n_min_16 + tRBTP + tRPpb",
|
||||
passBurstLength16},
|
||||
{BL_n_min_32 + tRBTP + tRPpb,
|
||||
"RDA",
|
||||
DependencyType::IntraBank,
|
||||
"BL_n_min_32 + tRBTP + tRPpb",
|
||||
passBurstLength32},
|
||||
{tWL + BL_n_min_16 + tCK + tWR + tRPpb,
|
||||
"WRA",
|
||||
DependencyType::IntraBank,
|
||||
"tWL + BL_n_min_16 + tCK + tWR + tRPpb",
|
||||
passBurstLength16},
|
||||
{tWL + BL_n_min_32 + tCK + tWR + tRPpb,
|
||||
"WRA",
|
||||
DependencyType::IntraBank,
|
||||
"tWL + BL_n_min_32 + tCK + tWR + tRPpb",
|
||||
passBurstLength32},
|
||||
{tRPpb, "PREPB", DependencyType::IntraBank, "tRPpb"},
|
||||
{tRPab, "PREAB", DependencyType::IntraRank, "tRPab"},
|
||||
{tRFCpb, "REFP2B", DependencyType::IntraBank, "tRFCpb"},
|
||||
{tpbR2pbR, "REFP2B", DependencyType::IntraRank, "tpbR2pbR"},
|
||||
{0, "CMD_BUS", DependencyType::InterRank, "CMDBus"},
|
||||
{0, "NAW", DependencyType::IntraRank, "tFAW"},
|
||||
}));
|
||||
|
||||
return dmap;
|
||||
return dmap;
|
||||
}
|
||||
|
||||
@@ -38,23 +38,24 @@
|
||||
#include "../dramtimedependenciesbase.h"
|
||||
#include "businessObjects/dramTimeDependencies/dbEntries/specialized/LPDDR5dbphaseentry.h"
|
||||
|
||||
class TimeDependenciesInfoLPDDR5 final : public DRAMTimeDependenciesBase {
|
||||
public:
|
||||
class TimeDependenciesInfoLPDDR5 final : public DRAMTimeDependenciesBase
|
||||
{
|
||||
public:
|
||||
TimeDependenciesInfoLPDDR5(const QJsonObject& memspec, const uint clk);
|
||||
|
||||
static const std::vector<QString> getPossiblePhases();
|
||||
|
||||
uint getPer2BankOffset() { return per2BankOffset; }
|
||||
|
||||
protected:
|
||||
protected:
|
||||
void mInitializeValues() override;
|
||||
DependencyMap mSpecializedGetDependencies() const override;
|
||||
|
||||
protected:
|
||||
protected:
|
||||
uint burstLength;
|
||||
uint dataRate;
|
||||
uint per2BankOffset;
|
||||
|
||||
|
||||
uint tRCD;
|
||||
uint tRPpb;
|
||||
uint tRPab;
|
||||
@@ -115,5 +116,4 @@ class TimeDependenciesInfoLPDDR5 final : public DRAMTimeDependenciesBase {
|
||||
uint tRDPDEN;
|
||||
uint tWRPDEN;
|
||||
uint tWRAPDEN;
|
||||
|
||||
};
|
||||
|
||||
@@ -38,94 +38,115 @@
|
||||
#include <chrono>
|
||||
#include <iostream>
|
||||
|
||||
void
|
||||
PhaseDependenciesTracker::calculateDependencies(TraceDB& tdb, std::vector<QString>& commands) {
|
||||
using std::chrono::high_resolution_clock;
|
||||
using std::chrono::duration_cast;
|
||||
void PhaseDependenciesTracker::calculateDependencies(TraceDB& tdb, std::vector<QString>& commands)
|
||||
{
|
||||
using std::chrono::duration;
|
||||
using std::chrono::duration_cast;
|
||||
using std::chrono::high_resolution_clock;
|
||||
using std::chrono::microseconds;
|
||||
|
||||
auto deviceInstantiationTimeStart = high_resolution_clock::now();
|
||||
auto deviceConfig = ConfigurationFactory::make(tdb);
|
||||
auto deviceConfig = ConfigurationFactory::make(tdb);
|
||||
auto deviceInstantiationTimeEnd = high_resolution_clock::now();
|
||||
auto deviceInstantiationTimeDuration = duration_cast<microseconds>(deviceInstantiationTimeEnd - deviceInstantiationTimeStart);
|
||||
auto deviceInstantiationTimeDuration =
|
||||
duration_cast<microseconds>(deviceInstantiationTimeEnd - deviceInstantiationTimeStart);
|
||||
|
||||
mBeginTransaction(tdb);
|
||||
|
||||
mDropTable(tdb);
|
||||
|
||||
if (commands.size() > 0) {
|
||||
if (commands.size() > 0)
|
||||
{
|
||||
auto phasesLoadingTimeStart = high_resolution_clock::now();
|
||||
auto& phases = mGetFilteredPhases(deviceConfig, tdb, commands);
|
||||
auto& phases = mGetFilteredPhases(deviceConfig, tdb, commands);
|
||||
auto phasesLoadingTimeEnd = high_resolution_clock::now();
|
||||
auto phasesLoadingTimeDuration = duration_cast<microseconds>(phasesLoadingTimeEnd - phasesLoadingTimeStart);
|
||||
auto phasesLoadingTimeDuration =
|
||||
duration_cast<microseconds>(phasesLoadingTimeEnd - phasesLoadingTimeStart);
|
||||
|
||||
if (phases.size() != 0) {
|
||||
if (phases.size() != 0)
|
||||
{
|
||||
auto dependenciesCalcTimeStart = high_resolution_clock::now();
|
||||
auto& entries = mCalculateDependencies(deviceConfig, phases, commands);
|
||||
auto& entries = mCalculateDependencies(deviceConfig, phases, commands);
|
||||
auto dependenciesCalcTimeEnd = high_resolution_clock::now();
|
||||
auto dependenciesCalcTimeDuration = duration_cast<microseconds>(dependenciesCalcTimeEnd - dependenciesCalcTimeStart);
|
||||
auto dependenciesCalcTimeDuration =
|
||||
duration_cast<microseconds>(dependenciesCalcTimeEnd - dependenciesCalcTimeStart);
|
||||
|
||||
if (entries.size() > 0) {
|
||||
if (entries.size() > 0)
|
||||
{
|
||||
mCreateTable(tdb);
|
||||
}
|
||||
|
||||
auto tableInsertionTimeStart = high_resolution_clock::now();
|
||||
mInsertIntoTable(tdb, entries);
|
||||
mInsertIntoTable(tdb, entries);
|
||||
auto tableInsertionTimeEnd = high_resolution_clock::now();
|
||||
auto tableInsertionTimeDuration = duration_cast<microseconds>(tableInsertionTimeEnd - tableInsertionTimeStart);
|
||||
auto tableInsertionTimeDuration =
|
||||
duration_cast<microseconds>(tableInsertionTimeEnd - tableInsertionTimeStart);
|
||||
|
||||
auto totalTime = deviceInstantiationTimeDuration + phasesLoadingTimeDuration + dependenciesCalcTimeDuration + tableInsertionTimeDuration;
|
||||
auto totalTime = deviceInstantiationTimeDuration + phasesLoadingTimeDuration +
|
||||
dependenciesCalcTimeDuration + tableInsertionTimeDuration;
|
||||
|
||||
|
||||
std::cout << "PhaseDependenciesTracker times (us):" << std::endl
|
||||
<< "\tDevice instantiation: " << deviceInstantiationTimeDuration.count() << std::endl
|
||||
<< "\tPhase loading: " << phasesLoadingTimeDuration.count() << std::endl
|
||||
<< "\tDependencies calculation: " << dependenciesCalcTimeDuration.count() << std::endl
|
||||
<< "\tDB table population: " << tableInsertionTimeDuration.count() << std::endl
|
||||
<< " - Total time: " << totalTime.count() << std::endl;
|
||||
|
||||
} else {
|
||||
std::cout << "PhaseDependenciesTracker times (us):" << std::endl
|
||||
<< "\tDevice instantiation: " << deviceInstantiationTimeDuration.count()
|
||||
<< std::endl
|
||||
<< "\tPhase loading: " << phasesLoadingTimeDuration.count() << std::endl
|
||||
<< "\tDependencies calculation: " << dependenciesCalcTimeDuration.count()
|
||||
<< std::endl
|
||||
<< "\tDB table population: " << tableInsertionTimeDuration.count()
|
||||
<< std::endl
|
||||
<< " - Total time: " << totalTime.count() << std::endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
// TODO - not sure if necessary. Still, a possibility
|
||||
// mRollbackChanges(tdb);
|
||||
// return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
mCommitTransaction(tdb);
|
||||
}
|
||||
|
||||
void PhaseDependenciesTracker::mDropTable(TraceDB& tdb) {
|
||||
void PhaseDependenciesTracker::mDropTable(TraceDB& tdb)
|
||||
{
|
||||
QString command = "DROP TABLE IF EXISTS DirectDependencies; ";
|
||||
|
||||
|
||||
auto query = mExecuteQuery(tdb, command);
|
||||
query.finish();
|
||||
}
|
||||
|
||||
void PhaseDependenciesTracker::mCreateTable(TraceDB& tdb) {
|
||||
QString command = "CREATE TABLE DirectDependencies( DelayedPhaseID INT, DelayedPhaseName, DependencyType, TimeDependency, DependencyPhaseID INT, DependencyPhaseName ); ";
|
||||
|
||||
void PhaseDependenciesTracker::mCreateTable(TraceDB& tdb)
|
||||
{
|
||||
QString command =
|
||||
"CREATE TABLE DirectDependencies( DelayedPhaseID INT, DelayedPhaseName, DependencyType, "
|
||||
"TimeDependency, DependencyPhaseID INT, DependencyPhaseName ); ";
|
||||
|
||||
auto query = mExecuteQuery(tdb, command);
|
||||
query.finish();
|
||||
}
|
||||
|
||||
void PhaseDependenciesTracker::mInsertIntoTable(TraceDB& tdb, const std::vector<DBDependencyEntry>& entries) {
|
||||
void PhaseDependenciesTracker::mInsertIntoTable(TraceDB& tdb,
|
||||
const std::vector<DBDependencyEntry>& entries)
|
||||
{
|
||||
static const size_t bulkInsertionSize = 30;
|
||||
|
||||
|
||||
auto numberOfEntries = entries.size();
|
||||
|
||||
QString command;
|
||||
size_t counter = 0;
|
||||
for (const auto& entry : entries) {
|
||||
if (counter == 0) {
|
||||
for (const auto& entry : entries)
|
||||
{
|
||||
if (counter == 0)
|
||||
{
|
||||
// Reset command string and add first entry
|
||||
command = "INSERT INTO 'DirectDependencies' ('DelayedPhaseID', 'DelayedPhaseName', 'DependencyType', 'TimeDependency', 'DependencyPhaseID', 'DependencyPhaseName') ";
|
||||
command =
|
||||
"INSERT INTO 'DirectDependencies' ('DelayedPhaseID', 'DelayedPhaseName', "
|
||||
"'DependencyType', 'TimeDependency', 'DependencyPhaseID', 'DependencyPhaseName') ";
|
||||
mAddFirstEntryCommandString(command, entry);
|
||||
|
||||
counter++;
|
||||
|
||||
} else if (counter == bulkInsertionSize-1) {
|
||||
counter++;
|
||||
}
|
||||
else if (counter == bulkInsertionSize - 1)
|
||||
{
|
||||
// Write last entry and submit
|
||||
mAddEntryCommandString(command, entry);
|
||||
|
||||
@@ -133,27 +154,27 @@ void PhaseDependenciesTracker::mInsertIntoTable(TraceDB& tdb, const std::vector<
|
||||
query.finish();
|
||||
|
||||
counter = 0;
|
||||
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
// Write entry
|
||||
mAddEntryCommandString(command, entry);
|
||||
|
||||
counter++;
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (counter != 0) {
|
||||
if (counter != 0)
|
||||
{
|
||||
auto query = mExecuteQuery(tdb, command);
|
||||
query.finish();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
const std::vector<std::shared_ptr<DBPhaseEntryBase>>
|
||||
PhaseDependenciesTracker::mGetFilteredPhases(const std::shared_ptr<ConfigurationBase> deviceConfig, TraceDB& tdb, const std::vector<QString>& commands)
|
||||
PhaseDependenciesTracker::mGetFilteredPhases(const std::shared_ptr<ConfigurationBase> deviceConfig,
|
||||
TraceDB& tdb,
|
||||
const std::vector<QString>& commands)
|
||||
{
|
||||
std::vector<std::shared_ptr<DBPhaseEntryBase>> phases;
|
||||
QString queryStr = deviceConfig->getQueryStr(commands);
|
||||
@@ -162,31 +183,42 @@ PhaseDependenciesTracker::mGetFilteredPhases(const std::shared_ptr<Configuration
|
||||
if (!query.next())
|
||||
return phases;
|
||||
|
||||
if (!query.last()) {
|
||||
throw sqlException( ("Query:\n " + tdb.queryToString(query) + "\n failed. Error: \n"
|
||||
"Could not retrieve number of rows\n").toStdString(),
|
||||
tdb.pathToDB.toStdString());
|
||||
if (!query.last())
|
||||
{
|
||||
throw sqlException(("Query:\n " + tdb.queryToString(query) +
|
||||
"\n failed. Error: \n"
|
||||
"Could not retrieve number of rows\n")
|
||||
.toStdString(),
|
||||
tdb.pathToDB.toStdString());
|
||||
}
|
||||
|
||||
size_t nrows = query.at() + 1;
|
||||
|
||||
if (!query.first()) {
|
||||
throw sqlException( ("Query:\n " + tdb.queryToString(query) + "\n failed. Error: \n"
|
||||
"Could not retrieve number of rows safely\n").toStdString(),
|
||||
tdb.pathToDB.toStdString());
|
||||
if (!query.first())
|
||||
{
|
||||
throw sqlException(("Query:\n " + tdb.queryToString(query) +
|
||||
"\n failed. Error: \n"
|
||||
"Could not retrieve number of rows safely\n")
|
||||
.toStdString(),
|
||||
tdb.pathToDB.toStdString());
|
||||
}
|
||||
|
||||
phases.resize(nrows);
|
||||
|
||||
size_t rowIt = 0;
|
||||
do {
|
||||
do
|
||||
{
|
||||
phases[rowIt] = deviceConfig->makePhaseEntry(query);
|
||||
|
||||
++rowIt;
|
||||
} while (query.next());
|
||||
|
||||
if (rowIt != nrows) {
|
||||
throw std::runtime_error("An error occurred while fetching phases in 'PhaseDependenciesTracker::mGetFilteredPhases': expected " + std::to_string(nrows) + " rows, but found " + std::to_string(rowIt) + "\n");
|
||||
if (rowIt != nrows)
|
||||
{
|
||||
throw std::runtime_error("An error occurred while fetching phases in "
|
||||
"'PhaseDependenciesTracker::mGetFilteredPhases': expected " +
|
||||
std::to_string(nrows) + " rows, but found " +
|
||||
std::to_string(rowIt) + "\n");
|
||||
}
|
||||
|
||||
query.finish();
|
||||
@@ -194,96 +226,108 @@ PhaseDependenciesTracker::mGetFilteredPhases(const std::shared_ptr<Configuration
|
||||
return phases;
|
||||
}
|
||||
|
||||
const std::vector<DBDependencyEntry>
|
||||
PhaseDependenciesTracker::mCalculateDependencies(const std::shared_ptr<ConfigurationBase> deviceConfig, const std::vector<std::shared_ptr<DBPhaseEntryBase>>& phases, std::vector<QString>& commands) {
|
||||
const std::vector<DBDependencyEntry> 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()));
|
||||
entries.reserve((size_t)(0.4 * phases.size()));
|
||||
|
||||
// Get dependencies for device
|
||||
const DependencyMap deviceDependencies = deviceConfig->getDependencies(commands);
|
||||
|
||||
// Tries to find all timing dependencies for each phase on the trace
|
||||
PoolControllerMap poolController = deviceConfig->getPools();
|
||||
for (size_t i = 1; i < phases.size(); i++) {
|
||||
for (size_t i = 1; i < phases.size(); i++)
|
||||
{
|
||||
// Pool dependencies variables reset
|
||||
poolController.clear();
|
||||
|
||||
// Auxiliary variables
|
||||
const auto phase = phases[i];
|
||||
if (phase == nullptr) continue;
|
||||
|
||||
if (phase == nullptr)
|
||||
continue;
|
||||
|
||||
// Get time dependency descriptions for the current phase
|
||||
const auto& deps = deviceDependencies.at(phase->phaseName);
|
||||
|
||||
// Loop all previous phases until there cannot be any more time dependencies
|
||||
for (int j = i-1; j >= 0; j--) {
|
||||
for (int j = i - 1; j >= 0; j--)
|
||||
{
|
||||
// Get next phase to analyse
|
||||
const auto& otherPhase = phases[j];
|
||||
// Calculates the time difference in nanoseconds
|
||||
const auto timeDiff = phase->phaseBegin - otherPhase->phaseBegin;
|
||||
// Time difference begin greater than the maximum possible dependency time ends the internal loop
|
||||
if (timeDiff > deps.maxTime) break;
|
||||
// Time difference begin greater than the maximum possible dependency time ends the
|
||||
// internal loop
|
||||
if (timeDiff > deps.maxTime)
|
||||
break;
|
||||
|
||||
// For each possible dependency for the current phase,
|
||||
// checks if otherPhase would match as a dependency
|
||||
for (const auto& dep : deps.dependencies) {
|
||||
for (const auto& dep : deps.dependencies)
|
||||
{
|
||||
bool isPoolDep = dep.phaseDep.isPool();
|
||||
if (!isPoolDep && dep.phaseDep != otherPhase->phaseName) continue;
|
||||
|
||||
if (!phase->potentialDependency(dep, otherPhase)) {
|
||||
if (!isPoolDep && dep.phaseDep != otherPhase->phaseName)
|
||||
continue;
|
||||
|
||||
if (!phase->potentialDependency(dep, otherPhase))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (isPoolDep) {
|
||||
if (isPoolDep)
|
||||
{
|
||||
// Captures activate window and command bus dependencies
|
||||
|
||||
auto busyTime = poolController.getBusyTime(dep.phaseDep, otherPhase->phaseName);
|
||||
if (busyTime > 0 && timeDiff <= busyTime) {
|
||||
if (timeDiff == busyTime) {
|
||||
if (busyTime > 0 && timeDiff <= busyTime)
|
||||
{
|
||||
if (timeDiff == busyTime)
|
||||
{
|
||||
// Captures only the first (exactly matching time) phase in
|
||||
// the pool window as a dependency
|
||||
poolController.push(dep.phaseDep, DBDependencyEntry{
|
||||
phase->id,
|
||||
phase->phaseName.getIDStr(),
|
||||
PhaseDependency::dependencyTypeName(dep.depType),
|
||||
dep.timeDepName,
|
||||
otherPhase->id,
|
||||
otherPhase->phaseName.getIDStr()
|
||||
});
|
||||
}
|
||||
poolController.push(
|
||||
dep.phaseDep,
|
||||
DBDependencyEntry{phase->id,
|
||||
phase->phaseName.getIDStr(),
|
||||
PhaseDependency::dependencyTypeName(dep.depType),
|
||||
dep.timeDepName,
|
||||
otherPhase->id,
|
||||
otherPhase->phaseName.getIDStr()});
|
||||
}
|
||||
|
||||
if (timeDiff < busyTime) {
|
||||
if (timeDiff < busyTime)
|
||||
{
|
||||
poolController.increment(dep.phaseDep);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
continue;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (timeDiff == dep.timeValue) {
|
||||
entries.emplace_back(DBDependencyEntry{
|
||||
phase->id,
|
||||
phase->phaseName.getIDStr(),
|
||||
PhaseDependency::dependencyTypeName(dep.depType),
|
||||
dep.timeDepName,
|
||||
otherPhase->id,
|
||||
otherPhase->phaseName.getIDStr()
|
||||
});
|
||||
if (timeDiff == dep.timeValue)
|
||||
{
|
||||
entries.emplace_back(
|
||||
DBDependencyEntry{phase->id,
|
||||
phase->phaseName.getIDStr(),
|
||||
PhaseDependency::dependencyTypeName(dep.depType),
|
||||
dep.timeDepName,
|
||||
otherPhase->id,
|
||||
otherPhase->phaseName.getIDStr()});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
poolController.merge(entries);
|
||||
|
||||
}
|
||||
|
||||
return entries;
|
||||
}
|
||||
|
||||
QSqlQuery PhaseDependenciesTracker::mExecuteQuery(TraceDB& tdb, const QString queryStr) {
|
||||
QSqlQuery PhaseDependenciesTracker::mExecuteQuery(TraceDB& tdb, const QString queryStr)
|
||||
{
|
||||
QSqlQuery query(tdb.database);
|
||||
query.prepare(queryStr);
|
||||
tdb.executeQuery(query);
|
||||
@@ -291,39 +335,43 @@ QSqlQuery PhaseDependenciesTracker::mExecuteQuery(TraceDB& tdb, const QString qu
|
||||
return query;
|
||||
}
|
||||
|
||||
void PhaseDependenciesTracker::mBeginTransaction(TraceDB& tdb) {
|
||||
void PhaseDependenciesTracker::mBeginTransaction(TraceDB& tdb)
|
||||
{
|
||||
const QString queryStr = "BEGIN TRANSACTION;";
|
||||
auto query = mExecuteQuery(tdb, queryStr);
|
||||
query.finish();
|
||||
}
|
||||
|
||||
void PhaseDependenciesTracker::mRollbackChanges(TraceDB& tdb) {
|
||||
void PhaseDependenciesTracker::mRollbackChanges(TraceDB& tdb)
|
||||
{
|
||||
const QString queryStr = "ROLLBACK;";
|
||||
auto query = mExecuteQuery(tdb, queryStr);
|
||||
query.finish();
|
||||
}
|
||||
|
||||
void PhaseDependenciesTracker::mCommitTransaction(TraceDB& tdb) {
|
||||
void PhaseDependenciesTracker::mCommitTransaction(TraceDB& tdb)
|
||||
{
|
||||
const QString queryStr = "COMMIT;";
|
||||
auto query = mExecuteQuery(tdb, queryStr);
|
||||
query.finish();
|
||||
}
|
||||
|
||||
void PhaseDependenciesTracker::mAddFirstEntryCommandString(QString& command, const DBDependencyEntry& entry) {
|
||||
command = command + " SELECT '" + QString::number(entry.delayedPhaseID) + "' AS 'DelayedPhaseID', '"
|
||||
+ entry.delayedPhaseName + "' AS 'DelayedPhaseName', '"
|
||||
+ entry.dependencyType + "' AS 'DependencyType', '"
|
||||
+ entry.timeDependency + "' AS 'TimeDependency', '"
|
||||
+ QString::number(entry.dependencyPhaseID) + "' AS 'DependencyPhaseID', '"
|
||||
+ entry.dependencyPhaseName + "' AS 'DependencyPhaseName' ";
|
||||
|
||||
void PhaseDependenciesTracker::mAddFirstEntryCommandString(QString& command,
|
||||
const DBDependencyEntry& entry)
|
||||
{
|
||||
command = command + " SELECT '" + QString::number(entry.delayedPhaseID) +
|
||||
"' AS 'DelayedPhaseID', '" + entry.delayedPhaseName + "' AS 'DelayedPhaseName', '" +
|
||||
entry.dependencyType + "' AS 'DependencyType', '" + entry.timeDependency +
|
||||
"' AS 'TimeDependency', '" + QString::number(entry.dependencyPhaseID) +
|
||||
"' AS 'DependencyPhaseID', '" + entry.dependencyPhaseName +
|
||||
"' AS 'DependencyPhaseName' ";
|
||||
}
|
||||
|
||||
void PhaseDependenciesTracker::mAddEntryCommandString(QString& command, const DBDependencyEntry& entry) {
|
||||
command = command + " UNION ALL SELECT '" + QString::number(entry.delayedPhaseID) + "', '"
|
||||
+ entry.delayedPhaseName + "', '"
|
||||
+ entry.dependencyType + "', '"
|
||||
+ entry.timeDependency + "', '"
|
||||
+ QString::number(entry.dependencyPhaseID) + "', '"
|
||||
+ entry.dependencyPhaseName + "' ";
|
||||
void PhaseDependenciesTracker::mAddEntryCommandString(QString& command,
|
||||
const DBDependencyEntry& entry)
|
||||
{
|
||||
command = command + " UNION ALL SELECT '" + QString::number(entry.delayedPhaseID) + "', '" +
|
||||
entry.delayedPhaseName + "', '" + entry.dependencyType + "', '" +
|
||||
entry.timeDependency + "', '" + QString::number(entry.dependencyPhaseID) + "', '" +
|
||||
entry.dependencyPhaseName + "' ";
|
||||
}
|
||||
|
||||
@@ -35,15 +35,16 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <QString>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "data/tracedb.h"
|
||||
#include "configurations/configurationfactory.h"
|
||||
#include "common/common.h"
|
||||
#include "configurations/configurationfactory.h"
|
||||
#include "data/tracedb.h"
|
||||
|
||||
class PhaseDependenciesTracker {
|
||||
class PhaseDependenciesTracker
|
||||
{
|
||||
public:
|
||||
static void calculateDependencies(TraceDB& tdb, std::vector<QString>& dependencyFilter);
|
||||
|
||||
@@ -52,8 +53,14 @@ private:
|
||||
static void mCreateTable(TraceDB& tdb);
|
||||
static void mInsertIntoTable(TraceDB& tdb, const std::vector<DBDependencyEntry>& entries);
|
||||
|
||||
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 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);
|
||||
|
||||
@@ -63,9 +70,9 @@ private:
|
||||
private:
|
||||
static void mBeginTransaction(TraceDB& tdb);
|
||||
static void mRollbackChanges(TraceDB& tdb);
|
||||
static void mCommitTransaction(TraceDB& tdb);
|
||||
static void mCommitTransaction(TraceDB& tdb);
|
||||
|
||||
inline static void mAddFirstEntryCommandString(QString& command, const DBDependencyEntry& entry);
|
||||
inline static void mAddFirstEntryCommandString(QString& command,
|
||||
const DBDependencyEntry& entry);
|
||||
inline static void mAddEntryCommandString(QString& command, const DBDependencyEntry& entry);
|
||||
|
||||
};
|
||||
|
||||
@@ -67,19 +67,43 @@ struct GeneralInfo
|
||||
bool pseudoChannelMode = false;
|
||||
|
||||
GeneralInfo() = default;
|
||||
GeneralInfo(uint64_t numberOfTransactions, uint64_t numberOfPhases, Timespan span, unsigned int numberOfRanks,
|
||||
unsigned int numberOfBankgroups, unsigned int numberOfBanks, QString description, QString unitOfTime,
|
||||
uint64_t clkPeriod, uint64_t windowSize, unsigned int refreshMaxPostponed,
|
||||
unsigned int refreshMaxPulledin, unsigned int controllerThread, unsigned int maxBufferDepth,
|
||||
unsigned int per2BankOffset, bool rowColumnCommandBus, bool pseudoChannelMode)
|
||||
: numberOfTransactions(numberOfTransactions), numberOfPhases(numberOfPhases), span(span),
|
||||
numberOfRanks(numberOfRanks), numberOfBankGroups(numberOfBankgroups), numberOfBanks(numberOfBanks),
|
||||
banksPerRank(numberOfBanks / numberOfRanks), groupsPerRank(numberOfBankgroups / numberOfRanks),
|
||||
banksPerGroup(numberOfBanks / numberOfBankgroups), description(std::move(description)),
|
||||
unitOfTime(std::move(unitOfTime)), clkPeriod(clkPeriod), windowSize(windowSize),
|
||||
refreshMaxPostponed(refreshMaxPostponed), refreshMaxPulledin(refreshMaxPulledin),
|
||||
controllerThread(controllerThread), maxBufferDepth(maxBufferDepth), per2BankOffset(per2BankOffset),
|
||||
rowColumnCommandBus(rowColumnCommandBus), pseudoChannelMode(pseudoChannelMode)
|
||||
GeneralInfo(uint64_t numberOfTransactions,
|
||||
uint64_t numberOfPhases,
|
||||
Timespan span,
|
||||
unsigned int numberOfRanks,
|
||||
unsigned int numberOfBankgroups,
|
||||
unsigned int numberOfBanks,
|
||||
QString description,
|
||||
QString unitOfTime,
|
||||
uint64_t clkPeriod,
|
||||
uint64_t windowSize,
|
||||
unsigned int refreshMaxPostponed,
|
||||
unsigned int refreshMaxPulledin,
|
||||
unsigned int controllerThread,
|
||||
unsigned int maxBufferDepth,
|
||||
unsigned int per2BankOffset,
|
||||
bool rowColumnCommandBus,
|
||||
bool pseudoChannelMode) :
|
||||
numberOfTransactions(numberOfTransactions),
|
||||
numberOfPhases(numberOfPhases),
|
||||
span(span),
|
||||
numberOfRanks(numberOfRanks),
|
||||
numberOfBankGroups(numberOfBankgroups),
|
||||
numberOfBanks(numberOfBanks),
|
||||
banksPerRank(numberOfBanks / numberOfRanks),
|
||||
groupsPerRank(numberOfBankgroups / numberOfRanks),
|
||||
banksPerGroup(numberOfBanks / numberOfBankgroups),
|
||||
description(std::move(description)),
|
||||
unitOfTime(std::move(unitOfTime)),
|
||||
clkPeriod(clkPeriod),
|
||||
windowSize(windowSize),
|
||||
refreshMaxPostponed(refreshMaxPostponed),
|
||||
refreshMaxPulledin(refreshMaxPulledin),
|
||||
controllerThread(controllerThread),
|
||||
maxBufferDepth(maxBufferDepth),
|
||||
per2BankOffset(per2BankOffset),
|
||||
rowColumnCommandBus(rowColumnCommandBus),
|
||||
pseudoChannelMode(pseudoChannelMode)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
@@ -61,20 +61,11 @@ public:
|
||||
DependencyInfos();
|
||||
~DependencyInfos();
|
||||
|
||||
void setType(Type type)
|
||||
{
|
||||
mType = type;
|
||||
}
|
||||
void setType(Type type) { mType = type; }
|
||||
void addInfo(DependencyInfo);
|
||||
|
||||
const std::vector<DependencyInfo> &getInfos() const
|
||||
{
|
||||
return mInfos;
|
||||
}
|
||||
size_t size() const
|
||||
{
|
||||
return mInfos.size();
|
||||
}
|
||||
const std::vector<DependencyInfo>& getInfos() const { return mInfos; }
|
||||
size_t size() const { return mInfos.size(); }
|
||||
|
||||
private:
|
||||
Type mType;
|
||||
|
||||
@@ -44,8 +44,12 @@
|
||||
|
||||
#include <cmath>
|
||||
|
||||
void Phase::draw(QPainter *painter, const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRectF &canvasRect,
|
||||
bool highlight, const TraceDrawingProperties &drawingProperties) const
|
||||
void Phase::draw(QPainter* painter,
|
||||
const QwtScaleMap& xMap,
|
||||
const QwtScaleMap& yMap,
|
||||
const QRectF& canvasRect,
|
||||
bool highlight,
|
||||
const TraceDrawingProperties& drawingProperties) const
|
||||
{
|
||||
Q_UNUSED(canvasRect);
|
||||
|
||||
@@ -70,20 +74,28 @@ void Phase::draw(QPainter *painter, const QwtScaleMap &xMap, const QwtScaleMap &
|
||||
|
||||
for (auto yVal : getYVals(drawingProperties))
|
||||
{
|
||||
drawPhaseSymbol(span.Begin(), span.End(), yVal, drawingProperties.drawText, getPhaseSymbol(), painter, xMap,
|
||||
yMap, drawingProperties.textColor);
|
||||
drawPhaseSymbol(span.Begin(),
|
||||
span.End(),
|
||||
yVal,
|
||||
drawingProperties.drawText,
|
||||
getPhaseSymbol(),
|
||||
painter,
|
||||
xMap,
|
||||
yMap,
|
||||
drawingProperties.textColor);
|
||||
|
||||
DependencyOptions drawDependenciesOptions = drawingProperties.drawDependenciesOption;
|
||||
if (drawDependenciesOptions.draw == DependencyOption::All ||
|
||||
(drawDependenciesOptions.draw == DependencyOption::Selected && highlight))
|
||||
{
|
||||
drawPhaseDependencies(span.Begin(), span.End(), yVal, drawingProperties, painter, xMap, yMap);
|
||||
drawPhaseDependencies(
|
||||
span.Begin(), span.End(), yVal, drawingProperties, painter, xMap, yMap);
|
||||
}
|
||||
}
|
||||
|
||||
for (Timespan spanOnCommandBus : spansOnCommandBus)
|
||||
{
|
||||
for (const auto &line : drawingProperties.getTracePlotLines())
|
||||
for (const auto& line : drawingProperties.getTracePlotLines())
|
||||
{
|
||||
if (line->data.type == AbstractTracePlotLineModel::RowCommandBusLine)
|
||||
{
|
||||
@@ -98,14 +110,21 @@ void Phase::draw(QPainter *painter, const QwtScaleMap &xMap, const QwtScaleMap &
|
||||
else if (line->data.type != AbstractTracePlotLineModel::CommandBusLine)
|
||||
continue;
|
||||
|
||||
drawPhaseSymbol(spanOnCommandBus.Begin(), spanOnCommandBus.End(), line->data.yVal, false, PhaseSymbol::Hexagon, painter, xMap, yMap,
|
||||
drawPhaseSymbol(spanOnCommandBus.Begin(),
|
||||
spanOnCommandBus.End(),
|
||||
line->data.yVal,
|
||||
false,
|
||||
PhaseSymbol::Hexagon,
|
||||
painter,
|
||||
xMap,
|
||||
yMap,
|
||||
drawingProperties.textColor);
|
||||
}
|
||||
}
|
||||
|
||||
if (spanOnDataStrobe.End() != 0)
|
||||
{
|
||||
for (const auto &line : drawingProperties.getTracePlotLines())
|
||||
for (const auto& line : drawingProperties.getTracePlotLines())
|
||||
{
|
||||
if (line->data.type == AbstractTracePlotLineModel::PseudoChannel0Line)
|
||||
{
|
||||
@@ -120,14 +139,28 @@ void Phase::draw(QPainter *painter, const QwtScaleMap &xMap, const QwtScaleMap &
|
||||
else if (line->data.type != AbstractTracePlotLineModel::DataBusLine)
|
||||
continue;
|
||||
|
||||
drawPhaseSymbol(spanOnDataStrobe.Begin(), spanOnDataStrobe.End(), line->data.yVal, false,
|
||||
PhaseSymbol::Hexagon, painter, xMap, yMap, drawingProperties.textColor);
|
||||
drawPhaseSymbol(spanOnDataStrobe.Begin(),
|
||||
spanOnDataStrobe.End(),
|
||||
line->data.yVal,
|
||||
false,
|
||||
PhaseSymbol::Hexagon,
|
||||
painter,
|
||||
xMap,
|
||||
yMap,
|
||||
drawingProperties.textColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Phase::drawPhaseSymbol(traceTime begin, traceTime end, double y, bool drawtext, PhaseSymbol symbol,
|
||||
QPainter *painter, const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QColor& textColor) const
|
||||
void Phase::drawPhaseSymbol(traceTime begin,
|
||||
traceTime end,
|
||||
double y,
|
||||
bool drawtext,
|
||||
PhaseSymbol symbol,
|
||||
QPainter* painter,
|
||||
const QwtScaleMap& xMap,
|
||||
const QwtScaleMap& yMap,
|
||||
const QColor& textColor) const
|
||||
{
|
||||
double yVal = yMap.transform(y);
|
||||
double symbolHeight = yMap.transform(0) - yMap.transform(hexagonHeight);
|
||||
@@ -143,20 +176,29 @@ void Phase::drawPhaseSymbol(traceTime begin, traceTime end, double y, bool drawt
|
||||
}
|
||||
else
|
||||
{
|
||||
QPoint upperLeft(static_cast<int>(xMap.transform(begin)), static_cast<int>(yVal - symbolHeight / 2));
|
||||
QPoint bottomRight(static_cast<int>(xMap.transform(end)), static_cast<int>(yVal + symbolHeight / 2));
|
||||
QPoint upperLeft(static_cast<int>(xMap.transform(begin)),
|
||||
static_cast<int>(yVal - symbolHeight / 2));
|
||||
QPoint bottomRight(static_cast<int>(xMap.transform(end)),
|
||||
static_cast<int>(yVal + symbolHeight / 2));
|
||||
painter->drawRect(QRect(upperLeft, bottomRight));
|
||||
}
|
||||
|
||||
if (drawtext)
|
||||
drawText(painter, Name(),
|
||||
QPoint(static_cast<int>(xMap.transform(begin)), static_cast<int>(yVal + symbolHeight / 2)),
|
||||
TextPositioning::bottomRight, textColor);
|
||||
drawText(painter,
|
||||
Name(),
|
||||
QPoint(static_cast<int>(xMap.transform(begin)),
|
||||
static_cast<int>(yVal + symbolHeight / 2)),
|
||||
TextPositioning::bottomRight,
|
||||
textColor);
|
||||
}
|
||||
|
||||
void Phase::drawPhaseDependencies(traceTime begin, traceTime end, double y,
|
||||
const TraceDrawingProperties &drawingProperties, QPainter *painter,
|
||||
const QwtScaleMap &xMap, const QwtScaleMap &yMap) const
|
||||
void Phase::drawPhaseDependencies(traceTime begin,
|
||||
traceTime end,
|
||||
double y,
|
||||
const TraceDrawingProperties& drawingProperties,
|
||||
QPainter* painter,
|
||||
const QwtScaleMap& xMap,
|
||||
const QwtScaleMap& yMap) const
|
||||
{
|
||||
QPen pen;
|
||||
pen.setWidth(2);
|
||||
@@ -172,7 +214,8 @@ void Phase::drawPhaseDependencies(traceTime begin, traceTime end, double y,
|
||||
|
||||
size_t invisibleDeps = 0;
|
||||
|
||||
QPoint depLineTo(static_cast<int>(xMap.transform(begin /* + (end + offset - begin)/4*/)), static_cast<int>(yVal));
|
||||
QPoint depLineTo(static_cast<int>(xMap.transform(begin /* + (end + offset - begin)/4*/)),
|
||||
static_cast<int>(yVal));
|
||||
|
||||
for (const auto& dep : mDependencies)
|
||||
{
|
||||
@@ -192,19 +235,23 @@ void Phase::drawPhaseDependencies(traceTime begin, traceTime end, double y,
|
||||
|
||||
if (invisibleDeps > 0)
|
||||
{
|
||||
QPoint invisibleDepsPoint(static_cast<int>(xMap.transform(begin + (end + offset - begin) / 2)),
|
||||
static_cast<int>(yVal + 0.1 * symbolHeight));
|
||||
drawText(painter, QString::number(invisibleDeps), invisibleDepsPoint, TextPositioning::centerCenter);
|
||||
QPoint invisibleDepsPoint(
|
||||
static_cast<int>(xMap.transform(begin + (end + offset - begin) / 2)),
|
||||
static_cast<int>(yVal + 0.1 * symbolHeight));
|
||||
drawText(painter,
|
||||
QString::number(invisibleDeps),
|
||||
invisibleDepsPoint,
|
||||
TextPositioning::centerCenter);
|
||||
}
|
||||
|
||||
painter->restore();
|
||||
}
|
||||
|
||||
std::vector<int> Phase::getYVals(const TraceDrawingProperties &drawingProperties) const
|
||||
std::vector<int> Phase::getYVals(const TraceDrawingProperties& drawingProperties) const
|
||||
{
|
||||
std::vector<int> yVals;
|
||||
|
||||
for (const auto &line : drawingProperties.getTracePlotLines())
|
||||
for (const auto& line : drawingProperties.getTracePlotLines())
|
||||
{
|
||||
if (line->data.type != AbstractTracePlotLineModel::BankLine)
|
||||
continue;
|
||||
@@ -223,14 +270,15 @@ std::vector<int> Phase::getYVals(const TraceDrawingProperties &drawingProperties
|
||||
break;
|
||||
case Granularity::Groupwise:
|
||||
shouldBeDrawn = (rank == drawnRank) && (bank % drawingProperties.banksPerGroup ==
|
||||
drawnBank % drawingProperties.banksPerGroup);
|
||||
drawnBank % drawingProperties.banksPerGroup);
|
||||
break;
|
||||
case Granularity::Bankwise:
|
||||
shouldBeDrawn = (bank == drawnBank);
|
||||
break;
|
||||
|
||||
case Granularity::TwoBankwise:
|
||||
shouldBeDrawn = (bank == drawnBank) || ((bank + drawingProperties.per2BankOffset) == drawnBank);
|
||||
shouldBeDrawn =
|
||||
(bank == drawnBank) || ((bank + drawingProperties.per2BankOffset) == drawnBank);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -241,11 +289,11 @@ std::vector<int> Phase::getYVals(const TraceDrawingProperties &drawingProperties
|
||||
return yVals;
|
||||
}
|
||||
|
||||
std::vector<int> REQ::getYVals(const TraceDrawingProperties &drawingProperties) const
|
||||
std::vector<int> REQ::getYVals(const TraceDrawingProperties& drawingProperties) const
|
||||
{
|
||||
std::vector<int> yVals;
|
||||
|
||||
for (const auto &line : drawingProperties.getTracePlotLines())
|
||||
for (const auto& line : drawingProperties.getTracePlotLines())
|
||||
{
|
||||
if (line->data.type != AbstractTracePlotLineModel::RequestLine)
|
||||
continue;
|
||||
@@ -256,11 +304,11 @@ std::vector<int> REQ::getYVals(const TraceDrawingProperties &drawingProperties)
|
||||
return yVals;
|
||||
}
|
||||
|
||||
std::vector<int> RESP::getYVals(const TraceDrawingProperties &drawingProperties) const
|
||||
std::vector<int> RESP::getYVals(const TraceDrawingProperties& drawingProperties) const
|
||||
{
|
||||
std::vector<int> yVals;
|
||||
|
||||
for (const auto &line : drawingProperties.getTracePlotLines())
|
||||
for (const auto& line : drawingProperties.getTracePlotLines())
|
||||
{
|
||||
if (line->data.type != AbstractTracePlotLineModel::ResponseLine)
|
||||
continue;
|
||||
@@ -271,9 +319,10 @@ std::vector<int> RESP::getYVals(const TraceDrawingProperties &drawingProperties)
|
||||
return yVals;
|
||||
}
|
||||
|
||||
QColor Phase::getColor(const TraceDrawingProperties &drawingProperties) const
|
||||
QColor Phase::getColor(const TraceDrawingProperties& drawingProperties) const
|
||||
{
|
||||
switch (drawingProperties.colorGrouping) {
|
||||
switch (drawingProperties.colorGrouping)
|
||||
{
|
||||
case ColorGrouping::PhaseType:
|
||||
return getPhaseColor();
|
||||
break;
|
||||
@@ -295,7 +344,9 @@ Qt::BrushStyle Phase::getBrushStyle() const
|
||||
return Qt::SolidPattern;
|
||||
}
|
||||
|
||||
bool Phase::isSelected(Timespan timespan, double yVal, const TraceDrawingProperties &drawingProperties) const
|
||||
bool Phase::isSelected(Timespan timespan,
|
||||
double yVal,
|
||||
const TraceDrawingProperties& drawingProperties) const
|
||||
{
|
||||
if (span.overlaps(timespan))
|
||||
{
|
||||
@@ -308,7 +359,7 @@ bool Phase::isSelected(Timespan timespan, double yVal, const TraceDrawingPropert
|
||||
{
|
||||
if (_span.overlaps(timespan))
|
||||
{
|
||||
for (const auto &line : drawingProperties.getTracePlotLines())
|
||||
for (const auto& line : drawingProperties.getTracePlotLines())
|
||||
{
|
||||
if (line->data.type == AbstractTracePlotLineModel::RowCommandBusLine)
|
||||
{
|
||||
@@ -331,7 +382,7 @@ bool Phase::isSelected(Timespan timespan, double yVal, const TraceDrawingPropert
|
||||
|
||||
if (spanOnDataStrobe.End() != 0 && spanOnDataStrobe.overlaps(timespan))
|
||||
{
|
||||
for (const auto &line : drawingProperties.getTracePlotLines())
|
||||
for (const auto& line : drawingProperties.getTracePlotLines())
|
||||
{
|
||||
if (line->data.type == AbstractTracePlotLineModel::PseudoChannel0Line)
|
||||
{
|
||||
@@ -356,8 +407,8 @@ bool Phase::isSelected(Timespan timespan, double yVal, const TraceDrawingPropert
|
||||
|
||||
bool Phase::isColumnCommand() const
|
||||
{
|
||||
if (dynamic_cast<const RD *>(this) || dynamic_cast<const RDA *>(this) || dynamic_cast<const WR *>(this) ||
|
||||
dynamic_cast<const WRA *>(this))
|
||||
if (dynamic_cast<const RD*>(this) || dynamic_cast<const RDA*>(this) ||
|
||||
dynamic_cast<const WR*>(this) || dynamic_cast<const WRA*>(this))
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
#include <vector>
|
||||
|
||||
typedef unsigned int ID;
|
||||
//enum TextPositioning;
|
||||
// enum TextPositioning;
|
||||
class Transaction;
|
||||
|
||||
enum class RelevantAttributes
|
||||
@@ -77,61 +77,65 @@ inline RelevantAttributes operator&(RelevantAttributes a, RelevantAttributes b)
|
||||
class Phase
|
||||
{
|
||||
public:
|
||||
Phase(ID id, Timespan span, Timespan spanOnDataStrobe, unsigned int rank, unsigned int bankGroup,
|
||||
unsigned int bank, unsigned int row, unsigned int column, unsigned int burstLength,
|
||||
traceTime clk, const std::shared_ptr<Transaction> &transaction, std::vector<Timespan> spansOnCommandBus,
|
||||
unsigned int groupsPerRank, unsigned int banksPerGroup) :
|
||||
id(id), span(span), spanOnDataStrobe(spanOnDataStrobe),
|
||||
rank(rank), bankGroup(bankGroup), bank(bank), row(row), column(column), burstLength(burstLength),
|
||||
clk(clk), transaction(transaction), spansOnCommandBus(std::move(spansOnCommandBus)),
|
||||
groupsPerRank(groupsPerRank), banksPerGroup(banksPerGroup),
|
||||
hexagonHeight(0.6), captionPosition(TextPositioning::bottomRight) {}
|
||||
Phase(ID id,
|
||||
Timespan span,
|
||||
Timespan spanOnDataStrobe,
|
||||
unsigned int rank,
|
||||
unsigned int bankGroup,
|
||||
unsigned int bank,
|
||||
unsigned int row,
|
||||
unsigned int column,
|
||||
unsigned int burstLength,
|
||||
traceTime clk,
|
||||
const std::shared_ptr<Transaction>& transaction,
|
||||
std::vector<Timespan> spansOnCommandBus,
|
||||
unsigned int groupsPerRank,
|
||||
unsigned int banksPerGroup) :
|
||||
id(id),
|
||||
span(span),
|
||||
spanOnDataStrobe(spanOnDataStrobe),
|
||||
rank(rank),
|
||||
bankGroup(bankGroup),
|
||||
bank(bank),
|
||||
row(row),
|
||||
column(column),
|
||||
burstLength(burstLength),
|
||||
clk(clk),
|
||||
transaction(transaction),
|
||||
spansOnCommandBus(std::move(spansOnCommandBus)),
|
||||
groupsPerRank(groupsPerRank),
|
||||
banksPerGroup(banksPerGroup),
|
||||
hexagonHeight(0.6),
|
||||
captionPosition(TextPositioning::bottomRight)
|
||||
{
|
||||
}
|
||||
|
||||
void draw(QPainter *painter, const QwtScaleMap &xMap, const QwtScaleMap &yMap,
|
||||
const QRectF &canvasRect, bool highlight,
|
||||
const TraceDrawingProperties &drawingProperties) const;
|
||||
bool isSelected(Timespan timespan, double yVal, const TraceDrawingProperties &drawingproperties) const;
|
||||
void draw(QPainter* painter,
|
||||
const QwtScaleMap& xMap,
|
||||
const QwtScaleMap& yMap,
|
||||
const QRectF& canvasRect,
|
||||
bool highlight,
|
||||
const TraceDrawingProperties& drawingProperties) const;
|
||||
bool isSelected(Timespan timespan,
|
||||
double yVal,
|
||||
const TraceDrawingProperties& drawingproperties) const;
|
||||
bool isColumnCommand() const;
|
||||
|
||||
const Timespan &Span() const
|
||||
{
|
||||
return span;
|
||||
}
|
||||
const Timespan& Span() const { return span; }
|
||||
|
||||
ID Id() const
|
||||
{
|
||||
return id;
|
||||
}
|
||||
ID Id() const { return id; }
|
||||
|
||||
unsigned int getRank() const
|
||||
{
|
||||
return rank;
|
||||
}
|
||||
unsigned int getRank() const { return rank; }
|
||||
|
||||
unsigned int getBankGroup() const
|
||||
{
|
||||
return bankGroup % groupsPerRank;
|
||||
}
|
||||
unsigned int getBankGroup() const { return bankGroup % groupsPerRank; }
|
||||
|
||||
unsigned int getBank() const
|
||||
{
|
||||
return bank % banksPerGroup;
|
||||
}
|
||||
unsigned int getBank() const { return bank % banksPerGroup; }
|
||||
|
||||
unsigned int getRow() const
|
||||
{
|
||||
return row;
|
||||
}
|
||||
unsigned int getRow() const { return row; }
|
||||
|
||||
unsigned int getColumn() const
|
||||
{
|
||||
return column;
|
||||
}
|
||||
unsigned int getColumn() const { return column; }
|
||||
|
||||
unsigned int getBurstLength() const
|
||||
{
|
||||
return burstLength;
|
||||
}
|
||||
unsigned int getBurstLength() const { return burstLength; }
|
||||
|
||||
virtual RelevantAttributes getRelevantAttributes() const = 0;
|
||||
|
||||
@@ -153,26 +157,43 @@ protected:
|
||||
double hexagonHeight;
|
||||
TextPositioning captionPosition;
|
||||
|
||||
enum PhaseSymbol {Hexagon, Rect};
|
||||
enum PhaseSymbol
|
||||
{
|
||||
Hexagon,
|
||||
Rect
|
||||
};
|
||||
virtual PhaseSymbol getPhaseSymbol() const;
|
||||
virtual Qt::BrushStyle getBrushStyle() const;
|
||||
virtual QColor getColor(const TraceDrawingProperties &drawingProperties) const;
|
||||
virtual QColor getColor(const TraceDrawingProperties& drawingProperties) const;
|
||||
|
||||
virtual QColor getPhaseColor() const = 0;
|
||||
virtual std::vector<int> getYVals(const TraceDrawingProperties &drawingProperties) const;
|
||||
virtual void drawPhaseSymbol(traceTime begin, traceTime end, double y,
|
||||
bool drawtext, PhaseSymbol symbol, QPainter *painter, const QwtScaleMap &xMap,
|
||||
const QwtScaleMap &yMap, const QColor& textColor) const;
|
||||
virtual void drawPhaseDependencies(traceTime begin, traceTime end, double y,
|
||||
const TraceDrawingProperties &drawingProperties, QPainter *painter,
|
||||
const QwtScaleMap &xMap, const QwtScaleMap &yMap) const;
|
||||
virtual std::vector<int> getYVals(const TraceDrawingProperties& drawingProperties) const;
|
||||
virtual void drawPhaseSymbol(traceTime begin,
|
||||
traceTime end,
|
||||
double y,
|
||||
bool drawtext,
|
||||
PhaseSymbol symbol,
|
||||
QPainter* painter,
|
||||
const QwtScaleMap& xMap,
|
||||
const QwtScaleMap& yMap,
|
||||
const QColor& textColor) const;
|
||||
virtual void drawPhaseDependencies(traceTime begin,
|
||||
traceTime end,
|
||||
double y,
|
||||
const TraceDrawingProperties& drawingProperties,
|
||||
QPainter* painter,
|
||||
const QwtScaleMap& xMap,
|
||||
const QwtScaleMap& yMap) const;
|
||||
|
||||
enum class Granularity {Bankwise, TwoBankwise, Groupwise, Rankwise};
|
||||
|
||||
virtual Granularity getGranularity() const
|
||||
enum class Granularity
|
||||
{
|
||||
return Granularity::Bankwise;
|
||||
}
|
||||
Bankwise,
|
||||
TwoBankwise,
|
||||
Groupwise,
|
||||
Rankwise
|
||||
};
|
||||
|
||||
virtual Granularity getGranularity() const { return Granularity::Bankwise; }
|
||||
|
||||
friend class PhaseDependency;
|
||||
};
|
||||
@@ -183,21 +204,15 @@ public:
|
||||
using Phase::Phase;
|
||||
|
||||
protected:
|
||||
QColor getPhaseColor() const override
|
||||
{
|
||||
return ColorGenerator::getColor(1);
|
||||
}
|
||||
QString Name() const final
|
||||
{
|
||||
return "REQ";
|
||||
}
|
||||
QColor getPhaseColor() const override { return ColorGenerator::getColor(1); }
|
||||
QString Name() const final { return "REQ"; }
|
||||
|
||||
RelevantAttributes getRelevantAttributes() const override
|
||||
{
|
||||
return static_cast<RelevantAttributes>(0);
|
||||
}
|
||||
|
||||
std::vector<int> getYVals(const TraceDrawingProperties &drawingProperties) const override;
|
||||
std::vector<int> getYVals(const TraceDrawingProperties& drawingProperties) const override;
|
||||
};
|
||||
|
||||
class RESP final : public Phase
|
||||
@@ -206,21 +221,15 @@ public:
|
||||
using Phase::Phase;
|
||||
|
||||
protected:
|
||||
QColor getPhaseColor() const override
|
||||
{
|
||||
return ColorGenerator::getColor(1);
|
||||
}
|
||||
QString Name() const override
|
||||
{
|
||||
return "RESP";
|
||||
}
|
||||
QColor getPhaseColor() const override { return ColorGenerator::getColor(1); }
|
||||
QString Name() const override { return "RESP"; }
|
||||
|
||||
RelevantAttributes getRelevantAttributes() const override
|
||||
{
|
||||
return static_cast<RelevantAttributes>(0);
|
||||
}
|
||||
|
||||
std::vector<int> getYVals(const TraceDrawingProperties &drawingProperties) const override;
|
||||
std::vector<int> getYVals(const TraceDrawingProperties& drawingProperties) const override;
|
||||
};
|
||||
|
||||
class PREPB final : public Phase
|
||||
@@ -229,14 +238,8 @@ public:
|
||||
using Phase::Phase;
|
||||
|
||||
protected:
|
||||
QColor getPhaseColor() const override
|
||||
{
|
||||
return ColorGenerator::getColor(1);
|
||||
}
|
||||
QString Name() const override
|
||||
{
|
||||
return "PREPB";
|
||||
}
|
||||
QColor getPhaseColor() const override { return ColorGenerator::getColor(1); }
|
||||
QString Name() const override { return "PREPB"; }
|
||||
|
||||
RelevantAttributes getRelevantAttributes() const override
|
||||
{
|
||||
@@ -250,27 +253,15 @@ public:
|
||||
using Phase::Phase;
|
||||
|
||||
protected:
|
||||
QString Name() const override
|
||||
{
|
||||
return "PRESB";
|
||||
}
|
||||
virtual std::vector<traceTime> getTimesOnCommandBus() const
|
||||
{
|
||||
return {span.Begin()};
|
||||
}
|
||||
QColor getColor(const TraceDrawingProperties &drawingProperties) const override
|
||||
QString Name() const override { return "PRESB"; }
|
||||
virtual std::vector<traceTime> getTimesOnCommandBus() const { return {span.Begin()}; }
|
||||
QColor getColor(const TraceDrawingProperties& drawingProperties) const override
|
||||
{
|
||||
Q_UNUSED(drawingProperties)
|
||||
return getPhaseColor();
|
||||
}
|
||||
QColor getPhaseColor() const override
|
||||
{
|
||||
return ColorGenerator::getColor(1);
|
||||
}
|
||||
Granularity getGranularity() const override
|
||||
{
|
||||
return Granularity::Groupwise;
|
||||
}
|
||||
QColor getPhaseColor() const override { return ColorGenerator::getColor(1); }
|
||||
Granularity getGranularity() const override { return Granularity::Groupwise; }
|
||||
|
||||
RelevantAttributes getRelevantAttributes() const override
|
||||
{
|
||||
@@ -284,32 +275,17 @@ public:
|
||||
using Phase::Phase;
|
||||
|
||||
protected:
|
||||
QString Name() const override
|
||||
{
|
||||
return "PREAB";
|
||||
}
|
||||
virtual std::vector<traceTime> getTimesOnCommandBus() const
|
||||
{
|
||||
return {span.Begin()};
|
||||
}
|
||||
QColor getColor(const TraceDrawingProperties &drawingProperties) const override
|
||||
QString Name() const override { return "PREAB"; }
|
||||
virtual std::vector<traceTime> getTimesOnCommandBus() const { return {span.Begin()}; }
|
||||
QColor getColor(const TraceDrawingProperties& drawingProperties) const override
|
||||
{
|
||||
Q_UNUSED(drawingProperties)
|
||||
return getPhaseColor();
|
||||
}
|
||||
QColor getPhaseColor() const override
|
||||
{
|
||||
return ColorGenerator::getColor(10);
|
||||
}
|
||||
Granularity getGranularity() const override
|
||||
{
|
||||
return Granularity::Rankwise;
|
||||
}
|
||||
QColor getPhaseColor() const override { return ColorGenerator::getColor(10); }
|
||||
Granularity getGranularity() const override { return Granularity::Rankwise; }
|
||||
|
||||
RelevantAttributes getRelevantAttributes() const override
|
||||
{
|
||||
return RelevantAttributes::Rank;
|
||||
}
|
||||
RelevantAttributes getRelevantAttributes() const override { return RelevantAttributes::Rank; }
|
||||
};
|
||||
|
||||
class ACT final : public Phase
|
||||
@@ -318,14 +294,8 @@ public:
|
||||
using Phase::Phase;
|
||||
|
||||
protected:
|
||||
QColor getPhaseColor() const override
|
||||
{
|
||||
return ColorGenerator::getColor(3);
|
||||
}
|
||||
QString Name() const override
|
||||
{
|
||||
return "ACT";
|
||||
}
|
||||
QColor getPhaseColor() const override { return ColorGenerator::getColor(3); }
|
||||
QString Name() const override { return "ACT"; }
|
||||
|
||||
RelevantAttributes getRelevantAttributes() const override
|
||||
{
|
||||
@@ -340,14 +310,8 @@ public:
|
||||
using Phase::Phase;
|
||||
|
||||
protected:
|
||||
QColor getPhaseColor() const override
|
||||
{
|
||||
return ColorGenerator::getColor(4);
|
||||
}
|
||||
QString Name() const override
|
||||
{
|
||||
return "RD";
|
||||
}
|
||||
QColor getPhaseColor() const override { return ColorGenerator::getColor(4); }
|
||||
QString Name() const override { return "RD"; }
|
||||
|
||||
RelevantAttributes getRelevantAttributes() const override
|
||||
{
|
||||
@@ -362,14 +326,8 @@ public:
|
||||
using Phase::Phase;
|
||||
|
||||
protected:
|
||||
QColor getPhaseColor() const override
|
||||
{
|
||||
return ColorGenerator::getColor(5);
|
||||
}
|
||||
QString Name() const override
|
||||
{
|
||||
return "RDA";
|
||||
}
|
||||
QColor getPhaseColor() const override { return ColorGenerator::getColor(5); }
|
||||
QString Name() const override { return "RDA"; }
|
||||
|
||||
RelevantAttributes getRelevantAttributes() const override
|
||||
{
|
||||
@@ -384,14 +342,8 @@ public:
|
||||
using Phase::Phase;
|
||||
|
||||
protected:
|
||||
QColor getPhaseColor() const override
|
||||
{
|
||||
return ColorGenerator::getColor(6);
|
||||
}
|
||||
QString Name() const override
|
||||
{
|
||||
return "WR";
|
||||
}
|
||||
QColor getPhaseColor() const override { return ColorGenerator::getColor(6); }
|
||||
QString Name() const override { return "WR"; }
|
||||
|
||||
RelevantAttributes getRelevantAttributes() const override
|
||||
{
|
||||
@@ -406,14 +358,8 @@ public:
|
||||
using Phase::Phase;
|
||||
|
||||
protected:
|
||||
QColor getPhaseColor() const override
|
||||
{
|
||||
return ColorGenerator::getColor(6);
|
||||
}
|
||||
QString Name() const override
|
||||
{
|
||||
return "MWR";
|
||||
}
|
||||
QColor getPhaseColor() const override { return ColorGenerator::getColor(6); }
|
||||
QString Name() const override { return "MWR"; }
|
||||
|
||||
RelevantAttributes getRelevantAttributes() const override
|
||||
{
|
||||
@@ -428,14 +374,8 @@ public:
|
||||
using Phase::Phase;
|
||||
|
||||
protected:
|
||||
QColor getPhaseColor() const override
|
||||
{
|
||||
return ColorGenerator::getColor(7);
|
||||
}
|
||||
QString Name() const override
|
||||
{
|
||||
return "WRA";
|
||||
}
|
||||
QColor getPhaseColor() const override { return ColorGenerator::getColor(7); }
|
||||
QString Name() const override { return "WRA"; }
|
||||
|
||||
RelevantAttributes getRelevantAttributes() const override
|
||||
{
|
||||
@@ -450,14 +390,8 @@ public:
|
||||
using Phase::Phase;
|
||||
|
||||
protected:
|
||||
QColor getPhaseColor() const override
|
||||
{
|
||||
return ColorGenerator::getColor(7);
|
||||
}
|
||||
QString Name() const override
|
||||
{
|
||||
return "MWRA";
|
||||
}
|
||||
QColor getPhaseColor() const override { return ColorGenerator::getColor(7); }
|
||||
QString Name() const override { return "MWRA"; }
|
||||
|
||||
RelevantAttributes getRelevantAttributes() const override
|
||||
{
|
||||
@@ -472,15 +406,9 @@ public:
|
||||
using Phase::Phase;
|
||||
|
||||
protected:
|
||||
QString Name() const override
|
||||
{
|
||||
return "REF";
|
||||
}
|
||||
virtual std::vector<traceTime> getTimesOnCommandBus() const
|
||||
{
|
||||
return {span.Begin()};
|
||||
}
|
||||
QColor getColor(const TraceDrawingProperties &drawingProperties) const override
|
||||
QString Name() const override { return "REF"; }
|
||||
virtual std::vector<traceTime> getTimesOnCommandBus() const { return {span.Begin()}; }
|
||||
QColor getColor(const TraceDrawingProperties& drawingProperties) const override
|
||||
{
|
||||
Q_UNUSED(drawingProperties)
|
||||
return getPhaseColor();
|
||||
@@ -499,19 +427,10 @@ public:
|
||||
using AUTO_REFRESH::AUTO_REFRESH;
|
||||
|
||||
protected:
|
||||
QString Name() const override
|
||||
{
|
||||
return "REFAB";
|
||||
}
|
||||
Granularity getGranularity() const override
|
||||
{
|
||||
return Granularity::Rankwise;
|
||||
}
|
||||
QString Name() const override { return "REFAB"; }
|
||||
Granularity getGranularity() const override { return Granularity::Rankwise; }
|
||||
|
||||
RelevantAttributes getRelevantAttributes() const override
|
||||
{
|
||||
return RelevantAttributes::Rank;
|
||||
}
|
||||
RelevantAttributes getRelevantAttributes() const override { return RelevantAttributes::Rank; }
|
||||
};
|
||||
|
||||
class RFMAB final : public AUTO_REFRESH
|
||||
@@ -520,14 +439,8 @@ public:
|
||||
using AUTO_REFRESH::AUTO_REFRESH;
|
||||
|
||||
protected:
|
||||
QString Name() const override
|
||||
{
|
||||
return "RFMAB";
|
||||
}
|
||||
Granularity getGranularity() const override
|
||||
{
|
||||
return Granularity::Rankwise;
|
||||
}
|
||||
QString Name() const override { return "RFMAB"; }
|
||||
Granularity getGranularity() const override { return Granularity::Rankwise; }
|
||||
QColor getPhaseColor() const override
|
||||
{
|
||||
auto phaseColor = QColor(Qt::darkRed);
|
||||
@@ -535,10 +448,7 @@ protected:
|
||||
return phaseColor;
|
||||
}
|
||||
|
||||
RelevantAttributes getRelevantAttributes() const override
|
||||
{
|
||||
return RelevantAttributes::Rank;
|
||||
}
|
||||
RelevantAttributes getRelevantAttributes() const override { return RelevantAttributes::Rank; }
|
||||
};
|
||||
|
||||
class REFPB final : public AUTO_REFRESH
|
||||
@@ -547,10 +457,7 @@ public:
|
||||
using AUTO_REFRESH::AUTO_REFRESH;
|
||||
|
||||
protected:
|
||||
QString Name() const override
|
||||
{
|
||||
return "REFPB";
|
||||
}
|
||||
QString Name() const override { return "REFPB"; }
|
||||
|
||||
RelevantAttributes getRelevantAttributes() const override
|
||||
{
|
||||
@@ -564,10 +471,7 @@ public:
|
||||
using AUTO_REFRESH::AUTO_REFRESH;
|
||||
|
||||
protected:
|
||||
QString Name() const override
|
||||
{
|
||||
return "RFMPB";
|
||||
}
|
||||
QString Name() const override { return "RFMPB"; }
|
||||
QColor getPhaseColor() const override
|
||||
{
|
||||
auto phaseColor = QColor(Qt::darkRed);
|
||||
@@ -587,14 +491,8 @@ public:
|
||||
using AUTO_REFRESH::AUTO_REFRESH;
|
||||
|
||||
protected:
|
||||
QString Name() const override
|
||||
{
|
||||
return "REFP2B";
|
||||
}
|
||||
Granularity getGranularity() const override
|
||||
{
|
||||
return Granularity::TwoBankwise;
|
||||
}
|
||||
QString Name() const override { return "REFP2B"; }
|
||||
Granularity getGranularity() const override { return Granularity::TwoBankwise; }
|
||||
|
||||
RelevantAttributes getRelevantAttributes() const override
|
||||
{
|
||||
@@ -608,14 +506,8 @@ public:
|
||||
using AUTO_REFRESH::AUTO_REFRESH;
|
||||
|
||||
protected:
|
||||
QString Name() const override
|
||||
{
|
||||
return "RFMP2B";
|
||||
}
|
||||
Granularity getGranularity() const override
|
||||
{
|
||||
return Granularity::TwoBankwise;
|
||||
}
|
||||
QString Name() const override { return "RFMP2B"; }
|
||||
Granularity getGranularity() const override { return Granularity::TwoBankwise; }
|
||||
QColor getPhaseColor() const override
|
||||
{
|
||||
auto phaseColor = QColor(Qt::darkRed);
|
||||
@@ -635,14 +527,8 @@ public:
|
||||
using AUTO_REFRESH::AUTO_REFRESH;
|
||||
|
||||
protected:
|
||||
QString Name() const override
|
||||
{
|
||||
return "REFSB";
|
||||
}
|
||||
Granularity getGranularity() const override
|
||||
{
|
||||
return Granularity::Groupwise;
|
||||
}
|
||||
QString Name() const override { return "REFSB"; }
|
||||
Granularity getGranularity() const override { return Granularity::Groupwise; }
|
||||
|
||||
RelevantAttributes getRelevantAttributes() const override
|
||||
{
|
||||
@@ -656,14 +542,8 @@ public:
|
||||
using AUTO_REFRESH::AUTO_REFRESH;
|
||||
|
||||
protected:
|
||||
QString Name() const override
|
||||
{
|
||||
return "RFMSB";
|
||||
}
|
||||
Granularity getGranularity() const override
|
||||
{
|
||||
return Granularity::Groupwise;
|
||||
}
|
||||
QString Name() const override { return "RFMSB"; }
|
||||
Granularity getGranularity() const override { return Granularity::Groupwise; }
|
||||
QColor getPhaseColor() const override
|
||||
{
|
||||
auto phaseColor = QColor(Qt::darkRed);
|
||||
@@ -684,27 +564,15 @@ public:
|
||||
virtual ~PDNAB() = default;
|
||||
|
||||
protected:
|
||||
QString Name() const override
|
||||
{
|
||||
return "PDNAB";
|
||||
}
|
||||
Qt::BrushStyle getBrushStyle() const override
|
||||
{
|
||||
return Qt::Dense6Pattern;
|
||||
}
|
||||
QColor getColor(const TraceDrawingProperties &drawingProperties) const override
|
||||
QString Name() const override { return "PDNAB"; }
|
||||
Qt::BrushStyle getBrushStyle() const override { return Qt::Dense6Pattern; }
|
||||
QColor getColor(const TraceDrawingProperties& drawingProperties) const override
|
||||
{
|
||||
Q_UNUSED(drawingProperties)
|
||||
return getPhaseColor();
|
||||
}
|
||||
QColor getPhaseColor() const override
|
||||
{
|
||||
return {Qt::black};
|
||||
}
|
||||
Phase::PhaseSymbol getPhaseSymbol() const override
|
||||
{
|
||||
return PhaseSymbol::Rect;
|
||||
}
|
||||
QColor getPhaseColor() const override { return {Qt::black}; }
|
||||
Phase::PhaseSymbol getPhaseSymbol() const override { return PhaseSymbol::Rect; }
|
||||
|
||||
RelevantAttributes getRelevantAttributes() const override
|
||||
{
|
||||
@@ -718,19 +586,10 @@ public:
|
||||
using PDNAB::PDNAB;
|
||||
|
||||
protected:
|
||||
QString Name() const override
|
||||
{
|
||||
return "PDNA";
|
||||
}
|
||||
Granularity getGranularity() const override
|
||||
{
|
||||
return Granularity::Rankwise;
|
||||
}
|
||||
QString Name() const override { return "PDNA"; }
|
||||
Granularity getGranularity() const override { return Granularity::Rankwise; }
|
||||
|
||||
RelevantAttributes getRelevantAttributes() const override
|
||||
{
|
||||
return RelevantAttributes::Rank;
|
||||
}
|
||||
RelevantAttributes getRelevantAttributes() const override { return RelevantAttributes::Rank; }
|
||||
};
|
||||
|
||||
class PDNPB : public Phase
|
||||
@@ -740,27 +599,15 @@ public:
|
||||
virtual ~PDNPB() = default;
|
||||
|
||||
protected:
|
||||
QString Name() const override
|
||||
{
|
||||
return "PDNPB";
|
||||
}
|
||||
Qt::BrushStyle getBrushStyle() const override
|
||||
{
|
||||
return Qt::Dense4Pattern;
|
||||
}
|
||||
QColor getColor(const TraceDrawingProperties &drawingProperties) const override
|
||||
QString Name() const override { return "PDNPB"; }
|
||||
Qt::BrushStyle getBrushStyle() const override { return Qt::Dense4Pattern; }
|
||||
QColor getColor(const TraceDrawingProperties& drawingProperties) const override
|
||||
{
|
||||
Q_UNUSED(drawingProperties)
|
||||
return getPhaseColor();
|
||||
}
|
||||
QColor getPhaseColor() const override
|
||||
{
|
||||
return {Qt::black};
|
||||
}
|
||||
Phase::PhaseSymbol getPhaseSymbol() const override
|
||||
{
|
||||
return PhaseSymbol::Rect;
|
||||
}
|
||||
QColor getPhaseColor() const override { return {Qt::black}; }
|
||||
Phase::PhaseSymbol getPhaseSymbol() const override { return PhaseSymbol::Rect; }
|
||||
|
||||
RelevantAttributes getRelevantAttributes() const override
|
||||
{
|
||||
@@ -774,18 +621,9 @@ public:
|
||||
using PDNPB::PDNPB;
|
||||
|
||||
protected:
|
||||
QString Name() const override
|
||||
{
|
||||
return "PDNP";
|
||||
}
|
||||
Granularity getGranularity() const override
|
||||
{
|
||||
return Granularity::Rankwise;
|
||||
}
|
||||
RelevantAttributes getRelevantAttributes() const override
|
||||
{
|
||||
return RelevantAttributes::Rank;
|
||||
}
|
||||
QString Name() const override { return "PDNP"; }
|
||||
Granularity getGranularity() const override { return Granularity::Rankwise; }
|
||||
RelevantAttributes getRelevantAttributes() const override { return RelevantAttributes::Rank; }
|
||||
};
|
||||
|
||||
class SREFB : public Phase
|
||||
@@ -795,27 +633,15 @@ public:
|
||||
virtual ~SREFB() = default;
|
||||
|
||||
protected:
|
||||
QString Name() const override
|
||||
{
|
||||
return "SREFB";
|
||||
}
|
||||
Qt::BrushStyle getBrushStyle() const override
|
||||
{
|
||||
return Qt::Dense1Pattern;
|
||||
}
|
||||
QColor getColor(const TraceDrawingProperties &drawingProperties) const override
|
||||
QString Name() const override { return "SREFB"; }
|
||||
Qt::BrushStyle getBrushStyle() const override { return Qt::Dense1Pattern; }
|
||||
QColor getColor(const TraceDrawingProperties& drawingProperties) const override
|
||||
{
|
||||
Q_UNUSED(drawingProperties)
|
||||
return getPhaseColor();
|
||||
}
|
||||
QColor getPhaseColor() const override
|
||||
{
|
||||
return {Qt::black};
|
||||
}
|
||||
Phase::PhaseSymbol getPhaseSymbol() const override
|
||||
{
|
||||
return PhaseSymbol::Rect;
|
||||
}
|
||||
QColor getPhaseColor() const override { return {Qt::black}; }
|
||||
Phase::PhaseSymbol getPhaseSymbol() const override { return PhaseSymbol::Rect; }
|
||||
|
||||
RelevantAttributes getRelevantAttributes() const override
|
||||
{
|
||||
@@ -829,18 +655,9 @@ public:
|
||||
using SREFB::SREFB;
|
||||
|
||||
protected:
|
||||
QString Name() const override
|
||||
{
|
||||
return "SREF";
|
||||
}
|
||||
Granularity getGranularity() const override
|
||||
{
|
||||
return Granularity::Rankwise;
|
||||
}
|
||||
RelevantAttributes getRelevantAttributes() const override
|
||||
{
|
||||
return RelevantAttributes::Rank;
|
||||
}
|
||||
QString Name() const override { return "SREF"; }
|
||||
Granularity getGranularity() const override { return Granularity::Rankwise; }
|
||||
RelevantAttributes getRelevantAttributes() const override { return RelevantAttributes::Rank; }
|
||||
};
|
||||
|
||||
#endif // BANKPHASE_H
|
||||
|
||||
@@ -37,7 +37,9 @@
|
||||
#include "phase.h"
|
||||
#include <iostream>
|
||||
|
||||
PhaseDependency::PhaseDependency(DependencyType type, QString timeDependency, std::shared_ptr<Phase> dependency)
|
||||
PhaseDependency::PhaseDependency(DependencyType type,
|
||||
QString timeDependency,
|
||||
std::shared_ptr<Phase> dependency)
|
||||
{
|
||||
mType = type;
|
||||
mTimeDependency = timeDependency;
|
||||
@@ -56,8 +58,11 @@ PhaseDependency::~PhaseDependency()
|
||||
{
|
||||
}
|
||||
|
||||
bool PhaseDependency::draw(QPoint &end, const TraceDrawingProperties &drawingProperties, QPainter *painter,
|
||||
const QwtScaleMap &xMap, const QwtScaleMap &yMap)
|
||||
bool PhaseDependency::draw(QPoint& end,
|
||||
const TraceDrawingProperties& drawingProperties,
|
||||
QPainter* painter,
|
||||
const QwtScaleMap& xMap,
|
||||
const QwtScaleMap& yMap)
|
||||
{
|
||||
if (mIsInvisible)
|
||||
return false;
|
||||
@@ -78,26 +83,33 @@ bool PhaseDependency::draw(QPoint &end, const TraceDrawingProperties &drawingPro
|
||||
return drawn;
|
||||
}
|
||||
|
||||
void PhaseDependency::mDraw(QPoint &end, double depY, const TraceDrawingProperties &drawingProperties,
|
||||
QPainter *painter, const QwtScaleMap &xMap, const QwtScaleMap &yMap)
|
||||
void PhaseDependency::mDraw(QPoint& end,
|
||||
double depY,
|
||||
const TraceDrawingProperties& drawingProperties,
|
||||
QPainter* painter,
|
||||
const QwtScaleMap& xMap,
|
||||
const QwtScaleMap& yMap)
|
||||
{
|
||||
traceTime depBegin = mDependency->span.Begin();
|
||||
traceTime depEnd = mDependency->span.End();
|
||||
|
||||
traceTime depOffset = (depBegin == depEnd) ? static_cast<traceTime>(0.05 * mDependency->clk) : 0;
|
||||
traceTime depOffset =
|
||||
(depBegin == depEnd) ? static_cast<traceTime>(0.05 * mDependency->clk) : 0;
|
||||
|
||||
double depYVal = yMap.transform(depY);
|
||||
double depSymbolHeight = yMap.transform(0) - yMap.transform(mDependency->hexagonHeight);
|
||||
QPoint depLineFrom(static_cast<int>(xMap.transform(depBegin /* + (depEnd + depOffset - depBegin)/4*/)),
|
||||
static_cast<int>(depYVal));
|
||||
QPoint depLineFrom(
|
||||
static_cast<int>(xMap.transform(depBegin /* + (depEnd + depOffset - depBegin)/4*/)),
|
||||
static_cast<int>(depYVal));
|
||||
|
||||
QLineF line(depLineFrom, end);
|
||||
double angle = std::atan2(-line.dy(), line.dx());
|
||||
|
||||
qreal arrowSize = 10;
|
||||
QPointF arrowP1 = line.p2() - QPointF(sin(angle + M_PI / 3) * arrowSize, cos(angle + M_PI / 3) * arrowSize);
|
||||
QPointF arrowP2 =
|
||||
line.p2() - QPointF(sin(angle + M_PI - M_PI / 3) * arrowSize, cos(angle + M_PI - M_PI / 3) * arrowSize);
|
||||
QPointF arrowP1 =
|
||||
line.p2() - QPointF(sin(angle + M_PI / 3) * arrowSize, cos(angle + M_PI / 3) * arrowSize);
|
||||
QPointF arrowP2 = line.p2() - QPointF(sin(angle + M_PI - M_PI / 3) * arrowSize,
|
||||
cos(angle + M_PI - M_PI / 3) * arrowSize);
|
||||
QPolygonF arrowHead;
|
||||
arrowHead << line.p2() << arrowP1 << arrowP2;
|
||||
|
||||
@@ -109,7 +121,8 @@ void PhaseDependency::mDraw(QPoint &end, double depY, const TraceDrawingProperti
|
||||
|
||||
if (drawingProperties.drawDependenciesOption.text == DependencyTextOption::Enabled)
|
||||
{
|
||||
QPoint textPosition(line.x1() + (line.x2() - line.x1()) / 2, line.y1() + (line.y2() - line.y1()) / 2);
|
||||
QPoint textPosition(line.x1() + (line.x2() - line.x1()) / 2,
|
||||
line.y1() + (line.y2() - line.y1()) / 2);
|
||||
auto alignment = TextPositioning::topRight;
|
||||
|
||||
if (textPosition.y() == line.y1())
|
||||
@@ -128,38 +141,39 @@ void PhaseDependency::mDraw(QPoint &end, double depY, const TraceDrawingProperti
|
||||
}
|
||||
}
|
||||
|
||||
QString PhaseDependency::dependencyTypeName(DependencyType dtype) {
|
||||
switch(dtype) {
|
||||
case IntraBank:
|
||||
return "IntraBank";
|
||||
QString PhaseDependency::dependencyTypeName(DependencyType dtype)
|
||||
{
|
||||
switch (dtype)
|
||||
{
|
||||
case IntraBank:
|
||||
return "IntraBank";
|
||||
|
||||
case IntraBankGroup:
|
||||
return "IntraBankGroup";
|
||||
|
||||
case IntraBankInGroup:
|
||||
return "IntraBankInGroup";
|
||||
case IntraBankGroup:
|
||||
return "IntraBankGroup";
|
||||
|
||||
case IntraRank:
|
||||
return "IntraRank";
|
||||
case IntraBankInGroup:
|
||||
return "IntraBankInGroup";
|
||||
|
||||
case IntraLogicalRank:
|
||||
return "IntraLogicalRank";
|
||||
case IntraRank:
|
||||
return "IntraRank";
|
||||
|
||||
case IntraPhysicalRank:
|
||||
return "IntraPhysicalRank";
|
||||
case IntraLogicalRank:
|
||||
return "IntraLogicalRank";
|
||||
|
||||
case IntraDIMMRank:
|
||||
return "IntraDIMMRank";
|
||||
case IntraPhysicalRank:
|
||||
return "IntraPhysicalRank";
|
||||
|
||||
case InterRank:
|
||||
return "InterRank";
|
||||
case IntraDIMMRank:
|
||||
return "IntraDIMMRank";
|
||||
|
||||
case InterDIMMRank:
|
||||
return "InterDIMMRank";
|
||||
case InterRank:
|
||||
return "InterRank";
|
||||
|
||||
default:
|
||||
// TODO - maybe throw?
|
||||
return "";
|
||||
case InterDIMMRank:
|
||||
return "InterDIMMRank";
|
||||
|
||||
default:
|
||||
// TODO - maybe throw?
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,13 +66,13 @@ public:
|
||||
PhaseDependency(DependencyType type, QString timeDependency);
|
||||
~PhaseDependency();
|
||||
|
||||
bool isVisible()
|
||||
{
|
||||
return !mIsInvisible;
|
||||
}
|
||||
bool isVisible() { return !mIsInvisible; }
|
||||
|
||||
bool draw(QPoint &end, const TraceDrawingProperties &drawingProperties, QPainter *painter, const QwtScaleMap &xMap,
|
||||
const QwtScaleMap &yMap);
|
||||
bool draw(QPoint& end,
|
||||
const TraceDrawingProperties& drawingProperties,
|
||||
QPainter* painter,
|
||||
const QwtScaleMap& xMap,
|
||||
const QwtScaleMap& yMap);
|
||||
|
||||
static QString dependencyTypeName(DependencyType);
|
||||
|
||||
@@ -83,6 +83,10 @@ protected:
|
||||
|
||||
bool mIsInvisible = false;
|
||||
|
||||
void mDraw(QPoint &end, double depY, const TraceDrawingProperties &drawingProperties, QPainter *painter,
|
||||
const QwtScaleMap &xMap, const QwtScaleMap &yMap);
|
||||
void mDraw(QPoint& end,
|
||||
double depY,
|
||||
const TraceDrawingProperties& drawingProperties,
|
||||
QPainter* painter,
|
||||
const QwtScaleMap& xMap,
|
||||
const QwtScaleMap& yMap);
|
||||
};
|
||||
|
||||
@@ -36,116 +36,415 @@
|
||||
*/
|
||||
|
||||
#include "phasefactory.h"
|
||||
#include <exception>
|
||||
#include "phase.h"
|
||||
#include "businessObjects/timespan.h"
|
||||
#include "businessObjects/transaction.h"
|
||||
#include "data/tracedb.h"
|
||||
#include "businessObjects/timespan.h"
|
||||
#include "phase.h"
|
||||
#include <exception>
|
||||
|
||||
std::shared_ptr<Phase> PhaseFactory::createPhase(ID id, const QString &dbPhaseName,
|
||||
Timespan span, Timespan spanOnDataStrobe,
|
||||
unsigned int rank, unsigned int bankGroup, unsigned int bank, unsigned int row, unsigned int column,
|
||||
unsigned int burstLength, const std::shared_ptr<Transaction> &trans, TraceDB &database)
|
||||
std::shared_ptr<Phase> PhaseFactory::createPhase(ID id,
|
||||
const QString& dbPhaseName,
|
||||
Timespan span,
|
||||
Timespan spanOnDataStrobe,
|
||||
unsigned int rank,
|
||||
unsigned int bankGroup,
|
||||
unsigned int bank,
|
||||
unsigned int row,
|
||||
unsigned int column,
|
||||
unsigned int burstLength,
|
||||
const std::shared_ptr<Transaction>& trans,
|
||||
TraceDB& database)
|
||||
{
|
||||
auto clk = static_cast<traceTime>(database.getGeneralInfo().clkPeriod);
|
||||
unsigned int groupsPerRank = database.getGeneralInfo().groupsPerRank;
|
||||
unsigned int banksPerGroup = database.getGeneralInfo().banksPerGroup;
|
||||
const CommandLengths &cl = database.getCommandLengths();
|
||||
const CommandLengths& cl = database.getCommandLengths();
|
||||
|
||||
if (dbPhaseName == "REQ")
|
||||
return std::shared_ptr<Phase>(new REQ(id, span, spanOnDataStrobe, rank, bankGroup, bank, row, column,
|
||||
burstLength, clk, trans, {}, groupsPerRank, banksPerGroup));
|
||||
return std::shared_ptr<Phase>(new REQ(id,
|
||||
span,
|
||||
spanOnDataStrobe,
|
||||
rank,
|
||||
bankGroup,
|
||||
bank,
|
||||
row,
|
||||
column,
|
||||
burstLength,
|
||||
clk,
|
||||
trans,
|
||||
{},
|
||||
groupsPerRank,
|
||||
banksPerGroup));
|
||||
|
||||
if (dbPhaseName == "RESP")
|
||||
return std::shared_ptr<Phase>(new RESP(id, span, spanOnDataStrobe, rank, bankGroup, bank, row, column,
|
||||
burstLength, clk, trans, {}, groupsPerRank, banksPerGroup));
|
||||
return std::shared_ptr<Phase>(new RESP(id,
|
||||
span,
|
||||
spanOnDataStrobe,
|
||||
rank,
|
||||
bankGroup,
|
||||
bank,
|
||||
row,
|
||||
column,
|
||||
burstLength,
|
||||
clk,
|
||||
trans,
|
||||
{},
|
||||
groupsPerRank,
|
||||
banksPerGroup));
|
||||
|
||||
if (dbPhaseName == "PREPB")
|
||||
return std::shared_ptr<Phase>(new PREPB(id, span, spanOnDataStrobe, rank, bankGroup, bank, row, column,
|
||||
burstLength, clk, trans, {Timespan(span.Begin(), span.Begin() + clk * cl.PREPB)}, groupsPerRank, banksPerGroup));
|
||||
return std::shared_ptr<Phase>(
|
||||
new PREPB(id,
|
||||
span,
|
||||
spanOnDataStrobe,
|
||||
rank,
|
||||
bankGroup,
|
||||
bank,
|
||||
row,
|
||||
column,
|
||||
burstLength,
|
||||
clk,
|
||||
trans,
|
||||
{Timespan(span.Begin(), span.Begin() + clk * cl.PREPB)},
|
||||
groupsPerRank,
|
||||
banksPerGroup));
|
||||
|
||||
if (dbPhaseName == "ACT")
|
||||
return std::shared_ptr<Phase>(new ACT(id, span, spanOnDataStrobe, rank, bankGroup, bank, row, column,
|
||||
burstLength, clk, trans, {Timespan(span.Begin(), span.Begin() + clk * cl.ACT)}, groupsPerRank, banksPerGroup));
|
||||
return std::shared_ptr<Phase>(new ACT(id,
|
||||
span,
|
||||
spanOnDataStrobe,
|
||||
rank,
|
||||
bankGroup,
|
||||
bank,
|
||||
row,
|
||||
column,
|
||||
burstLength,
|
||||
clk,
|
||||
trans,
|
||||
{Timespan(span.Begin(), span.Begin() + clk * cl.ACT)},
|
||||
groupsPerRank,
|
||||
banksPerGroup));
|
||||
|
||||
if (dbPhaseName == "PREAB")
|
||||
return std::shared_ptr<Phase>(new PREAB(id, span, spanOnDataStrobe, rank, bankGroup, bank, row, column,
|
||||
burstLength, clk, trans, {Timespan(span.Begin(), span.Begin() + clk * cl.PREAB)}, groupsPerRank, banksPerGroup));
|
||||
return std::shared_ptr<Phase>(
|
||||
new PREAB(id,
|
||||
span,
|
||||
spanOnDataStrobe,
|
||||
rank,
|
||||
bankGroup,
|
||||
bank,
|
||||
row,
|
||||
column,
|
||||
burstLength,
|
||||
clk,
|
||||
trans,
|
||||
{Timespan(span.Begin(), span.Begin() + clk * cl.PREAB)},
|
||||
groupsPerRank,
|
||||
banksPerGroup));
|
||||
|
||||
if (dbPhaseName == "REFAB")
|
||||
return std::shared_ptr<Phase>(new REFAB(id, span, spanOnDataStrobe, rank, bankGroup, bank, row, column,
|
||||
burstLength, clk, trans, {Timespan(span.Begin(), span.Begin() + clk * cl.REFAB)}, groupsPerRank, banksPerGroup));
|
||||
return std::shared_ptr<Phase>(
|
||||
new REFAB(id,
|
||||
span,
|
||||
spanOnDataStrobe,
|
||||
rank,
|
||||
bankGroup,
|
||||
bank,
|
||||
row,
|
||||
column,
|
||||
burstLength,
|
||||
clk,
|
||||
trans,
|
||||
{Timespan(span.Begin(), span.Begin() + clk * cl.REFAB)},
|
||||
groupsPerRank,
|
||||
banksPerGroup));
|
||||
|
||||
if (dbPhaseName == "RFMAB")
|
||||
return std::shared_ptr<Phase>(new RFMAB(id, span, spanOnDataStrobe, rank, bankGroup, bank, row, column,
|
||||
burstLength, clk, trans, {Timespan(span.Begin(), span.Begin() + clk * cl.RFMAB)}, groupsPerRank, banksPerGroup));
|
||||
return std::shared_ptr<Phase>(
|
||||
new RFMAB(id,
|
||||
span,
|
||||
spanOnDataStrobe,
|
||||
rank,
|
||||
bankGroup,
|
||||
bank,
|
||||
row,
|
||||
column,
|
||||
burstLength,
|
||||
clk,
|
||||
trans,
|
||||
{Timespan(span.Begin(), span.Begin() + clk * cl.RFMAB)},
|
||||
groupsPerRank,
|
||||
banksPerGroup));
|
||||
|
||||
if (dbPhaseName == "REFPB")
|
||||
return std::shared_ptr<Phase>(new REFPB(id, span, spanOnDataStrobe, rank, bankGroup, bank, row, column,
|
||||
burstLength, clk, trans, {Timespan(span.Begin(), span.Begin() + clk * cl.REFPB)}, groupsPerRank, banksPerGroup));
|
||||
return std::shared_ptr<Phase>(
|
||||
new REFPB(id,
|
||||
span,
|
||||
spanOnDataStrobe,
|
||||
rank,
|
||||
bankGroup,
|
||||
bank,
|
||||
row,
|
||||
column,
|
||||
burstLength,
|
||||
clk,
|
||||
trans,
|
||||
{Timespan(span.Begin(), span.Begin() + clk * cl.REFPB)},
|
||||
groupsPerRank,
|
||||
banksPerGroup));
|
||||
|
||||
if (dbPhaseName == "RFMPB")
|
||||
return std::shared_ptr<Phase>(new RFMPB(id, span, spanOnDataStrobe, rank, bankGroup, bank, row, column,
|
||||
burstLength, clk, trans, {Timespan(span.Begin(), span.Begin() + clk * cl.RFMPB)}, groupsPerRank, banksPerGroup));
|
||||
return std::shared_ptr<Phase>(
|
||||
new RFMPB(id,
|
||||
span,
|
||||
spanOnDataStrobe,
|
||||
rank,
|
||||
bankGroup,
|
||||
bank,
|
||||
row,
|
||||
column,
|
||||
burstLength,
|
||||
clk,
|
||||
trans,
|
||||
{Timespan(span.Begin(), span.Begin() + clk * cl.RFMPB)},
|
||||
groupsPerRank,
|
||||
banksPerGroup));
|
||||
|
||||
if (dbPhaseName == "REFP2B")
|
||||
return std::shared_ptr<Phase>(new REFP2B(id, span, spanOnDataStrobe, rank, bankGroup, bank, row, column,
|
||||
burstLength, clk, trans, {Timespan(span.Begin(), span.Begin() + clk * cl.REFP2B)}, groupsPerRank, banksPerGroup));
|
||||
return std::shared_ptr<Phase>(
|
||||
new REFP2B(id,
|
||||
span,
|
||||
spanOnDataStrobe,
|
||||
rank,
|
||||
bankGroup,
|
||||
bank,
|
||||
row,
|
||||
column,
|
||||
burstLength,
|
||||
clk,
|
||||
trans,
|
||||
{Timespan(span.Begin(), span.Begin() + clk * cl.REFP2B)},
|
||||
groupsPerRank,
|
||||
banksPerGroup));
|
||||
|
||||
if (dbPhaseName == "RFMP2B")
|
||||
return std::shared_ptr<Phase>(new RFMP2B(id, span, spanOnDataStrobe, rank, bankGroup, bank, row, column,
|
||||
burstLength, clk, trans, {Timespan(span.Begin(), span.Begin() + clk * cl.RFMP2B)}, groupsPerRank, banksPerGroup));
|
||||
return std::shared_ptr<Phase>(
|
||||
new RFMP2B(id,
|
||||
span,
|
||||
spanOnDataStrobe,
|
||||
rank,
|
||||
bankGroup,
|
||||
bank,
|
||||
row,
|
||||
column,
|
||||
burstLength,
|
||||
clk,
|
||||
trans,
|
||||
{Timespan(span.Begin(), span.Begin() + clk * cl.RFMP2B)},
|
||||
groupsPerRank,
|
||||
banksPerGroup));
|
||||
|
||||
if (dbPhaseName == "PRESB")
|
||||
return std::shared_ptr<Phase>(new PRESB(id, span, spanOnDataStrobe, rank, bankGroup, bank, row, column,
|
||||
burstLength, clk, trans, {Timespan(span.Begin(), span.Begin() + clk * cl.PRESB)}, groupsPerRank, banksPerGroup));
|
||||
return std::shared_ptr<Phase>(
|
||||
new PRESB(id,
|
||||
span,
|
||||
spanOnDataStrobe,
|
||||
rank,
|
||||
bankGroup,
|
||||
bank,
|
||||
row,
|
||||
column,
|
||||
burstLength,
|
||||
clk,
|
||||
trans,
|
||||
{Timespan(span.Begin(), span.Begin() + clk * cl.PRESB)},
|
||||
groupsPerRank,
|
||||
banksPerGroup));
|
||||
|
||||
if (dbPhaseName == "REFSB")
|
||||
return std::shared_ptr<Phase>(new REFSB(id, span, spanOnDataStrobe, rank, bankGroup, bank, row, column,
|
||||
burstLength, clk, trans, {Timespan(span.Begin(), span.Begin() + clk * cl.REFSB)}, groupsPerRank, banksPerGroup));
|
||||
return std::shared_ptr<Phase>(
|
||||
new REFSB(id,
|
||||
span,
|
||||
spanOnDataStrobe,
|
||||
rank,
|
||||
bankGroup,
|
||||
bank,
|
||||
row,
|
||||
column,
|
||||
burstLength,
|
||||
clk,
|
||||
trans,
|
||||
{Timespan(span.Begin(), span.Begin() + clk * cl.REFSB)},
|
||||
groupsPerRank,
|
||||
banksPerGroup));
|
||||
|
||||
if (dbPhaseName == "RFMSB")
|
||||
return std::shared_ptr<Phase>(new RFMSB(id, span, spanOnDataStrobe, rank, bankGroup, bank, row, column,
|
||||
burstLength, clk, trans, {Timespan(span.Begin(), span.Begin() + clk * cl.RFMSB)}, groupsPerRank, banksPerGroup));
|
||||
return std::shared_ptr<Phase>(
|
||||
new RFMSB(id,
|
||||
span,
|
||||
spanOnDataStrobe,
|
||||
rank,
|
||||
bankGroup,
|
||||
bank,
|
||||
row,
|
||||
column,
|
||||
burstLength,
|
||||
clk,
|
||||
trans,
|
||||
{Timespan(span.Begin(), span.Begin() + clk * cl.RFMSB)},
|
||||
groupsPerRank,
|
||||
banksPerGroup));
|
||||
|
||||
if (dbPhaseName == "RD")
|
||||
return std::shared_ptr<Phase>(new RD(id, span, spanOnDataStrobe, rank, bankGroup, bank, row, column,
|
||||
burstLength, clk, trans, {Timespan(span.Begin(), span.Begin() + clk * cl.RD)}, groupsPerRank, banksPerGroup));
|
||||
return std::shared_ptr<Phase>(new RD(id,
|
||||
span,
|
||||
spanOnDataStrobe,
|
||||
rank,
|
||||
bankGroup,
|
||||
bank,
|
||||
row,
|
||||
column,
|
||||
burstLength,
|
||||
clk,
|
||||
trans,
|
||||
{Timespan(span.Begin(), span.Begin() + clk * cl.RD)},
|
||||
groupsPerRank,
|
||||
banksPerGroup));
|
||||
|
||||
if (dbPhaseName == "RDA")
|
||||
return std::shared_ptr<Phase>(new RDA(id, span, spanOnDataStrobe, rank, bankGroup, bank, row, column,
|
||||
burstLength, clk, trans, {Timespan(span.Begin(), span.Begin() + clk * cl.RDA)}, groupsPerRank, banksPerGroup));
|
||||
return std::shared_ptr<Phase>(new RDA(id,
|
||||
span,
|
||||
spanOnDataStrobe,
|
||||
rank,
|
||||
bankGroup,
|
||||
bank,
|
||||
row,
|
||||
column,
|
||||
burstLength,
|
||||
clk,
|
||||
trans,
|
||||
{Timespan(span.Begin(), span.Begin() + clk * cl.RDA)},
|
||||
groupsPerRank,
|
||||
banksPerGroup));
|
||||
|
||||
if (dbPhaseName == "WR")
|
||||
return std::shared_ptr<Phase>(new WR(id, span, spanOnDataStrobe, rank, bankGroup, bank, row, column,
|
||||
burstLength, clk, trans, {Timespan(span.Begin(), span.Begin() + clk * cl.WR)}, groupsPerRank, banksPerGroup));
|
||||
return std::shared_ptr<Phase>(new WR(id,
|
||||
span,
|
||||
spanOnDataStrobe,
|
||||
rank,
|
||||
bankGroup,
|
||||
bank,
|
||||
row,
|
||||
column,
|
||||
burstLength,
|
||||
clk,
|
||||
trans,
|
||||
{Timespan(span.Begin(), span.Begin() + clk * cl.WR)},
|
||||
groupsPerRank,
|
||||
banksPerGroup));
|
||||
|
||||
if (dbPhaseName == "MWR")
|
||||
return std::shared_ptr<Phase>(new MWR(id, span, spanOnDataStrobe, rank, bankGroup, bank, row, column,
|
||||
burstLength, clk, trans, {Timespan(span.Begin(), span.Begin() + clk * cl.WR)}, groupsPerRank, banksPerGroup));
|
||||
return std::shared_ptr<Phase>(new MWR(id,
|
||||
span,
|
||||
spanOnDataStrobe,
|
||||
rank,
|
||||
bankGroup,
|
||||
bank,
|
||||
row,
|
||||
column,
|
||||
burstLength,
|
||||
clk,
|
||||
trans,
|
||||
{Timespan(span.Begin(), span.Begin() + clk * cl.WR)},
|
||||
groupsPerRank,
|
||||
banksPerGroup));
|
||||
|
||||
if (dbPhaseName == "WRA")
|
||||
return std::shared_ptr<Phase>(new WRA(id, span, spanOnDataStrobe, rank, bankGroup, bank, row, column,
|
||||
burstLength, clk, trans, {Timespan(span.Begin(), span.Begin() + clk * cl.WRA)}, groupsPerRank, banksPerGroup));
|
||||
return std::shared_ptr<Phase>(new WRA(id,
|
||||
span,
|
||||
spanOnDataStrobe,
|
||||
rank,
|
||||
bankGroup,
|
||||
bank,
|
||||
row,
|
||||
column,
|
||||
burstLength,
|
||||
clk,
|
||||
trans,
|
||||
{Timespan(span.Begin(), span.Begin() + clk * cl.WRA)},
|
||||
groupsPerRank,
|
||||
banksPerGroup));
|
||||
|
||||
if (dbPhaseName == "MWRA")
|
||||
return std::shared_ptr<Phase>(new MWRA(id, span, spanOnDataStrobe, rank, bankGroup, bank, row, column,
|
||||
burstLength, clk, trans, {Timespan(span.Begin(), span.Begin() + clk * cl.WR)}, groupsPerRank, banksPerGroup));
|
||||
return std::shared_ptr<Phase>(new MWRA(id,
|
||||
span,
|
||||
spanOnDataStrobe,
|
||||
rank,
|
||||
bankGroup,
|
||||
bank,
|
||||
row,
|
||||
column,
|
||||
burstLength,
|
||||
clk,
|
||||
trans,
|
||||
{Timespan(span.Begin(), span.Begin() + clk * cl.WR)},
|
||||
groupsPerRank,
|
||||
banksPerGroup));
|
||||
|
||||
if (dbPhaseName == "PDNA")
|
||||
return std::shared_ptr<Phase>(new PDNA(id, span, spanOnDataStrobe, rank, bankGroup, bank, row, column,
|
||||
burstLength, clk, trans, {Timespan(span.Begin(), span.Begin() + clk * cl.PDEA),
|
||||
Timespan(span.End() - clk * cl.PDXA, span.End())}, groupsPerRank, banksPerGroup));
|
||||
return std::shared_ptr<Phase>(
|
||||
new PDNA(id,
|
||||
span,
|
||||
spanOnDataStrobe,
|
||||
rank,
|
||||
bankGroup,
|
||||
bank,
|
||||
row,
|
||||
column,
|
||||
burstLength,
|
||||
clk,
|
||||
trans,
|
||||
{Timespan(span.Begin(), span.Begin() + clk * cl.PDEA),
|
||||
Timespan(span.End() - clk * cl.PDXA, span.End())},
|
||||
groupsPerRank,
|
||||
banksPerGroup));
|
||||
|
||||
if (dbPhaseName == "PDNP")
|
||||
return std::shared_ptr<Phase>(new PDNP(id, span, spanOnDataStrobe, rank, bankGroup, bank, row, column,
|
||||
burstLength, clk, trans, {Timespan(span.Begin(), span.Begin() + clk * cl.PDEP),
|
||||
Timespan(span.End() - clk * cl.PDXP, span.End())}, groupsPerRank, banksPerGroup));
|
||||
return std::shared_ptr<Phase>(
|
||||
new PDNP(id,
|
||||
span,
|
||||
spanOnDataStrobe,
|
||||
rank,
|
||||
bankGroup,
|
||||
bank,
|
||||
row,
|
||||
column,
|
||||
burstLength,
|
||||
clk,
|
||||
trans,
|
||||
{Timespan(span.Begin(), span.Begin() + clk * cl.PDEP),
|
||||
Timespan(span.End() - clk * cl.PDXP, span.End())},
|
||||
groupsPerRank,
|
||||
banksPerGroup));
|
||||
|
||||
if (dbPhaseName == "SREF")
|
||||
return std::shared_ptr<Phase>(new SREF(id, span, spanOnDataStrobe, rank, bankGroup, bank, row, column,
|
||||
burstLength, clk, trans, {Timespan(span.Begin(), span.Begin() + clk * cl.SREFEN),
|
||||
Timespan(span.End() - clk * cl.SREFEX, span.End())}, groupsPerRank, banksPerGroup));
|
||||
return std::shared_ptr<Phase>(
|
||||
new SREF(id,
|
||||
span,
|
||||
spanOnDataStrobe,
|
||||
rank,
|
||||
bankGroup,
|
||||
bank,
|
||||
row,
|
||||
column,
|
||||
burstLength,
|
||||
clk,
|
||||
trans,
|
||||
{Timespan(span.Begin(), span.Begin() + clk * cl.SREFEN),
|
||||
Timespan(span.End() - clk * cl.SREFEX, span.End())},
|
||||
groupsPerRank,
|
||||
banksPerGroup));
|
||||
|
||||
throw std::runtime_error("DB phasename " + dbPhaseName.toStdString() + " unkown to phasefactory");
|
||||
throw std::runtime_error("DB phasename " + dbPhaseName.toStdString() +
|
||||
" unkown to phasefactory");
|
||||
}
|
||||
|
||||
@@ -38,10 +38,10 @@
|
||||
#ifndef PHASEFACTORY_H
|
||||
#define PHASEFACTORY_H
|
||||
|
||||
#include "businessObjects/transaction.h"
|
||||
#include "phase.h"
|
||||
#include <QStringList>
|
||||
#include <memory>
|
||||
#include "businessObjects/transaction.h"
|
||||
|
||||
class TraceDB;
|
||||
|
||||
@@ -49,10 +49,18 @@ class PhaseFactory
|
||||
{
|
||||
public:
|
||||
PhaseFactory() = delete;
|
||||
static std::shared_ptr<Phase> createPhase(ID id, const QString &dbPhaseName,
|
||||
Timespan span, Timespan spanOnDataStrobe,
|
||||
unsigned int rank, unsigned int bankGroup, unsigned int bank, unsigned int row, unsigned int column,
|
||||
unsigned int burstLength, const std::shared_ptr<Transaction> &trans, TraceDB &database);
|
||||
static std::shared_ptr<Phase> createPhase(ID id,
|
||||
const QString& dbPhaseName,
|
||||
Timespan span,
|
||||
Timespan spanOnDataStrobe,
|
||||
unsigned int rank,
|
||||
unsigned int bankGroup,
|
||||
unsigned int bank,
|
||||
unsigned int row,
|
||||
unsigned int column,
|
||||
unsigned int burstLength,
|
||||
const std::shared_ptr<Transaction>& trans,
|
||||
TraceDB& database);
|
||||
};
|
||||
|
||||
#endif // PHASEFACTORY_H
|
||||
|
||||
@@ -39,10 +39,10 @@
|
||||
|
||||
#include "pythoncaller.h"
|
||||
#include <exception>
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
#include <pybind11/pybind11.h>
|
||||
#include <pybind11/stl.h>
|
||||
#include <string>
|
||||
|
||||
std::string PythonCaller::generatePlots(std::string_view pathToTrace)
|
||||
{
|
||||
@@ -52,12 +52,12 @@ std::string PythonCaller::generatePlots(std::string_view pathToTrace)
|
||||
auto result = metricsModule.attr("generatePlots")(pathToTrace).cast<std::string>();
|
||||
return result;
|
||||
}
|
||||
catch (std::exception const &err)
|
||||
catch (std::exception const& err)
|
||||
{
|
||||
std::cout << err.what() << std::endl;
|
||||
}
|
||||
|
||||
return {};
|
||||
return {};
|
||||
}
|
||||
|
||||
std::vector<std::string> PythonCaller::availableMetrics(std::string_view pathToTrace)
|
||||
@@ -68,7 +68,7 @@ std::vector<std::string> PythonCaller::availableMetrics(std::string_view pathToT
|
||||
pybind11::list result = metricsModule.attr("getMetrics")(pathToTrace);
|
||||
return result.cast<std::vector<std::string>>();
|
||||
}
|
||||
catch (std::exception const &err)
|
||||
catch (std::exception const& err)
|
||||
{
|
||||
std::cout << err.what() << std::endl;
|
||||
}
|
||||
@@ -76,14 +76,16 @@ std::vector<std::string> PythonCaller::availableMetrics(std::string_view pathToT
|
||||
return {};
|
||||
}
|
||||
|
||||
TraceCalculatedMetrics PythonCaller::evaluateMetrics(std::string_view pathToTrace, std::vector<long> selectedMetrics)
|
||||
TraceCalculatedMetrics PythonCaller::evaluateMetrics(std::string_view pathToTrace,
|
||||
std::vector<long> selectedMetrics)
|
||||
{
|
||||
TraceCalculatedMetrics metrics(pathToTrace.data());
|
||||
|
||||
try
|
||||
{
|
||||
pybind11::module_ metricsModule = pybind11::module_::import("metrics");
|
||||
pybind11::list result = metricsModule.attr("calculateMetrics")(pathToTrace, selectedMetrics);
|
||||
pybind11::list result =
|
||||
metricsModule.attr("calculateMetrics")(pathToTrace, selectedMetrics);
|
||||
auto metricList = result.cast<std::vector<pybind11::tuple>>();
|
||||
|
||||
for (auto metricPair : metricList)
|
||||
@@ -93,7 +95,7 @@ TraceCalculatedMetrics PythonCaller::evaluateMetrics(std::string_view pathToTrac
|
||||
metrics.addCalculatedMetric({name, value});
|
||||
}
|
||||
}
|
||||
catch (std::exception const &err)
|
||||
catch (std::exception const& err)
|
||||
{
|
||||
std::cout << err.what() << std::endl;
|
||||
}
|
||||
@@ -109,7 +111,7 @@ std::string PythonCaller::dumpVcd(std::string_view pathToTrace)
|
||||
pybind11::str result = vcdModule.attr("dumpVcd")(pathToTrace);
|
||||
return result.cast<std::string>();
|
||||
}
|
||||
catch (std::exception const &err)
|
||||
catch (std::exception const& err)
|
||||
{
|
||||
std::cout << err.what() << std::endl;
|
||||
}
|
||||
|
||||
@@ -45,18 +45,17 @@
|
||||
#undef slots
|
||||
#endif
|
||||
|
||||
#include <string>
|
||||
#include "businessObjects/tracecalculatedmetrics.h"
|
||||
#include <string>
|
||||
|
||||
class PythonCaller
|
||||
{
|
||||
public:
|
||||
static std::vector<std::string> availableMetrics(std::string_view pathToTrace);
|
||||
static TraceCalculatedMetrics evaluateMetrics(std::string_view pathToTrace, std::vector<long> selectedMetrics);
|
||||
static TraceCalculatedMetrics evaluateMetrics(std::string_view pathToTrace,
|
||||
std::vector<long> selectedMetrics);
|
||||
static std::string generatePlots(std::string_view pathToTrace);
|
||||
static std::string dumpVcd(std::string_view pathToTrace);
|
||||
};
|
||||
|
||||
#endif // PYTHONCALLER_H
|
||||
|
||||
|
||||
|
||||
@@ -42,27 +42,21 @@
|
||||
class TestResult
|
||||
{
|
||||
public:
|
||||
TestResult(const QString &testName, bool passed, QString &message) :
|
||||
testName(testName), passed(passed), message(message) {}
|
||||
TestResult(const QString& testName, bool passed, QString& message) :
|
||||
testName(testName),
|
||||
passed(passed),
|
||||
message(message)
|
||||
{
|
||||
}
|
||||
|
||||
QString getTestName() const
|
||||
{
|
||||
return testName;
|
||||
}
|
||||
QString getMessage() const
|
||||
{
|
||||
return message;
|
||||
}
|
||||
bool hasPassed() const
|
||||
{
|
||||
return passed;
|
||||
}
|
||||
QString getTestName() const { return testName; }
|
||||
QString getMessage() const { return message; }
|
||||
bool hasPassed() const { return passed; }
|
||||
|
||||
private:
|
||||
QString testName;
|
||||
bool passed;
|
||||
QString message;
|
||||
|
||||
};
|
||||
|
||||
#endif // TESTRESULT_H
|
||||
|
||||
@@ -42,7 +42,7 @@ bool Timespan::contains(traceTime time) const
|
||||
return (begin <= time && time <= end);
|
||||
}
|
||||
|
||||
bool Timespan::overlaps(const Timespan &other) const
|
||||
bool Timespan::overlaps(const Timespan& other) const
|
||||
{
|
||||
return other.Begin() < this->end && this->begin < other.End();
|
||||
}
|
||||
@@ -50,5 +50,5 @@ bool Timespan::overlaps(const Timespan &other) const
|
||||
void Timespan::shift(traceTime offset)
|
||||
{
|
||||
begin += offset;
|
||||
end += offset;
|
||||
end += offset;
|
||||
}
|
||||
|
||||
@@ -37,43 +37,25 @@
|
||||
|
||||
#ifndef TIMESPAN_H
|
||||
#define TIMESPAN_H
|
||||
#include "tracetime.h"
|
||||
#include <QString>
|
||||
#include <cstdlib>
|
||||
#include "tracetime.h"
|
||||
|
||||
class Timespan
|
||||
{
|
||||
traceTime begin;
|
||||
traceTime end;
|
||||
public:
|
||||
|
||||
public:
|
||||
explicit Timespan(traceTime begin = 0, traceTime end = 0) : begin(begin), end(end) {}
|
||||
traceTime timeCovered() const
|
||||
{
|
||||
return std::abs(End() - Begin());
|
||||
}
|
||||
traceTime Begin() const
|
||||
{
|
||||
return begin;
|
||||
}
|
||||
void setBegin(traceTime time)
|
||||
{
|
||||
begin = time;
|
||||
}
|
||||
traceTime End() const
|
||||
{
|
||||
return end;
|
||||
}
|
||||
traceTime Middle() const
|
||||
{
|
||||
return (begin + end) / 2;
|
||||
}
|
||||
void setEnd(traceTime time)
|
||||
{
|
||||
end = time;
|
||||
}
|
||||
traceTime timeCovered() const { return std::abs(End() - Begin()); }
|
||||
traceTime Begin() const { return begin; }
|
||||
void setBegin(traceTime time) { begin = time; }
|
||||
traceTime End() const { return end; }
|
||||
traceTime Middle() const { return (begin + end) / 2; }
|
||||
void setEnd(traceTime time) { end = time; }
|
||||
bool contains(traceTime time) const;
|
||||
bool overlaps(const Timespan &other) const;
|
||||
bool overlaps(const Timespan& other) const;
|
||||
void shift(traceTime offset);
|
||||
};
|
||||
|
||||
|
||||
@@ -37,33 +37,28 @@
|
||||
|
||||
#ifndef TRACEMETRICRESULTS_H
|
||||
#define TRACEMETRICRESULTS_H
|
||||
#include "calculatedMetric.h"
|
||||
#include <QString>
|
||||
#include <vector>
|
||||
#include "calculatedMetric.h"
|
||||
|
||||
class TraceCalculatedMetrics
|
||||
{
|
||||
public:
|
||||
TraceCalculatedMetrics(const QString &traceName): traceName(traceName) {}
|
||||
TraceCalculatedMetrics(const QString& traceName) : traceName(traceName) {}
|
||||
|
||||
void addCalculatedMetric(const CalculatedMetric &result)
|
||||
void addCalculatedMetric(const CalculatedMetric& result)
|
||||
{
|
||||
calculatedMetrics.push_back(result);
|
||||
}
|
||||
QString getTraceName() const
|
||||
{
|
||||
return traceName;
|
||||
}
|
||||
const std::vector<CalculatedMetric> &getCalculatedMetrics() const
|
||||
{
|
||||
return calculatedMetrics;
|
||||
}
|
||||
QString getTraceName() const { return traceName; }
|
||||
const std::vector<CalculatedMetric>& getCalculatedMetrics() const { return calculatedMetrics; }
|
||||
|
||||
QString toCSVHeader()
|
||||
{
|
||||
QString result = "";
|
||||
result.append("Trace");
|
||||
for (CalculatedMetric calculatedMetric : calculatedMetrics) {
|
||||
for (CalculatedMetric calculatedMetric : calculatedMetrics)
|
||||
{
|
||||
result.append(",");
|
||||
result.append(calculatedMetric.name.c_str());
|
||||
}
|
||||
@@ -74,7 +69,8 @@ public:
|
||||
{
|
||||
QString result = "";
|
||||
result.append(traceName);
|
||||
for (CalculatedMetric calculatedMetric : calculatedMetrics) {
|
||||
for (CalculatedMetric calculatedMetric : calculatedMetrics)
|
||||
{
|
||||
result.append(",");
|
||||
result.append(QString::number(calculatedMetric.value));
|
||||
}
|
||||
@@ -86,5 +82,4 @@ private:
|
||||
std::vector<CalculatedMetric> calculatedMetrics;
|
||||
};
|
||||
|
||||
|
||||
#endif // TRACEMETRICRESULTS_H
|
||||
|
||||
@@ -41,72 +41,83 @@
|
||||
#include <QKeyEvent>
|
||||
#include <QMimeData>
|
||||
|
||||
AbstractTracePlotLineModel::AbstractTracePlotLineModel(const GeneralInfo &generalInfo, QObject *parent)
|
||||
: QAbstractItemModel(parent), internalSelectionModel(new QItemSelectionModel(this, this)),
|
||||
rootNode(std::make_shared<Node>()), numberOfRanks(generalInfo.numberOfRanks),
|
||||
groupsPerRank(generalInfo.groupsPerRank), banksPerGroup(generalInfo.banksPerGroup),
|
||||
banksPerRank(generalInfo.banksPerRank), commandBusType(getCommandBusType(generalInfo)),
|
||||
dataBusType(getDataBusType(generalInfo))
|
||||
AbstractTracePlotLineModel::AbstractTracePlotLineModel(const GeneralInfo& generalInfo,
|
||||
QObject* parent) :
|
||||
QAbstractItemModel(parent),
|
||||
internalSelectionModel(new QItemSelectionModel(this, this)),
|
||||
rootNode(std::make_shared<Node>()),
|
||||
numberOfRanks(generalInfo.numberOfRanks),
|
||||
groupsPerRank(generalInfo.groupsPerRank),
|
||||
banksPerGroup(generalInfo.banksPerGroup),
|
||||
banksPerRank(generalInfo.banksPerRank),
|
||||
commandBusType(getCommandBusType(generalInfo)),
|
||||
dataBusType(getDataBusType(generalInfo))
|
||||
{
|
||||
createInitialNodes();
|
||||
}
|
||||
|
||||
AvailableTracePlotLineModel::AvailableTracePlotLineModel(const GeneralInfo &generalInfo, QObject *parent)
|
||||
: AbstractTracePlotLineModel(generalInfo, parent)
|
||||
AvailableTracePlotLineModel::AvailableTracePlotLineModel(const GeneralInfo& generalInfo,
|
||||
QObject* parent) :
|
||||
AbstractTracePlotLineModel(generalInfo, parent)
|
||||
{
|
||||
}
|
||||
|
||||
SelectedTracePlotLineModel::SelectedTracePlotLineModel(const GeneralInfo &generalInfo, QObject *parent)
|
||||
: AbstractTracePlotLineModel(generalInfo, parent)
|
||||
SelectedTracePlotLineModel::SelectedTracePlotLineModel(const GeneralInfo& generalInfo,
|
||||
QObject* parent) :
|
||||
AbstractTracePlotLineModel(generalInfo, parent)
|
||||
{
|
||||
}
|
||||
|
||||
void AbstractTracePlotLineModel::addTopLevelNode(std::shared_ptr<Node> &&node)
|
||||
void AbstractTracePlotLineModel::addTopLevelNode(std::shared_ptr<Node>&& node)
|
||||
{
|
||||
rootNode->children.push_back(std::move(node));
|
||||
}
|
||||
|
||||
void AbstractTracePlotLineModel::createInitialNodes()
|
||||
{
|
||||
addTopLevelNode(
|
||||
std::unique_ptr<Node>(new Node({LineType::RequestLine, getLabel(LineType::RequestLine)}, rootNode.get())));
|
||||
addTopLevelNode(
|
||||
std::unique_ptr<Node>(new Node({LineType::ResponseLine, getLabel(LineType::ResponseLine)}, rootNode.get())));
|
||||
addTopLevelNode(std::unique_ptr<Node>(
|
||||
new Node({LineType::RequestLine, getLabel(LineType::RequestLine)}, rootNode.get())));
|
||||
addTopLevelNode(std::unique_ptr<Node>(
|
||||
new Node({LineType::ResponseLine, getLabel(LineType::ResponseLine)}, rootNode.get())));
|
||||
|
||||
for (unsigned int rank = 0; rank < numberOfRanks; rank++)
|
||||
addTopLevelNode(createRankGroupNode(rank));
|
||||
|
||||
if (commandBusType == CommandBusType::SingleCommandBus)
|
||||
{
|
||||
addTopLevelNode(std::unique_ptr<Node>(
|
||||
new Node({LineType::CommandBusLine, getLabel(LineType::CommandBusLine)}, rootNode.get())));
|
||||
addTopLevelNode(std::unique_ptr<Node>(new Node(
|
||||
{LineType::CommandBusLine, getLabel(LineType::CommandBusLine)}, rootNode.get())));
|
||||
}
|
||||
else // commandBusType == CommandBusType::RowColumnCommandBus
|
||||
{
|
||||
addTopLevelNode(std::unique_ptr<Node>(new Node(
|
||||
{LineType::RowCommandBusLine, getLabel(LineType::RowCommandBusLine)}, rootNode.get())));
|
||||
addTopLevelNode(std::unique_ptr<Node>(
|
||||
new Node({LineType::RowCommandBusLine, getLabel(LineType::RowCommandBusLine)}, rootNode.get())));
|
||||
addTopLevelNode(std::unique_ptr<Node>(
|
||||
new Node({LineType::ColumnCommandBusLine, getLabel(LineType::ColumnCommandBusLine)}, rootNode.get())));
|
||||
new Node({LineType::ColumnCommandBusLine, getLabel(LineType::ColumnCommandBusLine)},
|
||||
rootNode.get())));
|
||||
}
|
||||
|
||||
if (dataBusType == DataBusType::LegacyMode)
|
||||
{
|
||||
addTopLevelNode(
|
||||
std::unique_ptr<Node>(new Node({LineType::DataBusLine, getLabel(LineType::DataBusLine)}, rootNode.get())));
|
||||
addTopLevelNode(std::unique_ptr<Node>(
|
||||
new Node({LineType::DataBusLine, getLabel(LineType::DataBusLine)}, rootNode.get())));
|
||||
}
|
||||
else // dataBusType == DataBusType::PseudoChannelMode
|
||||
{
|
||||
addTopLevelNode(std::unique_ptr<Node>(
|
||||
new Node({LineType::PseudoChannel0Line, getLabel(LineType::PseudoChannel0Line)}, rootNode.get())));
|
||||
new Node({LineType::PseudoChannel0Line, getLabel(LineType::PseudoChannel0Line)},
|
||||
rootNode.get())));
|
||||
addTopLevelNode(std::unique_ptr<Node>(
|
||||
new Node({LineType::PseudoChannel1Line, getLabel(LineType::PseudoChannel1Line)}, rootNode.get())));
|
||||
new Node({LineType::PseudoChannel1Line, getLabel(LineType::PseudoChannel1Line)},
|
||||
rootNode.get())));
|
||||
}
|
||||
}
|
||||
|
||||
std::shared_ptr<AbstractTracePlotLineModel::Node>
|
||||
AbstractTracePlotLineModel::createRankGroupNode(unsigned int rank) const
|
||||
{
|
||||
auto rankGroup = std::unique_ptr<Node>(new Node({LineType::RankGroup, getLabel(rank), rank}, rootNode.get()));
|
||||
auto rankGroup = std::unique_ptr<Node>(
|
||||
new Node({LineType::RankGroup, getLabel(rank), rank}, rootNode.get()));
|
||||
|
||||
for (unsigned int group = 0; group < groupsPerRank; group++)
|
||||
{
|
||||
@@ -116,9 +127,12 @@ AbstractTracePlotLineModel::createRankGroupNode(unsigned int rank) const
|
||||
unsigned int absoluteGroup = group + rank * groupsPerRank;
|
||||
unsigned int absoluteBank = bank + rank * banksPerRank + group * banksPerGroup;
|
||||
|
||||
auto bankLine = std::unique_ptr<Node>(
|
||||
new Node({LineType::BankLine, getLabel(rank, group, bank), absoluteRank, absoluteGroup, absoluteBank},
|
||||
rankGroup.get()));
|
||||
auto bankLine = std::unique_ptr<Node>(new Node({LineType::BankLine,
|
||||
getLabel(rank, group, bank),
|
||||
absoluteRank,
|
||||
absoluteGroup,
|
||||
absoluteBank},
|
||||
rankGroup.get()));
|
||||
|
||||
rankGroup->children.push_back(std::move(bankLine));
|
||||
}
|
||||
@@ -127,34 +141,34 @@ AbstractTracePlotLineModel::createRankGroupNode(unsigned int rank) const
|
||||
return rankGroup;
|
||||
}
|
||||
|
||||
int AbstractTracePlotLineModel::rowCount(const QModelIndex &parent) const
|
||||
int AbstractTracePlotLineModel::rowCount(const QModelIndex& parent) const
|
||||
{
|
||||
if (parent.column() > 0)
|
||||
return 0;
|
||||
|
||||
const Node *parentNode;
|
||||
const Node* parentNode;
|
||||
|
||||
if (!parent.isValid())
|
||||
parentNode = rootNode.get();
|
||||
else
|
||||
parentNode = static_cast<const Node *>(parent.internalPointer());
|
||||
parentNode = static_cast<const Node*>(parent.internalPointer());
|
||||
|
||||
return parentNode->childCount();
|
||||
}
|
||||
|
||||
int AbstractTracePlotLineModel::columnCount(const QModelIndex &parent) const
|
||||
int AbstractTracePlotLineModel::columnCount(const QModelIndex& parent) const
|
||||
{
|
||||
Q_UNUSED(parent)
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
QVariant AbstractTracePlotLineModel::data(const QModelIndex &index, int role) const
|
||||
QVariant AbstractTracePlotLineModel::data(const QModelIndex& index, int role) const
|
||||
{
|
||||
if (!index.isValid())
|
||||
return QVariant();
|
||||
|
||||
auto *node = static_cast<const Node *>(index.internalPointer());
|
||||
auto* node = static_cast<const Node*>(index.internalPointer());
|
||||
|
||||
switch (role)
|
||||
{
|
||||
@@ -171,12 +185,12 @@ QVariant AbstractTracePlotLineModel::data(const QModelIndex &index, int role) co
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
bool SelectedTracePlotLineModel::setData(const QModelIndex &index, const QVariant &value, int role)
|
||||
bool SelectedTracePlotLineModel::setData(const QModelIndex& index, const QVariant& value, int role)
|
||||
{
|
||||
if (!index.isValid())
|
||||
return false;
|
||||
|
||||
auto *node = static_cast<Node *>(index.internalPointer());
|
||||
auto* node = static_cast<Node*>(index.internalPointer());
|
||||
|
||||
switch (role)
|
||||
{
|
||||
@@ -194,7 +208,8 @@ bool SelectedTracePlotLineModel::setData(const QModelIndex &index, const QVarian
|
||||
return false;
|
||||
}
|
||||
|
||||
QVariant AvailableTracePlotLineModel::headerData(int section, Qt::Orientation orientation, int role) const
|
||||
QVariant
|
||||
AvailableTracePlotLineModel::headerData(int section, Qt::Orientation orientation, int role) const
|
||||
{
|
||||
if (role != Qt::DisplayRole)
|
||||
return QVariant();
|
||||
@@ -205,7 +220,8 @@ QVariant AvailableTracePlotLineModel::headerData(int section, Qt::Orientation or
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
QVariant SelectedTracePlotLineModel::headerData(int section, Qt::Orientation orientation, int role) const
|
||||
QVariant
|
||||
SelectedTracePlotLineModel::headerData(int section, Qt::Orientation orientation, int role) const
|
||||
{
|
||||
if (role != Qt::DisplayRole)
|
||||
return QVariant();
|
||||
@@ -218,39 +234,39 @@ QVariant SelectedTracePlotLineModel::headerData(int section, Qt::Orientation ori
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
QModelIndex AbstractTracePlotLineModel::index(int row, int column, const QModelIndex &parent) const
|
||||
QModelIndex AbstractTracePlotLineModel::index(int row, int column, const QModelIndex& parent) const
|
||||
{
|
||||
if (!hasIndex(row, column, parent))
|
||||
return QModelIndex();
|
||||
|
||||
const Node *parentNode;
|
||||
const Node* parentNode;
|
||||
|
||||
if (!parent.isValid())
|
||||
parentNode = rootNode.get();
|
||||
else
|
||||
parentNode = static_cast<const Node *>(parent.internalPointer());
|
||||
parentNode = static_cast<const Node*>(parent.internalPointer());
|
||||
|
||||
const Node *node = parentNode->children[row].get();
|
||||
const Node* node = parentNode->children[row].get();
|
||||
|
||||
return createIndex(row, column, const_cast<Node *>(node));
|
||||
return createIndex(row, column, const_cast<Node*>(node));
|
||||
}
|
||||
|
||||
QModelIndex AbstractTracePlotLineModel::parent(const QModelIndex &index) const
|
||||
QModelIndex AbstractTracePlotLineModel::parent(const QModelIndex& index) const
|
||||
{
|
||||
if (!index.isValid())
|
||||
return QModelIndex();
|
||||
|
||||
const Node *childNode = static_cast<const Node *>(index.internalPointer());
|
||||
const Node *parentNode = childNode->parent;
|
||||
const Node* childNode = static_cast<const Node*>(index.internalPointer());
|
||||
const Node* parentNode = childNode->parent;
|
||||
|
||||
if (!parentNode || parentNode == rootNode.get())
|
||||
return QModelIndex();
|
||||
|
||||
return createIndex(parentNode->getRow(), 0, const_cast<Node *>(parentNode));
|
||||
return createIndex(parentNode->getRow(), 0, const_cast<Node*>(parentNode));
|
||||
}
|
||||
|
||||
void SelectedTracePlotLineModel::recreateCollapseButtons(TracePlot *tracePlot,
|
||||
CustomLabelScaleDraw *customLabelScaleDraw)
|
||||
void SelectedTracePlotLineModel::recreateCollapseButtons(TracePlot* tracePlot,
|
||||
CustomLabelScaleDraw* customLabelScaleDraw)
|
||||
{
|
||||
// Remove old buttons
|
||||
for (auto button : collapseButtons)
|
||||
@@ -261,12 +277,12 @@ void SelectedTracePlotLineModel::recreateCollapseButtons(TracePlot *tracePlot,
|
||||
|
||||
collapseButtons.clear();
|
||||
|
||||
for (const auto &node : rootNode->children)
|
||||
for (const auto& node : rootNode->children)
|
||||
{
|
||||
if (node->data.type != LineType::RankGroup)
|
||||
continue;
|
||||
|
||||
QPushButton *collapseButton = new QPushButton(tracePlot);
|
||||
QPushButton* collapseButton = new QPushButton(tracePlot);
|
||||
|
||||
unsigned int yVal = [node]()
|
||||
{
|
||||
@@ -295,11 +311,15 @@ void SelectedTracePlotLineModel::recreateCollapseButtons(TracePlot *tracePlot,
|
||||
recreateCollapseButtons(tracePlot, customLabelScaleDraw);
|
||||
};
|
||||
|
||||
// Important: The context of the connection is `collapseButton` as it should be disconnected when the button
|
||||
// ceases to exist.
|
||||
connect(customLabelScaleDraw, &CustomLabelScaleDraw::scaleRedraw, collapseButton, repositionButton);
|
||||
// Important: The context of the connection is `collapseButton` as it should be disconnected
|
||||
// when the button ceases to exist.
|
||||
connect(customLabelScaleDraw,
|
||||
&CustomLabelScaleDraw::scaleRedraw,
|
||||
collapseButton,
|
||||
repositionButton);
|
||||
connect(collapseButton, &QPushButton::pressed, this, toggleCollapsed);
|
||||
connect(collapseButton, &QPushButton::pressed, tracePlot, &TracePlot::recreateCollapseButtons);
|
||||
connect(
|
||||
collapseButton, &QPushButton::pressed, tracePlot, &TracePlot::recreateCollapseButtons);
|
||||
|
||||
collapseButton->show();
|
||||
collapseButtons.push_back(collapseButton);
|
||||
@@ -311,21 +331,23 @@ int AbstractTracePlotLineModel::Node::getRow() const
|
||||
if (!parent)
|
||||
return 0;
|
||||
|
||||
const auto &siblings = parent->children;
|
||||
const auto siblingsIt = std::find_if(siblings.begin(), siblings.end(),
|
||||
[this](const std::shared_ptr<Node> &node) { return node.get() == this; });
|
||||
const auto& siblings = parent->children;
|
||||
const auto siblingsIt =
|
||||
std::find_if(siblings.begin(),
|
||||
siblings.end(),
|
||||
[this](const std::shared_ptr<Node>& node) { return node.get() == this; });
|
||||
|
||||
Q_ASSERT(siblingsIt != siblings.end());
|
||||
|
||||
return std::distance(siblings.begin(), siblingsIt);
|
||||
}
|
||||
|
||||
std::shared_ptr<AbstractTracePlotLineModel::Node> AbstractTracePlotLineModel::Node::cloneNode(const Node *node,
|
||||
const Node *parent)
|
||||
std::shared_ptr<AbstractTracePlotLineModel::Node>
|
||||
AbstractTracePlotLineModel::Node::cloneNode(const Node* node, const Node* parent)
|
||||
{
|
||||
std::shared_ptr<Node> clonedNode = std::make_shared<Node>(node->data, parent);
|
||||
|
||||
for (const auto &child : node->children)
|
||||
for (const auto& child : node->children)
|
||||
clonedNode->children.push_back(cloneNode(child.get(), clonedNode.get()));
|
||||
|
||||
return clonedNode;
|
||||
@@ -362,13 +384,16 @@ QString AbstractTracePlotLineModel::getLabel(unsigned int rank) const
|
||||
return rankLabel.data() + QString::number(rank);
|
||||
}
|
||||
|
||||
QString AbstractTracePlotLineModel::getLabel(unsigned int rank, unsigned int group, unsigned int bank) const
|
||||
QString
|
||||
AbstractTracePlotLineModel::getLabel(unsigned int rank, unsigned int group, unsigned int bank) const
|
||||
{
|
||||
std::string_view rankLabel = dataBusType == DataBusType::LegacyMode ? "RA" : "PC";
|
||||
return rankLabel.data() + QString::number(rank) + " BG" + QString::number(group) + " BA" + QString::number(bank);
|
||||
return rankLabel.data() + QString::number(rank) + " BG" + QString::number(group) + " BA" +
|
||||
QString::number(bank);
|
||||
}
|
||||
|
||||
AbstractTracePlotLineModel::CommandBusType AbstractTracePlotLineModel::getCommandBusType(const GeneralInfo &generalInfo)
|
||||
AbstractTracePlotLineModel::CommandBusType
|
||||
AbstractTracePlotLineModel::getCommandBusType(const GeneralInfo& generalInfo)
|
||||
{
|
||||
if (generalInfo.rowColumnCommandBus)
|
||||
return CommandBusType::RowColumnCommandBus;
|
||||
@@ -376,7 +401,8 @@ AbstractTracePlotLineModel::CommandBusType AbstractTracePlotLineModel::getComman
|
||||
return CommandBusType::SingleCommandBus;
|
||||
}
|
||||
|
||||
AbstractTracePlotLineModel::DataBusType AbstractTracePlotLineModel::getDataBusType(const GeneralInfo &generalInfo)
|
||||
AbstractTracePlotLineModel::DataBusType
|
||||
AbstractTracePlotLineModel::getDataBusType(const GeneralInfo& generalInfo)
|
||||
{
|
||||
if (generalInfo.pseudoChannelMode)
|
||||
return DataBusType::PseudoChannelMode;
|
||||
@@ -384,27 +410,28 @@ AbstractTracePlotLineModel::DataBusType AbstractTracePlotLineModel::getDataBusTy
|
||||
return DataBusType::LegacyMode;
|
||||
}
|
||||
|
||||
bool SelectedTracePlotLineModel::removeRows(int row, int count, const QModelIndex &parent)
|
||||
bool SelectedTracePlotLineModel::removeRows(int row, int count, const QModelIndex& parent)
|
||||
{
|
||||
if (parent != QModelIndex())
|
||||
return false;
|
||||
|
||||
// Note: beginRemoveRows requires [first, last], but erase requires [first, last)
|
||||
beginRemoveRows(QModelIndex(), row, row + count - 1);
|
||||
rootNode->children.erase(rootNode->children.begin() + row, rootNode->children.begin() + row + count);
|
||||
rootNode->children.erase(rootNode->children.begin() + row,
|
||||
rootNode->children.begin() + row + count);
|
||||
endRemoveRows();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void AvailableTracePlotLineModel::itemsDoubleClicked(const QModelIndex &index)
|
||||
void AvailableTracePlotLineModel::itemsDoubleClicked(const QModelIndex& index)
|
||||
{
|
||||
QModelIndexList indexList({index});
|
||||
|
||||
emit returnPressed(indexList);
|
||||
}
|
||||
|
||||
void SelectedTracePlotLineModel::itemsDoubleClicked(const QModelIndex &index)
|
||||
void SelectedTracePlotLineModel::itemsDoubleClicked(const QModelIndex& index)
|
||||
{
|
||||
if (index.parent() != QModelIndex())
|
||||
return;
|
||||
@@ -412,13 +439,13 @@ void SelectedTracePlotLineModel::itemsDoubleClicked(const QModelIndex &index)
|
||||
removeRow(index.row(), QModelIndex());
|
||||
}
|
||||
|
||||
bool AvailableTracePlotLineModel::eventFilter(QObject *object, QEvent *event)
|
||||
bool AvailableTracePlotLineModel::eventFilter(QObject* object, QEvent* event)
|
||||
{
|
||||
Q_UNUSED(object)
|
||||
|
||||
if (event->type() == QEvent::KeyPress)
|
||||
{
|
||||
QKeyEvent *keyEvent = static_cast<QKeyEvent *>(event);
|
||||
QKeyEvent* keyEvent = static_cast<QKeyEvent*>(event);
|
||||
|
||||
if (keyEvent->key() == Qt::Key_Return)
|
||||
{
|
||||
@@ -435,13 +462,13 @@ bool AvailableTracePlotLineModel::eventFilter(QObject *object, QEvent *event)
|
||||
return false;
|
||||
}
|
||||
|
||||
bool SelectedTracePlotLineModel::eventFilter(QObject *object, QEvent *event)
|
||||
bool SelectedTracePlotLineModel::eventFilter(QObject* object, QEvent* event)
|
||||
{
|
||||
Q_UNUSED(object)
|
||||
|
||||
if (event->type() == QEvent::KeyPress)
|
||||
{
|
||||
QKeyEvent *keyEvent = static_cast<QKeyEvent *>(event);
|
||||
QKeyEvent* keyEvent = static_cast<QKeyEvent*>(event);
|
||||
|
||||
if (keyEvent->key() == Qt::Key_Delete)
|
||||
{
|
||||
@@ -452,7 +479,7 @@ bool SelectedTracePlotLineModel::eventFilter(QObject *object, QEvent *event)
|
||||
if (indexes.count() == 0)
|
||||
return true;
|
||||
|
||||
for (const auto &index : indexes)
|
||||
for (const auto& index : indexes)
|
||||
{
|
||||
// Only remove toplevel indexes
|
||||
if (index.parent() != QModelIndex())
|
||||
@@ -471,11 +498,11 @@ bool SelectedTracePlotLineModel::eventFilter(QObject *object, QEvent *event)
|
||||
return false;
|
||||
}
|
||||
|
||||
void SelectedTracePlotLineModel::addIndexesFromAvailableModel(const QModelIndexList &indexes)
|
||||
void SelectedTracePlotLineModel::addIndexesFromAvailableModel(const QModelIndexList& indexes)
|
||||
{
|
||||
for (const auto &index : indexes)
|
||||
for (const auto& index : indexes)
|
||||
{
|
||||
auto node = static_cast<const Node *>(index.internalPointer());
|
||||
auto node = static_cast<const Node*>(index.internalPointer());
|
||||
auto clonedNode = Node::cloneNode(node, rootNode.get());
|
||||
|
||||
beginInsertRows(QModelIndex(), rootNode->children.size(), rootNode->children.size());
|
||||
@@ -484,7 +511,7 @@ void SelectedTracePlotLineModel::addIndexesFromAvailableModel(const QModelIndexL
|
||||
}
|
||||
}
|
||||
|
||||
QItemSelectionModel *AbstractTracePlotLineModel::selectionModel() const
|
||||
QItemSelectionModel* AbstractTracePlotLineModel::selectionModel() const
|
||||
{
|
||||
return internalSelectionModel;
|
||||
}
|
||||
@@ -497,27 +524,30 @@ QStringList AbstractTracePlotLineModel::mimeTypes() const
|
||||
return types;
|
||||
}
|
||||
|
||||
QMimeData *AbstractTracePlotLineModel::mimeData(const QModelIndexList &indexes) const
|
||||
QMimeData* AbstractTracePlotLineModel::mimeData(const QModelIndexList& indexes) const
|
||||
{
|
||||
QByteArray traceLineData;
|
||||
QDataStream dataStream(&traceLineData, QIODevice::WriteOnly);
|
||||
|
||||
for (const auto &index : indexes)
|
||||
for (const auto& index : indexes)
|
||||
{
|
||||
const Node *node = static_cast<const Node *>(index.internalPointer());
|
||||
const Node* node = static_cast<const Node*>(index.internalPointer());
|
||||
|
||||
dataStream << node->data.type << node->data.label << node->data.rank << node->data.group << node->data.bank
|
||||
<< node->data.collapsed;
|
||||
dataStream << node->data.type << node->data.label << node->data.rank << node->data.group
|
||||
<< node->data.bank << node->data.collapsed;
|
||||
}
|
||||
|
||||
QMimeData *mimeData = new QMimeData;
|
||||
QMimeData* mimeData = new QMimeData;
|
||||
mimeData->setData(TRACELINE_MIMETYPE, traceLineData);
|
||||
|
||||
return mimeData;
|
||||
}
|
||||
|
||||
bool AbstractTracePlotLineModel::canDropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column,
|
||||
const QModelIndex &parent) const
|
||||
bool AbstractTracePlotLineModel::canDropMimeData(const QMimeData* data,
|
||||
Qt::DropAction action,
|
||||
int row,
|
||||
int column,
|
||||
const QModelIndex& parent) const
|
||||
{
|
||||
Q_UNUSED(action);
|
||||
Q_UNUSED(row);
|
||||
@@ -532,8 +562,8 @@ bool AbstractTracePlotLineModel::canDropMimeData(const QMimeData *data, Qt::Drop
|
||||
return true;
|
||||
}
|
||||
|
||||
bool AbstractTracePlotLineModel::dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column,
|
||||
const QModelIndex &parent)
|
||||
bool AbstractTracePlotLineModel::dropMimeData(
|
||||
const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent)
|
||||
{
|
||||
if (!canDropMimeData(data, action, row, column, parent))
|
||||
return false;
|
||||
@@ -571,7 +601,8 @@ bool AbstractTracePlotLineModel::dropMimeData(const QMimeData *data, Qt::DropAct
|
||||
std::shared_ptr<Node> node;
|
||||
|
||||
if (type == LineType::BankLine)
|
||||
node = std::make_shared<Node>(Node::NodeData{type, label, rank, group, bank}, rootNode.get());
|
||||
node = std::make_shared<Node>(Node::NodeData{type, label, rank, group, bank},
|
||||
rootNode.get());
|
||||
else if (type == LineType::RankGroup)
|
||||
node = createRankGroupNode(rank);
|
||||
else
|
||||
@@ -585,7 +616,8 @@ bool AbstractTracePlotLineModel::dropMimeData(const QMimeData *data, Qt::DropAct
|
||||
|
||||
// Note: beginRemoveRows requires [first, last]
|
||||
beginInsertRows(QModelIndex(), beginRow, beginRow + droppedNodes.size() - 1);
|
||||
rootNode->children.insert(rootNode->children.begin() + beginRow, std::make_move_iterator(droppedNodes.begin()),
|
||||
rootNode->children.insert(rootNode->children.begin() + beginRow,
|
||||
std::make_move_iterator(droppedNodes.begin()),
|
||||
std::make_move_iterator(droppedNodes.end()));
|
||||
endInsertRows();
|
||||
}
|
||||
@@ -602,7 +634,7 @@ Qt::DropActions AbstractTracePlotLineModel::supportedDropActions() const
|
||||
return (Qt::MoveAction | Qt::CopyAction);
|
||||
}
|
||||
|
||||
Qt::ItemFlags AbstractTracePlotLineModel::flags(const QModelIndex &index) const
|
||||
Qt::ItemFlags AbstractTracePlotLineModel::flags(const QModelIndex& index) const
|
||||
{
|
||||
Qt::ItemFlags defaultFlags = QAbstractItemModel::flags(index);
|
||||
|
||||
@@ -626,8 +658,9 @@ void SelectedTracePlotLineModel::setRootNode(std::shared_ptr<AbstractTracePlotLi
|
||||
endInsertRows();
|
||||
}
|
||||
|
||||
TracePlotLineDataSource::TracePlotLineDataSource(SelectedTracePlotLineModel *selectedModel, QObject *parent)
|
||||
: selectedModel(selectedModel)
|
||||
TracePlotLineDataSource::TracePlotLineDataSource(SelectedTracePlotLineModel* selectedModel,
|
||||
QObject* parent) :
|
||||
selectedModel(selectedModel)
|
||||
{
|
||||
Q_UNUSED(parent)
|
||||
|
||||
@@ -639,11 +672,12 @@ void TracePlotLineDataSource::updateModel()
|
||||
entries.clear();
|
||||
|
||||
std::function<void(std::shared_ptr<AbstractTracePlotLineModel::Node> & parent)> addNodes;
|
||||
addNodes = [=, &addNodes](std::shared_ptr<AbstractTracePlotLineModel::Node> &parent)
|
||||
addNodes = [=, &addNodes](std::shared_ptr<AbstractTracePlotLineModel::Node>& parent)
|
||||
{
|
||||
for (auto &childNode : parent->children)
|
||||
for (auto& childNode : parent->children)
|
||||
{
|
||||
if (childNode->data.type == AbstractTracePlotLineModel::RankGroup && !childNode->data.collapsed)
|
||||
if (childNode->data.type == AbstractTracePlotLineModel::RankGroup &&
|
||||
!childNode->data.collapsed)
|
||||
{
|
||||
addNodes(childNode);
|
||||
continue; // Don't add the parent node itself when not collapsed.
|
||||
|
||||
@@ -51,17 +51,18 @@ class AbstractTracePlotLineModel : public QAbstractItemModel
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit AbstractTracePlotLineModel(const GeneralInfo &generalInfo, QObject *parent = nullptr);
|
||||
explicit AbstractTracePlotLineModel(const GeneralInfo& generalInfo, QObject* parent = nullptr);
|
||||
|
||||
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||
int columnCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||
int rowCount(const QModelIndex& parent = QModelIndex()) const override;
|
||||
int columnCount(const QModelIndex& parent = QModelIndex()) const override;
|
||||
|
||||
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
|
||||
QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override;
|
||||
|
||||
QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const override;
|
||||
QModelIndex parent(const QModelIndex &index) const override;
|
||||
QModelIndex
|
||||
index(int row, int column, const QModelIndex& parent = QModelIndex()) const override;
|
||||
QModelIndex parent(const QModelIndex& index) const override;
|
||||
|
||||
QItemSelectionModel *selectionModel() const;
|
||||
QItemSelectionModel* selectionModel() const;
|
||||
|
||||
enum Role
|
||||
{
|
||||
@@ -91,16 +92,25 @@ public:
|
||||
{
|
||||
NodeData() = default;
|
||||
|
||||
NodeData(LineType type, const QString &label) : type(type), label(label)
|
||||
NodeData(LineType type, const QString& label) : type(type), label(label) {}
|
||||
|
||||
NodeData(LineType type, const QString& label, unsigned int rank) :
|
||||
type(type),
|
||||
label(label),
|
||||
rank(rank)
|
||||
{
|
||||
}
|
||||
|
||||
NodeData(LineType type, const QString &label, unsigned int rank) : type(type), label(label), rank(rank)
|
||||
{
|
||||
}
|
||||
|
||||
NodeData(LineType type, const QString &label, unsigned int rank, unsigned int group, unsigned int bank)
|
||||
: type(type), label(label), rank(rank), group(group), bank(bank)
|
||||
NodeData(LineType type,
|
||||
const QString& label,
|
||||
unsigned int rank,
|
||||
unsigned int group,
|
||||
unsigned int bank) :
|
||||
type(type),
|
||||
label(label),
|
||||
rank(rank),
|
||||
group(group),
|
||||
bank(bank)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -126,24 +136,19 @@ public:
|
||||
*/
|
||||
Node() = default;
|
||||
|
||||
Node(NodeData data, const Node *parent) : data(data), parent(parent)
|
||||
{
|
||||
}
|
||||
Node(NodeData data, const Node* parent) : data(data), parent(parent) {}
|
||||
|
||||
/**
|
||||
* Gets the row relative to its parent.
|
||||
*/
|
||||
int getRow() const;
|
||||
int childCount() const
|
||||
{
|
||||
return children.size();
|
||||
}
|
||||
int childCount() const { return children.size(); }
|
||||
|
||||
static std::shared_ptr<Node> cloneNode(const Node *node, const Node *parent);
|
||||
static std::shared_ptr<Node> cloneNode(const Node* node, const Node* parent);
|
||||
|
||||
NodeData data;
|
||||
|
||||
const Node *parent = nullptr;
|
||||
const Node* parent = nullptr;
|
||||
std::vector<std::shared_ptr<Node>> children;
|
||||
};
|
||||
|
||||
@@ -161,15 +166,21 @@ protected:
|
||||
};
|
||||
|
||||
QStringList mimeTypes() const override;
|
||||
QMimeData *mimeData(const QModelIndexList &indexes) const override;
|
||||
bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column,
|
||||
const QModelIndex &parent) override;
|
||||
bool canDropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column,
|
||||
const QModelIndex &parent) const override;
|
||||
QMimeData* mimeData(const QModelIndexList& indexes) const override;
|
||||
bool dropMimeData(const QMimeData* data,
|
||||
Qt::DropAction action,
|
||||
int row,
|
||||
int column,
|
||||
const QModelIndex& parent) override;
|
||||
bool canDropMimeData(const QMimeData* data,
|
||||
Qt::DropAction action,
|
||||
int row,
|
||||
int column,
|
||||
const QModelIndex& parent) const override;
|
||||
Qt::DropActions supportedDropActions() const override;
|
||||
Qt::ItemFlags flags(const QModelIndex &index) const override;
|
||||
Qt::ItemFlags flags(const QModelIndex& index) const override;
|
||||
|
||||
void addTopLevelNode(std::shared_ptr<Node> &&node);
|
||||
void addTopLevelNode(std::shared_ptr<Node>&& node);
|
||||
void createInitialNodes();
|
||||
std::shared_ptr<Node> createRankGroupNode(unsigned int rank) const;
|
||||
|
||||
@@ -177,12 +188,12 @@ protected:
|
||||
QString getLabel(unsigned int rank) const;
|
||||
QString getLabel(unsigned int rank, unsigned int group, unsigned int bank) const;
|
||||
|
||||
static CommandBusType getCommandBusType(const GeneralInfo &generalInfo);
|
||||
static DataBusType getDataBusType(const GeneralInfo &generalInfo);
|
||||
static CommandBusType getCommandBusType(const GeneralInfo& generalInfo);
|
||||
static DataBusType getDataBusType(const GeneralInfo& generalInfo);
|
||||
|
||||
static constexpr auto TRACELINE_MIMETYPE = "application/x-tracelinedata";
|
||||
|
||||
QItemSelectionModel *const internalSelectionModel;
|
||||
QItemSelectionModel* const internalSelectionModel;
|
||||
|
||||
std::shared_ptr<Node> rootNode;
|
||||
|
||||
@@ -200,17 +211,18 @@ class AvailableTracePlotLineModel : public AbstractTracePlotLineModel
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit AvailableTracePlotLineModel(const GeneralInfo &generalInfo, QObject *parent = nullptr);
|
||||
explicit AvailableTracePlotLineModel(const GeneralInfo& generalInfo, QObject* parent = nullptr);
|
||||
|
||||
public Q_SLOTS:
|
||||
void itemsDoubleClicked(const QModelIndex &index);
|
||||
void itemsDoubleClicked(const QModelIndex& index);
|
||||
|
||||
Q_SIGNALS:
|
||||
void returnPressed(const QModelIndexList &indexes);
|
||||
void returnPressed(const QModelIndexList& indexes);
|
||||
|
||||
protected:
|
||||
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
|
||||
bool eventFilter(QObject *object, QEvent *event) override;
|
||||
QVariant
|
||||
headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
|
||||
bool eventFilter(QObject* object, QEvent* event) override;
|
||||
};
|
||||
|
||||
class SelectedTracePlotLineModel : public AbstractTracePlotLineModel
|
||||
@@ -218,28 +230,29 @@ class SelectedTracePlotLineModel : public AbstractTracePlotLineModel
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit SelectedTracePlotLineModel(const GeneralInfo &generalInfo, QObject *parent = nullptr);
|
||||
explicit SelectedTracePlotLineModel(const GeneralInfo& generalInfo, QObject* parent = nullptr);
|
||||
|
||||
bool setData(const QModelIndex &index, const QVariant &value, int role) override;
|
||||
bool setData(const QModelIndex& index, const QVariant& value, int role) override;
|
||||
|
||||
void recreateCollapseButtons(TracePlot *tracePlot, CustomLabelScaleDraw *customLabelScaleDraw);
|
||||
void recreateCollapseButtons(TracePlot* tracePlot, CustomLabelScaleDraw* customLabelScaleDraw);
|
||||
|
||||
std::shared_ptr<Node> getClonedRootNode();
|
||||
void setRootNode(std::shared_ptr<Node> node);
|
||||
|
||||
public Q_SLOTS:
|
||||
void itemsDoubleClicked(const QModelIndex &index);
|
||||
void itemsDoubleClicked(const QModelIndex& index);
|
||||
|
||||
void addIndexesFromAvailableModel(const QModelIndexList &indexes);
|
||||
void addIndexesFromAvailableModel(const QModelIndexList& indexes);
|
||||
|
||||
protected:
|
||||
bool eventFilter(QObject *object, QEvent *event) override;
|
||||
bool eventFilter(QObject* object, QEvent* event) override;
|
||||
|
||||
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
|
||||
bool removeRows(int row, int count, const QModelIndex &parent = QModelIndex()) override;
|
||||
QVariant
|
||||
headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
|
||||
bool removeRows(int row, int count, const QModelIndex& parent = QModelIndex()) override;
|
||||
|
||||
private:
|
||||
std::vector<QPushButton *> collapseButtons;
|
||||
std::vector<QPushButton*> collapseButtons;
|
||||
|
||||
friend class TracePlotLineDataSource;
|
||||
};
|
||||
@@ -254,16 +267,11 @@ class TracePlotLineDataSource : public QObject
|
||||
public:
|
||||
using TracePlotLine = AbstractTracePlotLineModel::Node;
|
||||
|
||||
explicit TracePlotLineDataSource(SelectedTracePlotLineModel *selectedModel, QObject *parent = nullptr);
|
||||
explicit TracePlotLineDataSource(SelectedTracePlotLineModel* selectedModel,
|
||||
QObject* parent = nullptr);
|
||||
|
||||
SelectedTracePlotLineModel *getSelectedModel() const
|
||||
{
|
||||
return selectedModel;
|
||||
};
|
||||
std::vector<std::shared_ptr<TracePlotLine>> &getTracePlotLines()
|
||||
{
|
||||
return entries;
|
||||
}
|
||||
SelectedTracePlotLineModel* getSelectedModel() const { return selectedModel; };
|
||||
std::vector<std::shared_ptr<TracePlotLine>>& getTracePlotLines() { return entries; }
|
||||
|
||||
public Q_SLOTS:
|
||||
void updateModel();
|
||||
@@ -272,7 +280,7 @@ Q_SIGNALS:
|
||||
void modelChanged();
|
||||
|
||||
private:
|
||||
SelectedTracePlotLineModel *selectedModel;
|
||||
SelectedTracePlotLineModel* selectedModel;
|
||||
|
||||
std::vector<std::shared_ptr<TracePlotLine>> entries;
|
||||
};
|
||||
|
||||
@@ -51,8 +51,7 @@ inline QString prettyFormatTime(traceTime time)
|
||||
inline QString formatInClks(traceTime time, unsigned int clkPeriod)
|
||||
{
|
||||
long long numberOfClockCovered = time / clkPeriod;
|
||||
QString suffix = (numberOfClockCovered != 1) ? QString(" clks") :
|
||||
QString(" clk");
|
||||
QString suffix = (numberOfClockCovered != 1) ? QString(" clks") : QString(" clk");
|
||||
return QString::number(numberOfClockCovered) + suffix;
|
||||
}
|
||||
|
||||
@@ -61,5 +60,4 @@ inline traceTime alignToClk(traceTime time, unsigned int clkPeriod)
|
||||
return round(1.0 * time / clkPeriod) * clkPeriod;
|
||||
}
|
||||
|
||||
|
||||
#endif // TRACETIME_H
|
||||
|
||||
@@ -44,25 +44,44 @@ using namespace std;
|
||||
|
||||
unsigned int Transaction::mSNumTransactions = 0;
|
||||
|
||||
Transaction::Transaction(ID id, QString command, unsigned int address, unsigned int dataLength,
|
||||
unsigned int thread, unsigned int channel, Timespan span, traceTime clk)
|
||||
: clk(clk), command(std::move(command)), address(address), dataLength(dataLength), thread(thread), channel(channel),
|
||||
span(span), id(id) {}
|
||||
Transaction::Transaction(ID id,
|
||||
QString command,
|
||||
unsigned int address,
|
||||
unsigned int dataLength,
|
||||
unsigned int thread,
|
||||
unsigned int channel,
|
||||
Timespan span,
|
||||
traceTime clk) :
|
||||
clk(clk),
|
||||
command(std::move(command)),
|
||||
address(address),
|
||||
dataLength(dataLength),
|
||||
thread(thread),
|
||||
channel(channel),
|
||||
span(span),
|
||||
id(id)
|
||||
{
|
||||
}
|
||||
|
||||
void Transaction::addPhase(const shared_ptr<Phase>& phase)
|
||||
{
|
||||
phases.push_back(phase);
|
||||
}
|
||||
|
||||
void Transaction::draw(QPainter *painter, const QwtScaleMap &xMap,
|
||||
const QwtScaleMap &yMap, const QRectF &canvasRect, bool highlight,
|
||||
const TraceDrawingProperties &drawingProperties) const
|
||||
void Transaction::draw(QPainter* painter,
|
||||
const QwtScaleMap& xMap,
|
||||
const QwtScaleMap& yMap,
|
||||
const QRectF& canvasRect,
|
||||
bool highlight,
|
||||
const TraceDrawingProperties& drawingProperties) const
|
||||
{
|
||||
for (const shared_ptr<Phase>& phase : phases)
|
||||
phase->draw(painter, xMap, yMap, canvasRect, highlight, drawingProperties);
|
||||
}
|
||||
|
||||
bool Transaction::isSelected(Timespan timespan, double yVal, const TraceDrawingProperties &drawingproperties) const
|
||||
bool Transaction::isSelected(Timespan timespan,
|
||||
double yVal,
|
||||
const TraceDrawingProperties& drawingproperties) const
|
||||
{
|
||||
if (span.overlaps(timespan))
|
||||
{
|
||||
|
||||
@@ -38,11 +38,11 @@
|
||||
|
||||
#ifndef TRANSACTION_H
|
||||
#define TRANSACTION_H
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
#include "timespan.h"
|
||||
#include "phases/phase.h"
|
||||
#include "presentation/tracedrawingproperties.h"
|
||||
#include "timespan.h"
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
typedef unsigned int ID;
|
||||
|
||||
@@ -59,20 +59,28 @@ public:
|
||||
const Timespan span;
|
||||
const ID id;
|
||||
|
||||
Transaction(ID id, QString command, unsigned int address, unsigned int dataLength, unsigned int thread,
|
||||
unsigned int channel, Timespan span, traceTime clk);
|
||||
Transaction(ID id,
|
||||
QString command,
|
||||
unsigned int address,
|
||||
unsigned int dataLength,
|
||||
unsigned int thread,
|
||||
unsigned int channel,
|
||||
Timespan span,
|
||||
traceTime clk);
|
||||
|
||||
void draw(QPainter *painter, const QwtScaleMap &xMap, const QwtScaleMap &yMap,
|
||||
const QRectF &canvasRect, bool highlight,
|
||||
const TraceDrawingProperties &drawingProperties) const;
|
||||
void draw(QPainter* painter,
|
||||
const QwtScaleMap& xMap,
|
||||
const QwtScaleMap& yMap,
|
||||
const QRectF& canvasRect,
|
||||
bool highlight,
|
||||
const TraceDrawingProperties& drawingProperties) const;
|
||||
void addPhase(const std::shared_ptr<Phase>& phase);
|
||||
|
||||
bool isSelected(Timespan timespan, double yVal, const TraceDrawingProperties &drawingproperties) const;
|
||||
bool isSelected(Timespan timespan,
|
||||
double yVal,
|
||||
const TraceDrawingProperties& drawingproperties) const;
|
||||
|
||||
const std::vector<std::shared_ptr<Phase>> &Phases() const
|
||||
{
|
||||
return phases;
|
||||
}
|
||||
const std::vector<std::shared_ptr<Phase>>& Phases() const { return phases; }
|
||||
|
||||
public:
|
||||
static void setNumTransactions(const unsigned int numTransactions)
|
||||
|
||||
@@ -40,28 +40,35 @@
|
||||
#define QUERYTEXTS_H
|
||||
#include <QString>
|
||||
|
||||
struct TransactionQueryTexts {
|
||||
struct TransactionQueryTexts
|
||||
{
|
||||
QString queryHead;
|
||||
QString selectTransactionsByTimespan, selectTransactionById;
|
||||
QString checkDependenciesExist, selectDependenciesByTimespan;
|
||||
QString selectDependencyTypePercentages, selectTimeDependencyPercentages, selectDelayedPhasePercentages,
|
||||
selectDependencyPhasePercentages;
|
||||
QString selectDependencyTypePercentages, selectTimeDependencyPercentages,
|
||||
selectDelayedPhasePercentages, selectDependencyPhasePercentages;
|
||||
|
||||
TransactionQueryTexts()
|
||||
{
|
||||
queryHead =
|
||||
"SELECT Transactions.ID AS TransactionID, Ranges.begin, Ranges.end, Address, DataLength, Thread, Channel, Command, Phases.ID AS PhaseID, PhaseName, PhaseBegin, PhaseEnd, DataStrobeBegin, DataStrobeEnd, Rank, BankGroup, Bank, Row, Column, BurstLength "
|
||||
" FROM Transactions INNER JOIN Phases ON Phases.Transact = Transactions.ID INNER JOIN Ranges ON Transactions.Range = Ranges.ID ";
|
||||
queryHead = "SELECT Transactions.ID AS TransactionID, Ranges.begin, Ranges.end, Address, "
|
||||
"DataLength, Thread, Channel, Command, Phases.ID AS PhaseID, PhaseName, "
|
||||
"PhaseBegin, PhaseEnd, DataStrobeBegin, DataStrobeEnd, Rank, BankGroup, Bank, "
|
||||
"Row, Column, BurstLength "
|
||||
" FROM Transactions INNER JOIN Phases ON Phases.Transact = Transactions.ID "
|
||||
"INNER JOIN Ranges ON Transactions.Range = Ranges.ID ";
|
||||
|
||||
selectTransactionsByTimespan = queryHead + " WHERE Ranges.end >= :begin AND Ranges.begin <= :end";
|
||||
selectTransactionsByTimespan =
|
||||
queryHead + " WHERE Ranges.end >= :begin AND Ranges.begin <= :end";
|
||||
selectTransactionById = queryHead + " WHERE Transactions.ID = :id";
|
||||
|
||||
checkDependenciesExist = "SELECT CASE WHEN 0 < (SELECT count(*) FROM sqlite_master WHERE type = 'table' AND "
|
||||
"name = 'DirectDependencies') THEN 1 ELSE 0 END AS result";
|
||||
checkDependenciesExist =
|
||||
"SELECT CASE WHEN 0 < (SELECT count(*) FROM sqlite_master WHERE type = 'table' AND "
|
||||
"name = 'DirectDependencies') THEN 1 ELSE 0 END AS result";
|
||||
selectDependenciesByTimespan =
|
||||
"WITH timespanTransactions AS (" + selectTransactionsByTimespan +
|
||||
") SELECT * from DirectDependencies WHERE DelayedPhaseID IN ("
|
||||
" SELECT DirectDependencies.DelayedPhaseID FROM DirectDependencies JOIN timespanTransactions "
|
||||
" SELECT DirectDependencies.DelayedPhaseID FROM DirectDependencies JOIN "
|
||||
"timespanTransactions "
|
||||
" ON DirectDependencies.DelayedPhaseID = timespanTransactions.PhaseID ) ";
|
||||
|
||||
// For some reason I could not use a parameter for these below
|
||||
@@ -125,7 +132,6 @@ struct TransactionQueryTexts {
|
||||
"FROM DependencyTypeDeps "
|
||||
"ORDER BY percentage DESC ;";
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
#endif // QUERYTEXTS_H
|
||||
|
||||
@@ -37,20 +37,19 @@
|
||||
* Iron Prando da Silva
|
||||
*/
|
||||
|
||||
#include <QString>
|
||||
#include <QFile>
|
||||
#include <QStringList>
|
||||
#include <QTextStream>
|
||||
#include <QSqlError>
|
||||
#include <iostream>
|
||||
#include <QFileInfo>
|
||||
#include <QDebug>
|
||||
#include "data/tracedb.h"
|
||||
#include "businessObjects/phases/phasefactory.h"
|
||||
#include <QDebug>
|
||||
#include <QFile>
|
||||
#include <QFileInfo>
|
||||
#include <QSqlError>
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
#include <QTextStream>
|
||||
#include <iostream>
|
||||
|
||||
|
||||
//define symbol printqueries if all queries should be printed to the console
|
||||
//#define printqueries
|
||||
// define symbol printqueries if all queries should be printed to the console
|
||||
// #define printqueries
|
||||
|
||||
TraceDB::TraceDB(const QString& path, bool openExisting)
|
||||
{
|
||||
@@ -88,11 +87,14 @@ void TraceDB::prepareQueries()
|
||||
qDebug() << database.lastError().text();
|
||||
|
||||
selectDebugMessagesByTimespan = QSqlQuery(database);
|
||||
if (!selectDebugMessagesByTimespan.prepare("SELECT time, Message FROM DebugMessages WHERE :begin <= time AND time <= :end "))
|
||||
if (!selectDebugMessagesByTimespan.prepare(
|
||||
"SELECT time, Message FROM DebugMessages WHERE :begin <= time AND time <= :end "))
|
||||
qDebug() << database.lastError().text();
|
||||
|
||||
selectDebugMessagesByTimespanWithLimit = QSqlQuery(database);
|
||||
if (!selectDebugMessagesByTimespanWithLimit.prepare("SELECT time, Message FROM DebugMessages WHERE :begin <= time AND time <= :end LIMIT :limit"))
|
||||
if (!selectDebugMessagesByTimespanWithLimit.prepare(
|
||||
"SELECT time, Message FROM DebugMessages WHERE :begin <= time AND time <= :end LIMIT "
|
||||
":limit"))
|
||||
qDebug() << database.lastError().text();
|
||||
|
||||
checkDependenciesExist = QSqlQuery(database);
|
||||
@@ -102,17 +104,16 @@ void TraceDB::prepareQueries()
|
||||
selectDependenciesByTimespan = QSqlQuery(database);
|
||||
if (!selectDependenciesByTimespan.prepare(queryTexts.selectDependenciesByTimespan))
|
||||
qDebug() << database.lastError().text();
|
||||
|
||||
}
|
||||
|
||||
void TraceDB::updateComments(const std::vector<CommentModel::Comment> &comments)
|
||||
void TraceDB::updateComments(const std::vector<CommentModel::Comment>& comments)
|
||||
{
|
||||
QSqlQuery query(database);
|
||||
query.prepare("DELETE FROM Comments");
|
||||
executeQuery(query);
|
||||
query.prepare("insert into Comments values(:time,:text)");
|
||||
|
||||
for (const auto &comment : comments)
|
||||
for (const auto& comment : comments)
|
||||
{
|
||||
query.bindValue(":time", comment.time);
|
||||
query.bindValue(":text", comment.text);
|
||||
@@ -120,7 +121,7 @@ void TraceDB::updateComments(const std::vector<CommentModel::Comment> &comments)
|
||||
}
|
||||
}
|
||||
|
||||
void TraceDB::updateFileDescription(const QString &description)
|
||||
void TraceDB::updateFileDescription(const QString& description)
|
||||
{
|
||||
QSqlQuery query(database);
|
||||
query.prepare("UPDATE GeneralInfo SET Description=:description");
|
||||
@@ -134,9 +135,11 @@ void TraceDB::refreshData()
|
||||
generalInfo = getGeneralInfoFromDB();
|
||||
}
|
||||
|
||||
//QueryText must select the fields
|
||||
//TransactionID, Ranges.begin, Ranges.end, Address, TThread, TChannel, TBank, TRow, TColumn, Phases.ID AS PhaseID, PhaseName, PhaseBegin, PhaseEnd
|
||||
std::vector<std::shared_ptr<Transaction>> TraceDB::getTransactionsWithCustomQuery(const QString& queryText)
|
||||
// QueryText must select the fields
|
||||
// TransactionID, Ranges.begin, Ranges.end, Address, TThread, TChannel, TBank, TRow, TColumn,
|
||||
// Phases.ID AS PhaseID, PhaseName, PhaseBegin, PhaseEnd
|
||||
std::vector<std::shared_ptr<Transaction>>
|
||||
TraceDB::getTransactionsWithCustomQuery(const QString& queryText)
|
||||
{
|
||||
QSqlQuery query(database);
|
||||
query.prepare(queryText);
|
||||
@@ -144,7 +147,8 @@ std::vector<std::shared_ptr<Transaction>> TraceDB::getTransactionsWithCustomQuer
|
||||
return parseTransactionsFromQuery(query);
|
||||
}
|
||||
|
||||
std::vector<std::shared_ptr<Transaction>> TraceDB::getTransactionsInTimespan(const Timespan &span, bool updateVisiblePhases)
|
||||
std::vector<std::shared_ptr<Transaction>>
|
||||
TraceDB::getTransactionsInTimespan(const Timespan& span, bool updateVisiblePhases)
|
||||
{
|
||||
selectTransactionsByTimespan.bindValue(":begin", span.Begin());
|
||||
selectTransactionsByTimespan.bindValue(":end", span.End());
|
||||
@@ -163,7 +167,7 @@ bool TraceDB::checkDependencyTableExists()
|
||||
return exists;
|
||||
}
|
||||
|
||||
void TraceDB::updateDependenciesInTimespan(const Timespan &span)
|
||||
void TraceDB::updateDependenciesInTimespan(const Timespan& span)
|
||||
{
|
||||
if (checkDependencyTableExists())
|
||||
{
|
||||
@@ -174,7 +178,7 @@ void TraceDB::updateDependenciesInTimespan(const Timespan &span)
|
||||
}
|
||||
}
|
||||
|
||||
//TODO Remove exception
|
||||
// TODO Remove exception
|
||||
std::shared_ptr<Transaction> TraceDB::getTransactionByID(ID id)
|
||||
{
|
||||
selectTransactionById.bindValue(":id", id);
|
||||
@@ -183,16 +187,17 @@ std::shared_ptr<Transaction> TraceDB::getTransactionByID(ID id)
|
||||
if (!result.empty())
|
||||
return result[0];
|
||||
else
|
||||
throw sqlException(("Transaction with ID " + QString::number(
|
||||
id) + " not in DB").toStdString(), this->pathToDB.toStdString());
|
||||
throw sqlException(
|
||||
("Transaction with ID " + QString::number(id) + " not in DB").toStdString(),
|
||||
this->pathToDB.toStdString());
|
||||
}
|
||||
|
||||
|
||||
std::shared_ptr<Transaction> TraceDB::getNextActivate(traceTime time)
|
||||
{
|
||||
QSqlQuery query(database);
|
||||
QString queryText = queryTexts.queryHead +
|
||||
"WHERE PhaseBegin > :traceTime AND PhaseName = 'ACT' ORDER BY PhaseBegin ASC LIMIT 1";
|
||||
QString queryText =
|
||||
queryTexts.queryHead +
|
||||
"WHERE PhaseBegin > :traceTime AND PhaseName = 'ACT' ORDER BY PhaseBegin ASC LIMIT 1";
|
||||
|
||||
query.prepare(queryText);
|
||||
query.bindValue(":traceTime", time);
|
||||
@@ -242,7 +247,8 @@ std::shared_ptr<Transaction> TraceDB::getNextRefresh(traceTime time)
|
||||
QSqlQuery query(database);
|
||||
QString queryText = queryTexts.queryHead +
|
||||
"WHERE PhaseBegin > :traceTime AND PhaseName "
|
||||
"IN ('REFAB','REFA','REFB','REFPB','REFP2B','REFSB','SREF','SREFB') ORDER BY PhaseBegin ASC LIMIT 1";
|
||||
"IN ('REFAB','REFA','REFB','REFPB','REFP2B','REFSB','SREF','SREFB') ORDER "
|
||||
"BY PhaseBegin ASC LIMIT 1";
|
||||
query.prepare(queryText);
|
||||
query.bindValue(":traceTime", time);
|
||||
executeQuery(query);
|
||||
@@ -252,8 +258,8 @@ std::shared_ptr<Transaction> TraceDB::getNextRefresh(traceTime time)
|
||||
std::shared_ptr<Transaction> TraceDB::getNextCommand(traceTime time)
|
||||
{
|
||||
QSqlQuery query(database);
|
||||
QString queryText = queryTexts.queryHead +
|
||||
"WHERE PhaseBegin > :traceTime ORDER BY PhaseBegin ASC LIMIT 1";
|
||||
QString queryText =
|
||||
queryTexts.queryHead + "WHERE PhaseBegin > :traceTime ORDER BY PhaseBegin ASC LIMIT 1";
|
||||
query.prepare(queryText);
|
||||
query.bindValue(":traceTime", time);
|
||||
executeQuery(query);
|
||||
@@ -279,9 +285,12 @@ ID TraceDB::getTransactionIDFromPhaseID(ID phaseID)
|
||||
query.bindValue(":id", phaseID);
|
||||
executeQuery(query);
|
||||
|
||||
if (query.next()) {
|
||||
if (query.next())
|
||||
{
|
||||
return query.value(0).toInt();
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
throw sqlException("Phase with ID " + std::to_string(phaseID) + " not in db",
|
||||
this->pathToDB.toStdString());
|
||||
}
|
||||
@@ -300,11 +309,12 @@ GeneralInfo TraceDB::getGeneralInfoFromDB()
|
||||
parameter = getParameterFromTable("UnitOfTime", "GeneralInfo");
|
||||
QString unitOfTime = parameter.isValid() ? parameter.toString() : "PS";
|
||||
parameter = getParameterFromTable("Traces", "GeneralInfo");
|
||||
QString traces = parameter.isValid() ? "Traces: " + parameter.toString() : "Traces: empty";
|
||||
QString traces = parameter.isValid() ? "Traces: " + parameter.toString() : "Traces: empty";
|
||||
parameter = getParameterFromTable("Memspec", "GeneralInfo");
|
||||
QString memspec = parameter.isValid() ? "Memspec: " + parameter.toString() : "Memspec: empty";
|
||||
QString memspec = parameter.isValid() ? "Memspec: " + parameter.toString() : "Memspec: empty";
|
||||
parameter = getParameterFromTable("MCconfig", "GeneralInfo");
|
||||
QString mcconfig = parameter.isValid() ? "MCconfig: " + parameter.toString() : "MCconfig: empty";
|
||||
QString mcconfig =
|
||||
parameter.isValid() ? "MCconfig: " + parameter.toString() : "MCconfig: empty";
|
||||
parameter = getParameterFromTable("WindowSize", "GeneralInfo");
|
||||
uint64_t windowSize = parameter.isValid() ? parameter.toULongLong() : 0;
|
||||
parameter = getParameterFromTable("RefreshMaxPostponed", "GeneralInfo");
|
||||
@@ -334,21 +344,34 @@ GeneralInfo TraceDB::getGeneralInfoFromDB()
|
||||
description += "Length of trace: " + prettyFormatTime(traceEnd) + "\n";
|
||||
description += "Window size: " + QString::number(windowSize) + "\n";
|
||||
|
||||
return {numberOfTransactions, numberOfPhases, Timespan(0, traceEnd),
|
||||
numberOfRanks, numberOfBankGroups, numberOfBanks,
|
||||
description, unitOfTime, clkPeriod,
|
||||
windowSize, refreshMaxPostponed, refreshMaxPulledin,
|
||||
controllerThread, maxBufferDepth, per2BankOffset,
|
||||
rowColumnCommandBus, pseudoChannelMode};
|
||||
return {numberOfTransactions,
|
||||
numberOfPhases,
|
||||
Timespan(0, traceEnd),
|
||||
numberOfRanks,
|
||||
numberOfBankGroups,
|
||||
numberOfBanks,
|
||||
description,
|
||||
unitOfTime,
|
||||
clkPeriod,
|
||||
windowSize,
|
||||
refreshMaxPostponed,
|
||||
refreshMaxPulledin,
|
||||
controllerThread,
|
||||
maxBufferDepth,
|
||||
per2BankOffset,
|
||||
rowColumnCommandBus,
|
||||
pseudoChannelMode};
|
||||
}
|
||||
|
||||
CommandLengths TraceDB::getCommandLengthsFromDB()
|
||||
{
|
||||
const std::string table = "CommandLengths";
|
||||
|
||||
auto getLengthFromDb = [=, &table](const std::string &command) -> QVariant
|
||||
auto getLengthFromDb = [=, &table](const std::string& command) -> QVariant
|
||||
{
|
||||
QSqlQuery query(("SELECT Length FROM " + table + " WHERE Command = \"" + command + "\"").c_str(), database);
|
||||
QSqlQuery query(
|
||||
("SELECT Length FROM " + table + " WHERE Command = \"" + command + "\"").c_str(),
|
||||
database);
|
||||
|
||||
if (query.first())
|
||||
return query.value(0);
|
||||
@@ -356,7 +379,7 @@ CommandLengths TraceDB::getCommandLengthsFromDB()
|
||||
return {};
|
||||
};
|
||||
|
||||
auto getCommandLength = [=, &table](const std::string &command) -> double
|
||||
auto getCommandLength = [=, &table](const std::string& command) -> double
|
||||
{
|
||||
QVariant length = getLengthFromDb(command);
|
||||
|
||||
@@ -364,8 +387,8 @@ CommandLengths TraceDB::getCommandLengthsFromDB()
|
||||
return length.toDouble();
|
||||
else
|
||||
{
|
||||
qDebug() << "CommandLength for" << command.c_str() << "not present in table" << table.c_str()
|
||||
<< ". Defaulting to 1.";
|
||||
qDebug() << "CommandLength for" << command.c_str() << "not present in table"
|
||||
<< table.c_str() << ". Defaulting to 1.";
|
||||
return 1;
|
||||
}
|
||||
};
|
||||
@@ -455,8 +478,7 @@ std::vector<CommentModel::Comment> TraceDB::getComments()
|
||||
return parseCommentsFromQuery(query);
|
||||
}
|
||||
|
||||
|
||||
std::vector<CommentModel::Comment> TraceDB::getDebugMessagesInTimespan(const Timespan &span)
|
||||
std::vector<CommentModel::Comment> TraceDB::getDebugMessagesInTimespan(const Timespan& span)
|
||||
{
|
||||
selectDebugMessagesByTimespan.bindValue(":begin", span.Begin());
|
||||
selectDebugMessagesByTimespan.bindValue(":end", span.End());
|
||||
@@ -465,8 +487,8 @@ std::vector<CommentModel::Comment> TraceDB::getDebugMessagesInTimespan(const Tim
|
||||
return parseCommentsFromQuery(selectDebugMessagesByTimespan);
|
||||
}
|
||||
|
||||
std::vector<CommentModel::Comment> TraceDB::getDebugMessagesInTimespan(const Timespan &span,
|
||||
unsigned int limit = 50)
|
||||
std::vector<CommentModel::Comment> TraceDB::getDebugMessagesInTimespan(const Timespan& span,
|
||||
unsigned int limit = 50)
|
||||
{
|
||||
selectDebugMessagesByTimespanWithLimit.bindValue(":begin", span.Begin());
|
||||
selectDebugMessagesByTimespanWithLimit.bindValue(":end", span.End());
|
||||
@@ -485,46 +507,45 @@ DependencyInfos TraceDB::getDependencyInfos(DependencyInfos::Type infoType)
|
||||
|
||||
switch (infoType)
|
||||
{
|
||||
case DependencyInfos::Type::DependencyType:
|
||||
{
|
||||
selectDependencyTypePercentages = QSqlQuery(database);
|
||||
if (!selectDependencyTypePercentages.prepare(queryTexts.selectDependencyTypePercentages))
|
||||
qDebug() << database.lastError().text();
|
||||
case DependencyInfos::Type::DependencyType:
|
||||
{
|
||||
selectDependencyTypePercentages = QSqlQuery(database);
|
||||
if (!selectDependencyTypePercentages.prepare(queryTexts.selectDependencyTypePercentages))
|
||||
qDebug() << database.lastError().text();
|
||||
|
||||
executeQuery(selectDependencyTypePercentages);
|
||||
return parseDependencyInfos(selectDependencyTypePercentages, infoType);
|
||||
}
|
||||
executeQuery(selectDependencyTypePercentages);
|
||||
return parseDependencyInfos(selectDependencyTypePercentages, infoType);
|
||||
}
|
||||
|
||||
case DependencyInfos::Type::TimeDependency:
|
||||
{
|
||||
selectTimeDependencyPercentages = QSqlQuery(database);
|
||||
if (!selectTimeDependencyPercentages.prepare(queryTexts.selectTimeDependencyPercentages))
|
||||
qDebug() << database.lastError().text();
|
||||
case DependencyInfos::Type::TimeDependency:
|
||||
{
|
||||
selectTimeDependencyPercentages = QSqlQuery(database);
|
||||
if (!selectTimeDependencyPercentages.prepare(queryTexts.selectTimeDependencyPercentages))
|
||||
qDebug() << database.lastError().text();
|
||||
|
||||
executeQuery(selectTimeDependencyPercentages);
|
||||
return parseDependencyInfos(selectTimeDependencyPercentages, infoType);
|
||||
}
|
||||
executeQuery(selectTimeDependencyPercentages);
|
||||
return parseDependencyInfos(selectTimeDependencyPercentages, infoType);
|
||||
}
|
||||
|
||||
case DependencyInfos::Type::DelayedPhase:
|
||||
{
|
||||
selectDelayedPhasePercentages = QSqlQuery(database);
|
||||
if (!selectDelayedPhasePercentages.prepare(queryTexts.selectDelayedPhasePercentages))
|
||||
qDebug() << database.lastError().text();
|
||||
case DependencyInfos::Type::DelayedPhase:
|
||||
{
|
||||
selectDelayedPhasePercentages = QSqlQuery(database);
|
||||
if (!selectDelayedPhasePercentages.prepare(queryTexts.selectDelayedPhasePercentages))
|
||||
qDebug() << database.lastError().text();
|
||||
|
||||
executeQuery(selectDelayedPhasePercentages);
|
||||
return parseDependencyInfos(selectDelayedPhasePercentages, infoType);
|
||||
}
|
||||
executeQuery(selectDelayedPhasePercentages);
|
||||
return parseDependencyInfos(selectDelayedPhasePercentages, infoType);
|
||||
}
|
||||
|
||||
case DependencyInfos::Type::DependencyPhase:
|
||||
{
|
||||
selectDependencyPhasePercentages = QSqlQuery(database);
|
||||
if (!selectDependencyPhasePercentages.prepare(queryTexts.selectDependencyPhasePercentages))
|
||||
qDebug() << database.lastError().text();
|
||||
|
||||
executeQuery(selectDependencyPhasePercentages);
|
||||
return parseDependencyInfos(selectDependencyPhasePercentages, infoType);
|
||||
}
|
||||
case DependencyInfos::Type::DependencyPhase:
|
||||
{
|
||||
selectDependencyPhasePercentages = QSqlQuery(database);
|
||||
if (!selectDependencyPhasePercentages.prepare(queryTexts.selectDependencyPhasePercentages))
|
||||
qDebug() << database.lastError().text();
|
||||
|
||||
executeQuery(selectDependencyPhasePercentages);
|
||||
return parseDependencyInfos(selectDependencyPhasePercentages, infoType);
|
||||
}
|
||||
}
|
||||
|
||||
return dummy;
|
||||
@@ -541,8 +562,7 @@ QSqlDatabase TraceDB::getDatabase() const
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
std::shared_ptr<Transaction> TraceDB::parseTransactionFromQuery(QSqlQuery &query)
|
||||
std::shared_ptr<Transaction> TraceDB::parseTransactionFromQuery(QSqlQuery& query)
|
||||
{
|
||||
auto result = parseTransactionsFromQuery(query);
|
||||
if (!result.empty())
|
||||
@@ -551,7 +571,8 @@ std::shared_ptr<Transaction> TraceDB::parseTransactionFromQuery(QSqlQuery &query
|
||||
return {};
|
||||
}
|
||||
|
||||
std::vector<std::shared_ptr<Transaction>> TraceDB::parseTransactionsFromQuery(QSqlQuery &query, bool updateVisiblePhases)
|
||||
std::vector<std::shared_ptr<Transaction>>
|
||||
TraceDB::parseTransactionsFromQuery(QSqlQuery& query, bool updateVisiblePhases)
|
||||
{
|
||||
if (updateVisiblePhases)
|
||||
{
|
||||
@@ -579,8 +600,14 @@ std::vector<std::shared_ptr<Transaction>> TraceDB::parseTransactionsFromQuery(QS
|
||||
unsigned int thread = query.value(5).toUInt();
|
||||
unsigned int channel = query.value(6).toUInt();
|
||||
QString command = query.value(7).toString();
|
||||
result.push_back(std::make_shared<Transaction>(id, std::move(command), address, dataLength, thread, channel,
|
||||
span, generalInfo.clkPeriod));
|
||||
result.push_back(std::make_shared<Transaction>(id,
|
||||
std::move(command),
|
||||
address,
|
||||
dataLength,
|
||||
thread,
|
||||
channel,
|
||||
span,
|
||||
generalInfo.clkPeriod));
|
||||
}
|
||||
|
||||
unsigned int phaseID = query.value(8).toInt();
|
||||
@@ -593,8 +620,18 @@ std::vector<std::shared_ptr<Transaction>> TraceDB::parseTransactionsFromQuery(QS
|
||||
unsigned int row = query.value(17).toUInt();
|
||||
unsigned int column = query.value(18).toUInt();
|
||||
unsigned int burstLength = query.value(19).toUInt();
|
||||
auto phase = PhaseFactory::createPhase(phaseID, phaseName, span, spanOnDataStrobe, rank, bankGroup, bank,
|
||||
row, column, burstLength, result.at(result.size() - 1), *this);
|
||||
auto phase = PhaseFactory::createPhase(phaseID,
|
||||
phaseName,
|
||||
span,
|
||||
spanOnDataStrobe,
|
||||
rank,
|
||||
bankGroup,
|
||||
bank,
|
||||
row,
|
||||
column,
|
||||
burstLength,
|
||||
result.at(result.size() - 1),
|
||||
*this);
|
||||
result.at(result.size() - 1)->addPhase(phase);
|
||||
|
||||
if (updateVisiblePhases)
|
||||
@@ -605,7 +642,7 @@ std::vector<std::shared_ptr<Transaction>> TraceDB::parseTransactionsFromQuery(QS
|
||||
return result;
|
||||
}
|
||||
|
||||
void TraceDB::mUpdateDependenciesFromQuery(QSqlQuery &query)
|
||||
void TraceDB::mUpdateDependenciesFromQuery(QSqlQuery& query)
|
||||
{
|
||||
DependencyType type;
|
||||
while (query.next())
|
||||
@@ -636,13 +673,13 @@ void TraceDB::mUpdateDependenciesFromQuery(QSqlQuery &query)
|
||||
{
|
||||
|
||||
_visiblePhases[delayedID]->addDependency(std::make_shared<PhaseDependency>(
|
||||
PhaseDependency(type, timeDependencyStr, _visiblePhases[dependencyID])));
|
||||
PhaseDependency(type, timeDependencyStr, _visiblePhases[dependencyID])));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
_visiblePhases[delayedID]->addDependency(
|
||||
std::make_shared<PhaseDependency>(PhaseDependency(type, timeDependencyStr)));
|
||||
std::make_shared<PhaseDependency>(PhaseDependency(type, timeDependencyStr)));
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -652,18 +689,19 @@ void TraceDB::mUpdateDependenciesFromQuery(QSqlQuery &query)
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<CommentModel::Comment> TraceDB::parseCommentsFromQuery(QSqlQuery &query)
|
||||
std::vector<CommentModel::Comment> TraceDB::parseCommentsFromQuery(QSqlQuery& query)
|
||||
{
|
||||
std::vector<CommentModel::Comment> result;
|
||||
while (query.next())
|
||||
{
|
||||
result.push_back(CommentModel::Comment{query.value(0).toLongLong(),
|
||||
query.value(1).toString()});
|
||||
result.push_back(
|
||||
CommentModel::Comment{query.value(0).toLongLong(), query.value(1).toString()});
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
DependencyInfos TraceDB::parseDependencyInfos(QSqlQuery &query, const DependencyInfos::Type infoType)
|
||||
DependencyInfos TraceDB::parseDependencyInfos(QSqlQuery& query,
|
||||
const DependencyInfos::Type infoType)
|
||||
{
|
||||
DependencyInfos infos(infoType);
|
||||
|
||||
@@ -680,18 +718,21 @@ DependencyInfos TraceDB::parseDependencyInfos(QSqlQuery &query, const Dependency
|
||||
void TraceDB::executeQuery(QSqlQuery query)
|
||||
{
|
||||
|
||||
//query.exec returns bool indicating if the query was sucessfull
|
||||
if (query.exec()) {
|
||||
// query.exec returns bool indicating if the query was sucessfull
|
||||
if (query.exec())
|
||||
{
|
||||
#ifdef printqueries
|
||||
cout << queryToString(query).toStdString() << endl;
|
||||
#endif
|
||||
}
|
||||
|
||||
else {
|
||||
else
|
||||
{
|
||||
query.finish();
|
||||
throw sqlException( ("Query:\n " + queryToString(query) + "\n failed. Error: \n"
|
||||
+
|
||||
query.lastError().text()).toStdString(), this->pathToDB.toStdString());
|
||||
throw sqlException(
|
||||
("Query:\n " + queryToString(query) + "\n failed. Error: \n" + query.lastError().text())
|
||||
.toStdString(),
|
||||
this->pathToDB.toStdString());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -699,14 +740,14 @@ QString TraceDB::queryToString(const QSqlQuery& query)
|
||||
{
|
||||
QString str = query.lastQuery();
|
||||
QMapIterator<QString, QVariant> it(query.boundValues());
|
||||
while (it.hasNext()) {
|
||||
while (it.hasNext())
|
||||
{
|
||||
it.next();
|
||||
str.replace(it.key(), it.value().toString());
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
|
||||
void TraceDB::dropAndCreateTables()
|
||||
{
|
||||
executeScriptFile("common/static/createTraceDB.sql");
|
||||
@@ -717,16 +758,20 @@ void TraceDB::executeScriptFile(const QString& fileName)
|
||||
QSqlQuery query(database);
|
||||
QFile scriptFile(fileName);
|
||||
|
||||
if (scriptFile.open(QIODevice::ReadOnly)) {
|
||||
if (scriptFile.open(QIODevice::ReadOnly))
|
||||
{
|
||||
// The SQLite driver executes only a single (the first) query in the QSqlQuery
|
||||
// if the script contains more queries, it needs to be splitted.
|
||||
QStringList scriptQueries = QTextStream(&scriptFile).readAll().split(';');
|
||||
|
||||
for (QString &queryTxt : scriptQueries) {
|
||||
if (queryTxt.trimmed().isEmpty()) {
|
||||
for (QString& queryTxt : scriptQueries)
|
||||
{
|
||||
if (queryTxt.trimmed().isEmpty())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if (!query.exec(queryTxt)) {
|
||||
if (!query.exec(queryTxt))
|
||||
{
|
||||
throw sqlException("Querry failed:" + query.lastError().text().toStdString(),
|
||||
this->pathToDB.toStdString());
|
||||
}
|
||||
|
||||
@@ -65,46 +65,36 @@ class TraceDB : public QObject
|
||||
|
||||
public:
|
||||
TraceDB(const QString& path, bool openExisting);
|
||||
const QString &getPathToDB() const
|
||||
{
|
||||
return pathToDB;
|
||||
}
|
||||
const QString& getPathToDB() const { return pathToDB; }
|
||||
|
||||
void updateComments(const std::vector<CommentModel::Comment> &comments);
|
||||
void updateFileDescription(const QString &description);
|
||||
void updateDependenciesInTimespan(const Timespan &span);
|
||||
void updateComments(const std::vector<CommentModel::Comment>& comments);
|
||||
void updateFileDescription(const QString& description);
|
||||
void updateDependenciesInTimespan(const Timespan& span);
|
||||
void refreshData();
|
||||
|
||||
const GeneralInfo &getGeneralInfo() const
|
||||
{
|
||||
return generalInfo;
|
||||
}
|
||||
const GeneralInfo& getGeneralInfo() const { return generalInfo; }
|
||||
|
||||
const CommandLengths &getCommandLengths() const
|
||||
{
|
||||
return commandLengths;
|
||||
}
|
||||
const CommandLengths& getCommandLengths() const { return commandLengths; }
|
||||
|
||||
std::vector<std::shared_ptr<Transaction>> getTransactionsWithCustomQuery(
|
||||
const QString& queryText);
|
||||
std::vector<std::shared_ptr<Transaction>> getTransactionsInTimespan(const Timespan &span,
|
||||
bool updateVisiblePhases = false);
|
||||
std::vector<std::shared_ptr<Transaction>>
|
||||
getTransactionsWithCustomQuery(const QString& queryText);
|
||||
std::vector<std::shared_ptr<Transaction>>
|
||||
getTransactionsInTimespan(const Timespan& span, bool updateVisiblePhases = false);
|
||||
std::shared_ptr<Transaction> getNextPrecharge(traceTime time);
|
||||
std::shared_ptr<Transaction> getNextActivate(traceTime time);
|
||||
std::shared_ptr<Transaction> getNextRefresh(traceTime time);
|
||||
std::shared_ptr<Transaction> getNextCommand(traceTime time);
|
||||
// std::shared_ptr<Transaction> getNextPreb(ID currentTransactionId);
|
||||
// std::shared_ptr<Transaction> getNextActb(ID currentTransactionId);
|
||||
// std::shared_ptr<Transaction> getNextRefb(ID currentTransactionId);
|
||||
|
||||
// std::shared_ptr<Transaction> getNextPreb(ID currentTransactionId);
|
||||
// std::shared_ptr<Transaction> getNextActb(ID currentTransactionId);
|
||||
// std::shared_ptr<Transaction> getNextRefb(ID currentTransactionId);
|
||||
|
||||
std::shared_ptr<Transaction> getTransactionByID(ID id);
|
||||
ID getTransactionIDFromPhaseID(ID phaseID);
|
||||
|
||||
std::vector<CommentModel::Comment> getComments();
|
||||
std::vector<CommentModel::Comment> getDebugMessagesInTimespan(const Timespan &span);
|
||||
std::vector<CommentModel::Comment> getDebugMessagesInTimespan(const Timespan &span,
|
||||
unsigned int limit);
|
||||
std::vector<CommentModel::Comment> getDebugMessagesInTimespan(const Timespan& span);
|
||||
std::vector<CommentModel::Comment> getDebugMessagesInTimespan(const Timespan& span,
|
||||
unsigned int limit);
|
||||
|
||||
bool checkDependencyTableExists();
|
||||
DependencyInfos getDependencyInfos(DependencyInfos::Type infoType);
|
||||
@@ -134,13 +124,14 @@ private:
|
||||
void prepareQueries();
|
||||
void executeQuery(QSqlQuery query);
|
||||
static QString queryToString(const QSqlQuery& query);
|
||||
std::shared_ptr<Transaction> parseTransactionFromQuery(QSqlQuery &query);
|
||||
std::vector<std::shared_ptr<Transaction>> parseTransactionsFromQuery(QSqlQuery &query,
|
||||
bool updateVisiblePhases = false);
|
||||
static std::vector<CommentModel::Comment> parseCommentsFromQuery(QSqlQuery &query);
|
||||
std::shared_ptr<Transaction> parseTransactionFromQuery(QSqlQuery& query);
|
||||
std::vector<std::shared_ptr<Transaction>>
|
||||
parseTransactionsFromQuery(QSqlQuery& query, bool updateVisiblePhases = false);
|
||||
static std::vector<CommentModel::Comment> parseCommentsFromQuery(QSqlQuery& query);
|
||||
|
||||
void mUpdateDependenciesFromQuery(QSqlQuery &query);
|
||||
static DependencyInfos parseDependencyInfos(QSqlQuery &query, const DependencyInfos::Type infoType);
|
||||
void mUpdateDependenciesFromQuery(QSqlQuery& query);
|
||||
static DependencyInfos parseDependencyInfos(QSqlQuery& query,
|
||||
const DependencyInfos::Type infoType);
|
||||
|
||||
void executeScriptFile(const QString& fileName);
|
||||
void dropAndCreateTables();
|
||||
@@ -152,27 +143,23 @@ private:
|
||||
CommandLengths getCommandLengthsFromDB();
|
||||
QVariant getParameterFromTable(const std::string& parameter, const std::string& table);
|
||||
|
||||
std::map<unsigned int, std::shared_ptr<Phase>> _visiblePhases; // Updated at parseTransactionsFromQuery
|
||||
std::map<unsigned int, std::shared_ptr<Phase>>
|
||||
_visiblePhases; // Updated at parseTransactionsFromQuery
|
||||
|
||||
// At businessObjects/phasedependenciestracker.h
|
||||
friend class PhaseDependenciesTracker;
|
||||
};
|
||||
|
||||
|
||||
|
||||
class sqlException : public std::exception
|
||||
{
|
||||
private:
|
||||
std::string message;
|
||||
|
||||
public:
|
||||
sqlException(std::string message, std::string filename)
|
||||
{
|
||||
this->message = std::string("Error in file ") + filename + std::string(" ") +
|
||||
message;
|
||||
}
|
||||
const char *what() const noexcept override
|
||||
{
|
||||
return message.c_str();
|
||||
this->message = std::string("Error in file ") + filename + std::string(" ") + message;
|
||||
}
|
||||
const char* what() const noexcept override { return message.c_str(); }
|
||||
};
|
||||
#endif // TRACEDB_H
|
||||
|
||||
@@ -38,29 +38,29 @@
|
||||
* Derek Christ
|
||||
*/
|
||||
|
||||
#include <QFileInfo>
|
||||
#include <QtAlgorithms>
|
||||
#include <QPainter>
|
||||
#include <QDebug>
|
||||
#include <stdio.h>
|
||||
#include <iostream>
|
||||
#include <QApplication>
|
||||
#include <QFile>
|
||||
#include <QTextStream>
|
||||
#include <QFileDialog>
|
||||
#include "evaluationtool.h"
|
||||
#include "ui_evaluationtool.h"
|
||||
#include <QApplication>
|
||||
#include <QDebug>
|
||||
#include <QFile>
|
||||
#include <QFileDialog>
|
||||
#include <QFileInfo>
|
||||
#include <QPainter>
|
||||
#include <QTextStream>
|
||||
#include <QtAlgorithms>
|
||||
#include <iostream>
|
||||
#include <stdio.h>
|
||||
|
||||
EvaluationTool::EvaluationTool(PythonCaller &pythonCaller, QWidget *parent) :
|
||||
EvaluationTool::EvaluationTool(PythonCaller& pythonCaller, QWidget* parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::EvaluationTool), pythonCaller(pythonCaller)
|
||||
ui(new Ui::EvaluationTool),
|
||||
pythonCaller(pythonCaller)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
traceFilesModel = new QStandardItemModel(this);
|
||||
ui->listView->setModel(traceFilesModel);
|
||||
selectMetrics = new SelectMetrics(this);
|
||||
QObject::connect(selectMetrics, SIGNAL(getSelectedMetrics()), this,
|
||||
SLOT(getSelectedMetrics()));
|
||||
QObject::connect(selectMetrics, SIGNAL(getSelectedMetrics()), this, SLOT(getSelectedMetrics()));
|
||||
}
|
||||
|
||||
EvaluationTool::~EvaluationTool()
|
||||
@@ -88,9 +88,11 @@ void EvaluationTool::showAndEvaluateMetrics(QList<QString> paths)
|
||||
std::vector<std::string> EvaluationTool::getMetrics()
|
||||
{
|
||||
std::vector<std::string> metrics;
|
||||
for (int row = 0; row < traceFilesModel->rowCount(); ++row) {
|
||||
TraceFileItem *item = static_cast<TraceFileItem *>(traceFilesModel->item(row));
|
||||
std::vector<std::string> result = PythonCaller::availableMetrics(item->getPath().toStdString());
|
||||
for (int row = 0; row < traceFilesModel->rowCount(); ++row)
|
||||
{
|
||||
TraceFileItem* item = static_cast<TraceFileItem*>(traceFilesModel->item(row));
|
||||
std::vector<std::string> result =
|
||||
PythonCaller::availableMetrics(item->getPath().toStdString());
|
||||
if (result.size() > metrics.size()) // TODO use std::set
|
||||
metrics = result;
|
||||
}
|
||||
@@ -106,11 +108,12 @@ void EvaluationTool::cleanUpUI()
|
||||
|
||||
void EvaluationTool::fillFileList(QList<QString> paths)
|
||||
{
|
||||
std::sort(paths.begin(), paths.end(), [] (const QString & path1,
|
||||
const QString & path2) {
|
||||
return QFileInfo(path1).baseName() < QFileInfo(path2).baseName();
|
||||
});
|
||||
for (const QString &path : paths) {
|
||||
std::sort(paths.begin(),
|
||||
paths.end(),
|
||||
[](const QString& path1, const QString& path2)
|
||||
{ return QFileInfo(path1).baseName() < QFileInfo(path2).baseName(); });
|
||||
for (const QString& path : paths)
|
||||
{
|
||||
traceFilesModel->appendRow(new TraceFileItem(path));
|
||||
}
|
||||
}
|
||||
@@ -125,7 +128,8 @@ void EvaluationTool::on_btn_calculateMetrics_clicked()
|
||||
void EvaluationTool::getSelectedMetrics()
|
||||
{
|
||||
std::vector<long> selectedMetrics;
|
||||
for (QCheckBox *metric : selectMetrics->metrics) {
|
||||
for (QCheckBox* metric : selectMetrics->metrics)
|
||||
{
|
||||
selectedMetrics.push_back(metric->isChecked());
|
||||
}
|
||||
calculateMetrics(selectedMetrics);
|
||||
@@ -134,11 +138,13 @@ void EvaluationTool::getSelectedMetrics()
|
||||
void EvaluationTool::calculateMetrics(std::vector<long> selectedMetrics)
|
||||
{
|
||||
ui->traceMetricTreeWidget->clear();
|
||||
for (int row = 0; row < traceFilesModel->rowCount(); ++row) {
|
||||
TraceFileItem *item = static_cast<TraceFileItem *>(traceFilesModel->item(row));
|
||||
for (int row = 0; row < traceFilesModel->rowCount(); ++row)
|
||||
{
|
||||
TraceFileItem* item = static_cast<TraceFileItem*>(traceFilesModel->item(row));
|
||||
if (item->checkState() == Qt::Checked)
|
||||
{
|
||||
TraceCalculatedMetrics result = pythonCaller.evaluateMetrics(item->getPath().toStdString(), selectedMetrics);
|
||||
TraceCalculatedMetrics result =
|
||||
pythonCaller.evaluateMetrics(item->getPath().toStdString(), selectedMetrics);
|
||||
calculatedMetrics.push_back(result);
|
||||
ui->traceMetricTreeWidget->addTraceMetricResults(result);
|
||||
}
|
||||
@@ -146,7 +152,7 @@ void EvaluationTool::calculateMetrics(std::vector<long> selectedMetrics)
|
||||
ui->traceMetricTreeWidget->expandAll();
|
||||
}
|
||||
|
||||
EvaluationTool::TraceFileItem::TraceFileItem(const QString &path)
|
||||
EvaluationTool::TraceFileItem::TraceFileItem(const QString& path)
|
||||
{
|
||||
this->path = path;
|
||||
setText(QFileInfo(this->path).baseName());
|
||||
@@ -157,15 +163,18 @@ EvaluationTool::TraceFileItem::TraceFileItem(const QString &path)
|
||||
|
||||
void EvaluationTool::on_btn_exportCSV_clicked()
|
||||
{
|
||||
if (calculatedMetrics.size() > 0) {
|
||||
QString filename = QFileDialog::getSaveFileName(this, "Export to CSV", "",
|
||||
"Comma separated Values(*.csv)");
|
||||
if (filename != "") {
|
||||
if (calculatedMetrics.size() > 0)
|
||||
{
|
||||
QString filename = QFileDialog::getSaveFileName(
|
||||
this, "Export to CSV", "", "Comma separated Values(*.csv)");
|
||||
if (filename != "")
|
||||
{
|
||||
QFile file(filename);
|
||||
file.open(QIODevice::WriteOnly | QIODevice::Text);
|
||||
QTextStream out(&file);
|
||||
out << calculatedMetrics[0].toCSVHeader() << "\n";
|
||||
for (TraceCalculatedMetrics &metrics : calculatedMetrics) {
|
||||
for (TraceCalculatedMetrics& metrics : calculatedMetrics)
|
||||
{
|
||||
out << metrics.toCSVLine() << "\n";
|
||||
}
|
||||
file.close();
|
||||
@@ -187,7 +196,7 @@ void EvaluationTool::genPlots()
|
||||
|
||||
for (int row = 0; row < traceFilesModel->rowCount(); ++row)
|
||||
{
|
||||
TraceFileItem *item = static_cast<TraceFileItem *>(traceFilesModel->item(row));
|
||||
TraceFileItem* item = static_cast<TraceFileItem*>(traceFilesModel->item(row));
|
||||
if (item->checkState() == Qt::Checked)
|
||||
{
|
||||
ui->traceMetricTreeWidget->addTracePlotResults(
|
||||
|
||||
@@ -43,16 +43,17 @@
|
||||
|
||||
#include "selectmetrics.h"
|
||||
|
||||
#include <QWidget>
|
||||
#include <QStandardItem>
|
||||
#include <QStandardItemModel>
|
||||
#include <QList>
|
||||
#include <QString>
|
||||
#include <vector>
|
||||
#include "businessObjects/pythoncaller.h"
|
||||
#include "businessObjects/tracecalculatedmetrics.h"
|
||||
#include <QList>
|
||||
#include <QStandardItem>
|
||||
#include <QStandardItemModel>
|
||||
#include <QString>
|
||||
#include <QWidget>
|
||||
#include <vector>
|
||||
|
||||
namespace Ui {
|
||||
namespace Ui
|
||||
{
|
||||
class EvaluationTool;
|
||||
}
|
||||
|
||||
@@ -61,7 +62,7 @@ class EvaluationTool : public QWidget
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit EvaluationTool(PythonCaller &pythonCaller, QWidget *parent = nullptr);
|
||||
explicit EvaluationTool(PythonCaller& pythonCaller, QWidget* parent = nullptr);
|
||||
~EvaluationTool();
|
||||
|
||||
void showForFiles(QList<QString> paths);
|
||||
@@ -80,27 +81,22 @@ private:
|
||||
void calculateMetrics(std::vector<long> selectedMetrics);
|
||||
std::vector<std::string> getMetrics();
|
||||
|
||||
|
||||
Ui::EvaluationTool *ui;
|
||||
QStandardItemModel *traceFilesModel;
|
||||
Ui::EvaluationTool* ui;
|
||||
QStandardItemModel* traceFilesModel;
|
||||
std::vector<TraceCalculatedMetrics> calculatedMetrics;
|
||||
SelectMetrics *selectMetrics;
|
||||
SelectMetrics* selectMetrics;
|
||||
|
||||
PythonCaller &pythonCaller;
|
||||
PythonCaller& pythonCaller;
|
||||
|
||||
class TraceFileItem : public QStandardItem
|
||||
{
|
||||
public:
|
||||
TraceFileItem(const QString &path);
|
||||
QString getPath()
|
||||
{
|
||||
return path;
|
||||
}
|
||||
TraceFileItem(const QString& path);
|
||||
QString getPath() { return path; }
|
||||
|
||||
private:
|
||||
QString path;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
#endif // EVALUATIONTOOL_H
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
#include "ui_gototimedialog.h"
|
||||
#include <QMessageBox>
|
||||
|
||||
GoToTimeDialog::GoToTimeDialog(double *goToSecond, QWidget *parent) :
|
||||
GoToTimeDialog::GoToTimeDialog(double* goToSecond, QWidget* parent) :
|
||||
QDialog(parent),
|
||||
goToSecond(goToSecond),
|
||||
ui(new Ui::GoToTimeDialog)
|
||||
@@ -59,8 +59,8 @@ void GoToTimeDialog::on_pushButton_clicked()
|
||||
*goToSecond = c.toDouble(ui->timeEdit->text(), &validNumber);
|
||||
if (validNumber)
|
||||
accept();
|
||||
else {
|
||||
QMessageBox::warning(this, "Invalid number",
|
||||
"Please enter a valid floating point number");
|
||||
else
|
||||
{
|
||||
QMessageBox::warning(this, "Invalid number", "Please enter a valid floating point number");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,9 +39,8 @@
|
||||
#define GOTOTIMEDIALOG_H
|
||||
#include <QDialog>
|
||||
|
||||
|
||||
|
||||
namespace Ui {
|
||||
namespace Ui
|
||||
{
|
||||
class GoToTimeDialog;
|
||||
}
|
||||
|
||||
@@ -50,18 +49,17 @@ class GoToTimeDialog : public QDialog
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit GoToTimeDialog(double *goToSecond, QWidget *parent = 0);
|
||||
explicit GoToTimeDialog(double* goToSecond, QWidget* parent = 0);
|
||||
~GoToTimeDialog();
|
||||
|
||||
|
||||
private:
|
||||
double *goToSecond;
|
||||
double* goToSecond;
|
||||
|
||||
private Q_SLOTS:
|
||||
void on_pushButton_clicked();
|
||||
|
||||
private:
|
||||
Ui::GoToTimeDialog *ui;
|
||||
Ui::GoToTimeDialog* ui;
|
||||
};
|
||||
|
||||
#endif // GOTOTIMEDIALOG_H
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
#include <iostream>
|
||||
#include <pybind11/embed.h>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
std::cout << argv[0] << std::endl;
|
||||
QApplication a(argc, argv);
|
||||
@@ -66,28 +66,33 @@ int main(int argc, char *argv[])
|
||||
pybind11::list path = sys.attr("path");
|
||||
path.append(modulesDir.c_str());
|
||||
|
||||
if (argc > 1) {
|
||||
if (argc > 1)
|
||||
{
|
||||
QSet<QString> arguments;
|
||||
for (int i = 1; i < argc; ++i)
|
||||
arguments.insert(QString(argv[i]));
|
||||
|
||||
StartupOption startupOption = StartupOption::showPlots;
|
||||
QString testflag("-t");
|
||||
if (arguments.contains(testflag)) {
|
||||
if (arguments.contains(testflag))
|
||||
{
|
||||
startupOption = StartupOption::runTests;
|
||||
arguments.remove(testflag);
|
||||
}
|
||||
|
||||
QString openFolderFlag("-f");
|
||||
if (arguments.contains(openFolderFlag)) {
|
||||
if (arguments.contains(openFolderFlag))
|
||||
{
|
||||
arguments.remove(openFolderFlag);
|
||||
QStringList nameFilter("*.tdb");
|
||||
QSet<QString> paths = arguments;
|
||||
arguments.clear();
|
||||
for (QString path : paths) {
|
||||
for (QString path : paths)
|
||||
{
|
||||
QDir directory(path);
|
||||
QStringList files = directory.entryList(nameFilter);
|
||||
for (QString &file : files) {
|
||||
for (QString& file : files)
|
||||
{
|
||||
arguments.insert(path.append("/") + file);
|
||||
}
|
||||
}
|
||||
@@ -96,12 +101,11 @@ int main(int argc, char *argv[])
|
||||
TraceAnalyzer analyzer(arguments, startupOption);
|
||||
analyzer.show();
|
||||
return a.exec();
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
TraceAnalyzer analyzer;
|
||||
analyzer.show();
|
||||
return a.exec();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -52,12 +52,17 @@ private:
|
||||
QColor color;
|
||||
|
||||
public:
|
||||
MarkerPlotItem(traceTime time, int width = 4,
|
||||
QColor color = QColor(Qt::black)): time(time), width(width), color(color) {}
|
||||
MarkerPlotItem(traceTime time, int width = 4, QColor color = QColor(Qt::black)) :
|
||||
time(time),
|
||||
width(width),
|
||||
color(color)
|
||||
{
|
||||
}
|
||||
virtual int rtti() const;
|
||||
virtual void draw(QPainter *painter, const QwtScaleMap &xMap,
|
||||
const QwtScaleMap &yMap, const QRectF &canvasRect) const;
|
||||
|
||||
virtual void draw(QPainter* painter,
|
||||
const QwtScaleMap& xMap,
|
||||
const QwtScaleMap& yMap,
|
||||
const QRectF& canvasRect) const;
|
||||
};
|
||||
|
||||
#endif // MARKERPLOTITEM_H
|
||||
|
||||
@@ -39,18 +39,16 @@
|
||||
#include <QGuiApplication>
|
||||
#include <qtooltip.h>
|
||||
|
||||
using namespace std;
|
||||
using namespace std;
|
||||
|
||||
void DebugMessageTreeWidget::init(TraceNavigator *navigator,
|
||||
TracePlot *traceplot)
|
||||
void DebugMessageTreeWidget::init(TraceNavigator* navigator, TracePlot* traceplot)
|
||||
{
|
||||
Q_ASSERT(isInitialized == false);
|
||||
isInitialized = true;
|
||||
arrangeUiSettings();
|
||||
connect(navigator, SIGNAL(currentTraceTimeChanged()), this,
|
||||
SLOT(currentTraceTimeChanged()));
|
||||
connect(navigator, SIGNAL(selectedTransactionsChanged()), this,
|
||||
SLOT(selectedTransactionChanged()));
|
||||
connect(navigator, SIGNAL(currentTraceTimeChanged()), this, SLOT(currentTraceTimeChanged()));
|
||||
connect(
|
||||
navigator, SIGNAL(selectedTransactionsChanged()), this, SLOT(selectedTransactionChanged()));
|
||||
this->traceplot = traceplot;
|
||||
this->navigator = navigator;
|
||||
currentTraceTimeChanged();
|
||||
@@ -67,35 +65,42 @@ void DebugMessageTreeWidget::arrangeUiSettings()
|
||||
|
||||
void DebugMessageTreeWidget::selectedTransactionChanged()
|
||||
{
|
||||
if (navigator->hasSelectedTransactions()) {
|
||||
if (navigator->hasSelectedTransactions())
|
||||
{
|
||||
Timespan span = navigator->getSpanCoveredBySelectedTransaction();
|
||||
showDebugMessages(navigator->TraceFile().getDebugMessagesInTimespan(span));
|
||||
} else {
|
||||
showDebugMessages(navigator->TraceFile().getDebugMessagesInTimespan(
|
||||
traceplot->GetCurrentTimespan()));
|
||||
}
|
||||
else
|
||||
{
|
||||
showDebugMessages(
|
||||
navigator->TraceFile().getDebugMessagesInTimespan(traceplot->GetCurrentTimespan()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void DebugMessageTreeWidget::currentTraceTimeChanged()
|
||||
{
|
||||
if (!navigator->hasSelectedTransactions())
|
||||
showDebugMessages(navigator->TraceFile().getDebugMessagesInTimespan(
|
||||
traceplot->GetCurrentTimespan()));
|
||||
showDebugMessages(
|
||||
navigator->TraceFile().getDebugMessagesInTimespan(traceplot->GetCurrentTimespan()));
|
||||
}
|
||||
|
||||
void DebugMessageTreeWidget::showDebugMessages(const vector<CommentModel::Comment> &comments)
|
||||
void DebugMessageTreeWidget::showDebugMessages(const vector<CommentModel::Comment>& comments)
|
||||
{
|
||||
clear();
|
||||
if (comments.empty())
|
||||
return;
|
||||
|
||||
traceTime currentTime = -1;
|
||||
for (const auto &comment : comments) {
|
||||
if (currentTime != comment.time) {
|
||||
addTopLevelItem(new QTreeWidgetItem({prettyFormatTime(comment.time), formatDebugMessage(comment.text)}));
|
||||
for (const auto& comment : comments)
|
||||
{
|
||||
if (currentTime != comment.time)
|
||||
{
|
||||
addTopLevelItem(new QTreeWidgetItem(
|
||||
{prettyFormatTime(comment.time), formatDebugMessage(comment.text)}));
|
||||
currentTime = comment.time;
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
addTopLevelItem(new QTreeWidgetItem({"", formatDebugMessage(comment.text)}));
|
||||
}
|
||||
}
|
||||
@@ -104,7 +109,7 @@ void DebugMessageTreeWidget::showDebugMessages(const vector<CommentModel::Commen
|
||||
this->scrollToTop();
|
||||
}
|
||||
|
||||
QString DebugMessageTreeWidget::formatDebugMessage(const QString &message)
|
||||
QString DebugMessageTreeWidget::formatDebugMessage(const QString& message)
|
||||
{
|
||||
QString formattedMessage = message;
|
||||
formattedMessage.replace(hexAdressMatcher, "");
|
||||
@@ -113,12 +118,11 @@ QString DebugMessageTreeWidget::formatDebugMessage(const QString &message)
|
||||
return formattedMessage;
|
||||
}
|
||||
|
||||
void DebugMessageTreeWidget::mousePressEvent(QMouseEvent *event)
|
||||
void DebugMessageTreeWidget::mousePressEvent(QMouseEvent* event)
|
||||
{
|
||||
QTreeWidgetItem *itemUnderCursor = itemAt(event->pos());
|
||||
if (itemUnderCursor != NULL) {
|
||||
QTreeWidgetItem* itemUnderCursor = itemAt(event->pos());
|
||||
if (itemUnderCursor != NULL)
|
||||
{
|
||||
QToolTip::showText(this->mapToGlobal(event->pos()), itemUnderCursor->text(1));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -37,26 +37,30 @@
|
||||
|
||||
#ifndef DEBUGMESSAGELISTWIDGET_H
|
||||
#define DEBUGMESSAGELISTWIDGET_H
|
||||
#include <QTreeWidget>
|
||||
#include <vector>
|
||||
#include <QString>
|
||||
#include <QRegularExpression>
|
||||
#include <QMouseEvent>
|
||||
#include "businessObjects/commentmodel.h"
|
||||
#include "tracenavigator.h"
|
||||
#include "traceplot.h"
|
||||
#include <QMouseEvent>
|
||||
#include <QRegularExpression>
|
||||
#include <QString>
|
||||
#include <QTreeWidget>
|
||||
#include <vector>
|
||||
|
||||
class DebugMessageTreeWidget : public QTreeWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
DebugMessageTreeWidget(QWidget *parent = 0) : QTreeWidget(parent),
|
||||
isInitialized(false), timeAnnotationMatcher(QString("@[0-9]+ n?s")),
|
||||
hexAdressMatcher(QString("0x[0-9,a-f]+")) {}
|
||||
void init(TraceNavigator *navigator, TracePlot *traceplot);
|
||||
DebugMessageTreeWidget(QWidget* parent = 0) :
|
||||
QTreeWidget(parent),
|
||||
isInitialized(false),
|
||||
timeAnnotationMatcher(QString("@[0-9]+ n?s")),
|
||||
hexAdressMatcher(QString("0x[0-9,a-f]+"))
|
||||
{
|
||||
}
|
||||
void init(TraceNavigator* navigator, TracePlot* traceplot);
|
||||
|
||||
void showDebugMessages(const std::vector<CommentModel::Comment> &comments);
|
||||
void showDebugMessages(const std::vector<CommentModel::Comment>& comments);
|
||||
void arrangeUiSettings();
|
||||
|
||||
public Q_SLOTS:
|
||||
@@ -65,12 +69,12 @@ public Q_SLOTS:
|
||||
|
||||
private:
|
||||
bool isInitialized;
|
||||
TracePlot *traceplot;
|
||||
TraceNavigator *navigator;
|
||||
TracePlot* traceplot;
|
||||
TraceNavigator* navigator;
|
||||
QRegularExpression timeAnnotationMatcher;
|
||||
QRegularExpression hexAdressMatcher;
|
||||
QString formatDebugMessage(const QString &message);
|
||||
void mousePressEvent(QMouseEvent *event);
|
||||
QString formatDebugMessage(const QString& message);
|
||||
void mousePressEvent(QMouseEvent* event);
|
||||
};
|
||||
|
||||
#endif // DEBUGMESSAGELISTWIDGET_H
|
||||
|
||||
@@ -37,12 +37,11 @@
|
||||
|
||||
#include "selectedtransactiontreewidget.h"
|
||||
|
||||
|
||||
|
||||
void SelectedTransactionTreeWidget::selectedTransactionsChanged()
|
||||
{
|
||||
this->clear();
|
||||
for (const auto &transaction : navigator->SelectedTransactions()) {
|
||||
for (const auto& transaction : navigator->SelectedTransactions())
|
||||
{
|
||||
AppendTransaction(transaction);
|
||||
}
|
||||
expandAll();
|
||||
@@ -65,9 +64,11 @@ void SelectedTransactionTreeWidget::selectedTransactionsChanged()
|
||||
resizeColumnToContents(0);
|
||||
}
|
||||
|
||||
void SelectedTransactionTreeWidget::init(TraceNavigator *navigator)
|
||||
void SelectedTransactionTreeWidget::init(TraceNavigator* navigator)
|
||||
{
|
||||
TransactionTreeWidget::init(navigator);
|
||||
QObject::connect(navigator, SIGNAL(selectedTransactionsChanged()), this,
|
||||
QObject::connect(navigator,
|
||||
SIGNAL(selectedTransactionsChanged()),
|
||||
this,
|
||||
SLOT(selectedTransactionsChanged()));
|
||||
}
|
||||
|
||||
@@ -44,14 +44,17 @@ class SelectedTransactionTreeWidget : public TransactionTreeWidget
|
||||
Q_OBJECT
|
||||
|
||||
bool isInitialized;
|
||||
|
||||
public:
|
||||
SelectedTransactionTreeWidget(QWidget *parent = 0) : TransactionTreeWidget(
|
||||
parent), isInitialized(false) {}
|
||||
virtual void init(TraceNavigator *navigator);
|
||||
SelectedTransactionTreeWidget(QWidget* parent = 0) :
|
||||
TransactionTreeWidget(parent),
|
||||
isInitialized(false)
|
||||
{
|
||||
}
|
||||
virtual void init(TraceNavigator* navigator);
|
||||
|
||||
public Q_SLOTS:
|
||||
void selectedTransactionsChanged();
|
||||
|
||||
};
|
||||
|
||||
#endif // SELECTEDTRANSACTIONTREEWIDGET_H
|
||||
|
||||
@@ -44,18 +44,23 @@ void TracePlotMouseLabel::setMode(MouseLabelMode mode)
|
||||
this->mode = mode;
|
||||
}
|
||||
|
||||
QwtText TracePlotMouseLabel::trackerText(const QPoint &point) const
|
||||
QwtText TracePlotMouseLabel::trackerText(const QPoint& point) const
|
||||
{
|
||||
if (mode == MouseLabelMode::AbsoluteTime) {
|
||||
traceTime mouseTime = static_cast<traceTime>(traceplot->invTransform(
|
||||
traceplot->xBottom, point.x()));
|
||||
return QwtText(prettyFormatTime(alignToClk(mouseTime,
|
||||
clkPeriod)) + "(" + formatInClks(mouseTime, clkPeriod) + ")");
|
||||
} else if (mode == MouseLabelMode::Timedifference) {
|
||||
if (mode == MouseLabelMode::AbsoluteTime)
|
||||
{
|
||||
traceTime mouseTime =
|
||||
static_cast<traceTime>(traceplot->invTransform(traceplot->xBottom, point.x()));
|
||||
return QwtText(prettyFormatTime(alignToClk(mouseTime, clkPeriod)) + "(" +
|
||||
formatInClks(mouseTime, clkPeriod) + ")");
|
||||
}
|
||||
else if (mode == MouseLabelMode::Timedifference)
|
||||
{
|
||||
traceTime mouseTime = timeDifferenceSpan.timeCovered();
|
||||
return QwtText(prettyFormatTime(alignToClk(mouseTime,
|
||||
clkPeriod)) + "(" + formatInClks(mouseTime, clkPeriod) + ")");
|
||||
} else {
|
||||
return QwtText(prettyFormatTime(alignToClk(mouseTime, clkPeriod)) + "(" +
|
||||
formatInClks(mouseTime, clkPeriod) + ")");
|
||||
}
|
||||
else
|
||||
{
|
||||
Q_ASSERT(false);
|
||||
}
|
||||
return QwtText(QString(""));
|
||||
|
||||
@@ -38,30 +38,43 @@
|
||||
#ifndef TRACEPLOTPICKER_H
|
||||
#define TRACEPLOTPICKER_H
|
||||
|
||||
#include <qwt_plot_picker.h>
|
||||
#include "traceplot.h"
|
||||
#include <qwt_plot_picker.h>
|
||||
|
||||
enum class MouseLabelMode {AbsoluteTime, Timedifference};
|
||||
enum class MouseLabelMode
|
||||
{
|
||||
AbsoluteTime,
|
||||
Timedifference
|
||||
};
|
||||
|
||||
class TracePlotMouseLabel : public QwtPlotPicker
|
||||
{
|
||||
public:
|
||||
TracePlotMouseLabel(TracePlot *traceplot, unsigned int clkPeriod,
|
||||
Timespan &timeDifferenceSpan):
|
||||
QwtPlotPicker(QwtPlot::xBottom, QwtPlot::yLeft, QwtPlotPicker::VLineRubberBand,
|
||||
QwtPicker::AlwaysOn, traceplot->canvas()),
|
||||
mode(MouseLabelMode::AbsoluteTime), traceplot(traceplot), clkPeriod(clkPeriod),
|
||||
timeDifferenceSpan(timeDifferenceSpan) {}
|
||||
TracePlotMouseLabel(TracePlot* traceplot,
|
||||
unsigned int clkPeriod,
|
||||
Timespan& timeDifferenceSpan) :
|
||||
QwtPlotPicker(QwtPlot::xBottom,
|
||||
QwtPlot::yLeft,
|
||||
QwtPlotPicker::VLineRubberBand,
|
||||
QwtPicker::AlwaysOn,
|
||||
traceplot->canvas()),
|
||||
mode(MouseLabelMode::AbsoluteTime),
|
||||
traceplot(traceplot),
|
||||
clkPeriod(clkPeriod),
|
||||
timeDifferenceSpan(timeDifferenceSpan)
|
||||
{
|
||||
}
|
||||
|
||||
void setMode(MouseLabelMode mode);
|
||||
|
||||
protected:
|
||||
virtual QwtText trackerText(const QPoint &point) const;
|
||||
virtual QwtText trackerText(const QPoint& point) const;
|
||||
|
||||
private:
|
||||
MouseLabelMode mode;
|
||||
TracePlot *traceplot;
|
||||
TracePlot* traceplot;
|
||||
unsigned int clkPeriod;
|
||||
Timespan &timeDifferenceSpan;
|
||||
Timespan& timeDifferenceSpan;
|
||||
};
|
||||
|
||||
#endif // TRACEPLOTPICKER_H
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
#include "tracedrawing.h"
|
||||
|
||||
void drawVerticalLine(QPainter *painter, int xPos, const QRectF &canvasRect)
|
||||
void drawVerticalLine(QPainter* painter, int xPos, const QRectF& canvasRect)
|
||||
{
|
||||
/* P1 (xPos,lowerCanvasYBorder)
|
||||
* |
|
||||
@@ -47,14 +47,12 @@ void drawVerticalLine(QPainter *painter, int xPos, const QRectF &canvasRect)
|
||||
* P2 (xPos,upperCanvasYBorder)
|
||||
*/
|
||||
|
||||
|
||||
|
||||
QPoint P1(xPos, static_cast<int>(canvasRect.top()));
|
||||
QPoint P2(xPos, static_cast<int>(canvasRect.bottom()));
|
||||
painter->drawLine(QLine(P1, P2));
|
||||
}
|
||||
|
||||
void drawDoubleArrow(QPainter *painter, int xFrom, int xTo, int y)
|
||||
void drawDoubleArrow(QPainter* painter, int xFrom, int xTo, int y)
|
||||
{
|
||||
|
||||
/* P1 P3
|
||||
@@ -78,57 +76,53 @@ void drawDoubleArrow(QPainter *painter, int xFrom, int xTo, int y)
|
||||
painter->drawLine(P2, from);
|
||||
painter->drawLine(P3, to);
|
||||
painter->drawLine(P4, to);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
void drawDoubleArrow(QPainter *painter, int xFrom, int xTo, int y,
|
||||
const QString &text, const QColor &textColor)
|
||||
void drawDoubleArrow(
|
||||
QPainter* painter, int xFrom, int xTo, int y, const QString& text, const QColor& textColor)
|
||||
{
|
||||
drawDoubleArrow(painter, xFrom, xTo, y);
|
||||
drawText(painter, text, QPoint((xTo + xFrom) / 2, y),
|
||||
TextPositioning::topCenter, textColor);
|
||||
drawText(painter, text, QPoint((xTo + xFrom) / 2, y), TextPositioning::topCenter, textColor);
|
||||
}
|
||||
|
||||
void drawHexagon(QPainter *painter, const QPoint &from, const QPoint &to,
|
||||
double height)
|
||||
void drawHexagon(QPainter* painter, const QPoint& from, const QPoint& to, double height)
|
||||
{
|
||||
// {text}
|
||||
// P1------------------------P2
|
||||
// From / \ To
|
||||
// \ /
|
||||
// P4-------------------------P3
|
||||
// {text}
|
||||
// P1------------------------P2
|
||||
// From / \ To
|
||||
// \ /
|
||||
// P4-------------------------P3
|
||||
|
||||
int offset = 10;
|
||||
if ( (to.x() - from.x()) <= 20) {
|
||||
if ((to.x() - from.x()) <= 20)
|
||||
{
|
||||
offset = 5;
|
||||
}
|
||||
if ( (to.x() - from.x()) <= 10) {
|
||||
if ((to.x() - from.x()) <= 10)
|
||||
{
|
||||
offset = 2;
|
||||
}
|
||||
if ( (to.x() - from.x()) <= 4) {
|
||||
if ((to.x() - from.x()) <= 4)
|
||||
{
|
||||
offset = 0;
|
||||
}
|
||||
|
||||
QPointF P1(from.x() + offset , from.y() - height / 2);
|
||||
QPointF P2(to.x() - offset , to.y() - height / 2);
|
||||
QPointF P3(to.x() - offset , to.y() + height / 2);
|
||||
QPointF P4(from.x() + offset , from.y() + height / 2);
|
||||
QPointF P1(from.x() + offset, from.y() - height / 2);
|
||||
QPointF P2(to.x() - offset, to.y() - height / 2);
|
||||
QPointF P3(to.x() - offset, to.y() + height / 2);
|
||||
QPointF P4(from.x() + offset, from.y() + height / 2);
|
||||
|
||||
QPolygonF polygon;
|
||||
polygon << from
|
||||
<< P1
|
||||
<< P2
|
||||
<< to
|
||||
<< P3
|
||||
<< P4;
|
||||
polygon << from << P1 << P2 << to << P3 << P4;
|
||||
|
||||
painter->drawPolygon(polygon);
|
||||
}
|
||||
|
||||
void drawText(QPainter *painter, const QString &text, const QPoint &position,
|
||||
const TextPositioning &positioning, const QColor &textColor)
|
||||
void drawText(QPainter* painter,
|
||||
const QString& text,
|
||||
const QPoint& position,
|
||||
const TextPositioning& positioning,
|
||||
const QColor& textColor)
|
||||
{
|
||||
//*--------------*
|
||||
//| | |
|
||||
@@ -143,7 +137,8 @@ void drawText(QPainter *painter, const QString &text, const QPoint &position,
|
||||
QRect rect(position - offset, position + offset);
|
||||
|
||||
int flags;
|
||||
switch (positioning) {
|
||||
switch (positioning)
|
||||
{
|
||||
case TextPositioning::topRight:
|
||||
flags = Qt::AlignRight | Qt::AlignTop;
|
||||
break;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user