Device¶
The Device class is a container representing a Xilinx device. Device has methods for programming, memory access, and contains the detected collection of debug cores. The collection of detected devices is held in the session.
see chipscopy.Session.devices
-
class
chipscopy.api.device.device.
Device
(*, hw_server, cs_server, device_spec, disable_core_scan, disable_cache)[source]¶ Bases:
object
The Device class represents a single device. It is the base class for other Xilinx or Generic devices. Depending on the device type, some features may be available or unavailable.
Device has the kitchen sink of properties functions to make documentation and type hints easy. Child classes raise FeatureNotAvailable for functions they do not support.
-
property
chipscope_node
¶ Low level TCF node access - For advanced use
- Return type
Optional
[CoreParent
]
-
property
context
¶ Returns the unique context for this device. Normally this is the jtag node context. If this device is not on a jtag chain, the top level device context will be a non-jtag node.
- Return type
str
-
property
debugcore_node
¶ Low level TCF node access - For advanced use
- Return type
Optional
[CoreParent
]
-
discover_and_setup_cores
(*, hub_address_list=None, ltx_file=None, **kwargs)[source]¶ Scan device for debug cores. This may take some time depending on what gets scanned.
- Parameters
hub_address_list (
Optional
[List
[int
]]) – List of debug hub addresses to scanltx_file (
Union
[Path
,str
,None
]) – LTX file (which contains debug hub addresses)
- Keyword Arguments
ila_scan – True=Scan Device for ILAs
vio_scan – True=Scan Device for VIOs
ibert_scan – True=Scan Device for IBERTs
pcie_scan – True=Scan Device for PCIEs
noc_scan – True=Scan Device for NOC
ddr_scan – True=Scan Device for DDRs
hbm_scan – True=Scan Device for HBMs
sysmon_scan – True=Scan Device for System Monitor
-
get_program_log
(memory_target='APU')[source]¶ Returns: Programming log read from hardware (None=Use default transport)
- Parameters
memory_target – Optional name of memory target such as APU, RPU, DPC
- Return type
str
-
property
ibert_cores
¶ Returns: list of detected IBERT cores in the device
- Return type
QueryList
[IBERT
]
-
property
is_programmable
¶ Returns True if this Device is programmable, False otherwise
- Return type
bool
-
property
is_programmed
¶ Returns True if this Device is programmed, False otherwise.
- Return type
bool
-
property
is_valid
¶ Returns True if this Node is valid, False otherwise.
- Return type
bool
-
property
jtag_cable_node
¶ Low level TCF node access - For advanced use
- Return type
Optional
[JtagCable
]
-
property
jtag_node
¶ Low level TCF node access - For advanced use
- Return type
Optional
[JtagDevice
]
-
memory_read
(address, num=1, *, size='w', target=None)[source]¶ Read num values from given memory address. This method is slow because it locates the memory context in the target tree every time. If you want to execute a large number of memory operations, grab a memory context and do all the operations in batch. Note: This method should not be used in inner loops. It is not the fastest because it looks up the memory target every time. Inner loops should just call the find_memory_target once.
- Return type
List
[int
]
-
property
memory_target_names
¶ Returns: list of supported memory targets
- Return type
List
[str
]
-
memory_write
(address, values, *, size='w', target=None)[source]¶ Write list of values to given memory address. This method is slow because it locates the memory context in the target tree every time. If you want to execute a large number of memory operations, grab a memory context and do the operations in batch. Note: This method should not be used in inner loops. It is not the fastest because it looks up the memory target every time. Inner loops should just call the find_memory_target once.
-
property
noc_core
¶ Returns: List with NOC roots for the device
- Return type
-
program
(programming_file, *, skip_reset=False, delay_after_program=0, show_progress_bar=True, progress=None, done=None)[source]¶ Program the device with a given programming file (bit or pdi).
- Parameters
programming_file (
Union
[str
,Path
]) – PDI file pathskip_reset (
bool
) – False = Do not reset device prior to programdelay_after_program (
int
) – Seconds to delay at end of programming (default=0)show_progress_bar (
bool
) – False if the progress bar doesn’t need to be shownprogress (
Optional
[NewType()
(ProgressFutureCallback
,Callable
[[ForwardRef
],None
])]) – Optional progress callbackdone (
Optional
[NewType()
(DoneFutureCallback
,Callable
[[ForwardRef
],None
])]) – Optional async future callback
-
property
sysmon_root
¶ Returns: List with one SysMon core for the device
-
property