📄 mdimain.frm
字号:
' EvalBd.FUD_DUT2 = abvLow
' EvalBd.WriteEvbBuffVal evb59Buff1
' Case "reset_dut1"
' 'Reset Dut 1 if clicked
' EvalBd.Reset_DUT1 = abvHigh
' EvalBd.WriteEvbBuffVal evb59Buff2
' EvalBd.Reset_DUT1 = abvLow
' EvalBd.WriteEvbBuffVal evb59Buff2
' Case "reset_dut2"
' 'Reset Dut 1 if clicked
' EvalBd.Reset_DUT2 = abvHigh
' EvalBd.WriteEvbBuffVal evb59Buff2
' EvalBd.Reset_DUT2 = abvLow
' EvalBd.WriteEvbBuffVal evb59Buff2
' Case "ioreset_dut1"
' 'Reset Dut 1 if clicked
' EvalBd.IOSync_DUT1 = abvHigh
' EvalBd.WriteEvbBuffVal evb59Buff2
' EvalBd.IOSync_DUT1 = abvLow
' EvalBd.WriteEvbBuffVal evb59Buff2
' Case "ioreset_dut2"
' 'Reset Dut 1 if clicked
' EvalBd.IOSync_DUT2 = abvHigh
' EvalBd.WriteEvbBuffVal evb59Buff2
' EvalBd.IOSync_DUT2 = abvLow
' EvalBd.WriteEvbBuffVal evb59Buff2
' End Select
Select Case Button.Key
Case "open":
mnuFileLoadSettings_Click
Case "save":
mnuFileSaveSettings_Click
Case "control":
'Show the configure IO window
mnuWindowControl_Click
Case "frequency":
mnuWindowFreq_Click
Case "rameditor":
mnuFileOpenRAMFile_Click
Case "ramconfig":
mnuWindowRAMConfig_Click
Case "amplitude":
mnuWindowAmplitude_Click
End Select
End Sub
Private Sub tlbMainToolBar_ButtonDropDown(ByVal Button As MSComctlLib.Button)
' Debug.Print "ButtonDropDown"
End Sub
Private Sub tlbMainToolBar_ButtonMenuClick(ByVal ButtonMenu As MSComctlLib.ButtonMenu)
' Debug.Print "ButtonMenuClick"
Select Case ButtonMenu.Key
Case "afud_dut1":
tlbMainToolBar.Buttons("fud_dut1").Image = "afud"
EvalBd.AutoFUD_DUT1 = True
' tlbMainToolBar.Buttons("fud_dut1").Caption = "FUD DUT1"
Case "mfud_dut1":
tlbMainToolBar.Buttons("fud_dut1").Image = "mfud"
EvalBd.AutoFUD_DUT1 = False
' tlbMainToolBar.Buttons("fud_dut1").Caption = "FUD"
Case "afud_dut2":
tlbMainToolBar.Buttons("fud_dut2").Image = "afud"
EvalBd.AutoFUD_DUT2 = True
' tlbMainToolBar.Buttons("fud_dut2").Caption = "Auto FUD"
Case "mfud_dut2":
tlbMainToolBar.Buttons("fud_dut2").Image = "mfud"
EvalBd.AutoFUD_DUT2 = False
' tlbMainToolBar.Buttons("fud_dut2").Caption = "FUD"
End Select
End Sub
Private Sub tlbMainToolBar_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 2 Then
PopupMenu mnuToolBarPopup
End If
End Sub
'Occurs whenever a reset occurs
Private Sub EvBd_ResetOccured(DUTNum As Integer, WasPwdwn As Boolean)
Screen.MousePointer = 11
'Do a FUD to finish the reset
EvalBd.FUD_DUT1 = abvHigh
EvalBd.FUD_DUT2 = abvHigh
EvalBd.WriteEvbBuffVal evb59Buff1
EvalBd.FUD_DUT1 = abvLow
EvalBd.FUD_DUT2 = abvLow
EvalBd.WriteEvbBuffVal evb59Buff1
'Reset the evalbd lines
EvalBd.ClkMdSel_DUT1 = abvLow
EvalBd.ClkMdSel_DUT2 = abvLow
If Not HardwareOnlyReset Then
'Refresh the control windows controls
frmControl.RefreshControls
frmFrequency.RefreshControls
frmIOInterface.RefreshControls
frmAmplitude.RefreshControls
frmRAMConfig.RefreshControls
frmRAMConfig.ResetForm
frmDUTSignals.RefreshControls
If WasPwdwn And frmControl.chkPwrDwnPin(DUTNum - 1).value = 0 Then
frmControl.PowerDownForm DUTNum, False
frmFrequency.PowerDownForm DUTNum, False
frmAmplitude.PowerDownForm DUTNum, False
frmRAMConfig.PowerDownForm DUTNum, False
End If
End If
Screen.MousePointer = 0
End Sub
'Occurs whenever one of the registermaps are modified
Private Sub EvBd_RegMapChanged(DUTNum As Integer, RegMap As Integer, RegAddr As Integer)
Dim bDut1LinSwpEnable As Boolean
Dim bDut2LinSwpEnable As Boolean
Dim bDut1RamEnable As Boolean
Dim bDut2RamEnable As Boolean
If RegMap = 1 Then
If RegAddr = 0 Then
With EvalBd
bDut1LinSwpEnable = CBool(.sGetNewRegMapBitVal(1, 0, 21))
bDut2LinSwpEnable = CBool(.sGetNewRegMapBitVal(2, 0, 21))
bDut1RamEnable = CBool(.sGetNewRegMapBitVal(1, 0, 31))
bDut2RamEnable = CBool(.sGetNewRegMapBitVal(2, 0, 31))
End With
'Only enable the "Load Both DUT's" check box on the RAM Config Window
'if the conditions are right
If (bDut1LinSwpEnable = bDut2LinSwpEnable) And (bDut1RamEnable = bDut2RamEnable) Then
If IsLoaded("frmRAMConfig") Then
frmRAMConfig.chkLoadBothDUTs.Enabled = True
End If
Else
If IsLoaded("frmRAMConfig") Then
frmRAMConfig.chkLoadBothDUTs.Enabled = False
End If
End If
End If
End If
If IsLoaded("frmRegisterMap") Then
'Update the new values registermap
If RegMap = 0 Then
frmRegisterMap.UpdateForm
'Highlight any buttons that should be
' FlashCntr = 4
' tmrLoadAnim_Timer
End If
End If
End Sub
Private Sub tmrLoadAnim_Timer()
Dim cntr As Integer
Dim sTemp0 As String
Dim sTemp1 As String
Dim sTemp2 As String
Dim sTemp3 As String
Dim sTemp4 As String
Dim sTemp5 As String
If FlashCntr = 4 Then
'Flash the IOInterface windows load button if needed
If frmIOInterface.NeedsLoading Then
'Set the load button background color to the flash color
frmIOInterface.cmdLoad.BackColor = FlashOnColor
End If
'Flash the button
With EvalBd
For cntr = 0 To 12
'Check DUT1
If .sGetNewRegMapVal(1, cntr) <> .sGetRegMapVal(1, cntr) Then
Select Case cntr
Case &H0, &H1
sTemp0 = Left(.sGetNewRegMapVal(1, &H0), 22) & Right(.sGetNewRegMapVal(1, &H0), 8)
sTemp1 = Left(.sGetRegMapVal(1, &H0), 22) & Right(.sGetRegMapVal(1, &H0), 8)
sTemp2 = .sGetNewRegMapVal(1, &H1)
sTemp3 = .sGetRegMapVal(1, &H1)
If (sTemp0 <> sTemp1) Or (sTemp2 <> sTemp3) Then
'Set the load button background color to the flash color
frmControl.cmdLoad.BackColor = FlashOnColor
End If
Case &H2, &H3
'Set the load button background color to the flash color
frmAmplitude.cmdLoad.BackColor = FlashOnColor
Case &H4 To &H6 'FTW & POW Registers
'If the dut is not in Linear sweep mode
' If EvalBd.sGetRegMapBitVal(1, 0, 21) = abvLow Then
'If in the DUT is not in linear sweep mode
'Set the load button background color to the flash color
frmFrequency.cmdLoad.BackColor = FlashOnColor
' Else
' 'Set the load button background color to the flash color
' frmRAMConfig.cmdLoad.BackColor = FlashOnColor
' End If
Case &H7, &H8, &H9, &HA 'RAM Seg Control Registers
'Set the load button background color to the flash color
frmRAMConfig.cmdLoad.BackColor = FlashOnColor
Case &HC
If IsLoaded("frmTestReg") Then
'Set the load button background color to the flash color
frmTestReg.cmdLoad.BackColor = FlashOnColor
End If
End Select
End If
'Check DUT2
If .sGetNewRegMapVal(2, cntr) <> .sGetRegMapVal(2, cntr) Then
Select Case cntr
Case &H0, &H1
'Get only the bits from the control registers interested in
sTemp0 = Left(.sGetNewRegMapVal(2, &H0), 22) & Right(.sGetNewRegMapVal(2, &H0), 8)
sTemp1 = Left(.sGetRegMapVal(2, &H0), 22) & Right(.sGetRegMapVal(2, &H0), 8)
sTemp2 = .sGetNewRegMapVal(2, &H1)
sTemp3 = .sGetRegMapVal(2, &H1)
If (sTemp0 <> sTemp1) Or (sTemp2 <> sTemp3) Then
'Set the load button background color to the flash color
frmControl.cmdLoad.BackColor = FlashOnColor
End If
sTemp0 = Mid(.sGetNewRegMapVal(2, &H0), 9, 2)
sTemp1 = Mid(.sGetRegMapVal(2, &H0), 9, 2)
If sTemp0 <> sTemp1 Then
'Set the load button background color to the flash color
frmIOInterface.cmdLoad.BackColor = FlashOnColor
End If
Case &H2, &H3
'Set the load button background color to the flash color
frmAmplitude.cmdLoad.BackColor = FlashOnColor
Case &H4 To &H6 'FTW & POW Registers
'If the dut is not in Linear sweep mode
' If EvalBd.sGetRegMapBitVal(2, 0, 21) = abvLow Then
'If in the DUT is not in linear sweep mode
'Set the load button background color to the flash color
frmFrequency.cmdLoad.BackColor = FlashOnColor
' Else
' 'Set the load button background color to the flash color
' frmRAMConfig.cmdLoad.BackColor = FlashOnColor
' End If
Case &H7, &H8, &H9, &HA 'RAM Seg Control Registers
'Set the load button background color to the flash color
frmRAMConfig.cmdLoad.BackColor = FlashOnColor
Case &HC
If IsLoaded("frmTestReg") Then
'Set the load button background color to the flash color
frmTestReg.cmdLoad.BackColor = FlashOnColor
End If
End Select
End If
Next cntr
End With
'Reset the counter
FlashCntr = 0
Else
'Incriment cntr
FlashCntr = FlashCntr + 1
If frmFrequency.cmdLoad.BackColor <> NormalColor Then
'Set the backcolor to the normal color
frmFrequency.cmdLoad.BackColor = NormalColor
End If
If frmControl.cmdLoad.BackColor <> NormalColor Then
frmControl.cmdLoad.BackColor = NormalColor
End If
If frmIOInterface.cmdLoad.BackColor <> NormalColor Then
frmIOInterface.cmdLoad.BackColor = NormalColor
End If
If frmRAMConfig.cmdLoad.BackColor <> NormalColor Then
frmRAMConfig.cmdLoad.BackColor = NormalColor
End If
If frmAmplitude.cmdLoad.BackColor <> NormalColor Then
frmAmplitude.cmdLoad.BackColor = NormalColor
End If
If IsLoaded("frmTestReg") Then
If frmTestReg.cmdLoad.BackColor <> NormalColor Then
frmTestReg.cmdLoad.BackColor = NormalColor
End If
End If
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -