cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Observer
Observer
2,023 Views
Registered: ‎06-05-2009

Xilkernel timing analysis

Hi,

I am trying to do some timing analysis for xilkernal, but the results didn't make sense to me. I am using an external pin to generate interrupt and the external pin is connected to an xps_intr whose Irq then is connected to the interrupt of MicroBlaze.  I am using Spartan 3a Starter kit and clock is 62.5MHz.

 

1. The first test is to measure the timing from external pin raising an interrupt to ISR start, the time I got is 50us.  

2, The secon test is to measure the ISR itself, the ISR code is like

 

{  

  

  //  raise the test GPIO pin for debugging

   XGpio_DiscreteWrite (&xgpioDebugInstance, 1, 0xFF);

 

   acknowledge_interrupt (XPAR_XPS_INTC_0_PROCESSOR_SUBSYSTEM_INTERRUPT_PORT_0_PIN_INTR);

       
    // wake up the main interrupt thread
    sem_post (&ssemIntHandlerSyncSemaphore);

 

   //  clears the test GPIO pin for debugging

   XGpio_DiscreteWrite (&xgpioDebugInstance, 1, 0x00);

 

}

 

basically, it only acknowleges the interrupt and wake up an application thread.  The time I got is 202 us.

 

3. The third test is to measure how long it needs to wake up the application thread. The application thread is like

 

{

   while (1)

   {

       sem_wait (&ssemIntHandlerSyncSemaphore);

     

       //  raise the test GPIO pin for debugging

       XGpio_DiscreteWrite (&xgpioDebugInstance, 1, 0xFF);

 

 

       // handling the interrupt

       .....

 

   }

 

 

}

 

The time I got is 306 us.

 

All of the times seem too long, which doesn't make sense. So anyone hs any idesa what I have done wrong?

 

fchpj

0 Kudos