Relayout the GUI to be more in line with expected norms

Add user logic reset signal
Stabilize data transfer
master
Timothy Pearson 11 years ago
parent 37420cfb78
commit 0ffb793cb5

@ -50,7 +50,7 @@
<cstring>group8BitInput</cstring> <cstring>group8BitInput</cstring>
</property> </property>
<property name="title"> <property name="title">
<string></string> <string>8-Bit Input (Switches)</string>
</property> </property>
<grid> <grid>
<property name="name"> <property name="name">
@ -96,10 +96,33 @@
<cstring>group8BitInputLED0</cstring> <cstring>group8BitInputLED0</cstring>
</property> </property>
</widget> </widget>
<widget class="TQLabel" row="0" column="8"> <spacer row="0" column="8">
<property name="name">
<cstring>unnamed_spacer</cstring>
</property>
<property name="orientation">
<enum>Horizontal</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
</spacer>
<widget class="TQLabel" row="0" column="9">
<property name="name"> <property name="name">
<cstring>group8BitInputValueText</cstring> <cstring>group8BitInputValueText</cstring>
</property> </property>
<property name="text">
<cstring></cstring>
</property>
<property name="alignment">
<set>AlignVCenter|AlignRight</set>
</property>
</widget> </widget>
</grid> </grid>
</widget> </widget>
@ -154,236 +177,196 @@
<cstring>group8BitOutputLED0</cstring> <cstring>group8BitOutputLED0</cstring>
</property> </property>
</widget> </widget>
<widget class="TQLabel" row="0" column="8"> <spacer row="0" column="8">
<property name="name">
<cstring>unnamed_spacer</cstring>
</property>
<property name="orientation">
<enum>Horizontal</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
</spacer>
<widget class="TQLabel" row="0" column="9">
<property name="name"> <property name="name">
<cstring>group8BitOutputValueText</cstring> <cstring>group8BitOutputValueText</cstring>
</property> </property>
<property name="text">
<cstring></cstring>
</property>
<property name="alignment">
<set>AlignVCenter|AlignRight</set>
</property>
</widget> </widget>
</grid> </grid>
</widget> </widget>
<widget class="TQGroupBox" row="2" column="0"> <widget class="TQGroupBox" row="0" column="1">
<property name="name"> <property name="name">
<cstring>group16BitIO</cstring> <cstring>group4BitOutput</cstring>
</property> </property>
<property name="title"> <property name="title">
<string>16-Bit I/O</string> <string>4-Bit Input (Buttons)</string>
</property> </property>
<grid> <grid>
<property name="name"> <property name="name">
<cstring>unnamed_grid</cstring> <cstring>unnamed_grid</cstring>
</property> </property>
<widget class="TQLabel" row="0" column="0"> <widget class="FPGAPushButton" row="0" column="0">
<property name="name"> <property name="name">
<cstring>unnamed_label</cstring> <cstring>group4BitInputLED3</cstring>
</property>
<property name="text">
<cstring>Input:</cstring>
</property> </property>
</widget> </widget>
<widget class="KIntSpinBox" row="0" column="1"> <widget class="FPGAPushButton" row="0" column="1">
<property name="name"> <property name="name">
<cstring>group16BitInputValue</cstring> <cstring>group4BitInputLED2</cstring>
</property>
<property name="prefix">
<cstring>0x</cstring>
</property>
<property name="value">
<number>0</number>
</property>
<property name="minValue">
<number>0</number>
</property>
<property name="maxValue">
<number>65535</number>
</property>
<property name="base">
<number>16</number>
</property> </property>
</widget> </widget>
<widget class="TQLabel" row="0" column="2"> <widget class="FPGAPushButton" row="0" column="2">
<property name="name"> <property name="name">
<cstring>unnamed_label</cstring> <cstring>group4BitInputLED1</cstring>
</property> </property>
<property name="text"> </widget>
<cstring>Output:</cstring> <widget class="FPGAPushButton" row="0" column="3">
<property name="name">
<cstring>group4BitInputLED0</cstring>
</property> </property>
</widget> </widget>
<widget class="TQLabel" row="0" column="3"> <widget class="TQLabel" row="0" column="4">
<property name="name"> <property name="name">
<cstring>group16BitOutputValue</cstring> <cstring>group4BitInputValueText</cstring>
</property> </property>
<property name="text"> <property name="alignment">
<cstring></cstring> <set>AlignVCenter|AlignRight</set>
</property> </property>
</widget> </widget>
</grid> </grid>
</widget> </widget>
<widget class="TQGroupBox" row="0" column="1" rowspan="3"> <widget class="TQGroupBox" row="1" column="1">
<property name="name"> <property name="name">
<cstring>group4BitInput</cstring> <cstring>group4BitOutput</cstring>
</property> </property>
<property name="title"> <property name="title">
<string>Buttons:</string> <string>4-Bit Output Values</string>
</property>
<grid>
<property name="name">
<cstring>unnamed_grid</cstring>
</property>
<widget class="TQLayoutWidget" row="0" column="1">
<property name="name">
<cstring>unnamed_layout</cstring>
</property> </property>
<grid> <grid>
<property name="name"> <property name="name">
<cstring>unnamed_grid</cstring> <cstring>unnamed_grid</cstring>
</property> </property>
<widget class="TQLayoutWidget" row="0" column="1" colspan="2"> <widget class="FPGALed" row="0" column="0">
<property name="name"> <property name="name">
<cstring>unnamed_layout</cstring> <cstring>group4BitOutputLED3</cstring>
</property> </property>
<grid> </widget>
<widget class="FPGALed" row="0" column="1">
<property name="name"> <property name="name">
<cstring>unnamed_grid</cstring> <cstring>group4BitOutputLED2</cstring>
</property> </property>
<spacer row="0" column="0"> </widget>
<widget class="FPGALed" row="0" column="2">
<property name="name"> <property name="name">
<cstring>unnamed_spacer</cstring> <cstring>group4BitOutputLED1</cstring>
</property>
<property name="orientation">
<enum>Horizontal</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property> </property>
<property name="sizeHint"> </widget>
<size> <widget class="FPGALed" row="0" column="3">
<width>0</width>
<height>0</height>
</size>
</property>
</spacer>
<widget class="FPGAPushButton" row="0" column="1">
<property name="name"> <property name="name">
<cstring>group4BitInputLED0</cstring> <cstring>group4BitOutputLED0</cstring>
</property> </property>
</widget> </widget>
<spacer row="0" column="2"> <widget class="TQLabel" row="0" column="4">
<property name="name"> <property name="name">
<cstring>unnamed_spacer</cstring> <cstring>group4BitOutputValueText</cstring>
</property>
<property name="orientation">
<enum>Horizontal</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property> </property>
<property name="sizeHint"> <property name="alignment">
<size> <set>AlignVCenter|AlignRight</set>
<width>0</width>
<height>0</height>
</size>
</property> </property>
</spacer>
</grid>
</widget> </widget>
<widget class="FPGAPushButton" row="1" column="0" rowspan="2"> </grid>
<property name="name">
<cstring>group4BitInputLED3</cstring>
</property>
</widget> </widget>
<widget class="FPGAPushButton" row="1" column="3" rowspan="2"> <widget class="TQGroupBox" row="2" column="0">
<property name="name"> <property name="name">
<cstring>group4BitInputLED1</cstring> <cstring>group16BitIO</cstring>
</property> </property>
</widget> <property name="title">
<widget class="TQLayoutWidget" row="3" column="1" colspan="2"> <string>16-Bit I/O</string>
<property name="name">
<cstring>unnamed_layout</cstring>
</property> </property>
<grid> <grid>
<property name="name"> <property name="name">
<cstring>unnamed_grid</cstring> <cstring>unnamed_grid</cstring>
</property> </property>
<spacer row="0" column="0"> <widget class="TQLabel" row="0" column="0">
<property name="name"> <property name="name">
<cstring>unnamed_spacer</cstring> <cstring>unnamed_label</cstring>
</property>
<property name="orientation">
<enum>Horizontal</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>0</width>
<height>0</height>
</size>
</property> </property>
</spacer> <property name="text">
<widget class="FPGAPushButton" row="0" column="1"> <cstring>Input:</cstring>
<property name="name">
<cstring>group4BitInputLED2</cstring>
</property> </property>
</widget> </widget>
<spacer row="0" column="2"> <widget class="KIntSpinBox" row="0" column="1">
<property name="name"> <property name="name">
<cstring>unnamed_spacer</cstring> <cstring>group16BitInputValue</cstring>
</property> </property>
<property name="orientation"> <property name="prefix">
<enum>Horizontal</enum> <cstring>0x</cstring>
</property> </property>
<property name="sizeType"> <property name="value">
<enum>Expanding</enum> <number>0</number>
</property> </property>
<property name="sizeHint"> <property name="minValue">
<size> <number>0</number>
<width>0</width> </property>
<height>0</height> <property name="maxValue">
</size> <number>65535</number>
</property>
<property name="base">
<number>16</number>
</property> </property>
</spacer>
</grid>
</widget> </widget>
<widget class="TQLabel" row="1" column="1"> <widget class="TQLabel" row="0" column="2">
<property name="name"> <property name="name">
<cstring>group4BitInputValueLabel</cstring> <cstring>unnamed_label</cstring>
</property> </property>
<property name="text"> <property name="text">
<cstring>In:</cstring> <cstring>Output:</cstring>
</property>
<property name="alignment">
<set>AlignBottom|AlignLeft</set>
</property> </property>
</widget> </widget>
<widget class="TQLabel" row="2" column="1"> <widget class="TQLabel" row="0" column="3">
<property name="name"> <property name="name">
<cstring>group4BitOutputValueLabel</cstring> <cstring>group16BitOutputValue</cstring>
</property> </property>
<property name="text"> <property name="text">
<cstring>Out:</cstring> <cstring></cstring>
</property> </property>
<property name="alignment"> <property name="alignment">
<set>AlignTop|AlignLeft</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
</widget> </widget>
<widget class="TQLabel" row="1" column="2"> </grid>
</widget>
<widget class="TQGroupBox" row="2" column="1">
<property name="name"> <property name="name">
<cstring>group4BitInputValueText</cstring> <cstring>groupGlobalControl</cstring>
</property> </property>
<property name="alignment"> <property name="title">
<set>AlignBottom|AlignRight</set> <string>Global Controls</string>
</property> </property>
</widget> <grid>
<widget class="TQLabel" row="2" column="2">
<property name="name"> <property name="name">
<cstring>group4BitOutputValueText</cstring> <cstring>unnamed_grid</cstring>
</property> </property>
<property name="alignment"> <widget class="TQPushButton" row="1" column="2">
<set>AlignTop|AlignRight</set> <property name="name">
<cstring>groupGlobalControlResetButton</cstring>
</property>
<property name="text">
<cstring>Strobe User Logic Reset</cstring>
</property> </property>
</widget>
</grid>
</widget> </widget>
</grid> </grid>
</widget> </widget>

