"vikram" <vi******@yahoo.co.uk> wrote in message
news:80**************************@posting.google.c om...
hello sir,
plz have patience to read this looooong mail.
i need to design a high speed recording system.
the pci card has a plx chip which provides dma facilty for data
transfer.
for dma i need the source address and the destination address....
Not only that but the PLX chip needs physical rather than virtual
addresses.
i have input audio files (.wav files) i need to read the data from the
files and store the audio data in an buffer.
buffer is malloc(sizeof(audio File)) or virtualalloc(...)
virtualalloc(...) isn't a standard C++ function, I assume you are
programming on a Win32 platform?
On a Win32 system malloc() and VirtualAlloc() return virtual rather than
physical addresses. But that is only one problem. On systems with virtual
memory (like Windows) there is no guarantee that the memory you allocate is
backed by physical RAM memory, it may be on the hard disk or not even
committed at all. In other words even if malloc() succeeds the allocated
memory may not be accessible by the PLX.
To control the PLX chip you will need to write a device driver or use a
toolkit that allows you to access hardware and allocate physical RAM from a
user mode program.
then i give this buffer[0] as the start address for dma transfer.and
the destination address as the plx register offset which is mapped to
a FIFO.from FIFO output goes to analog output where data is recorded.
Now the question is i need the whole of audio data in RAM.
due to performance issues.. i cant fetch from hard disk and start
transfer.
Are you sure there is a performance issue? Normally the speed of a hard
disks is more than adequate for audio applications. If made audio and video
applications in the past and certainly for for audio applications the speed
of the harddisk has never been an issue.
i need data in memory and start transfer... will it hold data upto
1.5GB in RAM ...?
This obviously depends on how much RAM is in your system. Also some concern
is if your PLX chip supports scatter/gatter lists (the old PLX chips didn't
allow scatter/gatter lists on the PCI side of the bridge), otherwise the
physical RAM needs to be contiguous as well...
any suggestion is apprecieated..
This question has nothing to do with the C++ language (the topic of this
newsgroup). I suggest you read this first:
http://www.slack.net/~shiva/welcome.txt and then visit one of the newsgroup
dedicated to the OS you are using.
--
Peter van Merkerk
peter.van.merkerk(at)dse.nl