FPGA Device Driver Design Guide on Windows 7 Embedded

Similar documents
TouchKit Software Programming Guide Version 1.2

TR4. PCIe Qsys Example Designs. June 20, 2018

TouchKit Software Programming Guide Version 1.1

Installation & Reference Guide

ines-ieee488.2 igpib Device Driver Software Manual 1998 ines GmbH

USB BF70x Audio 1.0 Library v.1.2 Users Guide Users Guide Revision 1.3. For Use With Analog Devices ADSP-BF70x Series Processors

Windows Device Driver and API Reference Manual

CEC 450 Real-Time Systems

... Application Note AN-531. PCI Express System Interconnect Software Architecture. Notes Introduction. System Architecture.

Call DLL from Limnor Applications

Universal Windows Driver Development with WDF UMDF 2.0 and KMDF for IoT, Desktop and Server

ADENEO HEADLESS BLUETOOTH MANAGER SAMPLE APPLICATIONS USER MANUAL. Ref.: C REV A. \\qualité\modèles\d36-a

USB BF70x Bulk Library v.1.1 Users Guide Users Guide Revision 1.1. For Use With Analog Devices ADSP-BF70x Series Processors. Closed Loop Design, LLC

.NET Wrapper SDK Descriptor

Trends in Prototyping Systems. ni logic Pvt. Ltd., Pune, India

PcieAltBase & PcieAltChan

Ausgewählte Betriebssysteme - Mark Russinovich & David Solomon (used with permission of authors)

ArduCAM USB Camera SDK

FarSync T4Ue. A 4 port PCI Express synchronous communications adapter

Engineer-to-Engineer Note

DYNAMIC ENGINEERING 150 DuBois St., Suite C Santa Cruz, CA Fax Est.

ArduCAM USB Camera C/C++ SDK

Linux Driver and C/C++ API for PCI/ISA Controllers

Embedded Systems. Input/Output Programming

The control of I/O devices is a major concern for OS designers

User's Manual. USB 2.0 Audio PCA with 16 Bit I/O, 4 x 4 Audio Mixer

PLX USB Development Kit

Unit OS A: Windows Networking

PMC-DA Channel 16 Bit D/A for PMC Systems REFERENCE MANUAL Version 1.0 June 2001

AD916x API Specification Rev 1.0

AD9164 API Specification Rev 1.0

System Monitoring Library Windows Driver Software for Industrial Controllers

PXDAC4800. Product Information Sheet. 1.2 GSPS 4-Channel Arbitrary Waveform Generator FEATURES APPLICATIONS OVERVIEW

DYNAMIC ENGINEERING. 150 DuBois, Suite C Santa Cruz, CA (831) Fax (831) Est.

Linux Driver and Embedded Developer

RTX64 Features by Release

FPGA Manager. State of the Union. Moritz Fischer, National Instruments

CLD SC58x CDC Library v.1.00 Users Guide Users Guide Revision For Use With Analog Devices ADSP-SC58x Series Processors. Closed Loop Design, LLC

Avnet S6LX16 Evaluation Board and Maxim DAC/ADC FMC Module Reference Design

Input/Output Systems

Building Gigabit Interfaces in Altera Transceiver Devices

Device-Functionality Progression

Chapter 12: I/O Systems. I/O Hardware

IFE: Course in Low Level Programing. Lecture 5

The Note/1 Driver Design

EECS150 - Digital Design Lecture 15 - Project Description, Part 5

William Stallings Computer Organization and Architecture. Chapter 11 CPU Structure and Function

SMT743 APPLICATION NOTE 1 APPLICATION NOTE 1. Application Note - SMT743 System.doc SMT743 SUNDANCE MULTIPROCESSOR TECHNOLOGY LTD.

PCI Express System Interconnect Software Architecture for x86-based Systems. Root Complex. Processor. UP Multi-port PCIe switch DP DP DP

Dr. Rafiq Zakaria Campus. Maulana Azad College of Arts, Science & Commerce, Aurangabad. Department of Computer Science. Academic Year