@ -589,7 +589,7 @@ FPGAViewPart::FPGAViewPart(TQWidget *parentWidget, const char *widgetName, TQObj
: RemoteInstrumentPart( parent, name ), m_base(NULL), m_interfaceMode(BasicInterfaceMode), : RemoteInstrumentPart( parent, name ), m_base(NULL), m_interfaceMode(BasicInterfaceMode),
m_commHandlerState(0), m_commHandlerMode(0), m_commHandlerNextState(0), m_commHandlerNextMode(0), m_connectionActiveAndValid(false), m_tickerState(0), m_remoteInputModeEnabled(false), m_4bitInputValue(0), m_4bitOutputValue(0), m_commHandlerState(0), m_commHandlerMode(0), m_commHandlerNextState(0), m_commHandlerNextMode(0), m_connectionActiveAndValid(false), m_tickerState(0), m_remoteInputModeEnabled(false), m_4bitInputValue(0), m_4bitOutputValue(0),
m_8bitInputValue(0), m_8bitOutputValue(0), m_16bitInputValue(0), m_16bitOutputValue(0), m_7segDigit3OutputValue(0xff), m_8bitInputValue(0), m_8bitOutputValue(0), m_16bitInputValue(0), m_16bitOutputValue(0), m_7segDigit3OutputValue(0xff),
m_7segDigit2OutputValue(0xff), m_7segDigit1OutputValue(0xff), m_7segDigit0OutputValue(0xff), m_7segDigit2OutputValue(0xff), m_7segDigit1OutputValue(0xff), m_7segDigit0OutputValue(0xff), m_sendingUserLogicReset(false),
m_batchOutputFile(NULL), m_dataOutputFile(NULL), m_dataMemorySize(16384), m_dataMemorySizePrev(0), m_batchOutputFile(NULL), m_dataOutputFile(NULL), m_dataMemorySize(16384), m_dataMemorySizePrev(0),
m_dataMemoryImageWidth(128), m_dataMemoryImageHeight(128), m_dataMemoryImageWidth(128), m_dataMemoryImageHeight(128),
m_inputImageViewer(NULL), m_outputImageViewer(NULL) m_inputImageViewer(NULL), m_outputImageViewer(NULL)
@ -637,15 +637,14 @@ FPGAViewPart::FPGAViewPart(TQWidget *parentWidget, const char *widgetName, TQObj
m_modeSubMenu->insert(m_modeAdvancedEnabled); m_modeSubMenu->insert(m_modeAdvancedEnabled);
// Initialize widgets // Initialize widgets
m_base->group4BitInputValueLabel->setFixedSize(LED_BASE_SIZE*2, LED_BASE_SIZE*2);
m_base->group4BitOutputValueLabel->setFixedSize(LED_BASE_SIZE*2, LED_BASE_SIZE*2);
m_base->group4BitInputValueText->setFixedSize(LED_BASE_SIZE*2, LED_BASE_SIZE*2);
m_base->group4BitOutputValueText->setFixedSize(LED_BASE_SIZE*2, LED_BASE_SIZE*2);
m_base->group4BitInputLED3->setFixedSize(LED_SIZE); m_base->group4BitInputLED3->setFixedSize(LED_SIZE);
m_base->group4BitInputLED2->setFixedSize(LED_SIZE); m_base->group4BitInputLED2->setFixedSize(LED_SIZE);
m_base->group4BitInputLED1->setFixedSize(LED_SIZE); m_base->group4BitInputLED1->setFixedSize(LED_SIZE);
m_base->group4BitInputLED0->setFixedSize(LED_SIZE); m_base->group4BitInputLED0->setFixedSize(LED_SIZE);
m_base->group4BitOutputLED3->setFixedSize(LED_SIZE);
m_base->group4BitOutputLED2->setFixedSize(LED_SIZE);
m_base->group4BitOutputLED1->setFixedSize(LED_SIZE);
m_base->group4BitOutputLED0->setFixedSize(LED_SIZE);
m_base->group8BitInputLED7->setFixedSize(LED_SIZE); m_base->group8BitInputLED7->setFixedSize(LED_SIZE);
m_base->group8BitInputLED6->setFixedSize(LED_SIZE); m_base->group8BitInputLED6->setFixedSize(LED_SIZE);
m_base->group8BitInputLED5->setFixedSize(LED_SIZE); m_base->group8BitInputLED5->setFixedSize(LED_SIZE);
@ -667,6 +666,10 @@ FPGAViewPart::FPGAViewPart(TQWidget *parentWidget, const char *widgetName, TQObj
m_base->group4BitInputLED2->setState(KLed::Off); m_base->group4BitInputLED2->setState(KLed::Off);
m_base->group4BitInputLED1->setState(KLed::Off); m_base->group4BitInputLED1->setState(KLed::Off);
m_base->group4BitInputLED0->setState(KLed::Off); m_base->group4BitInputLED0->setState(KLed::Off);
m_base->group4BitOutputLED3->setState(KLed::Off);
m_base->group4BitOutputLED2->setState(KLed::Off);
m_base->group4BitOutputLED1->setState(KLed::Off);
m_base->group4BitOutputLED0->setState(KLed::Off);
m_base->group8BitInputLED7->setState(KLed::Off); m_base->group8BitInputLED7->setState(KLed::Off);
m_base->group8BitInputLED6->setState(KLed::Off); m_base->group8BitInputLED6->setState(KLed::Off);
m_base->group8BitInputLED5->setState(KLed::Off); m_base->group8BitInputLED5->setState(KLed::Off);
@ -684,6 +687,10 @@ FPGAViewPart::FPGAViewPart(TQWidget *parentWidget, const char *widgetName, TQObj
m_base->group8BitOutputLED1->setState(KLed::Off); m_base->group8BitOutputLED1->setState(KLed::Off);
m_base->group8BitOutputLED0->setState(KLed::Off); m_base->group8BitOutputLED0->setState(KLed::Off);
m_base->group4BitOutputLED3->setClickable(false);
m_base->group4BitOutputLED2->setClickable(false);
m_base->group4BitOutputLED1->setClickable(false);
m_base->group4BitOutputLED0->setClickable(false);
m_base->group8BitOutputLED7->setClickable(false); m_base->group8BitOutputLED7->setClickable(false);
m_base->group8BitOutputLED6->setClickable(false); m_base->group8BitOutputLED6->setClickable(false);
m_base->group8BitOutputLED5->setClickable(false); m_base->group8BitOutputLED5->setClickable(false);
@ -693,6 +700,12 @@ FPGAViewPart::FPGAViewPart(TQWidget *parentWidget, const char *widgetName, TQObj
m_base->group8BitOutputLED1->setClickable(false); m_base->group8BitOutputLED1->setClickable(false);
m_base->group8BitOutputLED0->setClickable(false); m_base->group8BitOutputLED0->setClickable(false);
#if 0
TQFontMetrics group8BitTextMetrics(m_base->group8BitOutputValueText->font());
m_base->group8BitInputValueText->setFixedSize(group8BitTextMetrics.width("0000"), group8BitTextMetrics.height());
m_base->group8BitOutputValueText->setFixedSize(group8BitTextMetrics.width("0000"), group8BitTextMetrics.height());
#endif
connect(m_base->group4BitInputLED3, SIGNAL(changed()), this, SLOT(process4BitInputChanges())); connect(m_base->group4BitInputLED3, SIGNAL(changed()), this, SLOT(process4BitInputChanges()));
connect(m_base->group4BitInputLED2, SIGNAL(changed()), this, SLOT(process4BitInputChanges())); connect(m_base->group4BitInputLED2, SIGNAL(changed()), this, SLOT(process4BitInputChanges()));
connect(m_base->group4BitInputLED1, SIGNAL(changed()), this, SLOT(process4BitInputChanges())); connect(m_base->group4BitInputLED1, SIGNAL(changed()), this, SLOT(process4BitInputChanges()));
@ -744,6 +757,7 @@ FPGAViewPart::FPGAViewPart(TQWidget *parentWidget, const char *widgetName, TQObj
m_base->LCDOutputLabel->setFixedSize(lcdwidth, lcdheight); m_base->LCDOutputLabel->setFixedSize(lcdwidth, lcdheight);
m_base->frameLCDDisplay->setFrameStyle(TQFrame::Box | TQFrame::Raised); m_base->frameLCDDisplay->setFrameStyle(TQFrame::Box | TQFrame::Raised);
connect(m_base->groupGlobalControlResetButton, SIGNAL(clicked()), this, SLOT(groupGlobalControlResetButtonClicked()));
connect(m_base->batchTestRunButton, SIGNAL(clicked()), this, SLOT(batchTestRunButtonClicked())); connect(m_base->batchTestRunButton, SIGNAL(clicked()), this, SLOT(batchTestRunButtonClicked()));
connect(m_base->dataProcessingRunButton, SIGNAL(clicked()), this, SLOT(dataProcessingRunButtonClicked())); connect(m_base->dataProcessingRunButton, SIGNAL(clicked()), this, SLOT(dataProcessingRunButtonClicked()));
@ -815,6 +829,12 @@ void FPGAViewPart::process4BitInputChanges() {
} }
void FPGAViewPart::process4BitOutputChanges() { void FPGAViewPart::process4BitOutputChanges() {
// Write m_4bitOutputValue to LEDs
m_base->group4BitOutputLED3->setState((m_4bitOutputValue & 0x08)?KLed::On:KLed::Off);
m_base->group4BitOutputLED2->setState((m_4bitOutputValue & 0x04)?KLed::On:KLed::Off);
m_base->group4BitOutputLED1->setState((m_4bitOutputValue & 0x02)?KLed::On:KLed::Off);
m_base->group4BitOutputLED0->setState((m_4bitOutputValue & 0x01)?KLed::On:KLed::Off);
// Write m_4bitOutputValue to label // Write m_4bitOutputValue to label
m_base->group4BitOutputValueText->setText(TQString("0x%1").arg(m_4bitOutputValue, 0, 16)); m_base->group4BitOutputValueText->setText(TQString("0x%1").arg(m_4bitOutputValue, 0, 16));
} }
@ -862,13 +882,13 @@ void FPGAViewPart::process8BitInputChanges() {
m_base->group8BitInputLED0->setClickable(false); m_base->group8BitInputLED0->setClickable(false);
} }
m_base->group8BitInputValueText->setText(TQString("0x%1").arg(m_8bitInputValue, 0, 16)); m_base->group8BitInputValueText->setText(TQString("").sprintf("0x%02x", m_8bitInputValue));
if (m_remoteInputModeEnabled) { if (m_remoteInputModeEnabled) {
m_base->group8BitInput->setTitle(i18n("8-Bit Input Values") + " [" + i18n("Remote Input Mode") + "]"); m_base->group8BitInput->setTitle(i18n("8-Bit Input (Switches)") + " [" + i18n("Remote Input Mode") + "]");
} }
else { else {
m_base->group8BitInput->setTitle(i18n("8-Bit Input Values") + " [" + i18n("Local Input Mode") + "]"); m_base->group8BitInput->setTitle(i18n("8-Bit Input (Switches)") + " [" + i18n("Local Input Mode") + "]");
} }
} }
@ -895,7 +915,7 @@ void FPGAViewPart::process8BitOutputChanges() {
m_base->group8BitOutputLED1->setState((m_8bitOutputValue & 0x02)?KLed::On:KLed::Off); m_base->group8BitOutputLED1->setState((m_8bitOutputValue & 0x02)?KLed::On:KLed::Off);
m_base->group8BitOutputLED0->setState((m_8bitOutputValue & 0x01)?KLed::On:KLed::Off); m_base->group8BitOutputLED0->setState((m_8bitOutputValue & 0x01)?KLed::On:KLed::Off);
m_base->group8BitOutputValueText->setText(TQString("0x%1").arg(m_8bitOutputValue, 0, 16)); m_base->group8BitOutputValueText->setText(TQString("").sprintf("0x%02x", m_8bitOutputValue));
} }
void FPGAViewPart::process16BitInputChanges() { void FPGAViewPart::process16BitInputChanges() {
@ -905,7 +925,7 @@ void FPGAViewPart::process16BitInputChanges() {
void FPGAViewPart::process16BitOutputChanges() { void FPGAViewPart::process16BitOutputChanges() {
// Write m_16bitOutputValue to label // Write m_16bitOutputValue to label
m_base->group16BitOutputValue->setText(TQString("0x%1").arg(m_16bitOutputValue, 0, 16)); m_base->group16BitOutputValue->setText(TQString("").sprintf("0x%04x", m_16bitOutputValue));
} }
void FPGAViewPart::processLCDOutputChanges() { void FPGAViewPart::processLCDOutputChanges() {
@ -1012,6 +1032,7 @@ void FPGAViewPart::processLockouts() {
m_base->batchTestOutputFile->setEnabled(false); m_base->batchTestOutputFile->setEnabled(false);
m_base->batchTest16BitCheckBox->setEnabled(false); m_base->batchTest16BitCheckBox->setEnabled(false);
m_base->batchTestRunButton->setEnabled(false); m_base->batchTestRunButton->setEnabled(false);
m_base->groupGlobalControlResetButton->setEnabled(false);
} }
else { else {
m_base->batchTestInputFile->setEnabled(true); m_base->batchTestInputFile->setEnabled(true);
@ -1035,6 +1056,7 @@ void FPGAViewPart::processLockouts() {
m_base->dataProcessingOutputFile->setEnabled(false); m_base->dataProcessingOutputFile->setEnabled(false);
m_base->dataProcessingGenerateValidationString->setEnabled(false); m_base->dataProcessingGenerateValidationString->setEnabled(false);
m_base->dataProcessingRunButton->setEnabled(false); m_base->dataProcessingRunButton->setEnabled(false);
m_base->groupGlobalControlResetButton->setEnabled(false);
} }
else { else {
m_base->dataProcessingInputFile->setEnabled(true); m_base->dataProcessingInputFile->setEnabled(true);
@ -1047,6 +1069,7 @@ void FPGAViewPart::processLockouts() {
if ((m_connectionActiveAndValid == true) && (m_commHandlerMode == 0)) { if ((m_connectionActiveAndValid == true) && (m_commHandlerMode == 0)) {
m_base->dataProcessingStatusLabel->setText(i18n("Ready")); m_base->dataProcessingStatusLabel->setText(i18n("Ready"));
m_base->groupGlobalControlResetButton->setEnabled(!m_sendingUserLogicReset);
} }
} }
@ -1125,6 +1148,11 @@ TQPtrList<TDEAction> FPGAViewPart::menuActionList() {
return m_menuActionList; return m_menuActionList;
} }
void FPGAViewPart::groupGlobalControlResetButtonClicked() {
m_sendingUserLogicReset = true;
processLockouts();
}
void FPGAViewPart::batchTestRunButtonClicked() { void FPGAViewPart::batchTestRunButtonClicked() {
m_commHandlerNextState = 0; m_commHandlerNextState = 0;
m_commHandlerNextMode = 1; m_commHandlerNextMode = 1;
@ -1166,6 +1194,17 @@ void FPGAViewPart::sendInputStatesToRemoteFPGA() {
data[13] = '\r'; data[13] = '\r';
m_socket->writeBlock(data, 14); m_socket->writeBlock(data, 14);
m_socket->writeBufferedData(); m_socket->writeBufferedData();
if (m_sendingUserLogicReset) {
// Send user logic reset request
data[0] = 'R';
data[1] = '\r';
m_socket->writeBlock(data, 2);
m_socket->writeBufferedData();
m_sendingUserLogicReset = false;
processLockouts();
}
} }
} }

@ -199,6 +199,7 @@ namespace RemoteLab
void processLCDOutputChanges(); void processLCDOutputChanges();
void process7SegmentLEDOutputChanges(); void process7SegmentLEDOutputChanges();
void groupGlobalControlResetButtonClicked();
void batchTestRunButtonClicked(); void batchTestRunButtonClicked();
void dataProcessingRunButtonClicked(); void dataProcessingRunButtonClicked();
@ -239,6 +240,7 @@ namespace RemoteLab
unsigned char m_7segDigit2OutputValue; unsigned char m_7segDigit2OutputValue;
unsigned char m_7segDigit1OutputValue; unsigned char m_7segDigit1OutputValue;
unsigned char m_7segDigit0OutputValue; unsigned char m_7segDigit0OutputValue;
bool m_sendingUserLogicReset;
UnsignedIntegerList m_batchInputValueList; UnsignedIntegerList m_batchInputValueList;
UnsignedIntegerList m_batchOutputValueList; UnsignedIntegerList m_batchOutputValueList;

@ -39,6 +39,7 @@ module main(
output reg userproc_start, output reg userproc_start,
input userproc_done, input userproc_done,
output reg userlogic_reset,
input [3:0] four_bit_leds, input [3:0] four_bit_leds,
input [7:0] eight_bit_leds, input [7:0] eight_bit_leds,
@ -239,12 +240,18 @@ module main(
gpmc_advn_reg = gpmc_advn; gpmc_advn_reg = gpmc_advn;
gpmc_oen_reg = gpmc_oen; gpmc_oen_reg = gpmc_oen;
gpmc_wen_reg = gpmc_wen; gpmc_wen_reg = gpmc_wen;
if (gpmc_wen_reg == 1'b0) begin
gpmc_data_reg = gpmc_data; gpmc_data_reg = gpmc_data;
end
if (gpmc_advn_reg == 1'b0) begin if (gpmc_advn_reg == 1'b0) begin
gpmc_address_reg = gpmc_address; gpmc_address_reg = gpmc_address;
data_storage_write_enable = 1'b0; data_storage_write_enable = 1'b0;
lcd_data_storage_wea = 1'b0; lcd_data_storage_wea = 1'b0;
end end
if (gpmc_wen_reg == 1'b1) begin
data_storage_write_enable = 1'b0;
lcd_data_storage_wea = 1'b0;
end
if (gpmc_address_reg[RAM_ADDR_BITS] == 1'b1) begin if (gpmc_address_reg[RAM_ADDR_BITS] == 1'b1) begin
// System memory access // System memory access
@ -310,6 +317,8 @@ module main(
// Bit 0: User processing start // Bit 0: User processing start
// Bit 1: User processing done (read only) // Bit 1: User processing done (read only)
// 0x0b: Number of address bits of DSP RAM (read only) // 0x0b: Number of address bits of DSP RAM (read only)
// 0x0c: User device control
// Bit 0: User logic reset
// 0x20 - 0x3f: LCD data area // 0x20 - 0x3f: LCD data area
if (gpmc_wen_reg == 1'b0) begin if (gpmc_wen_reg == 1'b0) begin
if (gpmc_address_reg[(RAM_ADDR_BITS-1):5] == 1) begin // Address range 0x20 - 0x3f if (gpmc_address_reg[(RAM_ADDR_BITS-1):5] == 1) begin // Address range 0x20 - 0x3f
@ -333,6 +342,9 @@ module main(
10: begin 10: begin
userproc_start = gpmc_data_reg[0]; userproc_start = gpmc_data_reg[0];
end end
12: begin
userlogic_reset = gpmc_data_reg[0];
end
default: begin default: begin
// Do nothing // Do nothing
end end
@ -384,6 +396,10 @@ module main(
11: begin 11: begin
gpmc_data_out = RAM_ADDR_BITS; gpmc_data_out = RAM_ADDR_BITS;
end end
12: begin
gpmc_data_out[0] = userlogic_reset;
gpmc_data_out[7:1] = 0;
end
default: begin default: begin
gpmc_data_out = 0; gpmc_data_out = 0;
end end

@ -1,6 +1,7 @@
# (c) 2013 Timothy Pearson, Raptor Engineering # (c) 2013 Timothy Pearson, Raptor Engineering
# Released into the Public Domain # Released into the Public Domain
NET "clk" LOC = "V10" | IOSTANDARD = "LVCMOS33"; NET "clk" LOC = "V10" | IOSTANDARD = "LVCMOS33";
NET "clk" TNM_NET = clk;
TIMESPEC TS_clk = PERIOD "clk" 100000 KHz HIGH 50%; TIMESPEC TS_clk = PERIOD "clk" 100000 KHz HIGH 50%;
#NET "serial_input" LOC = "T12" | IOSTANDARD = "LVCMOS33"; #NET "serial_input" LOC = "T12" | IOSTANDARD = "LVCMOS33";
@ -39,6 +40,7 @@ NET "usermem_wen" LOC = "V16" |IOSTANDARD = "LVCMOS33";
NET "usermem_wait" LOC = "T18" | SLEW = FAST | IOSTANDARD = "LVCMOS33"; NET "usermem_wait" LOC = "T18" | SLEW = FAST | IOSTANDARD = "LVCMOS33";
NET "userproc_start" LOC = "K16" | SLEW = FAST | IOSTANDARD = "LVCMOS33"; NET "userproc_start" LOC = "K16" | SLEW = FAST | IOSTANDARD = "LVCMOS33";
NET "userproc_done" LOC = "L13" | IOSTANDARD = "LVCMOS33"; NET "userproc_done" LOC = "L13" | IOSTANDARD = "LVCMOS33";
NET "userlogic_reset" LOC = "E13" | SLEW = FAST | IOSTANDARD = "LVCMOS33";
NET "usermem_data<0>" LOC = "V14" | SLEW = FAST | IOSTANDARD = "LVCMOS33"; NET "usermem_data<0>" LOC = "V14" | SLEW = FAST | IOSTANDARD = "LVCMOS33";
NET "usermem_data<1>" LOC = "T11" | SLEW = FAST | IOSTANDARD = "LVCMOS33"; NET "usermem_data<1>" LOC = "T11" | SLEW = FAST | IOSTANDARD = "LVCMOS33";
@ -126,5 +128,4 @@ NET "sseg_data<4>" LOC = "V6" |IOSTANDARD = "LVCMOS33";
NET "sseg_data<5>" LOC = "V8" | IOSTANDARD = "LVCMOS33"; NET "sseg_data<5>" LOC = "V8" | IOSTANDARD = "LVCMOS33";
NET "sseg_data<6>" LOC = "T8" | IOSTANDARD = "LVCMOS33"; NET "sseg_data<6>" LOC = "T8" | IOSTANDARD = "LVCMOS33";
NET "sseg_data<7>" LOC = "V11" | IOSTANDARD = "LVCMOS33"; NET "sseg_data<7>" LOC = "V11" | IOSTANDARD = "LVCMOS33";
#Created by Constraints Editor (xc6slx9-csg324-3) - 2014/01/09
NET "clk" TNM_NET = clk;

@ -326,6 +326,7 @@
<property xil_pn:name="Use Synchronous Reset" xil_pn:value="Auto" xil_pn:valueState="default"/> <property xil_pn:name="Use Synchronous Reset" xil_pn:value="Auto" xil_pn:valueState="default"/>
<property xil_pn:name="Use Synchronous Set" xil_pn:value="Auto" xil_pn:valueState="default"/> <property xil_pn:name="Use Synchronous Set" xil_pn:value="Auto" xil_pn:valueState="default"/>
<property xil_pn:name="Use Synthesis Constraints File" xil_pn:value="true" xil_pn:valueState="default"/> <property xil_pn:name="Use Synthesis Constraints File" xil_pn:value="true" xil_pn:valueState="default"/>
<property xil_pn:name="User Browsed Strategy Files" xil_pn:value="" xil_pn:valueState="default"/>
<property xil_pn:name="UserID Code (8 Digit Hexadecimal)" xil_pn:value="0xFFFFFFFF" xil_pn:valueState="default"/> <property xil_pn:name="UserID Code (8 Digit Hexadecimal)" xil_pn:value="0xFFFFFFFF" xil_pn:valueState="default"/>
<property xil_pn:name="VCCAUX Voltage Level spartan6" xil_pn:value="2.5V" xil_pn:valueState="default"/> <property xil_pn:name="VCCAUX Voltage Level spartan6" xil_pn:value="2.5V" xil_pn:valueState="default"/>
<property xil_pn:name="VHDL Source Analysis Standard" xil_pn:value="VHDL-93" xil_pn:valueState="default"/> <property xil_pn:name="VHDL Source Analysis Standard" xil_pn:value="VHDL-93" xil_pn:valueState="default"/>

@ -292,6 +292,6 @@ int main(int argc, char *argv[])
fclose(bitfile); fclose(bitfile);
freebh(&bh); freebh(&bh);
fprintf(stderr,"Process finsished sucefully.\n"); fprintf(stderr,"Process finished successfully.\n");
return 0; return 0;
} }

Loading…
Cancel
Save