# This is the register Config 0x8000 variable Config 0 variable Config.TrigMode 0 variable Config.TestPatGen 0 variable Config.TrigOlap 0 variable Config.Rate 0 proc GetConfig {} { variable Config variable Config.TrigMode variable Config.TestPatGen variable Config.TrigOlap variable Config.Rate set Config [ReadRegister Config] set Config.TrigOlap [expr ($Config >> 1) & 1] set Config.Rate [expr ($Config >> 12) & 1] set Config.TrigMode [expr ($Config >> 6) & 1] set Config.TestPatGen [expr ($Config >> 3) & 1] } proc SetConfig {} { variable Config variable Config.TrigMode variable Config.TestPatGen variable Config.TrigOlap variable Config.Rate set Config [expr \ ([set Config.Rate] << 12) + \ ([set Config.TrigOlap] << 1) + \ ([set Config.TestPatGen] << 3) + \ (1 << 4) + \ ([set Config.TrigMode] << 6) \ ] WriteRegister Config $Config } proc DrawConfig {} { set html "" append html "

" append html "" append html "" append html "" append html "" append html "" append html "" append html "" # Bit 1: Trigger Overlap append html "" # Bit 3: Test Pattern Generator : append html "" # Bit 6: Trigger Mode : append html "" # Bit 12: rate : append html "" append html "" append html "
Trigger OverlapTest Pattern GeneratorTrigger ModeRate
" append html "" append html "" append html "" append html "" append html "" append html "" append html "" append html "
" append html "

" return $html }