Yes, I'm still harping on. Sorry :-)
Edwin wrote:
> Like the Idea. So I looked a bit better at LDIR in ROM too.
>
> LDIR is made up of 5 M-cycles:
> 4,4,3,5,5 for standard LDIR = 21T
> 4,4,3+1,5,5+2 LDIR in RAM with RAM contemption = 24T
> 4+4,4+4,3+5,5,5+6 LDIR in RAM with Display contemption = 40Ts
> 4,4,3+1,5,5+2 LDIR in ROM with RAM contemption = 24Ts
See I disagree about this...
Won't it be
[4]
[4]
Loop around:
{3},{1 WAIT} 4 cycles
{5},[3 of 5] 8 cycles
[2 of 5],[2 of 4] 4 cycles
[2 of 4], {2 WAIT} 4 cycles
or 20 t-states per byte? (plus initial setup, of course)
> When looking at a LDI:
> 4,4,3+1,5+3 LDI in RAM with RAM contemption =20Ts
> 4+4,4+4,3+5,5+3 LDI in RAM with display contemption =32Ts
>
> From the above timings you can see that a block of LDIs is 4Ts or
> 16.6% per byte faster then a LDIR (anywhere) during RAM contemption.
Don't think so.
> But during display contemption a LDIR in ROM is as fast as a LDI in RAM.
This is true.
To clarify:
LDIR in ROM, RAM contention
[4]
[4]
Loop around:
{3},{1 WAIT}
{5},[3 of 5]
[2 of 5],[2 of 4]
[2 of 4], {2 WAIT}
LDIR in ROM, DISPLAY contention:
[4], [4]
loop around:
{3}, {5 WAIT}
{5}, [3 of 5]
[2 of 5], [4], [2 of 4]
[2 of 4], {6 WAIT}
ie 32 t-states
LDI in RAM, RAM contention:
{4}
{4}
{3}{1 WAIT}
{5}{3 WAIT}
Still 20 t-states. So RAM-contended RAM-based unrolled LDIs are as slow
(fast) as ROM-based LDIR.
LDI in RAM, DISPLAY contention:
{4}{4 WAIT}
{4}{4 WAIT}
{3}{5 WAIT}
{5}{3 WAIT}
32 t-states. So display-contended RAM-based unrolled LDIs are as slow (fast)
as ROM-based LDIR too.
Of course you still have additional CALL/RET times (32 RAM-contended or 64?
DISPLAY-contended) but that plays against the issue of the inflexibility of
unrolled LDIs.
Or am I (still!!) missing something?
Geoff
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________