Change initial cache preset
MODIFY
src/cachesim/cacheconfigwidget.cpp
src/cachesim/cacheconfigwidget.cpp
@@ -58,8 +58,6 @@ void CacheConfigWidget::setCache(CacheSim* cache) {
connect(m_cache, &CacheSim::hitrateChanged, this, &CacheConfigWidget::updateHitrate);
setupPresets();
- m_ui->replacementPolicy->setCurrentIndex(0);
- handleConfigurationChanged();
}
void CacheConfigWidget::showCachePlot() {
@@ -111,8 +109,6 @@ void CacheConfigWidget::setupPresets() {
m_cache->setPreset(preset);
});
-
- m_ui->presets->setCurrentIndex(0);
}
void CacheConfigWidget::updateCacheSize() {}

MODIFY
src/cachesim/cachesim.h
src/cachesim/cachesim.h
@@ -200,9 +200,9 @@ private:
unsigned m_lineMask = -1;
unsigned m_tagMask = -1;
- int m_blocks = 1; // Some power of 2
- int m_lines = 2; // Some power of 2
- int m_ways = 2; // Some power of 2
+ int m_blocks = 2; // Some power of 2
+ int m_lines = 5; // Some power of 2
+ int m_ways = 0; // Some power of 2
/**
* @brief m_memory

MODIFY
src/memorytab.ui
src/memorytab.ui
</sizepolicy>
</property>
<property name="currentIndex">
- <number>1</number>
+ <number>0</number>
</property>
<widget class="QWidget" name="tab_3">
<attribute name="title">

Change initial cache preset