mmap_device_memory register read

By now we are dealing with Inteligent Instrumentation ACQ Module Carrier Board PCI20001 w/o DMA with AD module 20023M (option

with A/DC Burr-Brown ADS7800KP s/r 333kHz ).
We managed to perform memory mapping using mmap_device_memory (since Carrier is ISA bus memory mapped device), and it

operates well.

We have evaluated sample rate by means of Counter-Timer module, and realised folowing:

  • it is possible to achieve declared sample & conversion time of 3 mic. sec. when we use simple operation of software

triggering and conversion status waiting.

  • but when we include in loop reading two 8-bit AD registers, the lost of additional 3 micro seconds occured (approx. 1.5

micro second/register read)!!!
Our platform is x86 PC (P II Celeron 330 MHz) Neutrino 6.2.1A.
When we read other memory location outside of memory mapped region, register read time is approx. 20 nano seconds, ie 75

times faster!!!

Is it possible to achieve faster reading of device memory map? Is it a problem with ISA bus, PC architecture in general, or

something else? (BTW, in code we are using all IRQ disabled and boosted thread priority of approx. range 60)

A good device on ISA will give you 1Mbytes/sec async transfer rate.

Some BIOS have option to add wait state to ISA operation, check if yours is set to low, maybe that could speed it up a bit.

If you look at how the PC architecture works (and I suspect most modern archs), once you get out of the CPU, the fastest bus to the access is the main memory bus (front side bus on the PC). Depending upon the machine, access to this bus is going to be at 133Mhz and above - with DDR ram, you basically doube the speed by accessing it on the upclock and down clock.

Once you get off the main memory bus, your speed drops considerably. You can certainly get PCI devices which will work at 66 Mhz( with some issues to watch out for). If you go to an ISA bus, I believe the speed is 16 Mhz (been a while since I looked).

To me there is no doubt that the issuse in your case is the fact your memory is on the ISA bus. Going to a PCI based bus should give you a 4 times increase in speed (assuming all the devices on that particular PCI bus are all 66 Mhz capable). You are never going to get speeds approaching the main memory tho.

ISA is actually about 8Mhz. So the standard 33Mhz will give a 4x boost, 66Mgz gives 8x boost. In fact, it would probably be more due to the cycle costs of talking to ISA thru a PCI bridge (you get the latency twice). Even higher if you can get a PCI device that can DMA into memory.

Software has no say over the speed of ISA tranfers.

Common ISA hardware usually opperates at 1 MB/s, infact ioport accesses can’t go any faster. However, if the hw is designed correctly, a 16 bit memory access can be as fast as 8 MB/s on a 8 Mhz ISA bus.

Try setting or reading legacy registers in the southbridge or any ioport at all; you will find even on the latest centrino laptop with no apparent legacy devices that it’s still running at ISA speeds. :stuck_out_tongue:

Caching is not an option. Pre-fetch and post-write aren’t a done thing either but prolly could be, nobody is interested because memory mapped PCI cycles have all the features.