Factory methods

chipscopy.create_session(*, hw_server_url, cs_server_url=None, **kwargs)[source]

Create a new session. Connect to the specified hw_server, and optionally the cs_server.

  • hw_server is used for programming and Versal Memory read/write operations

  • cs_server is used for higher level debug core communication

Example 1: Default session create

my_session = create_session(hw_server_url="TCP:localhost:3121",
                            cs_server_url="TCP:localhost:3042")

Example 2: Disable core scanning and server version checking

my_session = create_session(hw_server_url="TCP:localhost:3121",
                            cs_server_url="TCP:localhost:3042",
                            disable_core_scan=True,
                            bypass_version_check=True)
Parameters
  • hw_server_url (str) – Hardware server URL. Format TCP:<hostname>:<port>

  • cs_server_url (Optional[str]) – ChipScope server URL. Format TCP:<hostname>:<port>

Keyword Arguments
  • disable_core_scan – Set True to completely disable core scanning during discover_and_setup_debug_cores

  • bypass_version_check – Set True to change hw_server and cs_server version mismatch to warning instead of error

  • xvc_mm_server_url – Url for the testing xvc memory map server - For special debug core testing use cases

  • cable_timeout – Seconds before timing out when detecting devices on a jtag cable

  • initial_device_scan – Do an initial device scan when opening session (lazy initialization otherwise)

  • disable_cache – Control client caching (experimental)

  • auto_connect – Automatically connect to server(s) when session is created

  • cs_server_sharing – Enable reference count to share cs_server connections

Return type

Session

Returns

New session object.

chipscopy.delete_session(session)[source]

Delete a session. Shuts down any open server connections.

Parameters

session (Session) – The session object to delete

chipscopy.api.session

class chipscopy.api.session.Session(*, hw_server_url, cs_server_url=None, xvc_mm_server_url=None, disable_core_scan, bypass_version_check, cable_timeout, disable_cache, initial_device_scan, cs_server_sharing)[source]

Bases: object

Top level object that tracks a connection to a hardware server and optionally, chipscope server. To create and destroy a session, use the factory function create_session() and delete_session().

property cables

Returns a list of all cables connected to the hw_server. Similar to vivado get_hw_targets command. target_cables may be jtag or virtual.

Return type

QueryList[Cable]

property devices

Returns a list of devices connected to this hw_server and cable. Devices may span multiple jtag chains. No ordering is guaranteed. Devices are cached after scanning until an event changes state and requires a re-scan if caching is enabled.

Return type

QueryList[Device]

get_param(params)[source]

Generic parameter get and set for low level chipscope server params

Return type

Dict[str, str]

static set_log_level(level=None)[source]

Set the logging level for the ChipScoPy client. This applies to all sessions. Default is “NONE”

Parameters

level (Optional[str]) – The minimum level to use for the logger. Valid levels are “TRACE”, “DEBUG”, “INFO”, “SUCCESS”, “WARNING”, “ERROR”, “CRITICAL”, “NONE”

set_param(params)[source]

Generic parameter get and set for low level chipscope server params