aboutsummaryrefslogtreecommitdiff
path: root/qtmips_gui/newdialog.cpp
diff options
context:
space:
mode:
authorPavel Pisa <pisa@cmp.felk.cvut.cz>2019-02-21 00:43:46 +0100
committerPavel Pisa <pisa@cmp.felk.cvut.cz>2019-02-21 00:43:46 +0100
commitda3d8fdd609be7cd1836be717032555af0732b88 (patch)
treeb604b7c9b1275d9a04272e9fc6ef25412b3123ee /qtmips_gui/newdialog.cpp
parent3388d5822d7730a60a0dc7424def93a5ef7f686c (diff)
downloadqtmips-da3d8fdd609be7cd1836be717032555af0732b88.tar.gz
qtmips-da3d8fdd609be7cd1836be717032555af0732b88.tar.bz2
qtmips-da3d8fdd609be7cd1836be717032555af0732b88.zip
Add burst time and store timing in the config.
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
Diffstat (limited to 'qtmips_gui/newdialog.cpp')
-rw-r--r--qtmips_gui/newdialog.cpp26
1 files changed, 26 insertions, 0 deletions
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();