Re: Which is the best way for KM-UM interaction by Chris
Chris
Mon Sep 11 08:23:31 CDT 2006
If you need to display the results in while the test is running, then just
communicate the results back to the application. Don't use the application
as part of the test. You can get the test results in the same way that
others have suggested pending an IOCTL.
Possibly useful tip: You should be able to call an IOCTL from an Excel macro
(following declares should get you started).
Public Declare Function DeviceIoControl Lib "kernel32" Alias
"DeviceIoControl" (ByVal hDevice As Long, ByVal dwIoControlCode As Long,
lpInBuffer As Any, ByVal nInBufferSize As Long, lpOutBuffer As Any, ByVal
nOutBufferSize As Long, lpBytesReturned As Long, lpOverlapped As OVERLAPPED)
As Long
Public Declare Function CreateFile Lib "kernel32" Alias "CreateFileA" (ByVal
lpFileName As String, ByVal dwDesiredAccess As Long, ByVal dwShareMode As
Long, lpSecurityAttributes As SECURITY_ATTRIBUTES, ByVal
dwCreationDisposition As Long, ByVal dwFlagsAndAttributes As Long, ByVal
hTemplateFile As Long) As Long
...Chris
"Chin" <chintin@gmail.com> wrote in message
news:1157970873.638519.280810@i42g2000cwa.googlegroups.com...
> One more thing, I ve not added, i ve to chart the performance on a GUI
> graph,
> So i need the application, also could anyone give me an info on
> charting libraries eg, line graph: bandwidth vs time
>
> Thanks,
> Chin
>
> Pavel A. wrote:
>> "Chin" wrote:
>> >
>> > Hi all,
>> > In my project i am trying to measure performance of a
>> > PCIe Core.
>> > For that, in the driver the 8kb Core RAM is written and
>> > read through DMA.
>> >
>> > The data is written from appln to driver continuously
>> > and then DMA is done and the same data is read back in the application.
>> >
>> >
>> > Could you pls suggest which is best way for interaction
>> > and synchronisation betn appln and driver. Presently I am trying with
>> > shared mem using zwcreatesection and createfilemapping of 8kb.
>> > Can i also use IOCTLs or other routines.
>> > And how do i synchronise as appln should wait writing,
>> > till driver does dma to read and write to the core, and then appln read
>> > should happen, then again write and so on.
>>
>> Perhaps in this case you don't need user mode app at all.
>> Your goal is testing the bus performance and not app to driver data
>> transfers.
>> So you could do everything in the driver; use DPCs and work items for
>> time
>> delays, waiting for i/o completion etc.
>>
>> --PA
>