background image

 

WIENER, Plein & Baus GmbH  

www.wiener-d.com 

 

 

 

VM-USB 

 
 

 

 

 

 
 

User Manual 

Rev. 3.4.1, December 28, 2007 

Summary of Contents for VM-USB

Page 1: ...WIENER Plein Baus GmbH 1 www wiener d com VM USB User Manual Rev 3 4 1 December 28 2007...

Page 2: ...d 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 req...

Page 3: ...3 4 5 User Devices Source Selector Read Write 19 3 4 6 Delay and Gate Generator Pulser Registers Read Write 20 3 4 7 Scaler Registers SLR_A and SCLR_B Read 21 3 4 8 Number Extract Mask Register Read W...

Page 4: ...xxusb_usbfifo_read 43 6 13 xxusb_bulk_read 43 6 14 xxusb_bulk_write 44 6 15 xxusb_flashblock_program 45 7 VM_USB Specific Functions 46 7 1 VME_register_write 46 7 2 VME_register_read 46 7 3 VME_DGG 4...

Page 5: ...l rotary switch 1 1 VM USB Features Low cost 6U single wide VME master with high speed USB2 interface auto selecting USB2 USB1 LED s for speed and FPGA failure reset While operated as a slot one syste...

Page 6: ...ck May include conditional execution of VME commands controlled by the content of a hit register May include multiple conditional command stacks action triggered by either USB VME IRQ or external sign...

Page 7: ...T32 BLT16 System Controller bus arbiter and or interrupt handler Firmware Software upgradeable 4 firmware locations Selection via 8 position switch P program C use Performance D32 via USB EASY VME 128...

Page 8: ...d Gen VME command Generator VME VME Bus Including Arbitration FIFOs Three Stage Pipelined FIFO array 22 kBytes Master Control Unit USB Controller FX2 CY7C68013 IC OUT FIFO USB Out FIFO Relative to Hos...

Page 9: ...ld be disconnected from AC mains 2 1 Installation for Windows Operating Systems 1 Switch off the VME crate and remove the power cord Plug in the VM USB on the first left slot 1 if needed as system con...

Page 10: ...CD ROM e g D F and locate the file CC USB inf Press Enter to select this driver and to close the window 7 The WIENER VM USB driver should be listed and highlighted in the driver list The driver is not...

Page 11: ...WIENER Plein Baus GmbH 11 www wiener d com 8 The New Hardware Wizard should copy all driver files into the Windows System32 folders and report a successful installation...

Page 12: ...he same as those available at for Windows and are described later in the manual Linux specific details are located in the readme file on the software CD that you received with your module 2 3 Firmware...

Page 13: ...ct Yes or go to the Flash ROM Operations page and click program Open the file of the latest firmware xxx bit When done one has to reset the controller or switch the selector switch to the correspondin...

Page 14: ...B is placed in autonomous data acquisition mode Bit 0 of the Action Register controls the operating mode of VM USB and distinguishes between the interactive and autonomous data acquisition modes In th...

Page 15: ...nces of VME Commands to be performed in response to event trigger signals while VM USB is operating in autonomous data acquisition mode of operation DAQ mode In this mode of operation VM USB issues VM...

Page 16: ...able 0x24 36 Number Extract Mask 32 bits Read Write 0x28 40 Interrupt Service Vectors 1 2 32 bits Read Write 0x2C 44 Interrupt Service Vectors 3 4 32 bits Read Write 0x30 48 Interrupt Service Vectors...

Page 17: ...encoded in bits 13 15 of the event header word Note that the bits 0 to 11 of this word list the event length and bit 12 indicates event length exceeding the length of the 2k Word event assembly buffer...

Page 18: ...8 15 0 7 Scaler Readout Frequency Scaler Readout Period Readout Trigger Delay 3 4 4 User LED Source Selectors Read Write Offset 0x10 0xC The Data stored in this register identifies the sources of the...

Page 19: ...signal Like for LEDs the first four sources may differ for different NIM outputs but the last four are shared The source codes are as follows Code NIM O1 NIM O2 0 Busy USB Trigger 1 Event Trigger Exec...

