"""
This script demonstrates operations on MPC5xxxController
- reads a TLB entry
- writes a TLB entry
"""
import isystem.connect as ic
if __name__ == '__main__':
winidea_id = ''
cmgr = ic.ConnectionMgr()
cmgr.connect(ic.CConnectionConfig().instanceId(winidea_id))
debugCtrl = ic.CDebugFacade(cmgr)
debugCtrl.download()
MPCCtrl = ic.CMPC5xxxController(cmgr)
TLB = MPCCtrl.getTLB(7)
TLB.m_dwMAS3 = 0x40800000 | (TLB.m_dwMAS3 & 0xFFF)
MPCCtrl.setTLB(7, TLB)