cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Adventurer
Adventurer
2,518 Views
Registered: ‎12-26-2013

How can I measure the HW execution cycles and time communication?

Hi everybody,

 

I'm working with EDK 12.4 and ML507 VIRTEX5 board.

I'm trying to implement a HW accelerator that executes some function.

I have measured the number of clock cycles needed to execute the following piece of my code, I found it =247883855 cycles. This timer output includes both the execution time of HW and communication time between the Microblaze and the HW.

But my goal is to measure separately the execution time taken by the HW processor to execute these functions and the communication time taken between the Microblaze and this HW accelerator to read or write data.

 

for (c=0; c<d; c++)
	{

   SOBEL_mWriteSlaveReg0(baseaddr, 0, pic[f+a][b+e]);
	
  
   SOBEL_mWriteSlaveReg1(baseaddr, 0, pic[f+a][b+1+e]);

   SOBEL_mWriteSlaveReg2(baseaddr, 0, pic[f+a][b+2+e]);
 
   SOBEL_mWriteSlaveReg3(baseaddr, 0, pic[f+a+1][b+e]);
  
   SOBEL_mWriteSlaveReg4(baseaddr, 0, pic[f+a+1][b+1+e]);
	
	SOBEL_mWriteSlaveReg5(baseaddr, 0, pic[f+a+1][b+2+e]);

	SOBEL_mWriteSlaveReg6(baseaddr, 0, pic[f+a+2][b+e]);
  
	SOBEL_mWriteSlaveReg7(baseaddr, 0, pic[f+a+2][b+1+e]);
 
	SOBEL_mWriteSlaveReg8(baseaddr, 0, pic[f+a+2][b+2+e]);

	Reg32Value1 = SOBEL_mReadSlaveReg9(baseaddr, 0);

	tab1[c]=Reg32Value1;
	
	Reg32Value2 = SOBEL_mReadSlaveReg10(baseaddr, 0);
	
	tab2[c]=Reg32Value2;
	e++;

	if (e%(largeur-2)==0)
	{
	e=0;
	f++;
	}	

	 }
	 

 

Can you help me please.

I would be very grateful for any help.

Thanks in advance.

 

0 Kudos
2 Replies
Highlighted
Xilinx Employee
Xilinx Employee
2,490 Views
Registered: ‎10-24-2013

Re: How can I measure the HW execution cycles and time communication?

Hi,
Please check this AR .
http://www.xilinx.com/support/answers/23013.html
Thanks,Vijay
--------------------------------------------------------------------------------------------
Please mark the post as an answer "Accept as solution" in case it helped resolve your query.
Give kudos in case a post in case it guided to the solution.
0 Kudos
Highlighted
Adventurer
Adventurer
2,481 Views
Registered: ‎12-26-2013

Re: How can I measure the HW execution cycles and time communication?

Hi,

 

Thank you for your reply.

 

I have already measured the time (number of cycles) of the above code using the PLB Timer Peripheral and and I found it equal to 247883855 cycles. 

But my need is to measure separately  the time spending for sending and receiving data through registers : mwriteslaveReg and mreadSlaveReg and the time execution taken by the HW module to compute received data.

 

I would appreciate any help on this.

 

0 Kudos