# This is the register Config 0x8000 variable Config 0 variable Config.ZeroSuppression 0 variable Config.Pack25 0 variable Config.TrigMode 0 variable Config.MemAccessMode 0 variable Config.TestPatGen 0 variable Config.TrigOlap 0 proc GetConfig {} { variable Config variable Config.ZeroSuppression variable Config.Pack25 variable Config.TrigMode variable Config.MemAccessMode variable Config.TestPatGen variable Config.TrigOlap set Config [ReadRegister Config] set Config.TrigOlap [expr ($Config >> 1) & 1] set Config.TrigMode [expr ($Config >> 6) & 1] set Config.TestPatGen [expr ($Config >> 3) & 1] set Config.MemAccessMode [expr ($Config >> 4) & 1] set Config.Pack25 [expr ($Config >> 11) & 1] set Config.ZeroSuppression [expr ($Config >> 16) & 3] } proc SetConfig {} { variable Config variable Config.ZeroSuppression variable Config.Pack25 variable Config.TrigMode variable Config.MemAccessMode variable Config.TestPatGen variable Config.TrigOlap set Config.ZeroSuppression 0 ;# these options are not supported by readout program set Config.Pack25 0 set Config [expr \ ([set Config.TrigOlap] << 1) + \ ([set Config.TestPatGen] << 3) + \ ([set Config.MemAccessMode] << 4) + \ ([set Config.TrigMode] << 6) + \ ([set Config.Pack25] << 11) + \ ([set Config.ZeroSuppression] << 16) \ ] WriteRegister Config $Config } proc DrawConfig {} { set html "" append html "

" append 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 4: Memory Access : append html "" # Bit 6: Trigger Mode : append html "" # Bit 11: pack 2.5 : append html "" # Bit 16: Zero Suppression : append html "" append html "" append html "
Trigger OverlapTest Pattern GeneratorMemory AccessTrigger ModePack 2.5Zero Suppression
" append html "" append html "" append html "" append html "" append html "" append html "" append html "" append html "" append html "" append html "" append html "" append html "
" append html "

" return $html }