visual basic for applications n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Visual Basic for Applications PowerPoint Presentation
Download Presentation
Visual Basic for Applications

Loading in 2 Seconds...

play fullscreen
1 / 21

Visual Basic for Applications - PowerPoint PPT Presentation


  • 102 Views
  • Uploaded on

Visual Basic for Applications. The Datapump Board Jamieson Olsen. Background I. D0 Central Track Trigger (CTT). Background II. Trigger Electronics. Low Voltage Differential Signal (LVDS) Channel Links. Background III. LVDS Channel Links. The PROBLEM:

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Visual Basic for Applications' - deanne


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
visual basic for applications

Visual Basic for Applications

The Datapump Board

Jamieson Olsen

background i
Background I
  • D0 Central Track Trigger (CTT)
background ii
Background II
  • Trigger Electronics

Low Voltage Differential Signal (LVDS) Channel Links

background iii
Background III
  • LVDS Channel Links

The PROBLEM:

Can’t probe the LVDS pairs! Can’t use a logic analyzer or ‘scope!

the datapump
The Datapump
  • To debug our trigger hardware it would be useful to have a data pattern generator that would drive channel links.
  • Likewise, it would be good to have a board that could capture channel link data and read it out.
  • General purpose – it should work with AFE, Mixer, and DFE boards!
hardware interface
Hardware Interface

Need some easy way to

load test vectors into the

transmitters and readout

the captured data on the

receivers.

What’s the hardware interface?

hardware interface1
Hardware Interface

OK, use a PC!

How should the PC connect to the Datapump?

  • VME is not portable
  • PCI, PCMCIA, USB, IEEE1394? Huh?
  • Parallel port is fast & easy to program!

(More on this later…)

datapump board1
Datapump Board
  • Three medium-sized Field Programmable Gate Arrays (FPGAs) are used to build the transmitter and receiver circuits.
  • A small CPLD acts as the parallel port interface “bridge” to the FPGAs.
transmitter circuit
Transmitter Circuit
  • Each transmitter sends 128 28-bit words (loops continuously).
  • All ten transmitters are synchronized to the same counter and 53MHz clock.
  • The transmitter test vectors can be read back for verification.
receiver circuit
Receiver Circuit
  • Specify a unique trigger pattern for each receiver. Should include ‘X’ (don’t care) bits.
  • All receivers are armed simultaneously.
  • Once armed, each receiver waits for the trigger pattern, then captures 256 data words.
parallel port
Parallel Port
  • Enhanced Parallel Port (EPP) is used
  • 8-bit bi-directional datapath
  • Three “ports” in the PC I/O space: Control, Data, Address
  • Setup the control port, then…
  • To write a byte: outp(port, data)
  • To read a byte: inp(port)
parallel ports and vba
Parallel Ports and VBA
  • VBA does not include the inp() and outp() functions.
  • VBA calls functions in a DLL (ntio.dll) called VB_pokeIO(port, data) and VB_peekIO(port)
  • The peek/poke functions in this DLL “cut through” windows and get right to the hardware ports.
user interface
User Interface
  • There are lots of test vectors which need to be visible simultaneously.
  • An Excel spreadsheet is ideal for this application!
  • VBA talks to the datapump via the parallel port.
excel control buttons
Excel Control Buttons
  • Configure the datapump FPGAs.
  • Write/Verify the transmitter test vectors.
  • Specify the trigger pattern for each receiver.
  • ‘Arm’ and readback the receiver data.
configuration
Configuration
  • Must do this each time datapump is power cycled.
  • Originally this was a C program and DOS batch file, but it was all converted into VBA.
  • Writes three files to the datapump PLDs.
  • The VBA module is called HEXDUMP, calls two subs Vbwrite_C() and hexdump().
datapump transmitters
Datapump Transmitters

VBA module “datapump”, subroutines Download_Vector() and Verify_Vector()

datapump receivers
Datapump Receivers

VBA module “datapump”, subroutines setup_U1() and readback_U1()