Other Parts Discussed in Thread: HALCOGEN
How to calculate time taken to execute the below function - RM48 kit. I know the clock frequency is 220Mhz and the period is around 4ns. execution time = period * number of cycle
how the number of cycles can be calculated
void expitr()
{
float k;
if(vte > 40)
{
vte = 20;
}
o = vte; //instentaneous flow rate value during inspiration
sciSend(scilinREG,1,(unsigned char*)"-");
y[0]=((int)o/100)%10 + 0x30;
y[1]=((int)o/10)%10 + 0x30;
y[2]=((int)o)%10 + 0x30;
y[3]=',';
sciSend(scilinREG,4,(unsigned char*)&y);
//sciSend(scilinREG,2,(unsigned char*)"\n\r");
//k = vte*1000*(((float)40-l12)/(float)60);
//k = k/8;
k =vte*10*(((float)40-l12)/(float)60);
k = k*2;
o = k; //Last
y[0]=((int)o/100)%10 + 0x30;
y[1]=((int)o/10)%10 + 0x30;
y[2]=((int)o)%10 + 0x30;
y[3]=',';
sciSend(scilinREG,4,(unsigned char*)&y);
if (f2 < 4)
{
o = LP_AW;
}
else
{
o = qqtot;
}
//o = LP_AW; //instentaneous presure value in airway during inspiration
y[0]=((int)o/100)%10 + 0x30;
y[1]=((int)o/10)%10 + 0x30;
y[2]=((int)o)%10 + 0x30;
y[3]=',';
sciSend(scilinREG,4,(unsigned char*)&y);
//sciSend(scilinREG,2,(unsigned char*)"\n\r");
}