We have generated the 500 test bench samples using actual samples of an ECG signal. The above code detects the QRS peaks in an ECG using Curve Length Transform and gives the output peak values as well as the sample numbers. The above code doesn't make use of loops and as such is directly hardware - implementable.