Re: [hatari-devel] Hatari profiler updates and DSP cycle questions

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Hi,

I've uploaded the change (2 extra cycles per extra access to the external memory).
Is it better this way ?

Laurent


Le 01/02/2013 11:50, Douglas Little a écrit :

Hi Laurent,
 
For the external access to memory, my code in hatari does the following :

In memory access, I count the number of access to external memory in nb_access_to_extMemory

Ok..
 
Then, in the main loop, I do :

        /* Add the waitstate due to external memory access */
        if (nb_access_to_extMemory > 1)
                dsp_core.instr_cycle += nb_access_to_extMemory - 1;


Do you think I should replace it with

        /* Add the waitstate due to external memory access */
        if (nb_access_to_extMemory > 1)
                dsp_core.instr_cycle += nb_access_to_extMemory*2 - 2;


Yes - in terms of 32MHz oscillator cycles it seems there should be a +2 penalty for each additional external memory reference (the first one being free).

So I believe your correction above is needed, yes. i.e. 

  ext_ref_penalty = (num_ext_ref - 1) * 2


I don't quite understand how the current formula (+1) could yield the figures I saw in the DSP test under Hatari though. That looks like a separate issue perhaps? The test itself is raced against a 200Hz TimerC, so it is a 'real time' measurement of the DSP performance with changes to external memory reference patterns only...

D.



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/