regtools: fix several bugs in qeditor

Change-Id: I1bef76d30eb47c4ebc8a2baca356d9c135b234ae
This commit is contained in:
Amaury Pouly 2013-08-22 17:50:59 +02:00
parent a2d4a4a560
commit 142ce48771
2 changed files with 6 additions and 4 deletions

View file

@ -303,6 +303,7 @@ static TmplAnalyserFactory< ClockAnalyser > g_clock_factory(true, "Clock Analyse
EmiAnalyser::EmiAnalyser(const soc_t& soc, IoBackend *backend) EmiAnalyser::EmiAnalyser(const soc_t& soc, IoBackend *backend)
:Analyser(soc, backend) :Analyser(soc, backend)
{ {
m_display_mode = DisplayCycles;
m_group = new QGroupBox("EMI Analyser"); m_group = new QGroupBox("EMI Analyser");
QVBoxLayout *layout = new QVBoxLayout; QVBoxLayout *layout = new QVBoxLayout;
m_group->setLayout(layout); m_group->setLayout(layout);
@ -347,6 +348,8 @@ bool EmiAnalyser::SupportSoc(const QString& soc_name)
void EmiAnalyser::OnChangeDisplayMode(int index) void EmiAnalyser::OnChangeDisplayMode(int index)
{ {
if(index == -1)
return;
m_display_mode = (DisplayMode)m_display_selector->itemData(index).toInt(); m_display_mode = (DisplayMode)m_display_selector->itemData(index).toInt();
int idx = m_panel->currentIndex(); int idx = m_panel->currentIndex();
FillTable(); FillTable();
@ -492,11 +495,11 @@ void EmiAnalyser::FillTable()
if(helper.ReadRegisterField("DRAM", "CTL10", "ADDR_PINS", value)) if(helper.ReadRegisterField("DRAM", "CTL10", "ADDR_PINS", value))
AddLine("Address Pins", 13 - value, ""); AddLine("Address Pins", 13 - value, "");
if(helper.ReadRegisterField("DRAM", "CTL11", "ADDR_PINS", value)) if(helper.ReadRegisterField("DRAM", "CTL11", "COLUMN_SIZE", value))
AddLine("Column Size", 12 - value, "-bit"); AddLine("Column Size", 12 - value, "-bit");
if(helper.ReadRegisterField("DRAM", "CTL11", "ADDR_PINS", value)) if(helper.ReadRegisterField("DRAM", "CTL11", "CASLAT", value))
AddLine("Encoded CAS", value, "Memory device dependent"); AddLine("Encoded CAS", value, "", "Memory device dependent");
if(helper.ReadRegisterField("DRAM", "CTL14", "CS_MAP", value)) if(helper.ReadRegisterField("DRAM", "CTL14", "CS_MAP", value))
{ {

View file

@ -14,7 +14,6 @@
#include <QLabel> #include <QLabel>
#include <QLineEdit> #include <QLineEdit>
#include "analyser.h" #include "analyser.h"
#include "collapsiblepanel.h"
/** /**
* Clock analyser * Clock analyser