Hey there,
If you go to:
C:\Analog Devices\ADSP-BF609_Evaluation_Board-Rel1.1.0\BF609_EZ-Board\Blackfin\Examples\drivers\pvp
(providing you have the BF609 support package downloaded)
You can find multiple examples of the PVP, including convolution.
convolution_input.c
This file is used to describe the input parameters for the convolution. For instance it defines the kernels used for the convolution. e.g.
ADI_PVP_CNV_KERNEL gCONV0Coef =
{
0X0000, 0X000D, 0X0037, 0X000D, 0X0000,
0X000D, 0X0381, 0X0E11, 0X0381, 0X000D,
0X0037, 0X0E11, 0X3868, 0X0E11, 0X0037,
0X000D, 0X0381, 0X0E11, 0X0381, 0X000D,
0X0000, 0X000D, 0X0037, 0X000D, 0X0000,
};
Convolution.c
This is the main file. If this is the project you mentioned, i can quickly go over it as it does use the PVP.
In the main function (int32_t main (void)) there are a few function calls which are used for the PVP.
E.G.
if( (RetVal = OpenPVPDevice()) != SUCCESS)
{
REPORT_ERROR("\n Failed to open the PVP device \n");
return FAILURE;
}
Before i go on, it's important to remember that this example uses the MEMORY pipe, not the camera pipe.
OpenPVPDevice()
This function initializes the PVP. It opens the device, opens the pipe, opens the stream (for the input), and opens the stream (for the output),
ConfigPVP()
This is the function they use to configure the PVP. Essentially in this function each block of the pvp is initialized and configured and the pipe configuration is created. In this function they also submit buffers to the input/output stream. CONVOutBuf is used as the input, and also the output, buffer. So if you ran the project, debugged it, and viewed CONVOutBuf (in the image viewer) you would see the output of the PVP (once the project has ran).
Once the buffers are submitted to the input/output, the input/output stream is enabled.
ConnectModules()
This connects the PVP processing blocks.
IPF1 is the input formatter where the input buffer enters the PVP. CNV0/CNV1 are the convolution blocks, and OPF3 Is the output formatter.
The buffer enters into IPF1 via the DMA from memory, and the output buffer (After convolution) exits from OPF3 via the DMA to memory.
adi_pvp_ApplyPipeConfig(ghCONVConf)
The config, initialized and configured from the functions listed above, is applied with this function.
After this the PVP pipe/PVP is simply enabled and now we're cooking with gas.