Hands-On Lab. Multi-Touch WMTouch - Native. Lab version: Last updated: 12/3/2010

Applying User-level Drivers on

Storage Systems. NPTEL Course Jan K. Gopinath Indian Institute of Science

Anybus CompactCom. Host Application Implementation Guide. Doc.Id. HMSI Doc. Rev Connecting DevicesTM

Revision: 09/21/ East Main Pullman, WA (509) Voice and Fax

27 Designing Your Own Program

Soliton SCTS Extender

PCI Express System Interconnect Software Architecture for PowerQUICC TM III-based Systems

Introduction. Overview

ProductionLine Testers, Inc.

Anybus CompactCom. Host Application Implementation Guide HMSI ENGLISH

EMX Module Specifications

Dotstack Porting Guide.

Software API Library. User s Manual V1.3

Tutorial on Socket Programming

Pci3Ip, Pci5Ip, Pc104pIp, Pc104p4Ip, cpci2ip, cpci4ip and PcieCar IndustryPack Carrier Device Drivers

x86.virtualizer source code

A Linux multimedia platform for SH-Mobile processors

PusleIR Multitouch Screen Software SDK Specification. Revision 4.0

LAT Communication Board Driver

PCIe/104 or PCI/104-Express 4-Channel Audio/Video Codec Model 953 User's Manual Rev.C September 2017

Inter-Process Communication and Synchronization of Processes, Threads and Tasks: Lesson-1: PROCESS

Miscellany. ZwRaiseException. Parameters. Return Value. Related Win32 Functions. ExceptionRecord Points to a structure that describes the exception.

Video capture using GigE Vision with MIL. What is GigE Vision

Spring 2017 :: CSE 506. Device Programming. Nima Honarmand

PCIe Hot-Swap Device Driver

AET60 BioCARDKey. Application Programming Interface. Subject to change without prior notice

Industrial I/O and You: Nonsense Hacks! Matt Ranostay Konsulko Group

PSK Propagation Reporter DLL Documentation 2013-Mar-10 Philip Gladstone

I/O Systems. Amir H. Payberah. Amirkabir University of Technology (Tehran Polytechnic)

Supporting Cloud Native with DPDK and containers KEITH INTEL CORPORATION

Software Development Advanced

VRM-Express-HL. Overview:

FarSync T4Ue. A 4 port PCI Express synchronous communications adapter

Microprocessors and Microcontrollers. Assignment 1:

Creating PCI Express Links in Intel FPGAs

Vive Input Utility Developer Guide

CLD BF70x CDC Library v.1.3 Users Guide Users Guide Revision 1.3. For Use With Analog Devices ADSP-BF70x Series Processors. Closed Loop Design, LLC

Chapter 13: I/O Systems

ArduCAM USB Camera SDK

Cisco TSP Media Driver

Cisco TSP Media Driver

Network device drivers in Linux

RC1000-PP. Function Reference Manual

Key Switch Control Software Windows driver software for Touch Panel Classembly Devices

Linux DRM Developer s Guide

HWMonitor SDK Programmer's Guide. Version May 2015

i.mx 7 - Hetereogenous Multiprocessing Architecture

User s Manual. PCIe-DIO05 Users Manual (Rev 1.1)

SENSORAY CO., INC. PCI MPEG Capture Device. Model 616 AVStream DirectShow Programming Manual. July, 2007

Transcription:

FPGA Device Driver Design Guide on Windows 7 Embedded Yunrui Zhang Guangzhou ZHIYUAN Electronics Co.,LTD

Contents 1 Driver Installation 2 Driver Library 3 Driver Design Guide

1. Driver Installation 1 Open device manager. 2 Select PCI Device.

1. Driver Installation 3 Right click on PCI Device ; Select Update Driver Software.

1. Driver Installation 4 Select "Browse my computer for driver software.

1. Driver Installation 5 Click Browse... to select the driver path. Then click Next.

1. Driver Installation 6 select Install this driver software anyway.

1. Driver Installation 7 After installation is complete: Click Close to return.

