# This is the register Config 0x8000 variable Config 0 variable Config.TrigMode 0 variable Config.TestPatGen 0 variable Config.TrigOlap 0 variable Config.GateMode 0 proc GetConfig {} { variable Config variable Config.TrigMode variable Config.TestPatGen variable Config.TrigOlap variable Config.GateMode set Config [ReadRegister Config] set Config.GateMode [expr $Config & 1] set Config.TrigOlap [expr ($Config >> 1) & 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.GateMode set Config [expr \ ([set Config.GateMode]) + \ ([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 "
| Gate Mode | " append html "Trigger Overlap | " append html "Test Pattern Generator | " append html "Trigger Mode | " append html "
| " append html "" append html " | " # Bit 1: Trigger Overlap append html "" append html "" append html " | " # Bit 3: Test Pattern Generator : append html "" append html "" append html " | " # Bit 6: Trigger Mode : append html "" append html "" append html " | " append html "