SPRUIG3C January 2018 – August 2019 TDA4VM , TDA4VM-Q1
A VCOP kernel written in VCOP Kernel-C is specified as C-callable function with arguments. The function body consists of one or more VCOP loop commands, table lookup commands, or histogram commands, collectively known as vloop commands.
On EVE, the kernel is invoked via a C-callable API consisting of five functions, which are generated by VCC. For a kernel named
kernel
written in VCOP Kernel-C, the API is:
unsigned int kernel_init (<args>, unsigned
short pblock[])
pblock[]
unsigned int kernel_param_count (void)
void kernel_vloops (unsigned short
pblock[])
void kernel (<args>)
kernel_init()
and
kernel_vloops()
using a statically allocated parameter
blockvoid kernel_custom ()
kernel_init()
and
kernel_vloops()
using a passed-in parameter blockThe API gives the application varying levels of control over the kernel execution. A naive application can simply call the kernel as kernel(<args>). A more sophisticated application that wants to control parameter buffer allocation and leverage double-buffering would call the lower level functions directly.
The migration tool generates these same five functions, as C++ functions for C7x. Therefore the functional interface to the kernel remains the same.
Figure 2-1 illustrates the kernel API in its original form for EVE and as translated for C7x.