Name of the exercise

VMEbus data transfer

Responsible for the exercise

Markus Joos

Description of the exercise

The students will write a C program that executes VMEbus single cycles and block transfers to write data to a VME memory and to read it back.

What will the students learn

  • Writing a simple C program to exchange data with a VMEbus module
  • Understand and use an existing VMEbus library
  • Compare the relative speed of different VMEbus transfer modes

Duration

2 hours. Time permitting the students can refine the program in the free time to go deeper into S/W performance profiling

List of material

H/W:
  • 1 VMEbus crate
  • 1 CCT SBC
  • 1 VMEbus D32/MBLT memory module (porbably a RIO2)
  • 1 VMEbus display module VMDIS 8004
  • 1 computer screen & keyboard
S/W:
  • Linux file system and gcc compiler / linker
  • vme_rcc, cmem_rcc and io_rcc driver
  • TDAQ RCD S/W (vme_rcc and related libraries)

Relevant Information

  • The students have heard the lecture on modular electronics
  • The students should have read:

Installation guide:

  1. Collect the H/W and turn the crate on.
  2. Make sure the SBC boots up. In case of problems contact the sysadmin. The SBC gets a Linux image from the central server.
  3. Log on with the DAQ school account (daqschool / daqsch00l) and use "lsmod" and "more /proc/xxx_rcc" to check if the drivers (vme_rcc, io_rcc and cmem_rcc) are loaded. The "proc" file of vme_rcc has to say that the Universe chip has been initialized
  4. Run "scanvme" and check if the memory module is seen at address 0x0
  5. Change directory to /exercise1/solution and run "make" to check if the example solution can be compiled
  6. Change directory to /exercise1/student and remove all files that may have been left by previous groups. Just keep the "makefile"

To be done: Document how the memory of the RIO can be slave mapped to address 0x0

Instruction sheet:

  1. Log on with the DAQ school account (daqschool / daqsch00l) and change directory to /exercise1/student
  2. Start an editor session (vi, nedit) and write a program that uses the vme_rcc library to execute the VMEbus cycles listed below:
    1. Write 0x12345678 to address 0x0 in A32 / D32 mode. Use the "safe" cycles
    2. Read the data back from address 0x0 and compare it
    3. Write 0x12345678 to address 0x4 in A32 / D32 mode. Use the "fast" cycles
    4. Read the data back from address 0x4 and compare it
    5. Write a block of 1 KB to address 0x1000 in A32 / D32 / BLT mode. You have to prepare the data in a cmem_rcc buffer.
    6. Read the data back in A32 / D64 / MBLT mode and compare it
  3. Watch the VMEbus transfers on the display module

Time permitting:

  • Instrument your code with calls of the rcc_time_stamp library and measure the overhead of the transactions.

Solution

TBD

-- MarkusJoos - 2009-08-20

Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r3 - 2009-09-15 - MarkusJoos
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Sandbox All webs login

  • Edit
  • Attach
This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2021 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback