From da3d8fdd609be7cd1836be717032555af0732b88 Mon Sep 17 00:00:00 2001 From: Pavel Pisa Date: Thu, 21 Feb 2019 00:43:46 +0100 Subject: Add burst time and store timing in the config. Signed-off-by: Pavel Pisa --- qtmips_gui/NewDialog.ui | 17 +++++++++++++++++ qtmips_gui/newdialog.cpp | 26 ++++++++++++++++++++++++++ qtmips_gui/newdialog.h | 3 +++ 3 files changed, 46 insertions(+) (limited to 'qtmips_gui') diff --git a/qtmips_gui/NewDialog.ui b/qtmips_gui/NewDialog.ui index 4171e73..411b075 100644 --- a/qtmips_gui/NewDialog.ui +++ b/qtmips_gui/NewDialog.ui @@ -251,6 +251,23 @@ + + + + Burst: + + + + + + + 0 + + + 999999999 + + + diff --git a/qtmips_gui/newdialog.cpp b/qtmips_gui/newdialog.cpp index 5e7f16d..3e37357 100644 --- a/qtmips_gui/newdialog.cpp +++ b/qtmips_gui/newdialog.cpp @@ -65,8 +65,12 @@ NewDialog::NewDialog(QWidget *parent, QSettings *settings) : QDialog(parent) { connect(ui->hazard_unit, SIGNAL(clicked(bool)), this, SLOT(hazard_unit_change())); connect(ui->hazard_stall, SIGNAL(clicked(bool)), this, SLOT(hazard_unit_change())); connect(ui->hazard_stall_forward, SIGNAL(clicked(bool)), this, SLOT(hazard_unit_change())); + connect(ui->mem_protec_exec, SIGNAL(clicked(bool)), this, SLOT(mem_protec_exec_change(bool))); connect(ui->mem_protec_write, SIGNAL(clicked(bool)), this, SLOT(mem_protec_write_change(bool))); + connect(ui->mem_time_read, SIGNAL(valueChanged(int)), this, SLOT(mem_time_read_change(int))); + connect(ui->mem_time_write, SIGNAL(valueChanged(int)), this, SLOT(mem_time_write_change(int))); + connect(ui->mem_time_burst, SIGNAL(valueChanged(int)), this, SLOT(mem_time_burst_change(int))); cache_handler_d = new NewDialogCacheHandler(this, ui_cache_d); cache_handler_p = new NewDialogCacheHandler(this, ui_cache_p); @@ -171,6 +175,27 @@ void NewDialog::mem_protec_write_change(bool v) { switch2custom(); } +void NewDialog::mem_time_read_change(int v) { + if (config->memory_access_time_read() != (unsigned)v) { + config->set_memory_access_time_read(v); + switch2custom(); + } +} + +void NewDialog::mem_time_write_change(int v) { + if (config->memory_access_time_write() != (unsigned)v) { + config->set_memory_access_time_write(v); + switch2custom(); + } +} + +void NewDialog::mem_time_burst_change(int v) { + if (config->memory_access_time_burst() != (unsigned)v) { + config->set_memory_access_time_burst(v); + switch2custom(); + } +} + void NewDialog::config_gui() { // Basic ui->elf_file->setText(config->elf()); @@ -185,6 +210,7 @@ void NewDialog::config_gui() { ui->mem_protec_write->setChecked(config->memory_write_protection()); ui->mem_time_read->setValue(config->memory_access_time_read()); ui->mem_time_write->setValue(config->memory_access_time_write()); + ui->mem_time_burst->setValue(config->memory_access_time_burst()); // Cache cache_handler_d->config_gui(); cache_handler_p->config_gui(); diff --git a/qtmips_gui/newdialog.h b/qtmips_gui/newdialog.h index 5f85969..2b1b7c4 100644 --- a/qtmips_gui/newdialog.h +++ b/qtmips_gui/newdialog.h @@ -67,6 +67,9 @@ private slots: void hazard_unit_change(); void mem_protec_exec_change(bool); void mem_protec_write_change(bool); + void mem_time_read_change(int); + void mem_time_write_change(int); + void mem_time_burst_change(int); private: Ui::NewDialog *ui; -- cgit v1.2.3