1. Driver Installation Driver for PCI Device is successfully installed : a). The ArCore Chipset System Driver will appear under the System devices ; b). Several devices are enumerated by ArCore Chipset System Driver.

1. Driver Installation 8 Install drivers for the other devices. The steps to install drivers for these devices are similar to those for PCI Device (See Step 2 to Step 7).

1. Driver Installation After installation is complete: a). A new type of device class is added: "ArCore Chipset Device.

2. Driver Library 1 ADC Device Object 2 DAC Device Object 3 GPIO Device Object 4 Video Capture And Net

2.1 ADC Device Object The method to operate ADC devices: AiCreate AiClose Initialize GetADCInfo GetDeviceName Start Stop RegisterADCallback

2.1 ADC Device Object Create an ADC device object with device index : DWORD stdcall AiCreate( IAiObject** ppiaiobj, int Index );

2.1 ADC Device Object Parameters of AiCreate: Parameters ppiaiobj Index Meaning Pointer to a Pointer to the IAiObject The index of ADC device Return Value: Return zreo if there is no error occurred, otherwise return non-zero value.

2.1 ADC Device Object Prototype of IAiObject: struct IAiObject { virtual DWORD stdcall Initialize( IN void *pcontext) = 0; virtual DWORD stdcall RegisterADCallback( IN AD_CONVERT_CALLBACK padcallback, IN void *padcontext) = 0; virtual DWORD stdcall GetADCInfo( IN OUT int *ByteWidth, IN OUT int *BitWidth) = 0; virtual DWORD stdcall GetDeviceName( IN OUT void* lpszname, IN OUT DWORD* pdwreqiredsize) = 0; virtual DWORD stdcall Start() = 0; virtual DWORD stdcall Stop() = 0; };

2.1 ADC Device Object Close a specified ADC device object: void stdcall AiClose( IAiObject* piaiobj );

2.1 ADC Device Object Parameters of AiClose: Parameters ppiaiobj Meaning Pointer to the IAiObject Return Value: None value to return.

2.1 ADC Device Object Initialize device function: DWORD stdcall Initialize( void* pcontext, );

2.1 ADC Device Object Parameters of Initialize: Parameters pcontext Meaning Reserved,must be NULL Return Value: Return zreo if there is no error occurred, otherwise return non-zero value.

2.1 ADC Device Object Read ADC Device information function: DWORD stdcall GetADCInfo( int* ByteWidth, int* BitWidth );

2.1 ADC Device Object Parameters of GetADCInfo: Parameters ByteWidth BitWidth Meaning Pointer to the number of the bytes for the data returned by the ADC Pointer to the number of bits of the ADC device Return Value: Return zreo if there is no error occurred, otherwise return non-zero value.

2.1 ADC Device Object Read ADC device name function: DWORD stdcall GetDeviceName( void* lpszname, DWORD* pdwreqiredsize );

2.1 ADC Device Object Parameters of GetDeviceName: Parameter lpszname pdwreqiredsize Meaning Pointer to the device name Pointer to the number of bytes required for the device name Return Value: Return zreo if there is no error occurred, otherwise return non-zero value.

2.1 ADC Device Object Start A/D Conversion function: DWORD stdcall Start();

2.1 ADC Device Object Parameters of Start: None Parameters to input. Return Value: Return zreo if there is no error occurred, otherwise return non-zero value.

2.1 ADC Device Object Stop A/D conversion function: DWORD stdcall Stop();

2.1 ADC Device Object Parameters of Stop: None Parameters to input. Return Value: Return zreo if there is no error occurred, otherwise return non-zero value.

2.1 ADC Device Object Register A/D data convert handler callback routine : DWORD stdcall RegisterADCallback( AD_CONVERT_CALLBACK padcallback, void* padcontext );

2.1 ADC Device Object Parameters of RegisterADCallback : Parameter padcallback padcontext Meaning Specifies the entry point for the usersupplied A/D data convert handler callback routine Pointer to a user-determined context to pass to the A/D data convert handler callback routine Return Value: Return zreo if there is no error occurred, otherwise return non-zero value.

