Frame 5

AI Engine Programming: A Kahn Process Network Evolution (WP552)

Document ID
WP552
Release Date
2023-07-20
Revision
1.0 English

The fifth set of data started writing to the buffers (ping buffer – buf0/buf1) and the vadd kernel (node/actor) started processing frame 4. The addConstant kernel (node/actor) must wait to process frame 2 because it cannot write to the buffer that is used by the fir_32 kernel (node/actor) for processing frame 1. This generates the memory lock for the input tokens. The copy_in_out kernel starts processing frame 2 as the token is ready.

Figure 1. Frame 5
Table 1. Sending the Frame 5 – Tokens/Kernels Status
KPN Terminology Input Token for Vadd Node/Actor Input Token for addConstant Node/Actor Input Token for fir_32 Input Token for copy_in_out Node/ Actor Port Node/ Actor Port
AI Engine Buffer (ping/pong) Vadd

Buffer (ping/pong)

addConstant

Buffer (ping/pong)

Buffer (ping/pong)

copy_in_out

Buffer (ping/pong)

fir_32

Buffer (ping/pong)

buf0/

buf1

buf0d/

buf1d

buf2 buf2d buf3 buf3d Buf4 buf4d buf6 buf6d buf5 buf5d
Frame 1 Fill - Waiting - - Waiting - - - - Waiting - - Waiting - -
Frame 2 Token ready Frame 1 Fill Processing (Frame 1) Fill - Waiting - - - - Waiting - - Waiting - -
Frame 3 Fill Token ready Frame 2 Processing (Frame 2) Token ready Frame 1 Fill Processing (Frame 1) Fill - Fill - Waiting - - Waiting - -
Frame 4 Token ready Frame 3 Fill Processing (Frame 3) Fill Token ready Frame 2 Processing (Frame 2) Token ready Frame 1 Fill Token ready for Frame 1 Fill

Processing (Frame 1)

Fill -

Processing (Frame 1)

Fill -
Frame 5 Fill Token ready Frame 4 Processing (Frame 4) - Locked Waiting Locked Token ready Frame 2 Locked Token ready Frame 2 Processing (Frame 2) - Fill Processing (Frame 1) Fill -