diff options
author | Pavel Pisa <pisa@cmp.felk.cvut.cz> | 2019-02-21 00:43:46 +0100 |
---|---|---|
committer | Pavel Pisa <pisa@cmp.felk.cvut.cz> | 2019-02-21 00:43:46 +0100 |
commit | da3d8fdd609be7cd1836be717032555af0732b88 (patch) | |
tree | b604b7c9b1275d9a04272e9fc6ef25412b3123ee /qtmips_gui | |
parent | 3388d5822d7730a60a0dc7424def93a5ef7f686c (diff) | |
download | qtmips-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')
-rw-r--r-- | qtmips_gui/NewDialog.ui | 17 | ||||
-rw-r--r-- | qtmips_gui/newdialog.cpp | 26 | ||||
-rw-r--r-- | qtmips_gui/newdialog.h | 3 |
3 files changed, 46 insertions, 0 deletions
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 @@ </property> </widget> </item> + <item row="2" column="0"> + <widget class="QLabel" name="label_3"> + <property name="text"> + <string>Burst:</string> + </property> + </widget> + </item> + <item row="2" column="1"> + <widget class="QSpinBox" name="mem_time_burst"> + <property name="minimum"> + <number>0</number> + </property> + <property name="maximum"> + <number>999999999</number> + </property> + </widget> + </item> </layout> </widget> </item> 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; |