uC chip interface arduino  0.9.0
A interface for async and neuromrphic IC testing
Loading...
Searching...
No Matches
Interface_Async Class Reference

Public Member Functions

def __init__ (self, api_object, interface_id, direction)
 constructor for the async interface More...
 
def __str__ (self)
 
def ack_pin (self)
 get the ack pin of the interface as it is on the uC More...
 
def activate (self, req_pin, ack_pin, data_width, data_pins, mode="4Phase_Chigh_Dhigh", req_delay=0, time=0)
 activate the interface on the uC with the given parameters More...
 
def data_from_chip (self)
 get the data recived from the chip will retun 2 lists: one with the word recoded and one with the time when it was recorded, linked by index More...
 
def data_from_chip_and_clear (self)
 get the data recived from the chip and clear the buffer will retun 2 lists: one with the word recoded and one with the time when it was recorded, linked by index More...
 
def data_pins (self)
 get the data pins of the interface as they are on the uC More...
 
def data_to_chip (self)
 get the data send to the chip when they are actually send off by the uC data_to_chip will retun the data send by the uC to the device under test (DUT) More...
 
def data_to_chip_and_clear (self)
 get the data send to the chip when they are actually send off by the uC and clear the buffer data_to_chip will retun the data send by the uC to the device under test (DUT) More...
 
def data_width (self)
 get the data width of the interface as it is on the uC More...
 
def errors (self)
 get the list of errors associated with this interface object More...
 
def header (self)
 get the header this object is responcible for More...
 
def interface_type (self)
 get the human readable type of the interface More...
 
def process_packet (self, packet)
 process a packet from the uC, update the status of the interface object and store the data More...
 
def req_delay (self)
 get the request delay of the interface as it is on the uC More...
 
def req_pin (self)
 get the request pin of the interface as it is on the uC More...
 
def send (self, word, time=0)
 send a word to the chip More...
 
def status (self)
 get the human readable status of the interface More...
 
def update (self)
 

Detailed Description

Definition at line 24 of file interface_async.py.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  api_object,
  interface_id,
  direction 
)

constructor for the async interface

Parameters
api_objectuC_api parent object
interface_idid of the interface this object is responcible for
direction"TO_CHIP" or "FROM_CHIP"

Definition at line 25 of file interface_async.py.

Member Function Documentation

◆ __str__()

def __str__ (   self)

Definition at line 119 of file interface_async.py.

◆ ack_pin()

def ack_pin (   self)

get the ack pin of the interface as it is on the uC

Returns
: tuple of ack pin and its timestamp of to what and when the pin was actually set on the uC

Definition at line 176 of file interface_async.py.

◆ activate()

def activate (   self,
  req_pin,
  ack_pin,
  data_width,
  data_pins,
  mode = "4Phase_Chigh_Dhigh",
  req_delay = 0,
  time = 0 
)

activate the interface on the uC with the given parameters

       Mode: 
       - "4Phase_Chigh_Dhigh" means 4 phase clock with high active clock and high active data
       - "4Phase_Clow_Dhigh" means 4 phase clock with low active clock and high active data
       - "2Phase" means 2 phase clock with high active data
       - "4Phase_MCP23017" means 4 phase clock with high active clock and high active data and MCP23017 port extender, pin IDs are not used in this mode

       @param req_pin: request pin id on the uC
       @param ack_pin: ack pin id on the uC
       @param data_width: data width of the interface
       @param data_pins: list of data pin ids on the uC
       @param mode: mode of the interface - "4Phase_Chigh_Dhigh", "4Phase_Clow_Dhigh", "2Phase", "4Phase_MCP23017"
       @param req_delay: how much the request of the handshake is delayed multiplied by 20us
       @param time: the exec_time when the uc should activate the interface, 0 means as soon as possible

Definition at line 317 of file interface_async.py.

◆ data_from_chip()

def data_from_chip (   self)

get the data recived from the chip will retun 2 lists: one with the word recoded and one with the time when it was recorded, linked by index

Returns
: tuple of the of data list and their timestamp list - index matched

Definition at line 190 of file interface_async.py.

◆ data_from_chip_and_clear()

def data_from_chip_and_clear (   self)

get the data recived from the chip and clear the buffer will retun 2 lists: one with the word recoded and one with the time when it was recorded, linked by index

Returns
: tuple of the of data list and their timestamp list - index matched

Definition at line 212 of file interface_async.py.

◆ data_pins()

def data_pins (   self)

get the data pins of the interface as they are on the uC

Returns
: tuple of data pins and their timestamps of to what and when the pins were actually set on the uC

Definition at line 155 of file interface_async.py.

◆ data_to_chip()

def data_to_chip (   self)

get the data send to the chip when they are actually send off by the uC data_to_chip will retun the data send by the uC to the device under test (DUT)

will retun 2 lists: one with the word send and one with the exact time when it was send, linked by index

the time might differ slightly from the time you sheduled the send word, as it is the time when it was send out and the uC can only send one word at a time

Returns
: tuple of the of data list and their timestamp list (of when the uC send them) - index matched

Definition at line 198 of file interface_async.py.

◆ data_to_chip_and_clear()

def data_to_chip_and_clear (   self)

get the data send to the chip when they are actually send off by the uC and clear the buffer data_to_chip will retun the data send by the uC to the device under test (DUT)

will retun 2 lists: one with the word send and one with the exact time when it was send, linked by index

the time might differ slightly from the time you sheduled the send word, as it is the time when it was send out and the uC can only send one word at a time

Returns
: tuple of the of data list and their timestamp list (of when the uC send them) - index matched

Definition at line 225 of file interface_async.py.

◆ data_width()

def data_width (   self)

get the data width of the interface as it is on the uC

Returns
: tuple of data width and its timestamp of to what and when the width was actually set on the uC

Definition at line 162 of file interface_async.py.

◆ errors()

def errors (   self)

get the list of errors associated with this interface object

Returns
: list of errors

Definition at line 243 of file interface_async.py.

◆ header()

def header (   self)

get the header this object is responcible for

Returns
: list of headers

Definition at line 134 of file interface_async.py.

◆ interface_type()

def interface_type (   self)

get the human readable type of the interface

Returns
: tuple of type and timestamp of to what and when the type was actually set on the uC)

Definition at line 148 of file interface_async.py.

◆ process_packet()

def process_packet (   self,
  packet 
)

process a packet from the uC, update the status of the interface object and store the data

Parameters
packetpacket object to be processed

Definition at line 251 of file interface_async.py.

◆ req_delay()

def req_delay (   self)

get the request delay of the interface as it is on the uC

Returns
: tuple of request delay and its timestamp of to what and when the delay was actually set on the uC

Definition at line 183 of file interface_async.py.

◆ req_pin()

def req_pin (   self)

get the request pin of the interface as it is on the uC

Returns
: tuple of request pin and its timestamp of to what and when the pin was actually set on the uC

Definition at line 169 of file interface_async.py.

◆ send()

def send (   self,
  word,
  time = 0 
)

send a word to the chip

Parameters
wordword to be send
timethe exec_time when the uc should send the word, 0 means as soon as possible

Definition at line 368 of file interface_async.py.

◆ status()

def status (   self)

get the human readable status of the interface

Returns
: tuple of status and timestamp

Definition at line 140 of file interface_async.py.

◆ update()

def update (   self)

Definition at line 381 of file interface_async.py.


The documentation for this class was generated from the following file: