2. Define the AXI stream data type and add the dds process function - 2023.2 English

Vitis Tutorials: Vitis Platform Creation (XD101)

Document ID
XD101
Release Date
2023-12-26
Version
2023.2 English

This function simply read the data into the kernel and then sends it out through another port.

Define a new ‘pkt’ type before the kernel function definition.

OLD

extern "C" {
/*
    Vector Addition Kernel
    ...
...

NEW

typedef ap_axis<15, 0, 0, 0> pkt;

static void dss_process( int *wave, hls::stream<pkt> &s_in) {
    for (int i = 0; i < 1024; i++) 
    {
        #pragma HLS PIPELINE II = 1
        pkt value = s_in.read();
        wave[i] = value.data;
    }
}
extern "C" {
/*
    Vector Addition Kernel
    ...