I know that verilog is an HDL and its all about parallel processing but the problem I face is that I have to write a report on why a section of C++ code is better in an HDL environment.
So I have the C++ code, which I wrote in Verilog. It works perfectly. Now I have to write a report on how this section of code is faster in Verilog. So I have to do execution time comparisons.
I managed to find the execution time of my C++ code using the following method:
#include <iostream.h>
#include <time.h>
using namespace std;
int main()
{
clock_t t1,t2;
t1=clock();
//code goes here
t2=clock();
float diff ((float)t2-(float)t1);
cout<<diff<<endl;
system ("pause");
return 0;
}
Now how can I get the same result in Verilog? Is there any option in the Xilinx compiler that can tell me how long this code will take to produce the end result after it has been programmed onto an FPGA board? or can I add something to the code that will be able to give this result?
Thank you
<time.h>is the method I used to find out the execution time in C++.