• 大小: 12.2MB
    文件类型: .rar
    金币: 2
    下载: 1 次
    发布日期: 2023-06-26
  • 语言: 其他
  • 标签: PCIe  的DMA  引擎  

资源简介

这个DMA引擎在Xilinx 65nm的V5器件的PCIe IP上测试通过;已经在ML506 和ML555板上测试通过,欢迎大家下载使用和学习

资源截图

代码片段和文件信息

/*++

Copyright (c) Microsoft Corporation.  All rights reserved.

    THIS CODE AND INFORMATION IS PROVIDED “AS IS“ WITHOUT WARRANTY OF ANY
    KIND EITHER EXPRESSED OR IMPLIED INCLUDING BUT NOT LIMITED TO THE
    IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
    PURPOSE.

Module Name:

    Init.c

Abstract:

    Contains most of initialization functions

Environment:

    Kernel mode

--*/

#include “precomp.h“

#include “Init.tmh“

#include 


#ifdef ALLOC_PRAGMA
#pragma alloc_text (PAGE PCIEInitializeDeviceExtension)
#pragma alloc_text (PAGE PCIEPrepareHardware)
#pragma alloc_text (PAGE PCIEInitializeDMA)
#pragma alloc_text (PAGE PCIEInitWrite)
#pragma alloc_text (PAGE PCIEInitRead)
#endif

void PCIEWait(int ms);


VOID PCIEIOCtrlCode(
    IN WDFQUEUE      Queue
    IN WDFREQUEST    Request
    IN size_t        OutputBufferLength
    IN size_t        InputBufferLength
    IN ULONG         IoControlCode
    );

NTSTATUS
PCIEInitializeDeviceExtension(
    IN PDEVICE_EXTENSION DevExt
    )
