This class provides control and interaction with a System on Chip (SoC) during a debug session.
It offers functionality to focus on cores, perform memory operations, and handle various bus-related tasks on the SoC.
Inherits isys::CSessionBaseCtrl.
|
void | attach () |
| Attaches to the specified SoC. More...
|
|
NAccessBatch::EAccessBatchResult | bus_access_batch (uint8_t nBusIndex, CAccessBatch &rAccessBatch) |
| Performs a batch memory access operation. More...
|
|
void | bus_fill (uint8_t nBusIndex, uint64_t nAddress, uint64_t nNumMAUs, const std::vector< uint8_t > &rvPattern) |
| Fills a memory region with a specified pattern via the specified bus. More...
|
|
std::vector< uint8_t > | bus_read (uint8_t nBusIndex, uint64_t nAddress, uint64_t nNumMAUs, std::vector< uint8_t > *pvAccess=nullptr) |
| Reads data from memory via the specified bus. More...
|
|
void | bus_write (uint8_t nBusIndex, uint64_t nAddress, const std::vector< uint8_t > &rvData, std::vector< uint8_t > *pvAccess=nullptr) |
| Writes data to memory via the specified bus. More...
|
|
| CSoCCtrl (SPConnectionMgr spConnectionMgr, SPSessionCtrl spSessionCtrl, const SHSC &rHSC, const std::string &rstrSoC) |
| Constructor for CSoCCtrl. More...
|
|
void | detach () |
| Detaches from the specified SoC. More...
|
|
SPCoreCtrl | get_core (uint32_t dwCoreIndex) |
| Retrieves a shared pointer for a specific core control on the SoC. More...
|
|
uint32_t | SMP_get_focused_core (uint32_t dwCoreIndex) |
| Retrieves the currently focused core index in an SMP process. More...
|
|
void | SMP_set_focused_core (uint32_t dwCoreIndex) |
| Sets the focused core in an SMP process. More...
|
|
void isys::CSoCCtrl::bus_fill |
( |
uint8_t |
nBusIndex, |
|
|
uint64_t |
nAddress, |
|
|
uint64_t |
nNumMAUs, |
|
|
const std::vector< uint8_t > & |
rvPattern |
|
) |
| |
Fills a memory region with a specified pattern via the specified bus.
- Parameters
-
nBusIndex | Index of the bus to use. |
nAddress | Address to start writing the pattern. |
nNumMAUs | Number of Memory Access Units (MAUs) to write. |
rvPattern | Pattern to fill the memory with. If shorter than nNumMAUs , the pattern repeats. |
- Exceptions
-
TException | if the operation fails. |
Python example: test_soc_ctrl_bus_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('')
>>> soc.bus_fill(0, 0x20000000, 4, vect)
>>> vect_read = soc.bus_read(0, 0x20000000, 4)
>>> [e for e in vect_read]
[1, 2, 3, 4]
std::vector< uint8_t > isys::CSoCCtrl::bus_read |
( |
uint8_t |
nBusIndex, |
|
|
uint64_t |
nAddress, |
|
|
uint64_t |
nNumMAUs, |
|
|
std::vector< uint8_t > * |
pvAccess = nullptr |
|
) |
| |
Reads data from memory via the specified bus.
- Parameters
-
nBusIndex | Index of the bus to use. |
nAddress | Address to read from. |
nNumMAUs | Number of MAUs to read. |
pvAccess | Optional access information returned for each location accessed. |
- Returns
- std::vector<uint8_t> Data read from memory.
- Exceptions
-
TException | if the operation fails. |
Python example: test_soc_ctrl_bus_read.py
>>> conn_mgr = ic.ConnectionMgr()
>>> conn_mgr.connect()
>>> sess_ctrl = ic.CSessionCtrl(conn_mgr)
>>> sess_ctrl.begin_reset()
>>> soc = sess_ctrl.get_SoC('')
>>> vect = ic.VectorBYTE([8, 7, 6, 5])
>>> soc.bus_write(0, 0x20000000, vect)
>>> vect_read = soc.bus_read(0, 0x20000000, 4)
>>> [e for e in vect_read]
[8, 7, 6, 5]
void isys::CSoCCtrl::bus_write |
( |
uint8_t |
nBusIndex, |
|
|
uint64_t |
nAddress, |
|
|
const std::vector< uint8_t > & |
rvData, |
|
|
std::vector< uint8_t > * |
pvAccess = nullptr |
|
) |
| |
Writes data to memory via the specified bus.
- Parameters
-
nBusIndex | Index of the bus to use. |
nAddress | Address to write the data to. |
rvData | Data to write. |
pvAccess | Optional access information returned for each location accessed. |
- Exceptions
-
TException | if the operation fails. |
Python example: test_soc_ctrl_bus_write.py
>>> conn_mgr = ic.ConnectionMgr()
>>> conn_mgr.connect()
>>> sess_ctrl = ic.CSessionCtrl(conn_mgr)
>>> sess_ctrl.begin_reset()
>>> soc = sess_ctrl.get_SoC('')
>>> vect = ic.VectorBYTE([8, 7, 6, 5])
>>> soc.bus_write(0, 0x20000000, vect)
>>> vect_read = soc.bus_read(0, 0x20000000, 4)
>>> [e for e in vect_read]
[8, 7, 6, 5]