1- (vector dot-product)

a. Describe a circuit in HLS, called dot_product_core, that receives two integer numbers denoted by x and y and performs the following operation.


Note that s save the previous function call results. The input signal determines the first function call, which should assume s=0.


b. If and represent two integer vectors, then the following equation calculates their dot-product.

For example if n=4, x={1, 2, 1, 4} and y={0,2,1,3}, then

d=1*0+2*2+1*1+4*3=17

Describe the dot-product using the dot_product_core function.

Note that the circuit should be able to receive data in each clock cycle.


2-  (median filter)

The median filter is usually used to remove noises from input signals or images. This filter replaces each input data sample with the median of neighbouring samples. These neighbouring samples are defined based on a window around the input data. If the size of the window is 3, then the following figure shows an example of how this filter works.

Descibe the filter in HLS. The design top-function prototype should be as follows:

void median_filter(int in_data, bool start, int &out_data, bool &out_data_vld );

The final RTL design should accept a new data sample in each clock cycle.