1/1
how to handle burst mode read/write of PCI in device driver
by Unknown on Dec 6, 2003 |
Not available! | ||
Hi everyone,
I am using driverstudio to write a device driver for my PCI card, but i don't know how to call up burst mode Read on my PCI card, i try to use one of this method VOID ind(ULONG Offset, PULONG buf, ULONG count); in the declaration of KMemoryRange supplied by driverstudio. It can read in a string of DWORD (32 bits) data but it is not performing burst mode read on the hardware . It is just read in data one by one. My question is : 1. How can i call up burst mode Read in my device driver? Is there any command or method can use , or i need to handle the IRP by my own? 2. By theory , where the data from the PCI board store before reaching my Win32 user program ? Do they store in the RAM before getting by the device driver ? Please give some sample code if it is possible. Thank you very much for you all. |
how to handle burst mode read/write of PCI in device driver
by Unknown on Dec 6, 2003 |
Not available! | ||
To use burst transfers on PCI the PCI card has to be the master, you need to
add DMA to your card. I think opencores has a wishbone DMA controller you
can use. All the high speed PCI devices have DMA, look at specs for SCSI
controllers ect. Anything you code in the device driver will be brocken down
to individual reads or writes, because of latency in the system the transfer
rate will be slow.
good luck
----- Original Message -----
From: tomko81@hotmail.com>
To: pci@opencores.org>
Sent: Saturday, December 06, 2003 6:10 AM
Subject: [pci] how to handle burst mode read/write of PCI in device driver
Hi everyone,
I am using driverstudio to write a device driver for my PCI card, but
i don't know how to call up burst mode Read on my PCI card, i try to use
one of this method
VOID ind(ULONG Offset, PULONG buf, ULONG count);
in the declaration of KMemoryRange supplied by driverstudio. It can read
in a string of DWORD (32 bits) data but it is not performing burst mode
read on the hardware . It is just read in data one by one.
My question is :
1. How can i call up burst mode Read in my device driver? Is there any
command or method can use , or i need to handle the IRP by my own?
2. By theory , where the data from the PCI board store before reaching
my Win32 user program ? Do they store in the RAM before getting by
the device driver ?
Please give some sample code if it is possible.
Thank you very much for you all.
_______________________________________________
http://www.opencores.org/mailman/listinfo/pci
|
how to handle burst mode read/write of PCI in device driver
by Unknown on Dec 9, 2003 |
Not available! | ||
Thank you very much for your reply.
But can you tell me more how to "add" DMA on my PCI core? As for the
pci card, how it can communicate with the PC can only through those
PCI signal bus. What i don't understand is on the side of motherboard ,
which type of command and signals need to given by the master PCI so
as to know it want to directly write data to memory without involve of
CPU? ( i don't mean i don't know the control of those signal like
FRAME,IRDY..etc as i have read the spec of PCI).
what i guess is the master PCI do normal memory write operation with
burst mode and give the address of physical memory on the PC at the
address period. This is just my guess and please tell me am i right or not.
Regards,
TOM
----- Original Message -----
From: "Dave Warren" dave@l... >
To: "Discussion list about free,open source PCI IP core"
pci@o... >
Date: Sat, 6 Dec 2003 11:47:57 -0000
Subject: Re: [pci] how to handle burst mode read/write of PCI in
device driver
To use burst transfers on PCI the PCI card has to be the master,
you need to
add DMA to your card. I think opencores has a wishbone DMA
controller you
can use. All the high speed PCI devices have DMA, look at specs for
SCSI
controllers ect. Anything you code in the device driver will be
brocken down
to individual reads or writes, because of latency in the system the
transfer
rate will be slow.
good luck
----- Original Message -----
From: tomko81@h... >
To: pci@o... >
Sent: Saturday, December 06, 2003 6:10 AM
Subject: [pci] how to handle burst mode read/write of PCI in device
driver
> Hi everyone,
> > I am using driverstudio to write a device driver for my PCI card, but
> i don't know how to call up burst mode Read on my PCI card, i
try to use
> one of this method
> > VOID ind(ULONG Offset, PULONG buf, ULONG count); > > in the declaration of KMemoryRange supplied by driverstudio. It can read
> in a string of DWORD (32 bits) data but it is not performing
burst mode
> read on the hardware . It is just read in data one by one.
> > My question is : > > 1. How can i call up burst mode Read in my device driver? Is there any
> command or method can use , or i need to handle the IRP by my
own?
>
> 2. By theory , where the data from the PCI board store before reaching
> my Win32 user program ? Do they store in the RAM before
getting by
> the device driver ?
> > Please give some sample code if it is possible. > > Thank you very much for you all. > > |
how to handle burst mode read/write of PCI in device driver
by Unknown on Dec 9, 2003 |
Not available! | ||
The board I have made does not use DMA but it can still have a reasonably
fast writes to the board. With a normal PC at 2.4GHz it will have write of
about 75MB/s. The burst works quite well. The limitations of transfer speed
are in the windows driver and/or in RAM bandwidth.
I do not know about read speed because the card hardly uses any.
I am using Altera PCI Slave core and a custom made windows driver.
Since all modern PC motherboards got DMA circuits that can be programmed to
do transfers without CPU, we got plans to rewrite the windows driver and
maybe get higher transfer rates. Information about DMA circuits could
probably be found in hardware related PC books. The original DMA chip was
called 8237A but it is integrated in the chipsets today.
A PCI master is a card that can initiate writes and reads by itself without
help from CPU or windows software. It is not related to DMA via the 8237A.
Regards
STB
-----Ursprungligt meddelande-----
Från: pci-bounces@opencores.org [mailto:pci-bounces@opencores.org] För
tomko81@hotmail.com
Skickat: den 9 december 2003 12:08
Till: dave@luscher.co.uk; pci@opencores.org
Ämne: Re: [pci] how to handle burst mode read/write of PCI in device driver
Thank you very much for your reply.
But can you tell me more how to "add" DMA on my PCI core? As for the
pci card, how it can communicate with the PC can only through those
PCI signal bus. What i don't understand is on the side of motherboard ,
which type of command and signals need to given by the master PCI so
as to know it want to directly write data to memory without involve of
CPU? ( i don't mean i don't know the control of those signal like
FRAME,IRDY..etc as i have read the spec of PCI).
what i guess is the master PCI do normal memory write operation with
burst mode and give the address of physical memory on the PC at the
address period. This is just my guess and please tell me am i right or not.
Regards,
TOM
----- Original Message -----
From: "Dave Warren" dave@l... >
To: "Discussion list about free,open source PCI IP core"
pci@o... >
Date: Sat, 6 Dec 2003 11:47:57 -0000
Subject: Re: [pci] how to handle burst mode read/write of PCI in
device driver
To use burst transfers on PCI the PCI card has to be the master,
you need to
add DMA to your card. I think opencores has a wishbone DMA
controller you
can use. All the high speed PCI devices have DMA, look at specs for
SCSI
controllers ect. Anything you code in the device driver will be
brocken down
to individual reads or writes, because of latency in the system the
transfer
rate will be slow.
good luck
----- Original Message -----
From: tomko81@h... >
To: pci@o... >
Sent: Saturday, December 06, 2003 6:10 AM
Subject: [pci] how to handle burst mode read/write of PCI in device
driver
_______________________________________________
http://www.opencores.org/mailman/listinfo/pci
> Hi everyone,
> > I am using driverstudio to write a device driver for my PCI card, but
> i don't know how to call up burst mode Read on my PCI card, i
try to use
> one of this method
> > VOID ind(ULONG Offset, PULONG buf, ULONG count); > > in the declaration of KMemoryRange supplied by driverstudio. It can read
> in a string of DWORD (32 bits) data but it is not performing
burst mode
> read on the hardware . It is just read in data one by one.
> > My question is : > > 1. How can i call up burst mode Read in my device driver? Is there any
> command or method can use , or i need to handle the IRP by my
own?
>
> 2. By theory , where the data from the PCI board store before reaching
> my Win32 user program ? Do they store in the RAM before
getting by
> the device driver ?
> > Please give some sample code if it is possible. > > Thank you very much for you all. > > |
how to handle burst mode read/write of PCI in device driver
by Unknown on Dec 10, 2003 |
Not available! | ||
Thank you for your reply.
But my point is that in slave PCI, the write/read process is initiated by
others like CPU, i try to read in a string of DWORD in the PCI device
driver but it just read in the data one by one and so the speed is slow. I
would like to know is there any solution can call out the burst read/write
in slave PCI?
You say you are using slave PCI but can still perform burst read, how
can you do that ?
Regards,
TOM
----- Original Message -----
From: Stefan Bergström stb@v... >
To: "'Discussion list about free, open source PCI IP core'"
pci@o... >
Date: Tue, 9 Dec 2003 17:28:04 +0100
Subject: Re: [pci] how to handle burst mode read/write of PCI in
device driver
The board I have made does not use DMA but it can still have a
reasonably
fast writes to the board. With a normal PC at 2.4GHz it will have
write of
about 75MB/s. The burst works quite well. The limitations of
transfer speed
are in the windows driver and/or in RAM bandwidth.
I do not know about read speed because the card hardly uses any.
I am using Altera PCI Slave core and a custom made windows driver.
Since all modern PC motherboards got DMA circuits that can be
programmed to
do transfers without CPU, we got plans to rewrite the windows
driver and
maybe get higher transfer rates. Information about DMA circuits
could
probably be found in hardware related PC books. The original DMA
chip was
called 8237A but it is integrated in the chipsets today.
A PCI master is a card that can initiate writes and reads by itself
without
help from CPU or windows software. It is not related to DMA via the
8237A.
Regards
STB
-----Ursprungligt meddelande-----
Från: pci-bounces@o... [mailto:pci-bounces@o... ]
För
tomko81@h...
Skickat: den 9 december 2003 12:08
Till: dave@l... ; pci@o...
Ämne: Re: [pci] how to handle burst mode read/write of PCI in
device driver
Thank you very much for your reply.
But can you tell me more how to "add" DMA on my PCI core? As for
the
pci card, how it can communicate with the PC can only through those
PCI signal bus. What i don't understand is on the side of
motherboard ,
which type of command and signals need to given by the master PCI
so
as to know it want to directly write data to memory without involve
of
CPU? ( i don't mean i don't know the control of those signal like
FRAME,IRDY..etc as i have read the spec of PCI).
what i guess is the master PCI do normal memory write operation
with
burst mode and give the address of physical memory on the PC at the
address period. This is just my guess and please tell me am i right
or not.
Regards,
TOM
----- Original Message -----
From: "Dave Warren" dave@l... >
To: "Discussion list about free,open source PCI IP core"
pci@o... >
Date: Sat, 6 Dec 2003 11:47:57 -0000
Subject: Re: [pci] how to handle burst mode read/write of PCI in
device driver
>
> > To use burst transfers on PCI the PCI card has to be the master,
> you need to
> add DMA to your card. I think opencores has a wishbone DMA > controller you > can use. All the high speed PCI devices have DMA, look at specs for
> SCSI
> controllers ect. Anything you code in the device driver will be
> brocken down
> to individual reads or writes, because of latency in the system the
> transfer
> rate will be slow.
>
> good luck
>
>
> ----- Original Message -----
> From: tomko81@h... >
> To: pci@o... >
> Sent: Saturday, December 06, 2003 6:10 AM
> Subject: [pci] how to handle burst mode read/write of PCI in
device
> driver
> >
> Hi everyone,
> > I am using driverstudio to write a device driver for my
> PCI card,
> but
> i don't know how to call up burst mode Read on my PCI
card, i
> try to use
> one of this method
> > VOID ind(ULONG Offset, PULONG buf, ULONG count); > > in the declaration of KMemoryRange supplied by driverstudio.
> It can read
> in a string of DWORD (32 bits) data but it is not
performing
> burst mode
> read on the hardware . It is just read in data one by
one.
>
> My question is : > > 1. How can i call up burst mode Read in my device driver? Is
> there any
> command or method can use , or i need to handle the IRP
by my
> own?
>
> 2. By theory , where the data from the PCI board store before
> reaching
> my Win32 user program ? Do they store in the RAM before
> getting by
> the device driver ?
> > Please give some sample code if it is possible. > > Thank you very much for you all. > > > |
how to handle burst mode read/write of PCI in device driver
by Unknown on Dec 10, 2003 |
Not available! | ||
I'm just using write bursts. I do not know if my board can use burst read.
The PCI standard and the Altera PCI core can handle it but I do not know if
there are limitations in the motherboard hardware that prevent read bursts.
I have no clue whether the Opencore PCI can handle read bursts.
It should be technically possible to use read busts (in a slave PCI-core) at
a PC since Altera has made code for it but I don't know for sure.
Sincerely
STB
-----Ursprungligt meddelande-----
Från: tomko81@hotmail.com [mailto:tomko81@hotmail.com]
Skickat: den 10 december 2003 02:08
Till: stb@viking2001.se; pci@opencores.org
Ämne: Re: [pci] how to handle burst mode read/write of PCI in device driver
Thank you for your reply.
But my point is that in slave PCI, the write/read process is initiated by
others like CPU, i try to read in a string of DWORD in the PCI device
driver but it just read in the data one by one and so the speed is slow. I
would like to know is there any solution can call out the burst read/write
in slave PCI?
You say you are using slave PCI but can still perform burst read, how
can you do that ?
Regards,
TOM
|
how to handle burst mode read/write of PCI in device driver
by Unknown on Dec 10, 2003 |
Not available! | ||
Hi Stefan,
on PCI you can influent the kind of transfer by setting the command bit's on the bus. These bit's are laying during addressing phase on the bus and indicate the desired busmode. Beneath the single cycle read/write modes there exist two modes for initiating a burst. They are called 'read cache line' and 'read multiple'. For writing, no such modes are defined!! Of course, write bursts occour, but you can't take control over them. They are assembled by the (intelligent) PCI-bridge into a burst. If you want to know, how to initiate 'read cache line' or 'read multiple' transfers (I recomend read multiple) you have to look into you're description/driver how to influent the C/BE# of your device. I hope this was helpful for you, Adalbert Stefan Bergström wrote:
I'm just using write bursts. I do not know if my board can use burst read.
The PCI standard and the Altera PCI core can handle it but I do not know if
there are limitations in the motherboard hardware that prevent read bursts.
I have no clue whether the Opencore PCI can handle read bursts.
It should be technically possible to use read busts (in a slave PCI-core) at
a PC since Altera has made code for it but I don't know for sure.
Sincerely
STB
-----Ursprungligt meddelande-----
Från: tomko81@hotmail.com [mailto:tomko81@hotmail.com]
Skickat: den 10 december 2003 02:08
Till: stb@viking2001.se; pci@opencores.org
Ämne: Re: [pci] how to handle burst mode read/write of PCI in device driver
Thank you for your reply.
But my point is that in slave PCI, the write/read process is initiated by
others like CPU, i try to read in a string of DWORD in the PCI device
driver but it just read in the data one by one and so the speed is slow. I
would like to know is there any solution can call out the burst read/write
in slave PCI?
You say you are using slave PCI but can still perform burst read, how
can you do that ?
Regards,
TOM
_______________________________________________
http://www.opencores.org/mailman/listinfo/pci
|
how to handle burst mode read/write of PCI in device driver
by Unknown on Dec 11, 2003 |
Not available! | ||
The solution is to use the MTRR register that it's available in the
Pentium III and up.
This register tolds the CPU that some region of the PCI address space is
type "write-back" and will make burst reads.
more information in this
thread:http://www.pcisig.com/reflector/msg04112.html
_ _
o' \,=./ `o
(o o)
---=--=---=--=--=---=--=--=--=--=---=--=--=-----ooO--(_)--Ooo---
Sebastián Fernández
_____________________________
Instituto de Ing. Eléctrica
Facultad de Ingenieria
Tel: 7110974 int.107
On Wed, 10 Dec 2003, adalbert.mueller wrote:
Hi Stefan,
on PCI you can influent the kind of transfer by setting the command bit's on the bus. These bit's are laying during addressing phase on the bus and indicate the desired busmode. Beneath the single cycle read/write modes there exist two modes for initiating a burst. They are called 'read cache line' and 'read multiple'. For writing, no such modes are defined!! Of course, write bursts occour, but you can't take control over them. They are assembled by the (intelligent) PCI-bridge into a burst. If you want to know, how to initiate 'read cache line' or 'read multiple' transfers (I recomend read multiple) you have to look into you're description/driver how to influent the C/BE# of your device. I hope this was helpful for you, Adalbert Stefan Bergström wrote:
>I'm just using write bursts. I do not know if my board can use burst read.
>The PCI standard and the Altera PCI core can handle it but I do not know if
>there are limitations in the motherboard hardware that prevent read bursts.
>I have no clue whether the Opencore PCI can handle read bursts.
>
>It should be technically possible to use read busts (in a slave PCI-core) at
>a PC since Altera has made code for it but I don't know for sure.
>
>Sincerely
>STB
>
>-----Ursprungligt meddelande-----
>Från: tomko81@hotmail.com [mailto:tomko81@hotmail.com]
>Skickat: den 10 december 2003 02:08
>Till: stb@viking2001.se; pci@opencores.org
>Ämne: Re: [pci] how to handle burst mode read/write of PCI in device driver
>
>Thank you for your reply.
>
>But my point is that in slave PCI, the write/read process is initiated by
>others like CPU, i try to read in a string of DWORD in the PCI device
>driver but it just read in the data one by one and so the speed is slow. I
>would like to know is there any solution can call out the burst read/write
>in slave PCI?
>
>You say you are using slave PCI but can still perform burst read, how
>can you do that ?
>
>
>Regards,
>TOM
>
>
>
>
>_______________________________________________
>http://www.opencores.org/mailman/listinfo/pci
>
>
_______________________________________________
http://www.opencores.org/mailman/listinfo/pci
|
1/1