Show cycle count changes in ProcessorTab
MODIFY
src/processortab.cpp
src/processortab.cpp
@@ -33,6 +33,7 @@ ProcessorTab::ProcessorTab(QToolBar* toolbar, QWidget* parent) : RipesTab(toolba
updateInstructionModel();
m_ui->registerWidget->updateModel();
connect(this, &ProcessorTab::update, m_ui->registerWidget, &RegisterWidget::updateView);
+ connect(this, &ProcessorTab::update, this, &ProcessorTab::updateStatistics);
setupSimulatorActions();
@@ -142,6 +143,12 @@ void ProcessorTab::setupSimulatorActions() {
m_toolbar->addAction(m_pipelineTableAction);
}
+void ProcessorTab::updateStatistics() {
+ m_ui->cycleCount->setText(QString::number(ProcessorHandler::get()->getProcessor()->getCycleCount()));
+ m_ui->instructionsRetired->setText(
+ QString::number(ProcessorHandler::get()->getProcessor()->getInstructionsRetired()));
+}
+
void ProcessorTab::pause() {
m_autoClockAction->setChecked(false);
m_runAction->setChecked(false);

MODIFY
src/processortab.h
src/processortab.h
@@ -45,6 +45,7 @@ public slots:
void printToLog(const QString&);
void processorFinished();
void runFinished();
+ void updateStatistics();
void processorSelection();

MODIFY
src/processortab.ui
src/processortab.ui
<item>
<widget class="QLabel" name="nInstrExecutedLabel">
<property name="text">
- <string># instructions executed:</string>
+ <string># instructions retired:</string>
</property>
</widget>
</item>
<item>
- <widget class="QLineEdit" name="nInstrExecuted">
+ <widget class="QLineEdit" name="instructionsRetired">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>

Show cycle count changes in ProcessorTab