aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--qtmips_gui/NewDialog.ui8
-rw-r--r--qtmips_gui/newdialog.cpp16
-rw-r--r--qtmips_machine/machineconfig.cpp14
-rw-r--r--qtmips_machine/machineconfig.h6
4 files changed, 22 insertions, 22 deletions
diff --git a/qtmips_gui/NewDialog.ui b/qtmips_gui/NewDialog.ui
index 3c1eaba..135ac83 100644
--- a/qtmips_gui/NewDialog.ui
+++ b/qtmips_gui/NewDialog.ui
@@ -50,16 +50,16 @@
</widget>
</item>
<item>
- <widget class="QRadioButton" name="preset_pipelined_bare">
+ <widget class="QRadioButton" name="preset_no_pipeline_cache">
<property name="text">
- <string>Pipelined without hazard unit and without cache</string>
+ <string>No pipeline with cache</string>
</property>
</widget>
</item>
<item>
- <widget class="QRadioButton" name="preset_pipelined_hazard">
+ <widget class="QRadioButton" name="preset_pipelined_bare">
<property name="text">
- <string>Pipelined with hazard unit and without cache</string>
+ <string>Pipelined without hazard unit and without cache</string>
</property>
</widget>
</item>
diff --git a/qtmips_gui/newdialog.cpp b/qtmips_gui/newdialog.cpp
index ee957cb..565d353 100644
--- a/qtmips_gui/newdialog.cpp
+++ b/qtmips_gui/newdialog.cpp
@@ -21,8 +21,8 @@ NewDialog::NewDialog(QWidget *parent, QSettings *settings) : QDialog(parent) {
connect(ui->pushButton_cancel, SIGNAL(clicked(bool)), this, SLOT(cancel()));
connect(ui->pushButton_browse, SIGNAL(clicked(bool)), this, SLOT(browse_elf()));
connect(ui->preset_no_pipeline, SIGNAL(toggled(bool)), this, SLOT(set_preset()));
+ connect(ui->preset_no_pipeline_cache, SIGNAL(toggled(bool)), this, SLOT(set_preset()));
connect(ui->preset_pipelined_bare, SIGNAL(toggled(bool)), this, SLOT(set_preset()));
- connect(ui->preset_pipelined_hazard, SIGNAL(toggled(bool)), this, SLOT(set_preset()));
connect(ui->preset_pipelined, SIGNAL(toggled(bool)), this, SLOT(set_preset()));
connect(ui->pipelined, SIGNAL(clicked(bool)), this, SLOT(pipelined_change(bool)));
@@ -159,12 +159,12 @@ unsigned NewDialog::preset_number() {
enum machine::ConfigPresets preset;
if (ui->preset_no_pipeline->isChecked())
preset = machine::CP_SINGLE;
+ else if (ui->preset_no_pipeline_cache->isChecked())
+ preset = machine::CP_SINGLE_CACHE;
else if (ui->preset_pipelined_bare->isChecked())
preset = machine::CP_PIPE_NO_HAZARD;
- else if (ui->preset_pipelined_hazard->isChecked())
- preset = machine::CP_PIPE_NO_CACHE;
else if (ui->preset_pipelined->isChecked())
- preset = machine::CP_PIPE_CACHE;
+ preset = machine::CP_PIPE;
else
return 0;
return (unsigned)preset + 1;
@@ -188,13 +188,13 @@ void NewDialog::load_settings() {
case machine::CP_SINGLE:
ui->preset_no_pipeline->setChecked(true);
break;
+ case machine::CP_SINGLE_CACHE:
+ ui->preset_no_pipeline_cache->setChecked(true);
+ break;
case machine::CP_PIPE_NO_HAZARD:
ui->preset_pipelined_bare->setChecked(true);
break;
- case machine::CP_PIPE_NO_CACHE:
- ui->preset_pipelined_hazard->setChecked(true);
- break;
- case machine::CP_PIPE_CACHE:
+ case machine::CP_PIPE:
ui->preset_pipelined->setChecked(true);
break;
}
diff --git a/qtmips_machine/machineconfig.cpp b/qtmips_machine/machineconfig.cpp
index ce0e3d8..13a1ff2 100644
--- a/qtmips_machine/machineconfig.cpp
+++ b/qtmips_machine/machineconfig.cpp
@@ -64,17 +64,17 @@ void MachineConfigCache::store(QSettings *sts, const QString &prefix) {
void MachineConfigCache::preset(enum ConfigPresets p) {
switch (p) {
- case CP_PIPE_CACHE:
+ case CP_PIPE:
+ case CP_SINGLE_CACHE:
set_enabled(true);
- set_sets(3);
- set_blocks(1);
- set_associativity(1);
+ set_sets(4);
+ set_blocks(2);
+ set_associativity(2);
set_replacement_policy(RP_RAND);
set_write_policy(WP_TROUGH);
break;
case CP_SINGLE:
case CP_PIPE_NO_HAZARD:
- case CP_PIPE_NO_CACHE:
set_enabled(false);
}
}
@@ -198,6 +198,7 @@ void MachineConfig::preset(enum ConfigPresets p) {
// Note: we set just a minimal subset to get preset (preserving as much of hidden configuration as possible)
switch (p) {
case CP_SINGLE:
+ case CP_SINGLE_CACHE:
set_pipelined(false);
set_delay_slot(true);
break;
@@ -205,8 +206,7 @@ void MachineConfig::preset(enum ConfigPresets p) {
set_pipelined(true);
set_hazard_unit(MachineConfig::HU_NONE);
break;
- case CP_PIPE_CACHE:
- case CP_PIPE_NO_CACHE:
+ case CP_PIPE:
set_pipelined(true);
set_hazard_unit(MachineConfig::HU_STALL_FORWARD);
break;
diff --git a/qtmips_machine/machineconfig.h b/qtmips_machine/machineconfig.h
index 1ec2703..56cdf8e 100644
--- a/qtmips_machine/machineconfig.h
+++ b/qtmips_machine/machineconfig.h
@@ -8,9 +8,9 @@ namespace machine {
enum ConfigPresets {
CP_SINGLE, // No pipeline cpu without cache
- CP_PIPE_NO_HAZARD, // Pipelined cpu without hazard unit
- CP_PIPE_NO_CACHE, // Pipelined cpu without cache
- CP_PIPE_CACHE // Full pipelined cpu
+ CP_SINGLE_CACHE, // No pipeline cpu with cache
+ CP_PIPE_NO_HAZARD, // Pipelined cpu without hazard unit and without cache
+ CP_PIPE // Full pipelined cpu
};
class MachineConfigCache {