C/C++ Reference

C/C++ Reference

Rather than repeating what’s already well-explained elsewhere, this page collects tutorials, references, and videos for brushing up on C and C++ concepts used in EMBS. If there is a resource that you particularly like and think that others would benefit from it, let us know and we’ll add the link.

Note

For Zynq-specific compiler and linker information, see the C Compilation Tips page.

Getting Started

Pointers and Memory

Note

In EMBS, malloc on the Zynq works but makes HLS porting harder. See the C Compilation Tips page for linker and heap sizing information.

Bitwise Operations

Common patterns you’ll use frequently:

reg |= (1 << n);   // Set bit n
reg &= ~(1 << n);  // Clear bit n
reg ^= (1 << n);   // Toggle bit n