This class provides debug session functions.
#include <CSessionCtrl.h>
Inherits isys::CSessionBaseCtrl.
|
void | observe (bool bObserve) |
| Enables core observation, call is valid only within session. More...
|
|
void | memory_fill (uint8_t nMemoryArea, uint64_t nAddress, uint64_t nNumMAUs, const std::vector< uint8_t > &rvPattern) |
| Fills memory with the specified pattern. More...
|
|
void | memory_write (uint8_t nMemoryArea, uint64_t nAddress, const std::vector< uint8_t > &rvData, std::vector< uint8_t > *pvAccess=nullptr) |
| Writes memory. More...
|
|
std::vector< uint8_t > | memory_read (uint8_t nMemoryArea, uint64_t nAddress, uint64_t nNumMAUs, std::vector< uint8_t > *pvAccess=nullptr) |
| Reads memory. More...
|
|
◆ memory_fill()
void isys::CCoreCtrl::memory_fill |
( |
uint8_t |
nMemoryArea, |
|
|
uint64_t |
nAddress, |
|
|
uint64_t |
nNumMAUs, |
|
|
const std::vector< uint8_t > & |
rvPattern |
|
) |
| |
Fills memory with the specified pattern.
- Parameters
-
nMemoryArea | index of the area to be used |
nAddress | the address to write to |
nNumMAUs | number of addresses to write |
rvPattern | the pattern to be used for fill. If it is shorter than nNumMAUs , the pattern is repeated. |
- Exceptions
-
TException | if operation fails. |
Python example: test_memory_fill.py
>>> conn_mgr = ic.ConnectionMgr()
>>> conn_mgr.connect()
>>> vect = ic.VectorBYTE([1, 2, 3, 4])
>>> sess_ctrl = ic.CSessionCtrl(conn_mgr)
>>> sess_ctrl.begin_reset()
>>> soc = sess_ctrl.get_SoC('')
>>> core_ctrl = soc.get_core(0)
>>> core_ctrl.memory_fill(0, 0x200000A0, 4, vect)
>>> vect = core_ctrl.memory_read(0, 0x200000A0, 4)
>>> [e for e in vect]
[1, 2, 3, 4]
◆ memory_read()
std::vector< uint8_t > isys::CCoreCtrl::memory_read |
( |
uint8_t |
nMemoryArea, |
|
|
uint64_t |
nAddress, |
|
|
uint64_t |
nNumMAUs, |
|
|
std::vector< uint8_t > * |
pvAccess = nullptr |
|
) |
| |
Reads memory.
- Parameters
-
nMemoryArea | index of the area to be used |
nAddress | the address to read from |
nNumMAUs | number of MAUs |
pvAccess | optional parameter - access info is returned for every accessed location |
- Returns
- the data read
- Exceptions
-
TException | if operation fails. |
Python example: test_memory_read.py
>>> conn_mgr = ic.ConnectionMgr()
>>> conn_mgr.connect()
>>> vect = ic.VectorBYTE([1, 2, 3, 4])
>>> sess_ctrl = ic.CSessionCtrl(conn_mgr)
>>> sess_ctrl.begin_reset()
>>> soc = sess_ctrl.get_SoC('')
>>> core_ctrl = soc.get_core(0)
>>> core_ctrl.memory_fill(0, 0x200000A0, 4, vect)
>>> vect = core_ctrl.memory_read(0, 0x200000A0, 4)
>>> [e for e in vect]
[1, 2, 3, 4]
◆ memory_write()
void isys::CCoreCtrl::memory_write |
( |
uint8_t |
nMemoryArea, |
|
|
uint64_t |
nAddress, |
|
|
const std::vector< uint8_t > & |
rvData, |
|
|
std::vector< uint8_t > * |
pvAccess = nullptr |
|
) |
| |
Writes memory.
- Parameters
-
nMemoryArea | index of the area to be used |
nAddress | the address to write to |
rvData | the data to write |
pvAccess | optional parameter - access info is returned for every accessed location |
- Exceptions
-
TException | if operation fails. |
Python example: test_memory_write.py
>>> conn_mgr = ic.ConnectionMgr()
>>> conn_mgr.connect()
>>> vect = ic.VectorBYTE([1, 2, 3, 4])
>>> sess_ctrl = ic.CSessionCtrl(conn_mgr)
>>> sess_ctrl.begin_reset()
>>> soc = sess_ctrl.get_SoC('')
>>> core_ctrl = soc.get_core(0)
>>> core_ctrl.memory_write(0, 0x200000A0, vect)
>>> vect = core_ctrl.memory_read(0, 0x200000A0, 4)
>>> [e for e in vect]
[1, 2, 3, 4]
◆ observe()
void isys::CCoreCtrl::observe |
( |
bool |
bObserve | ) |
|
Enables core observation, call is valid only within session.
- Parameters
-
bObserve | set it to true to enable core observation, false to disable it |
- Exceptions
-
TException | if operation fails. |
Python example: test_observe.py
>>> conn_mgr = ic.ConnectionMgr()
>>> conn_mgr.connect()
>>> sess_ctrl = ic.CSessionCtrl(conn_mgr)
>>> sess_ctrl.begin_reset()
>>> soc = sess_ctrl.get_SoC('')
>>> core_ctrl = soc.get_core(0)
>>> core_ctrl.observe(True)