winIDEA SDK
Loading...
Searching...
No Matches
isys::CSoCCtrl Class Reference

This class provides control and interaction with a System on Chip (SoC) during a debug session. More...

#include <CSessionCtrl.h>

Public Member Functions

CAccessBatch::EAccessBatchResult access_batch (CAccessBatch &rAccessBatch)
 Performs a batch memory access operation.
void attach ()
 Attaches to the specified SoC.
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.
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.
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.
void bus_write_file (uint8_t nBusIndex, uint64_t nAddress, const std::string &rstrPath)
 Writes file content to memory via the specified bus.
void detach ()
 Detaches from the specified SoC.
SPCoreCtrl get_core (uint32_t dwCoreIndex)
 Retrieves a shared pointer for a specific core control on the SoC.
void program ()
 Programs the SoC.
void program_verify ()
 Performs post-download verification on the SoC to ensure data integrity and correctness.
void reset ()
 Resets the SoC.
uint32_t SMP_get_focused_core (uint32_t dwCoreIndex)
 Retrieves the currently focused core index in an SMP process.
void SMP_set_focused_core (uint32_t dwCoreIndex)
 Sets the focused core in an SMP process.

Friends

class isys::CSessionCtrl

Detailed Description

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.

Member Function Documentation

◆ access_batch()

CAccessBatch::EAccessBatchResult isys::CSoCCtrl::access_batch ( CAccessBatch & rAccessBatch)

Performs a batch memory access operation.

Parameters
rAccessBatchReference to access batch structure containing the details of the batch operation. The data can be received by calling CAccessBatch::item(...) and reading from it's data member.
Returns
CAccessBatch::EAccessBatchResult sResult of the access batch operation.
Exceptions
TExceptionif the operation fails.

Python example: test_soc_ctrl_bus_access_batch.py

result = soc.access_batch(access_batch) # Execute batch access
if result == ic.CAccessBatch.EAccessBatchResult_OK: # Check if batch access was successful
print('Access batch OK')
else:
print(f'Access batch failed with error: {result}')
Since
9.21.174

◆ attach()

void isys::CSoCCtrl::attach ( )

Attaches to the specified SoC.

This call is only valid within an active session, when the debug session has already been established (e.g. with begin_attach()).

Exceptions
TExceptionif the operation fails.
Since
9.21.169

Python example: test_soc_ctrl_attach.py

>>> conn_mgr = ic.ConnectionMgr()
>>> conn_mgr.connect()
>>> sess_ctrl = ic.CSessionCtrl(conn_mgr)
>>> sess_ctrl.begin_reset()
>>> soc = sess_ctrl.get_SoC('')
>>> soc.attach()

◆ bus_fill()

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
nBusIndexIndex of the bus to use.
nAddressAddress to start writing the pattern.
nNumMAUsNumber of Memory Access Units (MAUs) to write.
rvPatternPattern to fill the memory with. If shorter than nNumMAUs, the pattern repeats.
Exceptions
TExceptionif the operation fails.
Since
9.21.169

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]

◆ bus_read()

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
nBusIndexIndex of the bus to use.
nAddressAddress to read from.
nNumMAUsNumber of MAUs to read.
pvAccessOptional access information returned for each location accessed.
Returns
std::vector<uint8_t> Data read from memory.
Exceptions
TExceptionif the operation fails.
Since
9.21.169

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]

◆ bus_write()

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
nBusIndexIndex of the bus to use.
nAddressAddress to write the data to.
rvDataData to write.
pvAccessOptional access information returned for each location accessed.
Exceptions
TExceptionif the operation fails.
Since
9.21.169

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]

◆ bus_write_file()

void isys::CSoCCtrl::bus_write_file ( uint8_t nBusIndex,
uint64_t nAddress,
const std::string & rstrPath )

Writes file content to memory via the specified bus.

Parameters
nBusIndexIndex of the bus to use.
nAddressAddress to write the data to.
rstrPathPath to file
Exceptions
TExceptionif the operation fails.
Since
9.21.152

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('')
>>> soc.bus_write_file(0, 0x20000000, 'image.bin')

◆ detach()

void isys::CSoCCtrl::detach ( )

Detaches from the specified SoC.

This call is only valid within an active session.

Exceptions
TExceptionif the operation fails.
Since
9.21.169

Python example: test_soc_ctrl_detach.py

>>> conn_mgr = ic.ConnectionMgr()
>>> conn_mgr.connect()
>>> sess_ctrl = ic.CSessionCtrl(conn_mgr)
>>> sess_ctrl.begin_reset()
>>> soc = sess_ctrl.get_SoC('')
>>> soc.attach()
>>> soc.detach()

◆ get_core()

SPCoreCtrl isys::CSoCCtrl::get_core ( uint32_t dwCoreIndex)

Retrieves a shared pointer for a specific core control on the SoC.

Parameters
dwCoreIndexIndex of the core to be retrieved.
Returns
SPCoreCtrl Core control shared pointer.
Since
9.21.169

◆ program()

void isys::CSoCCtrl::program ( )

Programs the SoC.

This call is only valid within an active session, when the debug session has already been established.

Exceptions
TExceptionif the operation fails.
Since
9.26.8

◆ program_verify()

void isys::CSoCCtrl::program_verify ( )

Performs post-download verification on the SoC to ensure data integrity and correctness.

This call is only valid within an active session, when the debug session has already been established.

This function checks the validity of the downloaded data and ensures that it meets expected standards (e.g., checksum verification, completeness).

Exceptions
TExceptionif the operation fails.
Since
9.26.8

◆ reset()

void isys::CSoCCtrl::reset ( )

Resets the SoC.

This call is only valid within an active session, when the debug session has already been established.

Exceptions
TExceptionif the operation fails.
Since
9.26.8

◆ SMP_get_focused_core()

uint32_t isys::CSoCCtrl::SMP_get_focused_core ( uint32_t dwCoreIndex)

Retrieves the currently focused core index in an SMP process.

Parameters
dwCoreIndexIdentifies the SMP binding
Returns
uint32_t Index of the focused core in the current process's SMP binding
Exceptions
TExceptionif the operation fails
Since
9.21.169

Python example: test_soc_ctrl_smp_get_focused_core.py

>>> conn_mgr = ic.ConnectionMgr()
>>> conn_mgr.connect()
>>> sess_ctrl = ic.CSessionCtrl(conn_mgr)
>>> sess_ctrl.begin_reset()
>>> soc = sess_ctrl.get_SoC('')
>>> soc.SMP_get_focused_core(0)
0

◆ SMP_set_focused_core()

void isys::CSoCCtrl::SMP_set_focused_core ( uint32_t dwCoreIndex)

Sets the focused core in an SMP process.

Parameters
dwCoreIndexIndex of the core to set focus on
Exceptions
TExceptionIf the operation fails or dwCoreIndex is not in the current process's SMP binding.
Since
9.21.169

Python example: test_soc_ctrl_smp_set_focused_core.py

>>> conn_mgr = ic.ConnectionMgr()
>>> conn_mgr.connect()
>>> sess_ctrl = ic.CSessionCtrl(conn_mgr)
>>> sess_ctrl.begin_reset()
>>> soc = sess_ctrl.get_SoC('')
>>> focused_core = soc.SMP_get_focused_core(0)
>>> focused_core
0
>>> soc.SMP_set_focused_core(focused_core)