Protocols

For the TPM the only protocol definition is currently UCP.

Uniboard Control Protocol

The user interface to the TPM CPLD is based upon a UDP-IP core which manages MAC, IP and UDP layers and allows the user to execute sequences of memory mapped bus accesses from a network device. The specific protocol implemented over UDP to convey the information about the memory mapped accesses is the Uniboard Control Protocol (UCP). The CPLD is able to decode a UCP packet and translate the memory access into an internal bus access, thus allowing the user to access registers that have been memory mapped into the CPLD address space.

class ska_low_sps_tpm_api.protocols.ucp.UCP(board, logger=None)[source]

Class implementing the UCP communication protocol

class OPCODE(value)[source]

Device enumeration

ASYNC_UPDATE = 19
BITWISE_AND = 3
BITWISE_OR = 4
BIT_WRITE = 11
CANCEL_UPDATE = 20
FIFO_READ = 9
FIFO_WRITE = 10
FLASH_ERASE = 8
FLASH_READ = 7
FLASH_WRITE = 6
OVERLAPPED_WRITE = 40
PERIODIC_UPDATE = 18
READ = 1
RESET_BOARD = 17
WAIT_FOR_PPS = 4294967295
WRITE = 2
__init__(board, logger=None)[source]

UCP class constructor

close_connection()[source]

Close socket connection

create_connection(ip, port, src_ip=None)[source]

Create connection.

Parameters:
  • ip – Remote IP

  • port – Remote port

read_register(address, n, offset)[source]

Read register value from board.

Parameters:
  • address – Address to read from

  • n – Number of values to read

  • offset – Offset to read from

select_map_program(bitfile_data, fifo_addr=None, ucp_smap_write=True, lock_obj=None)[source]

Program the board using select map.

Parameters:

values – Values to write

write_register(address, values, offset=0, retry=True)[source]

Write values to register.

Parameters:
  • address – Address to write to

  • values – Values to write

  • offset – Offset to write to

  • retry – Enable retries of write operation