Thank you all for your responses. I am reading that ISA book at the moment, so i still have a lot to understand. This is going to be a long post. This is as I understand it (so far):
The XT:
4.77MHz is ~210ns, 210ns = ~4.76Mhz
It takes 4 cycles to read or write 1 byte to/from RAM. (840ns)
It takes 5 cycles to read or write 1 byte to/from I/O. (1050ns)
It takes 5 cycles to read or write 1 byte Via DMA. (1050ns)
(1 Bytes x 4.77MHz)/4 = 1.1925 MB/s ~ 1.19MB/s ~ 1.1905 ~ (1 Bytes x 1000/210ns)/4
(1 Bytes x 4.77MHz)/5 = 0.954 MB/s ~ 0.95MB/s ~ 0.952 ~ (1 Bytes x 1000/210ns)/5
1.13 megabytes, i assume you mean 1.19? unless i missed something.
XT PIO transfer:
So if we are going to move data from a card (above port 254) to another card, using PIO (is that the correct term?)
Code:
Loop: mov dx, 378h ;Point at LPT1: data port (2 cycles*)
in al, dx ;Read byte from printer port. (5 cycles)
mov dx, 278h ;Point at LPT2: data port (2 cycles*)
out dx, al ;Write byte in AL to ptr port. (5 cycles)
jmp Loop (15 cycles, what!*)
>* I am assuming "dx, 378h" is equivalent to reg, reg. 2 cycles according to:
http://zsmith.co/intel_m.html#mov
15 cycles!
http://zsmith.co/intel_j.html#jmp
Code example based on:
https://courses.engr.illinois.edu/ece390/books/artofasm/CH06/CH06-4.html#HEADING4-144
So using this method we have 2+5+2+5+15 = 14 + 15 (seriously!). Lets just ignore the loop instruction. If we just copy-paste the first four lines enough times, we can effectively optimize it out of the equation So:
14 cycles, per byte moved.
So (1 byte x 1000/210ns)/14 = ~0.340MB/s Max transfer rate.
XT DMA:
Ok i am having problems with this one, lots of diagrams, no code, sounds complicated.
AT
8MHZ is 125ns, lets just stick with 8MHz for the time being.
It takes 3 cycles to read or write 2 bytes to/from I/O. (375ns)
(2 Bytes x 8MHz)/3 = 5.33 MB/s = (2 Bytes x 1000/125ns)/3
AT PIO:
So if we are going to move data from a card (above port 254) to another card, using PIO:
Code:
mov dx, 378h ;Point at LPT1: data port (2 cycles*)
in ax, dx ;Read word from printer port. (3 cycles)
mov dx, 278h ;Point at LPT2: data port (2 cycles*)
out dx, ax ;Write word in AL to ptr port. (3 cycles)
>* Again I am assuming dx, 378h is equivalent to reg, reg. 2 cycles according to:
http://zsmith.co/intel_m.html#mov
So using this method we have 2+3+2+3 = 10 cycles, per word moved.
So ((2bytes x 1000)/125ns)/10 = 1.600MB/s Max transfer rate.
a 286/386 at 16MHz (bus is just half speed 8MHz)
Ok now we have basically a double speed CPU, most instructions would be twice as fast, but if we access an 8MHz ISA bus, any instruction should, take the same time in ns, right? So:
Code:
ISA: CPU (2x ISA):
mov dx, 378h ;Point at LPT1: data port (1 cycles) (2 cycles)
in ax, dx ;Read word from printer port. (3 cycles) (6 cycles)
mov dx, 278h ;Point at LPT2: data port (1 cycles) (2 cycles)
out dx, ax ;Write word in AL to ptr port. (3 cycles) (6 cycles)
I hope that makes sense. The CPU does the mov instruction (2 CPU cycles), within the time one ISA bus cycle has elapsed.
So using this method we have 1+3+1+3 = 8 cycles, per word moved.
So ((2bytes x 1000)/125ns)/8 = 2.000MB/s Max transfer rate.
32MHz CPU:
we have 0.5+3+0.5+3 = 7 cycles, per word moved.
So ((2bytes x 1000)/125ns)/7 = 2.286MB/s Max transfer rate.
64MHz CPU
we have 0.25+3+0.25+3 = 6.5 cycles, per word moved.
So ((2bytes x 1000)/125ns)/6.5 = 2.462MB/s Max transfer rate.
I think I'm on the right track, the figures look right, but that could just be coincidence.
Mike, does the Inboard operate at 16MHz, and the bus still at 4.77MHz, I think this is correct:
4.77Mhz / 16MHz = ~0.3, so the cpu should be able to perform the mov instructions in (previously 2 bus cycles, in 0.6 cycles, so:
0.6+5+0.6+5 = 11.2
So (1 byte x 1000/210ns)/11.2 = ~0.425MB/s Max transfer rate.
Of course, if anyone finds any errors in my calculations, please please let me know.