2. Compile of S2MM HLS kernel - 2025.1 English - XD098

Vitis Tutorials: Getting Started (XD098)

Document ID
XD098
Release Date
2025-06-17
Version
2025.1 English

The S2MM code (s2mm.cpp) is simple and as follows:

void s2mm(ap_int<32>* mem, hls::stream<ap_axis<32, 0, 0, 0>  >& s, int size) {
	for(int i = 0; i < size; i++) {
		ap_axis<32, 0, 0, 0> x = s.read();
		mem[i] = x.data;
	}

The “s” is the AXI-Stream input to HLS kernel and “mem” is the AXI-MM output from the kernel. “for” loop input the data AXI-Stream data and generates AXI-MM data.

To compile the above code, we will use v++ -c –mode hls command:

v++ -c --mode hls --platform $(PLATFORM) --config s2mm.cfg

The above command will generate a HLS kernel s2mm.xo.

Next Chapter: Create a host application using AMD VCK190 platform


Copyright © 2020–2025 Advanced Micro Devices, Inc.

Terms and Conditions