Periodically update processor statistics whilst running
MODIFY
external/VSRTL
external/VSRTL
-Subproject commit 43a245602fe8b022b51b8a771a6c50b4ead6a20f
+Subproject commit 4f09918df10ba4dcb66faf6bf60faefb542b7558

MODIFY
src/processortab.cpp
src/processortab.cpp
@@ -41,6 +41,11 @@ ProcessorTab::ProcessorTab(QToolBar* toolbar, QWidget* parent) : RipesTab(toolba
setupSimulatorActions();
+ // Setup statistics update timer
+ m_statUpdateTimer = new QTimer(this);
+ m_statUpdateTimer->setInterval(100);
+ connect(m_statUpdateTimer, &QTimer::timeout, this, &ProcessorTab::updateStatistics);
+
// Connect ECALL functionality to application output log and scroll to bottom
connect(this, &ProcessorTab::appendToLog, [this](QString string) {
m_ui->console->insertPlainText(string);
@@ -297,6 +302,7 @@ void ProcessorTab::setInstructionViewCenterAddr(uint32_t address) {
void ProcessorTab::runFinished() {
pause();
ProcessorHandler::get()->checkProcessorFinished();
+ m_statUpdateTimer->stop();
emit update();
}
@@ -307,8 +313,10 @@ void ProcessorTab::run(bool state) {
}
if (state) {
ProcessorHandler::get()->run();
+ m_statUpdateTimer->start();
} else {
ProcessorHandler::get()->stop();
+ m_statUpdateTimer->stop();
}
// Enable/Disable all actions based on whether the processor is running.

MODIFY
src/processortab.h
src/processortab.h
@@ -74,6 +74,8 @@ private:
std::map<unsigned, vsrtl::Label*> m_stageInstructionLabels;
+ QTimer* m_statUpdateTimer;
+
// Actions
QAction* m_selectProcessorAction = nullptr;
QAction* m_clockAction = nullptr;

Periodically update processor statistics whilst running