Numerous enhancements

Fixed a crash in TA
Renamed Ranks to PC in pseudo-channel mode
Make diagrams red for better readability
This commit is contained in:
2022-05-10 09:17:26 +02:00
parent 5fcafe9862
commit 9590642c03
3 changed files with 13 additions and 14 deletions

View File

@@ -356,14 +356,16 @@ QString AbstractTracePlotLineModel::getLabel(LineType type)
}
}
QString AbstractTracePlotLineModel::getLabel(unsigned int rank)
QString AbstractTracePlotLineModel::getLabel(unsigned int rank) const
{
return "RA" + QString::number(rank);
std::string_view rankLabel = dataBusType == DataBusType::LegacyMode ? "RA" : "PC";
return rankLabel.data() + QString::number(rank);
}
QString AbstractTracePlotLineModel::getLabel(unsigned int rank, unsigned int group, unsigned int bank)
QString AbstractTracePlotLineModel::getLabel(unsigned int rank, unsigned int group, unsigned int bank) const
{
return "RA" + QString::number(rank) + " BG" + QString::number(group) + " BA" + QString::number(bank);
std::string_view rankLabel = dataBusType == DataBusType::LegacyMode ? "RA" : "PC";
return rankLabel.data() + QString::number(rank) + " BG" + QString::number(group) + " BA" + QString::number(bank);
}
AbstractTracePlotLineModel::CommandBusType AbstractTracePlotLineModel::getCommandBusType(const GeneralInfo &generalInfo)

View File

@@ -174,8 +174,8 @@ protected:
std::shared_ptr<Node> createRankGroupNode(unsigned int rank) const;
static QString getLabel(LineType type);
static QString getLabel(unsigned int rank);
static QString getLabel(unsigned int rank, unsigned int group, unsigned int bank);
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);

View File

@@ -86,14 +86,6 @@ TraceFileTab::TraceFileTab(QWidget *parent, const QString &path)
std::cout << "Opening new tab for \"" << path.toStdString() << "\"" <<
std::endl;
initNavigatorAndItsDependentWidgets(path);
setUpFileWatcher(path);
setUpTraceplotScrollbar();
setUpTraceSelector();
setUpCommentView();
setUpPossiblePhases();
ui->mcConfigView->setModel(mcConfigModel);
ui->mcConfigView->horizontalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents);
@@ -109,6 +101,8 @@ TraceFileTab::TraceFileTab(QWidget *parent, const QString &path)
setUpTraceplotScrollbar();
setUpCommentView();
setUpPossiblePhases();
tracefileChanged();
}
@@ -491,6 +485,7 @@ void TraceFileTab::on_startPowerAnalysis_clicked()
data->setSamples(*samples);
cur->setData(data);
cur->attach(ui->powerPlot);
cur->setPen(QPen(QColor(255,0,0)));
QwtPlotMagnifier *mag1 = new QwtPlotMagnifier(ui->powerPlot->canvas());
mag1->setAxisEnabled(QwtPlot::xBottom, true);
@@ -519,6 +514,7 @@ void TraceFileTab::on_startPowerAnalysis_clicked()
data2->setSamples(*samples2);
cur2->setData(data2);
cur2->attach(ui->bandwidthPlot);
cur2->setPen(QPen(QColor(255,0,0)));
ui->bandwidthPlot->setAxisTitle(0,"Bandwidth [%]");
ui->bandwidthPlot->setAxisScale(0,0.0,100.0);
@@ -563,6 +559,7 @@ void TraceFileTab::on_startPowerAnalysis_clicked()
data3->setSamples(*samples3);
cur3->setData(data3);
cur3->attach(ui->bufferPlot);
cur3->setPen(QPen(QColor(255,0,0)));
ui->bufferPlot->setAxisTitle(0,"Buffer Utilization");
ui->bufferPlot->setAxisScale(0,0.0, maxBufferDepth);