/*++
Routine Description:

    This routine is called by EvtDeviceAdd. Here the device context is
    initialized and all the software resources required by the device is
    allocated.

Arguments:

    DevExt     Pointer to the Device Extension

Return Value:

     NTSTATUS

--*/
{
    NTSTATUS    status;
    ULONG       dteCount;
    WDF_IO_QUEUE_CONFIG  queueConfig;

    PAGED_CODE();

    DevExt->MaximumTransferLength = PCIE_MAXIMUM_TRANSFER_LENGTH;    
    DevExt->BufferSystemVirtualAddress  = NULL;
    DevExt->BufferUserVirtualAddress    = NULL;
    DevExt->BufferMdl                   = NULL;
    
    DevExt->Buffer2SystemVirtualAddress = NULL;
    DevExt->Buffer2UserVirtualAddress   = NULL;    
    DevExt->Buffer2Mdl                  = NULL;

    //
    // Setup a queue to handle only IRP_MJ_WRITE requests in Sequential
    // dispatch mode. This mode ensures there is only one write request
    // outstanding in the driver at any time. framework will present the next
    // request only if the current request is completed.
    // Since we have configured the queue to dispatch all the specific requests
    // we care about we don‘t need a default queue.  A default queue is
    // used to receive requests that are not preconfigured to goto
    // a specific queue.
    //
    WDF_IO_QUEUE_CONFIG_INIT ( &queueConfig
                              WdfIoQueueDispatchSequential);

    queueConfig.EvtIoDeviceControl = PCIEIOCtrlCode;

    status = WdfIoQueueCreate( DevExt->Device
                                &queueConfig
                                WDF_NO_object_ATTRIBUTES
                                &DevExt->IOCtrlQueue );

    if(!NT_SUCCESS(status)) {
        TraceEvents(TRACE_LEVEL_ERROR DBG_PNP
                    “WdfIoQueueCreate failed: %!STATUS!“ status);
        return status;
    }


 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件     548807  2007-11-13 03:09  DMA_Freeware\pcie_ml505esx1_prj\ml505cg\endpoint_blk_plus_v1_5\doc\pcie_blk_plus_ds551.pdf

     文件     343188  2007-11-13 03:09  DMA_Freeware\pcie_ml505esx1_prj\ml505cg\endpoint_blk_plus_v1_5\doc\pcie_blk_plus_gsg343.pdf

     文件    2485883  2007-11-13 03:09  DMA_Freeware\pcie_ml505esx1_prj\ml505cg\endpoint_blk_plus_v1_5\doc\pcie_blk_plus_ug341.pdf

     文件       6989  2007-11-07 15:58  DMA_Freeware\pcie_ml505esx1_prj\ml505cg\endpoint_blk_plus_v1_5\example_design\BMD.v

     文件        138  2007-08-08 23:22  DMA_Freeware\pcie_ml505esx1_prj\ml505cg\endpoint_blk_plus_v1_5\example_design\BMD_64.v

     文件      13914  2007-11-17 13:46  DMA_Freeware\pcie_ml505esx1_prj\ml505cg\endpoint_blk_plus_v1_5\example_design\BMD_64_RX_ENGINE.v

     文件      21728  2007-11-17 15:03  DMA_Freeware\pcie_ml505esx1_prj\ml505cg\endpoint_blk_plus_v1_5\example_design\BMD_64_TX_ENGINE.v

     文件      13780  2007-11-17 14:34  DMA_Freeware\pcie_ml505esx1_prj\ml505cg\endpoint_blk_plus_v1_5\example_design\BMD_EP.v

     文件      11237  2007-11-18 04:09  DMA_Freeware\pcie_ml505esx1_prj\ml505cg\endpoint_blk_plus_v1_5\example_design\BMD_EP_MEM.v

     文件       9400  2007-11-17 15:05  DMA_Freeware\pcie_ml505esx1_prj\ml505cg\endpoint_blk_plus_v1_5\example_design\BMD_EP_MEM_ACCESS.v

     文件      10219  2007-11-17 15:06  DMA_Freeware\pcie_ml505esx1_prj\ml505cg\endpoint_blk_plus_v1_5\example_design\BMD_INTR_CTRL.v

     文件       2413  2007-08-08 22:00  DMA_Freeware\pcie_ml505esx1_prj\ml505cg\endpoint_blk_plus_v1_5\example_design\BMD_TO_CTRL.v

     文件      64245  2007-11-13 03:05  DMA_Freeware\pcie_ml505esx1_prj\ml505cg\endpoint_blk_plus_v1_5\example_design\EP_MEM.v

     文件       8332  2007-11-13 03:05  DMA_Freeware\pcie_ml505esx1_prj\ml505cg\endpoint_blk_plus_v1_5\example_design\pci_exp_1_lane_64b_ep.v

     文件      12002  2007-11-13 03:11  DMA_Freeware\pcie_ml505esx1_prj\ml505cg\endpoint_blk_plus_v1_5\example_design\pci_exp_64b_app.v

     文件      17972  2007-11-13 03:05  DMA_Freeware\pcie_ml505esx1_prj\ml505cg\endpoint_blk_plus_v1_5\example_design\xilinx_pci_exp_1_lane_ep.v

     文件        426  2007-11-13 03:05  DMA_Freeware\pcie_ml505esx1_prj\ml505cg\endpoint_blk_plus_v1_5\example_design\xilinx_pci_exp_1_lane_ep_product.v

     文件       8725  2007-11-11 06:23  DMA_Freeware\pcie_ml505esx1_prj\ml505cg\endpoint_blk_plus_v1_5\example_design\xilinx_pci_exp_blk_plus_1_lane_ep-XC5VLX50T-FF1136-1_ES.ucf

     文件        984  2007-11-11 04:38  DMA_Freeware\pcie_ml505esx1_prj\ml505cg\endpoint_blk_plus_v1_5\implement\backup_implement.sh

     文件       2315  2007-11-11 07:11  DMA_Freeware\pcie_ml505esx1_prj\ml505cg\endpoint_blk_plus_v1_5\implement\coregen.log

     文件        803  2007-11-11 04:39  DMA_Freeware\pcie_ml505esx1_prj\ml505cg\endpoint_blk_plus_v1_5\implement\endpoint_blk_plus_v1_5_top.bld

     文件       1003  2007-11-13 03:43  DMA_Freeware\pcie_ml505esx1_prj\ml505cg\endpoint_blk_plus_v1_5\implement\implement.sh

     文件        176  2007-11-13 02:03  DMA_Freeware\pcie_ml505esx1_prj\ml505cg\endpoint_blk_plus_v1_5\implement\make_ace.sh

     文件      25385  2007-11-13 03:51  DMA_Freeware\pcie_ml505esx1_prj\ml505cg\endpoint_blk_plus_v1_5\implement\novas.rc

     文件        239  2007-08-08 22:00  DMA_Freeware\pcie_ml505esx1_prj\ml505cg\endpoint_blk_plus_v1_5\implement\pcie_ace.cmd

     文件    1769956  2007-11-18 08:30  DMA_Freeware\pcie_ml505esx1_prj\ml505cg\endpoint_blk_plus_v1_5\implement\pcie_x1_plus_v1_5es_imp.ace

     文件       5093  2007-11-18 08:23  DMA_Freeware\pcie_ml505esx1_prj\ml505cg\endpoint_blk_plus_v1_5\implement\results\mapped.map

     文件     130357  2007-11-18 08:23  DMA_Freeware\pcie_ml505esx1_prj\ml505cg\endpoint_blk_plus_v1_5\implement\results\mapped.mrp

     文件     793571  2007-11-18 08:23  DMA_Freeware\pcie_ml505esx1_prj\ml505cg\endpoint_blk_plus_v1_5\implement\results\mapped.ncd

     文件     309239  2007-11-18 08:21  DMA_Freeware\pcie_ml505esx1_prj\ml505cg\endpoint_blk_plus_v1_5\implement\results\mapped.pcf

............此处省略327个文件信息

评论

共有 条评论