Page 20: ...in units of 12 5 ns 80 MHz clock for either the gate and delay generator or for the pulser These values can be set for channel A and B independently The pulser is re triggering after the defined delay...

Page 21: ...shipped before 3 1 06 you will need to upgrade the CPLD firmware before taking advantage of the VME interrupts For more information on this contact WIENER support Any Stack ID can be linked to any co...

Page 22: ...ill sufficiently fast This watchdog timeout should be made shorter than the software timeout set for bulk read The relevant numbers for multi buffer bulk transfer are stored in the USB Bulk Transfer S...

Page 23: ...D named U7 and there are no dedicated connections for this purpose To write the IRQ mask 1 Write the IRQ mask to bits 0 6 of the global register and set bit 15 to 1 2 Set bit 1 of the action register...

Page 24: ...and Out Packets are of a variable length depending on which internal address is involved and what the content of the message is Important Note With some drivers EZUSB in conjunction with Windows API r...

Page 25: ...d description of Out Packets for the four target devices is given below 4 2 Writing Data to the Register Block The Out Packet for writing data to the Action Register the single register of the Registe...

Page 26: ...s in the long VCG stacks Please see the example and comments about stack generation at the end of chapter 4 5 1 Target Address 8 VCS ID 0 7 and VCG 2 Stack size Number of subsequent words low word of...

Page 27: ...bit is ignored Don t care BE Endianess BE 1 sets data mode to big endian VME default and BE 0 indicates little endian HD Hit Data identifies the data as a 16 bit hit register data coincidence register...

Page 28: ...Byte 3 1 0 0 0 1 Byte 0 Byte 1 1 1 0 1 1 Byte 3 1 0 1 1 1 Byte 2 1 1 0 0 1 Byte 1 1 0 1 0 1 Byte 0 0 0 0 0 0 Byte 3 Byte 2 Byte 1 Byte 0 0 0 1 0 0 Byte 2 Byte 1 Byte 0 0 1 0 0 0 Byte 3 Byte 2 Byte 1...

Page 29: ...st be on the 256 byte boundary i e to have the least significant byte equal zero The block length may be set to less than 256 bytes in which case noncontiguous memory locations will be accessed To sup...

Page 30: ...onally is identified in the command stack by setting bit 19 value 0x80000 of its Mode Word Additionally one must specify in bits 22 23 values 0x400000 and 0x800000 of the Mode Word the number of terms...

Page 31: ...17 Using XXUSBWin Application to Handle Stacks The MS Windows application XXUSBWin allows one to create save and read as well as to upload the VME command stack list in an easy and convenient way Fur...

Page 32: ...he Register Block and to the VME Stacks is straightforward such that the buffer consists only of the requested data The data buffers read during the data acquisition process have a structure depending...

Page 33: ...splits the long event into parts each of which appears as a separate event in the output buffer The partial events are tagged by setting bit 12 of the Event Length word except for the last part Also o...

Page 34: ...24 bit Read returns 2 words with data bits 0 15 and 16 23 respectively Bits 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 1 D15 D14 D13 D12 D11 D10 D9 D8 D7 D6 D5 D4 D3 D2 D1 D0 2 0 0 0 0 0 0 0 0 D23 D22 D21...

Page 35: ...xxusb_stack_read to verify that the stack is correctly stored 3 When the setup calls for it build and load the auxiliary scaler stack and define the readout mode and frequency 4 Set the trigger delay...

Page 36: ...nd function retrieves relevant parameters of USB ports of all XX USB devices attached to the host and returns these in an array of proper structures This is the first command to be issued when attempt...

Page 37: ...ng aliases to usb_open and usb_close functions of the libusb library 6 3 xxusb_serial_open Opens a xxusb device CC USB or VM USB whose serial number is given USB_DEV_HANDLE xxusb_serial_open char Seri...

