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.