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

Vitis Tutorials: Vitis Platform Creation (XD101)

Document ID
XD101
Release Date
2024-06-19
Version
2024.1 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<16, 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
    ...