2.1 ADC Device Object Prototype of A/D data convert handler routine : void ( stdcall *AD_CONVERT_CALLBACK)( ); DWORD dwrawdata, void* Context

2.1 ADC Device Object Parameters of AD_CONVERT_CALLBACK: Parameter dwrawdata padcontext Meaning The raw data get from the AD converter Pointer to a user-determined context Return Value: None value to return.

2.2 DAC Device Object Method to operate DAC device: AoCreate AoClose Initialize SendAoData

2.2 DAC Device Object Create a DAC device object with device index : DWORD stdcall AoCreate( IAoObject** ppiaoobj, int Index );

2.2 DAC Device Object Parameters of AoCreate: Parameters ppiaoobj Index Meaning Pointer to a Pointer to the IAoObject The index of DAC device Return Value: Return zreo if there is no error occurred, otherwise return non-zero value.

2.2 DAC Device Object Prototype of IAoObject : struct IAoObject { virtual DWORD stdcall Initialize( IN void *pcontext) = 0; }; virtual DWORD stdcall SendAoData( IN USHORT *ptxbuffer, IN unsigned long dwbuffersize) = 0;

2.2 DAC Device Object Close a specified DAC device object: void stdcall AoClose( IAoObject* piaoobj );

2.2 DAC Device Object Parameters of AoClose: Parameters ppiaoobj Meaning Pointer to the IAoObject Return Value: None value to return.

2.2 DAC Device Object Initialize device function: DWORD stdcall Initialize( void* pcontext, );

2.2 DAC Device Object Parameters of Initialize: Parameters pcontext Meaning Reserved,must be NULL Return Value: Return zreo if there is no error occurred, otherwise return non-zero value.

2.2 DAC Device Object Write data to DAC function: DWORD stdcall SendAoData( USHORT * ptxbuffer, unsigned long dwbuffersize );

2.2 DAC Device Object Parameters of SendAoData: Parameter ptxbuffer dwbuffersize Meaning Pointer to the DAC write buffer The size of the DAC write buffer Return Value: Return zreo if there is no error occurred, otherwise return non-zero value.

2.3 GPIO Device Object Method to operate GPIO interfaces: GpioCreate GpioClose Initialize RegisterEventProc SetLEDState GetLEDState

2.3 GPIO Device Object Create a GPIO device object with device index : DWORD stdcall GpioCreate( IGpioObject** ppigpioobj, int Index );

2.3 GPIO Device Object Parameters of GpioCreate : Parameters ppigpioobj Index Return Value: Meaning Pointer to a Pointer to the IGpioObject The index of GPIO device Return zreo if there is no error occurred, otherwise return non-zero value.

2.3 GPIO Device Object Prototype of IGpioObject : struct IGpioObject { virtual DWORD stdcall Initialize( void *pcontext) = 0; virtual DWORD stdcall RegisterEventProc( GPIO_EVENT_PROC_ROUTINE peventprocroutine, void *peventproccontext) = 0; virtual DWORD stdcall SetLEDState( DWORD State) = 0; virtual DWORD stdcall GetLEDState( DWORD* psate) = 0; };

2.3 GPIO Device Object Close a specified GPIO device object: void stdcall GpioClose( IGpioObject* pigpioobj );

2.3 GPIO Device Object Parameters of GpioClose : Parameters pigpioobj Meaning Pointer to the IGpioObject Return Value: None value to return.

2.3 GPIO Device Object Initialize device function: DWORD stdcall Initialize( void* pcontext, );

2.3 GPIO Device Object Parameters of Initialize: Parameters pcontext Meaning Reserved,must be NULL Return Value: Return zreo if there is no error occurred, otherwise return non-zero value.

2.3 GPIO Device Object Register GPIO event handler callback routine : DWORD stdcall RegisterEventProc( GPIO_EVENT_PROC_ROUTINE peventprocroutine, void* peventproccontext );

2.3 GPIO Device Object Parameters of RegisterEventProc: Parameter peventprocroutine peventproccontext Meaning Specifies the entry point for the usersupplied GPIO event handler callback routine Pointer to a user-determined context to pass to the GPIO event handler callback routine Return Value: Return zreo if there is no error occurred, otherwise return non-zero value.

2.3 GPIO Device Object Prototype of GPIO event handler callback routine : void ( stdcall* GPIO_EVENT_PROC_ROUTINE)( int Event, int wparam, int lparam, void* Context );

2.3 GPIO Device Object Parameters of GPIO_EVENT_PROC_ROUTINE: Parameter Event wparam lparam Context Meaning Event message type Status of the switch or buttons Switch message : reserved Button message : the index of the button, if more than one button s state is changed or there are one or more buttons are held, lparam will be negative one Pointer to a user-determined context Return Value: None value to return.

2.3 GPIO Device Object The enumeration values of Event: Event type GPIO_SWITCH_CHANGED GPIO_BUTTON_DOWN GPIO_BUTTON_UP Meaning Switch statue is changed Button down Button up

2.3 GPIO Device Object Set LED state: DWORD stdcall SetLEDState( DWORD State );

2.3 GPIO Device Object Parameters of SetLEDState: Parameters State Meaning The lower 8 bits of psate are corresponding to the states of 8 LEDs Return Value: Return zreo if there is no error occurred, otherwise return non-zero value.

2.3 GPIO Device Object Get LED state: DWORD stdcall GetLEDState( DWORD* pstate );

2.3 GPIO Device Object Parameters of GetLEDState: Parameters pstate Meaning The lower 8 bits of psate are corresponding to the states of 8 LEDs Return Value: Return zreo if there is no error occurred, otherwise return non-zero value.

2.4 Video Capture And Net Video Capture DirectShow. Refer to platform SDK Documentation. NET Windows Sockets. Refer to platform SDK Documentation.

3. Driver Design Guide Summary Driver Design Guide Hardware Architecture Driver Stack of FPGA Device Supported Drivers And Driver Type Driver Development Tools Implement A Driver

I/O Bank 7 I/O Bank 6 3. Driver Design Guide Hardware Architecture Intel Atom Processor PCIe Altera Arria II EP2AGXE6XX FPGA Intel Atom E6x5C COMe Connector 2 PHY Video Decoder Altera TSE 12-bit ADC 400Ksps 8-bit ADC 10Msps 10-bit DAC 10Msps Analog Video Input 8 Leds 4 Switches 4 Buttons

3. Driver Design Guide Driver Stack of FPGA Device ADC (aradc.sys) DAC (ardac.sys) GPIO (argpio.sys) VIDEO (arvideo.sys) NET (arndis.sys) Child Device FPGA (arcore.sys) Parent Device PCI Bus (pci.sys)

3. Driver Design Guide ZLG Supported Drivers Bus Driver FPGA bus driver, ArCore.sys ADC One 8bit ADC and 12bit ADC Input DAC One 10bit DAC Output GPIO 8 LED Output, 4 Button Input, 4 Switch Input Video Capture AVStream minidriver Net Driver NDIS miniport driver

3. Driver Design Guide Generic WDM Device Driver Overview Application API (Application Interface) User Kernel API DLL Device Driver DDI (Device Driver Interface) Kernel / HAL Hardware

3. Driver Design Guide Video Capture Driver Overview Ks Microsoft supplied Port Class Stream Class AVStream Vendor supplied audio minidrivers DVD video capture audio or video minidrivers

3. Driver Design Guide Net Device Driver Overview Transport Driver Interface (TDI) Microsoft supplied LAN Protocols Native Media Aware Protocol Vendor supplied NDIS Interface NDIS miniport Net Card

3. Driver Design Guide Driver Development Tools ESDC Hardware Platform WDK Version 7600.16385.0 WinDbg or Other Debug Tools System Symbols (for debugging driver) Visual Studio (optional)

3. Driver Design Guide Implement ADC/DAC Drivers Assume Bus Driver is Working as Design ADC/DAC Running After Power On ADC/DAC No FIFO, No Interrupt Generated Driver Must Polling the ADC/DAC

3. Driver Design Guide Build ADC/DAC Drivers