winIDEA SDK
Loading...
Searching...
No Matches
mpc5xxx_tlb_read_write.py
1# This script is licensed under BSD License, see file LICENSE.txt, or search for `License` in the SDK online help.
2#
3# (c) TASKING Germany GmbH, 2023
4
5"""
6This script demonstrates operations on MPC5xxxController
7- reads a TLB entry
8- writes a TLB entry
9"""
10
11
12import isystem.connect as ic
13
14if __name__ == '__main__':
15 winidea_id = ''
16
17 cmgr = ic.ConnectionMgr()
18 cmgr.connect(ic.CConnectionConfig().instanceId(winidea_id))
19
20 debugCtrl = ic.CDebugFacade(cmgr)
21 debugCtrl.download()
22
23 # get MPC5xxx controller
24 MPCCtrl = ic.CMPC5xxxController(cmgr)
25
26 # get TLB 7
27 TLB = MPCCtrl.getTLB(7)
28
29 # change RPN to 0x40800000 physical
30 TLB.m_dwMAS3 = 0x40800000 | (TLB.m_dwMAS3 & 0xFFF)
31
32 # set TLB 7
33 MPCCtrl.setTLB(7, TLB)
34
35