View topic - mmap_device_memory register read

mmap_device_memory register read

anything that doesn't fit to other groups.

mmap_device_memory register read

Postby slop67 » Wed Jan 28, 2004 1:20 pm

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)
slop67
New Member
 
Posts: 1
Joined: Wed Jan 28, 2004 12:50 pm

Postby mario » Wed Jan 28, 2004 3:57 pm

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.
mario
QNX Master
 
Posts: 4132
Joined: Sun Sep 01, 2002 1:04 am

Postby rick » Wed Jan 28, 2004 3:57 pm

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.
rick
QNX Master
 
Posts: 500
Joined: Wed Nov 13, 2002 3:59 am

Postby cdm » Wed Jan 28, 2004 8:08 pm

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.
cdm
QNX Master
 
Posts: 789
Joined: Fri Jul 05, 2002 9:38 am

Postby evanh » Wed Jan 28, 2004 8:26 pm

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. :P

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.
evanh
QNX Master
 
Posts: 735
Joined: Sat Feb 01, 2003 8:04 am


Return to General Programming

Who is online

Users browsing this forum: No registered users and 1 guest

cron