Re: [hatari-devel] view the DSP stack?

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


Hi Doug,

Thanks a lot. I've uploaded a patch, if you can verify it.

I've also patched another instruction that I think was wrong timing :

P:ext  JSR ext_addr

Maybe you can test it too with my newpatch to verify if it's OK now ?

Eero, The way I've done this patch is probably not the most optimized :

I use one variable (access_to_ext_memory) as a 3 FLAG bits variable :
 - 1st bit for access to X external memory
 - 2nd bit for access to Y external memory
 - 3rd bit for access to P external memory

Then I have to slide the bits to count how many access I did to external memory.


	/* Add the waitstate due to external memory access */
 +	/* (2 extra cycles per extra access to the external memory after the first one */
 +	if (access_to_ext_memory != 0) {
 +		value = access_to_ext_memory & 1;
 +		value += (access_to_ext_memory & 2) >> 1;
 +		value += (access_to_ext_memory & 4) >> 2;
 +		
 +		if (value > 1)
 +			dsp_core.instr_cycle += (value - 1) * 2;
 +	}
 +


If you think there's a more optimized way to do it, just don't hesitate to change it.

Best regards

Laurent


Le 17/02/2013 16:58, Douglas Little a écrit :

Hi Laurent,

PS: Doug, I still have a patch ready to be send for the DSP timings, but I'd like to be sure there's a problem before sending it.

I finally got around to taking the measurements you asked for - the test does indeed show a difference in timing for L: memory references involving external memory.

Falcon030:

DSP ( L:Int P:Int )       -> 16.00 Mips (~100%)
DSP ( L:Ext P:Int )       -> 8.00 Mips (~100%)
DSP ( L:Int P:Ext )       -> 16.00 Mips (~100%)
DSP ( L:Ext P:Ext )       -> 5.33 Mips (~100%)

Hatari:

DSP ( L:Int P:Int )       -> 16.00 Mips (~100%)
DSP ( L:Ext P:Int )       -> 5.35 Mips (~67%)
DSP ( L:Int P:Ext )       -> 16.00 Mips (~100%)
DSP ( L:Ext P:Ext )       -> 4.00 Mips (~75%)


Cheers,
Doug.




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