Home
00437.A0 vpcivmed - W-IE-NE
Contents
1. switches for VPCIVMED_VECTOR_CMD define READ CURRENT LEVEL 0 try to get the current IRQ level define READ_VECTOR 1 if level 0 read vector current LEVEL else level switches for the VPCIVMED_RESET define VME_RESET_CMD 0 raise a VME reset only define LOCAL_RESET_CMD 1 raise a local reset only define GLOBAL_RESET_CMD 2 raise a global reset define POLL_RESET_CMD 3 ask if reset is finished address masks for the pager to use for offset and size window lignm ent define HI ADDRESS MASK DWORD OXFFFFF 000 masks the high part of a vme address define LO ADDRESS MASK HI ADDRESS MASK masks the low part of a vme address define ONE_PAGE_SIZE LO_ADDRESS_MASK 1 size of 1 page hardware related macros to calculate the real base and the real size of demand pages 222 2222 define PAGE_BASE base base amp HI_ADDRESS_MASK makes an aligned base for a page define PAGE_SIZE base size base size LO ADDRESS MASK ONE_PAGE_SIZE ONE_PAGE_SIZE IN SEES E SSD SS SS SSD SEES SELE SI SI SES SSL SSL oa een ee a ERROR RETURNS in dIfcStatus define E_NO_ERROR 0 all OK define E_INCOMPATIBLE 1 incompatible hardware define E_NO_ADDRESS 2 cant get lcr or ifr addresses define E_N
2. typedef struct caution very sensitive on alignment DWORD dwInterface comes from the interface No DWORD dlIfcStatus usable fits to driver OK DWORD dwLinkCount how often this interface is requested WORD wNumMemWindows from actual configuration WORD wNumIOPorts WORD wNumIRQs WORD wNumDMAs DWORD dLCR_MemBase from actual configuration DWORD dLCR_MemLength WORD wLCR_IOBase WORD wLCR_IOLength WORD wLCR_IRQ WORD wReservel DWORD dUSR_MemBase DWORD dUSR_MemLength WORD wModuleType read from connected hardware WORD wFPGAVersion WORD wModuleNumber WORD wWordMode WORD wSysControl WORD wConnected PVOID pvler virtual address of LCR PVOID pvI r virtual address of IFR some addresses to tune performance WORD pwCSR pointer to csr register WORD pwIRQStat pointer to irq status BYTE pbVector pointer to vector read register DWORD pdwVMEAdr pointer to VME address register BYTE pbModifier pointer to address modifier register void pvVME pointer into VME window DWORD dwPagePhysVME physical page number of the VME window January 13 14 00437 A0 User s Manual VPCIVMED W Ie Ne R Plein amp Baus GmbH void psIrqDescriptor pointer to associated irg descriptor DWORD dwActivePage the current active page of this interface WORD wReserve2 char cszHWRevision 10 VPCIVMED_STATIC_STATUS typedef str
3. This help Interface init lim Get VME interrupt status ID m lt m gt lt src gt lt end gt lt dest gt Move memory area o Jump to OS pladrmode Port search q Quit program r x lt f gt lt start gt end s m lt start gt lt end gt lt p gt t lt start gt v w x lt f gt lt start gt lt end gt x lt start gt val y 1 0 z 0 3 Read file lt f gt to VME x x or s HEX Search pattern lt p gt different Items TAS emulation Test and Set bit 7 Generate VME SYSRESET Write VME into file lt f gt h Intel Hex Read Write to interface register start Read set clear SY SFAIL Show interface internals m mode e g b byte w word l long double word h help x hex start address end address src source dest destination option pvmon is available for WIN 95 NT and Linux The driver for the operating system has to be installed An error message is reported if no driver was found or the VME crate is not online The first time pvmon is started a configuration is mandatory Simply type c on the command line January 13 8 00437 A0 User s Manual VPCIVMED W Ie Ne R Plein amp Baus GmbH Powerful commands are implemented in pvmon Try p to look for ports or test the RAM on the VME bus with the command gw 0 10000 40 In the address range from 0x00000 to 0x10000 RAM is tested for the predetermined address modifier in 0x40 runs using a random
4. amp Baus GmbH VPCIVMED_RESET_RESULT polling result in progress if wResult 0 define __PCIVMEH_H _ endif January 13 16 00437 A0 User s Manual VPCIVMED W Ie Ne R Plein amp Baus GmbH APPENDIX D Standard initialization procedure The standard initialization procedure is summarized in the following array 0x0009 LCR WORD interrupts LCR WORD interface VIC BYTE VIC BYTE VIC BYTE VIC BYTE MIC BYTE VIC BYTE INIG BYTE ENTES BYTE VIC BYTE VIC BYTE VIC BYTE VIC BYTE VIC BYTE VIG BYTE VIC BYTE VIC BYTE VIC BYTE VIC BYTE VIC BYTE VES5 BYTE VIC BYTE VIC BYTE VIC BYTE VIC BYTE VIC BYTE MIC BYTE MIG BYTE VIC BYTE VIC BYTE VIC BYTE VIC BYTE INIG BYTE VIC BYTE VIC BYTE VIC BYTE VIC BYTE VIC BYTE VIC BYTE January 13 ACCESS ACCESS ACCESS ACCESS E_ACCESS E_ACCESS ACCESS ACCESS ACCESS ACCESS ACCESS ACCESS ACCESS ACCESS ACCESS ACCESS ACCESS ACCESS ACCESS ACCESS ACCESS ACCESS ACCESS ACCESS ACCESS ACCESS ACCESS ACCESS ACCESS ACCESS ACCESS ACCESS ACCESS ACCESS ACCESS Ox4c 0x50 WOR WOR WOR WOR WOR WOR WOR WOR WOR WOR WOR WOR WOR WOR WOR WOR WOR WOR WOR WOR WOR WOR 0x4180 Oxf8 1 0x78 1 0x78 2 0x78 3 0x78 4 0x78 5
5. 0x78 6 0x78 7 Oxf8 0 Oxf8 1 Oxf8 2 Oxf8 3 Oxf8 4 Oxf8 5 0x38 6 0x38 7 Oxf8 2 Oxf8 3 Oxe8 6 0x08 0x0c 0x00 0x10 0x00 0x00 0x00 0x00 0x00 0x00 Oxfe OxOf OxOf OxO0f OxOf OxOf OxOf OxOf 0x3c 17 disable enable VIICR VICR1 VICR7 DSICR LICR1 LICR7 ICGS ICMS EGICR ICGS IVBR ICMS IVBR LIVBR EGIVBR ICSR ICRO ICR4 VIRSR VIVR1 VIVR7 TTR 16 usec 00437 A0 User s Manual VPCIVMED W Ie Ne R Plein amp Baus GmbH VIC BYTE ACCESS WORD 0xb3 0x40 ARCR VIC BYTE ACCESS WORD 0xb7 0x29 AMSR VIC BYTE ACCESS WORD O0xd3 0x00 RCR IFR LONG ACCESS WORD ADRHL OxFOFOFOFO ADR H ADR L IFR WORD ACCESS WORD CSR 0x0000 Contr Reg VIC BYTE ACCESS WORD Ox7f 0x80 ICR7 LCR WORD ACCESS Ox4c 0x0009 disable interrupts STOP WORD_ACCESS 0 0 APPENDIX E Standard deinitialization procedure Deinitialization is divided into two part Part one is run before the user deinitialization VIC BYTE ACCESS WORD Ox7f 0x00 ICR7 set SYSFAIL LCR WORD ACCESS 0x4c 0x0009 disable interrupts STOP WORD_ACCESS 0 O Part two starts after the user commands LCR WORD_ACCESS 0x50 0x4080 disable
6. are possible for address and size The driver s header file provides macro functions PAGE BASE and PAGE_SIZE to calculate these numbers The driver maps the specified area of the VME bus into the virtual memory A pointer to this memory region is returned Each access to this region is mapped into the VME bus Any access out of the window will be denied Errors during VME bus access are not reported as Windows errors VPCIVMED_DETATCH_WINDOW releases a previously reserved window Use a VPCIVMED REMOVE WINDOW structure to define parameters VPCIVMED GET STATIC STATUS returns status information of a VMEMM interface in a VPCIVMED STATIC STATUS structure VPCIVMED GET DYNAMIC STATUS informs about parameters of the interface which change during operation Use a VPCIVMED DYNAMIC STATUS structure for communication VPCIVMED READ VECTOR returns interrupt information in a VPCIVMED VECTOR LEVEL structure VPCIVMED ACCESS VIC68A provides direct access to the VIC68A chip Use a VPCIVMED_VIC68A_ACTION structure to program the chip and for the exchange of data The PCI VME profits of the huge variety of features which are provided by the VIC68A chip e g direct access to 68xxx processors and programmable delays by accessing the VIC68A directly No limitations of this communication are installed Note Do not change any registers which may influence the Address Modifier R
7. pattern Note Before using the command make sure that no important data is stored in the address range All addresses will be overwritten To use pvmon interactively type e g pvmon a39 p a29 p First address modifier is set to 0x39 and the address range is scanned readable addresses The same is repeated for AM 0x29 January 13 9 00437 A0 User s Manual VPCIVMED W Ie Ne R Plein amp Baus GmbH APPENDIX C Header file vpcivmed h ifndef __PCIVMEH_H__ PCIVMEH H shared between applications and VPCIVMED driver c 1999 ARW Elektronik this source code is published under GPL Open Source You can use redistribute and modify it unless this header is not modified or deleted No warranty is given that this software will work like expected This product is not authorized for use as critical component in life support systems without the express written approval of ARW Elektronik Germany Please announce changes and hints to ARW Elektronik What ho When first steps 24 01 98 added direct read write access to vic68a chip registers 12 07 98 rename PCR_ into LCR_ 19 07 98 TAS included 1 7 0 2 299 Corrections about interrupt handling 20 02 99 changes about PCIADA status 25 02 99 changes of IOCTL codes because of compatibility to WIN NT 12 03 99 PLX 9052 removed out of VPCIVMED_STATIC_STRUCT 16 03 99 VIC68A_WRITE_ONLY added 17 03 99 extension for VME reset 18 04 9
8. small test program pvmon exe which is supplied in the same package It is easy to use the driver for your own VME application The driver is independent from the chosen programming language since Windos95 standard I O functions are used for the communication VME access is performed via an interface window of an area of virtual memory which is defined by the driver For user applications this window looks like normal memory Read and write operations to the VME bus are converted into simple read and write operations into the not real memory The access to the driver is not limited to one process Multiple processes can use the driver Even one driver supports multiple VME interfaces Different levels of VME interrupts are handled by the interface The driver provides several serviced to operate these interrupts Windows95 and Windows98 are trademarks of the Microsoft Corporation January 13 1 00437 A0 User s Manual VPCIVMED W Ie Ne R Plein amp Baus GmbH Installation Be sure that PCIADA card of the PCI VME interface is installed in your PC Please refer to the PCI VME manual to insert the card After switching on you machine Windows recognizes the new hardware in you system and asks for a driver Insert the supplied CD into your drive and enter the driver s path If you CDROM is drive D type D WIN95 DRIVER In the next step the driver is copied to WINDOWS SYSTEM VPCIVMED VXD and the interface is added to th
9. 1 get the status of PCIADA s only define VPCIVMED_RESET VPCIVMED_CTL_CODE 12 make a reset to VME or global Jf a a aaa Sk SS a a a Se a one possible return codes define BOGUSADDRESS Oxffffffff Returned by MS routines De ee El FEE SODS ES SEE some built in limits define VPCIVMED_MAX PCIADA 4 maximum count of supported PCI interfaces define VPCIVMED_MAX_VMEMM 16 maximum number of supported VMEMMs define VPCIVMED_MAX WINDOWS 8 maximum number of windows into VME BRAS a AS PRS ARS sense SS SS SS switches and masks switches for VPCIVMED_INIT_COMMANDs define LCR BYTE 0 destination is LCR register define IFR BYTE 1 destination is VME Interface register define VIC BYTE 2 destination is VIC68A register define STOP BYTE 255 this command stops the init machine define BYTE_ACCESS BYTE 1 write byte wise define WORD ACCESS BYTE 2 word define LONG ACCESS BYTE 4 long switches for VPCIVMED_ACCESS_VIC68A define VIC68A_READ 0 read only access define VIC68A_WRITE 1 write and read back access define VIC68A_OR 2 read bit wise or content and read back access define VIC68A_AND 3 read bit wise and content and read back access define VIC68A_WRITE_ONLY 4 do not read back after write January 13 11 00437 A0 User s Manual VPCIVMED W Ie Ne R Plein amp Baus GmbH
10. 9 release of version 2 5 for driver 18 04 99 ED SE EEE DR BLIEB Pe I SSH BE BE BE SS OST NWNDNDN DNDN IN TI NTI N IN DD constants to be used to access certain features of the PCIVME interface define VPCIVMED_CTL_CODE x 0x80002000 x lt lt 2 compatibility to WIN NT define VPCIVMED_INIT_HARDWARE VPCIVMED_CTL_CODE 0 initializes the hardware with given parameters define VPCIVMED_DEINIT_HARDWARE VPCIVMED_CTL_CODE 1 uninitializes the hardware define VPCIVMED_ATTACH_WINDOW VPCIVMED_CTL_CODE 2 requests a base address to a vme window January 13 10 00437 A0 User s Manual VPCIVMED W Ie Ne R Plein amp Baus GmbH define VPCIVMED_DETACH_WINDOW VPCIVMED_CTL_CODE 3 frees a vme window define VPCIVMED_GET_STATIC_STATUS VPCIVMED_CTL_CODE A asks for INTERFACE structure define VPCIVMED_GET_DYNAMIC_STATUS VPCIVMED_CTL_CODE 5 asks for dynamic status define VPCIVMED_READ_VECTOR VPCIVMED_CTL_CODE 6 reads the level and vector of IRQ define VPCIVMED_ACCESS_VIC68A VPCIVMED_CTL_CODE 7 access vic68a register define VPCIVMED INSTALL IRO HANDLER VPCIVMED_CTL_CODE 8 installs a handler function define VPCIVMED_CONTROL_INTERRUPTS VPCIVMED_CTL_CODE 9 enable disable of interrupts define VPCIVMED_TAS VPCIVMED_CTL_CODE 10 make test and set define VPCIVMED_GET_PCIADA_STATUS VPCIVMED_CTL_CODE 1
11. OT_CONNECTED 3 no VMEMM hardware connected define E_CON_ERROR 4 data transfer failure define E_EMPTY 1 no PCI interface associated hessen a ame SS SE ee Sg a Se ee een eee shared structures between PCIVME IF and Application COMMANDS typedef struct DWORD dwInterface some command only need this input into requests VPCIVMED_STANDARD_COMMAND typedef struct one command element to initialize interface or deinitialize BYTE range 0 lcr 1 vme interface 1 stop default vme if BYTE type 1 byte access 2 word access 4 dword access default byte WORD offset offset into interface address range for initialisation DWORD value value to initialize VPCIVMED_INIT_ELEMENT January 13 12 00437 A0 User s Manual VPCIVMED W Ie Ne R Plein amp Baus GmbH typedef struct DWORD dwInterface targets to interface number VPCIVMED_INIT_ELEMENT sVie 1 be the last VPCIVMED_INIT_COMMAND typedef struct DWORD dwInterface DWORD base Lf base size must be less than DWORD size std 64k for short WORD modifier window VPCIVMED ADD WINDOW typedef struct DWORD dwInterface DWORD pdwLinAdr VPCIVMED REMOVE WINDOW typedef struct DWORD dwInterface DWORD dwAddress WORD wModifier window BYTE bContent VPCIVMED_TAS STRUCT typedef struct DWORD dwInterfac
12. VPCIVMED Windows 95 driver for PCI VME User s Manual 00437 A0 General Remarks The only purpose of this manual is a description of the product It must not be interpreted a declaration of conformity for this product including the product and software W Ie Ne R revises this product and manual without notice Differences of the description in manual and product are possible W Ie Ne R excludes completely any liability for loss of profits loss of business loss of use or data interrupt of business or for indirect special incidental or consequential damages of any kind even if W Ie Ne R has been advises of the possibility of such damages arising from any defect or error in this manual or product Any use of the product which may influence health of human beings requires the express written permission of W Ie Ne R Products mentioned in this manual are mentioned for identification purposes only Product names appearing in this manual may or may not be registered trademarks or copyrights of their respective companies No part of this product including the product and the software may be reproduced transmitted transcribed stored in a retrieval system or translated into any language in any form by any means with the express written permission of W Ie Ne R VPCIVMED is designed by ARW Elektronik Germany January 13 i 00437 A0 _ Kommentar vH1 Vers dieses Dokuments Wann ionen La 1 Table of conte
13. ce manager if any interrupt reserved for the interface The interface works without a reserved interrupt but interrupt functions are not available in this case January 13 6 00437 A0 User s Manual VPCIVMED W Ie Ne R Plein amp Baus GmbH APPENDIX A Packing list The driver is delivered in one CD ROM which contains Directory WIN95 DRIVER vpcivmed vxd the driver pcivme inf INF file for installation Directory WIN95 DRIVER SOURCE vpcivmed h header file to access the driver vic h header file for the VIC68A chip vme h header file to access the VME bus source files for the driver Directory WIN95 PVMON pvmon exe a useful program Directory WIN95 PVMON SOURCE source files for pvmon January 13 7 00437 A0 W Ie Ne R Plein amp Baus GmbH User s Manual VPCIVMED APPENDIX B Short form manual of pymon pvmon is a simple shell program to test the PCI VME interface by ARW Elektronik The code is OpenSource and is enclosed to the interface Overview of pymon commands type to get this help alh adrmode c d m start end e m lt start gt value f lt m gt lt start gt lt end gt lt x gt g lt m gt lt st gt lt en gt I x h i Change address modifiers h help Configure interface Dump memory area Examine or change memory area Fill memory from lt start gt til lt end gt with lt x gt Generate random memory test loop 1 seed x
14. e WORD wRegisterAddress WORD wAccessMode BYTE bContent VPCIVMED_VIC68A_ACTION typedef struct DWORD dwInterface DWORD dwIrqHandler Handler VPCIVMED_IRQ_HANDLER typedef struct DWORD dwInterface WORD wEnable VPCIVMED_IRO_CONTROL typedef struct DWORD dwInterface FH WORD wAction fl vector level January 13 at least one zero element must targets to interface number offset into VME address range 128 Mbytes for ext 16 Mbytes for VME address modifier for this targets to interface number linear address of window to remove targets to interface number tas to address VME address modifier for this byte content to store and get back targets to interface number address offset of vic68a register read write or and content to write and or targets to the interface number void User IrgHandler DWORD BOGUSADDRESS deinstalled targets to the interface number a 1 enables a 0 disables targets to interface number read current irq level read 13 00437 A0 User s Manual VPCIVMED W Ie Ne R Plein amp Baus GmbH WORD wType must be set to 1 VPCIVMED_VECTOR_COMMAND typedef struct DWORD dwInterface targets to interface number WORD wCommand VPCIVMED_RESET_COMMAND shared structures between PCIVME IF and Application RESPONSE includes static information about driver parameters
15. e WINDOWS registry You will find the driver at HKEY_LOCAL_MACHINE ENUM PCI VEN10B5 amp DEV9050 You will find the interface at start settings control panel system device manager where Interrupt and I O settings can be verified Note The driver only works for Windows 95 98 in 32 bit mode Only real 32 bit applications can use the driver but it does not work for MS DOS or WINDOWS 3 11 programs So far WINDOWS NT is not supported A driver is under preparation MS DOS and Windows 3 11 are trademarks of the Microsoft Corporation Windows NT is a trademark of the Microsoft Corporation January 13 2 00437 A0 3 1 3 2 User s Manual VPCIVMED W Ie Ne R Plein amp Baus GmbH Operating the driver A simple test unit pvmon exe The program is a useful tool to check the access to the VME bus and test VME modules It expects the driver vpcivmed in C WINDOWS SYSTEM If it is not there the path has to be specified Open a DOS box and start pymon by typing pvmon A short help is displayed Help can be obtained by typing on the prompt too Before accessing the VME bus pvmon has to be configured by typing c Store the settings and restart the program Now you can exchange data with the VME bus For more information please refer to the short form manual in APPENDIX B Using the driver for program code Access to the driver is managed by Windows 95 Standard I O funct
16. egister It will cause errors in the mechanism of interface windows VPCIVMED INSTALL IRQ HANDLER installs the interrupt handler on the local interrupt priority level The TCB Thread Control Block of the calling thread is stored when the service is accessed If an interrupt is enabled and released and the thread is alertable it is possible to invoke the installed interrupt handler Either PCIADA or VMEMM interrupts cause the interrupt handler Interrupt source is coded in a parameter which is described in Table 1 Table 1 Coding of interrupt level and vector FRE interrupt level interrupt vector Fass 31to 19 18 to 16 7 to 0 A BUS ERROR is handled as an VMEMM Interrupt Since the driver is locked after each VMEMM interrupt it has to be released by the user s application Interrupts caused by PCIADA are treated as virtual level 8 VPCIVMED_CONTROL_INTERRUPTS controls the interrupt mechanism It enables or disables specified interrupts of PCIADA or VMEMM VPCIVMED_TAS causes an uninterruptible cycle on the VME bus which is comparable to the TAS command of 68xxx processors VPCIVMED GET PCIADA STATUS returns status of all connected PCIADA boards installed in the PC It checks which VMEMM modules are connected and ready January 13 5 00437 A0 User s Manual VPCIVMED W Ie Ne R Plein amp Baus GmbH VPCIVMED_RESET controls different reset functions of the interface and the VME bus which are a local reset a global res
17. et and a VME bus reset Contents of all VIC68A registers are lost during a reset Perform a deinitialization and a reinitialization after the reset to reload registers Interrupt vectors Each interrupt caused by VMEMM has to be vectored Normally vectors from 0x00 to 0x3F are used by the driver internal use and vectors from 0x40 to OxFF are reserved for VME bus and it s peripherals Refer to Table 2 for detailed information Note The time out interrupt generated by PCIADA causes an interrupt vector number 1 Table 2 Interrupt vectors for different sources 1 active 6 active 7 active Interprocess communication global switeh 1 fo Interprocess communication global switeh 3 11 Interprocess communication module switch 0 12 Interprocess communication module switch 1 13 Interprocess communication module switch 2 14 Interprocess communication module switch 3 15 ACFAIL asserted 16 Write post Fail 17 Arbitration Timeout 18 SYSFAIL asserted 19 VME bus Interrupter acknowledge Pressing the reset button on the front panel causes an interrupt Applications have to take care of any further action which should be performed If more than one application use one window of the interface it is not possible to locate the cause of a VME BUS ERROR In this case every only one action is performed If errors occur during interrupt operations check at start settings control panel system devi
18. h is explained in winerror h and the real size of the returned data is returned Description of the defined services VPCIVMED_INIT_HARDWARE initializes one VMEMM module Standard initialization commands are summarized in APPENDIX D Additional initialization commands can be passed to the interface All VPCIVMED_INIT_COMMANDs have to be stored in a STOP terminated array Example struct DWORD dwInterface VPCIVMED_INIT_ELEMENT sVIC 3 sUserInitStruct 0 VIC BYTE_ACCESS 0x57 OxAA VIC BYTE_ACCESS 08253 0x00 STOP WORD_ACCESS 0x00 0x00 Note If the array contains only the STOP element the standard initialization will be performed The interface will be initialized on the first call of the service It has to be deinitialized before a new initialization is possible VPCIVMED_DEINIT_HARDWARE deinitializes the specified VMEMM board and it s PCIADA card Additional commands are added as described above APPENDIX E shows the standard commands VPCIVMED_ATTACH_WINDOW reserves a window for VME access One process can open VPCIVMED MAX WINDOWS at maximum Parameters which are required to open a window are passed in a VPCIVMED ADD WINDOW structure The window size is limited to 256 Mbyte January 13 4 00437 A0 User s Manual VPCIVMED W Ie Ne R Plein amp Baus GmbH Address Modifier a Base Address and size have to be specified for each window Only values at the edge of a 4k page
19. interface STOP WORD_ACCESS 0 O January 13 18 00437 A0 Seite i 1 Kommentar vH1 Dr L der von Horn Versionen dieses Dokuments Wann Was Wer 8 Juli 99 Manual erstellt L von Horn 19 Juli 99 nderungen von K Hitschler ber cksichtigt L von Horn vergl vpcivmed hitschler doc
20. ions which are independent from the programming language Header files for c programs are supplied with the interface They could easy adapted to other languages In your program include files vpcivmed h and windows h Add winerror h too if you want to use GetLastError to decode error messages Use window s function CreateFile to open the interface DeviceloControl to operate it and CloseHandle to close it At maximum VPCIVMED_MAX_PCIADA PCIADA cards currently 4 VPCIVMED_MAX_VMEMM interfaces 16 and VPCIVMED_MAX_WINDOWS 8 different windows are supported by the driver These parameters are defined in vpcivmed h Only the number of the VMEMM module is used to identify different modules and cards Intercommunication between driver and the users program is done via memory windows The driver provides a window for each process who requested it returning a pointer into the window Size Address Modifier and offset to access the VME bus is fixed for each window Random access to different windows it possible The driver itself takes care of Address Modifier and address offsets Any PCI VME application using the driver contains three major parts 1 Startup vxd_Handle CreateFile VxDpathName 0 0 NULL O FILE FLAG DELETE ON CLOSE NULL During this procedure number and IDs of connected VMEMM modules is determined 2 Controlling the Interface Each access to the interface is done by result DeviceloControl v
21. nts 1 VPCIVMED driver General description 2 Installati n eiiis e ieies T 3 Operating the driver enesssnesensnnennnennnn 3 1 A simple test unit pvmon E X s s sssssessseseseseserestsertstseststststernrsestststsesesenenestsenesesene 3 2 Using the driver for program code uuesessessesessesnenesnennnnennnnennenennenennennennnnennnnnn 3 3 3 Serye See sne Ear r EEN attonp inevetniuta ip svevtbucunsssoniets 4 SA 1 Interrupt Vectors ars Bes A A evens teases 6 APPENDIX A Packing liste taint aout 2ER had aii hate eee eae en ates 7 APPENDIX B Short form manual Of pvmon uceesessesenesnesennnennenennennennnennesnnnnennnn 8 APPENDIX C Header file vpeivmed h sesssnsnenesnesnennenenennsnennennnnennenennennennn 10 APPENDIX D Standard initialization procedure essesesensnennenessennenenennennnnennennn 17 APPENDIX E Standard deinitialization procedure uenessesesessennenesnennenenennenennennennn 18 List of tables Table 1 Coding of interrupt level and vector esessssnenesesnenenennenennennennenennennnennennnnen 5 Table 2 Interrupt vectors for different sources useseessnenenesnennenennennenennennenennenennnennnn 6 January 13 ii 00437 A0 User s Manual VPCIVMED W Ie Ne R Plein amp Baus GmbH VPCIVMED driver General description VPCIVMED provides an easy access to the VME bus for Windows95 and 98 users It s major efforts are demonstrated by a
22. uct DWORD dwInterface comes from the interface No WORD wVMEMM_connected status VMEMM is connected and powered WORD wVMEMM_enable status VMEMM access is enabled WORD wPCIADAIrg status PCIADA timeout IRQ pending WORD wVMEMMIrg status VMEMM IRQ pending VPCIVMED_DYNAMIC_STATUS typedef struct DWORD dwInterface comes from the interface No DWORD dwStatusID interrupt vector byte word long WORD wLevel interrupt level WORD wPCIIrq pending PCIADA Irq detected and cleared VPCIVMED_VECTOR_LEVEL typedef struct DWORD dwDummy nothing useful in here WORD wVersion Version of driver WORD wNumberOfInterfaces number of detected PCIADA struct DWORD dIfcStatus connection status of PCIADA VMEMM DWORD dwLinkCount how often this interface is requested WORD wModuleType if connected type of connected module WORD wFPGAVersion i connected Version of VMEMM FPGA WORD wModuleNumber i connected Number of Connected VMEMM WORD wWordMode if connected Mode of operation WORD wSysControl if connected VMEMM sysctl status WORD wConnected connected or not WORD wDummy char cszHWRevision 10 revision of PCI interface sPCIAda VPCIVMED_MAX_PCIADA VPCIVMED_PCIADA_STATUS typedef struct DWORD dwInterface WORD wResult January 13 status of each one targets to interface number 15 00437 A0 User s Manual VPCIVMED W Ie Ne R Plein
23. xd_Handle JR It is only necessary to pass the ID of the selected VMEMM module to the driver The corresponding ID of the PCIADA card is calculated automatically 3 Shut down On the command CloseHandle vxd_Handle the driver is closed for the application It is removed of the memory after it s last process has finished January 13 3 00437 A0 3 3 User s Manual VPCIVMED W Ie Ne R Plein amp Baus GmbH Services The driver provides different services which communicate via DeviceIoControl with the application Numbers and structures for this communication are defined in vpcivmed h see APPENDIX C Define Pointers to in and out structures before calling the driver A call of the driver may look like VPCIVMED_STANDARD_COMMAND sInterface VPCIVMED_VECTOR_LEVEL sVectorLevel DWORD DTOC Count DWORD dwResult AG sInterface dwInterface 1 selection of 1 VMEMM poll if an interrupt is pending dwResult DeviceloControl vxd_Handle VPCIVMED_READ_VECTOR amp sInterface izeof sInterface amp sVectorLevel sizeof sVectorLevel amp DIOC_count NULL if dwResult printf Error d occured n GetLastError else printf I have read a vector d at level d n sVectorLevel dwStatusID wLevel w Service VPCIVMED_READ_VECTOR is called Pointers to in and out structure and it s sizes are necessary An error code whic
Download Pdf Manuals
Related Search
Related Contents
ClaultTM Echo User Manual Guide Clinical Education InLine USB 3.0 cable Implementación de un sistema para la evaluación de personal RACING QUATTRO - FULCRUM Wheels Melitta ENJOY Therm BaByliss G596E Cat. Téc. EXL Port. - Valtek Sulamericana ンユミッ トカップリング 1_Titular de muestra Copyright © All rights reserved.
Failed to retrieve file