1- Variables defined in the global scope in a C/C++ HLS description are implemented by registers or flip-flops and initialised to zeros by default. These variables may optionally be assigned a specific initial value. For the initialised variables, the C code values are assigned at compile time (at time zero) and never again.
Synthesise the following code and show that flip-flops implement the global variables.

2- Write an HLS code that describes an N-bit circular shift-register (right rotate operation) with a load and shift, data_in inputs and a data_out output, as shown in the following figure. Note that N is a constant parameter. When the load is 1, the register is initialised with data_in, and when the rotate input is one, the register rotates one bit to the right.
Then assume N is 17 and synthesis the code in Vitis-HLS, and show the RTL/C Co-simulation waveforms. The function prototype is shown below.

3- Write an HLS code for an N-bit shift register with three inputs and an N-bit output. This is the top-function prototype.
void left_right_shift_register(bool d, bool left, bool right, ap_uint<N> &data_out);
When the left input is one the register is shifted one bit to the left and the d input enters from the right. When the right input is one the register is shifted one bit to the right and the d input enters from the left.
The data_out represents the N-bit data in the register.