# This is the register Config 0x8000 variable Config 0 variable Config.TrigPolarity 0 variable Config.TestPatGen 0 variable Config.TrigOlap 0 proc GetConfig {} { variable Config variable Config.TrigPolarity variable Config.TestPatGen variable Config.TrigOlap set Config [ReadRegister Config] set Config.TrigOlap [expr ($Config >> 1) & 1] set Config.TestPatGen [expr ($Config >> 3) & 1] set Config.TrigPolarity [expr ($Config >> 6) & 1] } proc SetConfig {} { variable Config variable Config.TrigPolarity variable Config.TestPatGen variable Config.TrigOlap set Config [expr \ ([set Config.TrigOlap] << 1) + \ ([set Config.TestPatGen] << 3) + \ (1 << 4) + \ ([set Config.TrigPolarity] << 6) ] WriteRegister Config $Config } proc DrawConfig {} { variable Name set html "" append html "
" append html "
| Trigger Overlap | " append html "Test Pattern Generator | " append html "Trigger Polarity | " append html "
| " append html "" append html " | " # Bit 3: Test Pattern Generator : append html "" append html "" append html " | " # Bit 6: Trigger Polarity : append html "" append html "" append html " | " append html "