Michel Julier wrote: > > Hello, > > SPEED: > I have a concern about the speed of transfers from IO ports (on an ISA > bus) to the memory. I am using and insb() instruction (that is "REP; > INSB" in assembly) in an rtlinux real-time thread in the kernel. > According to the specs for 386, I expect to spend 2 cycles for "REP" and > 9 cycles for "INSB" (386 protected mode at highest permission level).
Forget it. Those numbers are for the processor, not for ISA. ISA runs at 8MHz with rather long and ineffective bus cycles. Every time you do an I/O access, your helpful chipset will slow the processor down to that speed. My old 286, which has a 12MHz Processor & bus is a lot faster than my new Athlon 1600. Funny enough, this behaviour is generic for I/O, so even I/O on the PCI bus works at that speed. >From my experience I/O takes 1us per access. This is constant enough accross different PCs, so the Linux kernel uses it for timing. > > However, using a scope, I find that each byte takes 2�s (on a > Pentium-MMX at 133 MHz) or 3�s (on a DIMM-PC: 386SX at 40MHz) to arrive. > The read cycle itself (that is /IOR=0) takes about 500ns (already quite > long), and I really cannot understand what does the processor the rest > of the time. > > Does anyone have any idea? Is it just normal, or can I try something > else? What really puzzles me is that I know some systems that transfer > up to 1MB/s on the parallel port. Each byte needs at least 2 IO > operations, so how is it possible? I have heard that rumour myself, but could not reproduce it. You can get that speed using ECP and DMA but with software control you can only reach about 500K/s. EPP will get you close to 1M/s with a very fast EPP device. Kind regards, Iwo -- Iwo Mergler, Navigation Systems, Philips Semiconductors - Systems Laboratory (Southampton). Tel: +44 (0)2380 31 2646 (Direct Dial) Fax: +44 (0)2380 31 6304 mailto:[EMAIL PROTECTED] _______________________________________________ Rtl mailing list [EMAIL PROTECTED] http://www2.fsmlabs.com/mailman/listinfo.cgi/rtl
