[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: PCI real time video to disk
Hi,
If you are running a Windows operating system (as would be indicated by
saying you are
on a 'wintel' platform), then you certainly don't want to be calling any
BIOS routines directly
to save data to disk, if that disk partition is currently mounted by the
operating system! You
must use operating-supplied calls to get the data to and from the hard
drive, if you wish to
cooperate with maintaining the operating system's coherent view of the file
system. If
you wish to stream to a raw partition, then you must at least assure
yourself that you
aren't crossing swords with the OS for use of the disk controller. The OS
is almost
assuredly not using the BIOS for anything than intial booting of the system,
and is
likely talking directly to the disk controller. Directly changing disk
controller registers
from within another process will cause race conditions and file system
failures.
That said, a modern PIII-based system has the IDE disk driver chip
interfaced on
the mainboard via the PCI bus, rather than (for instance) tied to the CPU
memory
directly. While you may be able to bus-master writes from your video
capture board
directly into the disk data channels, you will need to set this operation up
with the
cooperation of the operating system. In Windows NT, for instance, such
bus-mastering
devices are called 'Adapters' (go figure), and you will need to look in the
Windows Device
Driver Kit (DDK) documentation and sample files (part of the Microsoft
Developer's Network
(MSDN) massive CD/DVD set) for example code for Adapter-type devices. As
far as
I remember, all such examples assume that the transfer is taking place
between the
device and CPU main memory, so you may have to get rather creative to hook
something
together 'under the covers' in the NT kernel mode device driver realm to get
one device
to stream directly to the other, without using main CPU memory as a
'go-between' buffer.
If you manage to overlap the I/O streams, and don't saturate the memory and
PCI bandwidth,
you may be able to get what you need by going ahead and using the CPU memory
as a buffer. The bottlenecks will be the PCI bus itself, since the video
capture
board and the CPU north bridge will be competing as bus-masters, and the CPU
north
bridge, since you will be trying to stream 12.5 MBytes/sec *into* the
bridge, while
the bridge is trying to stream 12.5 MBytes/sec back *out* of the bridge to
the hard
drive controllers, using the CPU memory as a FIFO, to absorb latencies in
the
system. If you have a small (less than several megabyte) buffer on your
video
capture board (and most modern PCI video capture designs have dispensed
practically
with buffers altogether), then you will need some CPU memory as a FIFO, and
a
guarantee of minimal latency in getting data *into* the north bridge, or
else you
will surely drop data coming from the capture card. If you try to write
directly to
the disk drive, then either the capture card or the drive has to have enough
fast buffer
to keep you from losing data from the real-time video stream while waiting
for
drive positioning, etc.
Cheers,
-- DaveN
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
=-=
Dave New, NewD@elcsci.com | Machine vision?
ESI Vision Products Division | At least *they* can see the future...
3980 Ranchero Drive |
Ann Arbor, MI 48108 | Opinions expressed are mine. | PGP
2.6
(734) 332-7010 VOX | 08 12 9F AF 5B 3E B2 9B 6F DC 66 5A 41 0B AB
29
(734) 332-7077 FAX
-----Original Message-----
From: Daniel DeConinck [mailto:daniel.deconinck@sympatico.ca]
Sent: Thursday, November 02, 2000 12:30 PM
To: pci-sig@znyx.com
Subject: PCI real time video to disk
Hello,
I have designed a PCI target with video capture. I need to stream 12.5MB/sec
to hard disk on a wintel PIII platform.
Should I:
-move the data across the PCI bus from my PCI device to PC main memory
-then make a BIOS call to save memory to disk.
OR
-should I just leave the memory on my target PC and call the BIOS disk save
command ?
What path does data take when going to the hard disk (in a typical wintel
PIII) ?
Does it originate from any memory address either on a PCI device or mother
board ?
Do the hard disk controllers connect directly to the CPU bus or is the hard
disk controller a PCI device ?
Dan DeConinck