Page 38: ...ion toggles the reset state of the FPGA while XX USB is in programming mode rotary selector set in one of four P positions WORD xxusb_reset_toggle HANDLE hDevice Parameters hDevice in Handle to the XX...

Page 39: ...in Handle to the XX USB device wRegisterAddress in Address of the XX USB register For a list of XX USB addresses see Remarks lpRegisterData out Pointer to a variable that receives the data returned b...

Page 40: ...r VM USB The physical length of the periodic scaler stack is 256 16 bit words for CC USB and 256 32 bit words for VM USB While the stack is expected to contain properly encoded sequence of VME VM USB...

Page 41: ...urned VME data to the USB port FIFO Then xxusb_stack_execute reads a buffer from XX USB containing the desired VME data WORD xxusb_stack_execute HANDLE hDevice LPDWORD lpData Parameters hDevice in Han...

Page 42: ...ly of write operations lDataLen may be set to 1 Timeout The time in ms that should be spent tryimg to write data Return Values When Successful the number of bytes read from xxusb Upon failure a negati...

Page 43: ...r of words to read This number must be not less than the number of bytes stored in the output FIFO wTimeout in Time in milliseconds after which the I O operation is canceled should there be no data av...

Page 44: ...n returns the number of bytes read from XX USB Function returns a negative number on a failure which in most cases signifies a timeout condition Remarks Depending upon the actual need the function may...

Page 45: ...ned short integers 16 bits or unsigned long integers 32 bits 6 15 xxusb_flashblock_program The xxusb_flashblock_program function programs one sector of 256 bytes of the flash memory FPGA configuration...

Page 46: ...The VME_register_write function writes to the internal registers of the VM_USB as described in section 3 4 short VME_register_write HANDLE hDevice USHORT Address LONG Data Parameters hDevice in Handl...

Page 47: ...LE hDevice USHORT channel USHORT trigger USHORT output LONG delay USHORT gate USHORT invert USHORT latch Parameters hDevice in Handle to the XX USB device channel in The DGG channel you wish to modify...

Page 48: ...settings function allows the user to setup the LEDs on the front panel of the VM_USB Details about the LED settings are found in section 3 4 4 short VME_LED_settings HANDLE hDevice USHORT LED USHORT c...

Page 49: ...t USHORT latch Parameters hDevice in Handle to the XX USB device Channel in The NIIM output channel you wish to modify Valid values are 1 O1 2 O2 code in Determines what event the output is linked to...

Page 50: ...ble in 1 enables scaler latch in 1 resets the scaler at time of call Return Values On success the function returns the number of bytes from from the VM_USB Function returns a negative number on a fail...

Page 51: ...Handle to the XX USB device Address_Modifier in VME Address modifier VME_Address in VME address to read Data from Data in data read from the VM_USB Return Values On success the function returns the nu...

Page 52: ..._Address LONG Data Parameters hDevice in Handle to the XX USB device Address_Modifier in VME Address modifier VME_Address in VME address to read Data from Data in data read from the VM_USB Return Valu...

Page 53: ...Address modifier count in The number of times to repeat the read VME_Address in VME address to read Data from Data out pointer to an array where Data can be stored read from the VM_USB Return Values...

Page 54: ...n be instructed via the USB interface to release the FPGA from reset When released from the reset state the FPGA will attempt to boot itself from the selected segment of flash memory with a successful...

Page 55: ...8 bytes and allowing at least 30ms wait time between the consecutive buffers 3 Send an FPGA reset toggle buffer or cold boot VM USB in the corresponding C mode A successful boot will be indicated by t...

Page 56: ...n the VME bus Both scalers are asynchronous with respect to the VM USB clock each using a dedicated fast clock network driven by the selected clock signal The use of the scalers is straightforward and...

Page 57: ...and reading back their content the internal device address space has been expanded to include the additional 2 bits required to identify the stack in addition to bit 0 As in earlier versions the stac...

Page 58: ...contain events with identical stack IDs 5 A pulser option has been added to the DGG input options such that the DGG is retriggered with the trailing edge of the gate pulse With this option selected th...

Reviews: