Data Master: How-To Configure and Operate for Release R3-R9 ("Balloon")

DEPRECATED

Introduction

This How-To is intended for the members of the timing team. The data master is implemented using a PCIe PEXARIA2A module in an industrial PC. The PCIe module requires a dedicated gateware including a couple of lm32 softcores. Configuration and operation can be done by the FAIR Data Master Control Tool.

Getting the Tool

Just use SVN to checkout this.
  • All necessary files are now in /ftm-tools.
  • You will need libetherbone and libxml2 to run ftm-ctl.
  • In case you need to recompile the tool, you need to get the sources, see here.

The Tool

Connection works over Etherbone via the typical interfaces such as USB, PCIe, ...

Checking the Status

[ruth@tsl0815 ~]# ./ftm-ctl dev/wbm0 status

### FTM @ dev/wbm0 - 9 Cores ####
╒═══════════════════════════════════════════════════════════════════════════════╕
│ WR                                                                            │
├────────────────────────┬──────────────────────────────────────────────────────┤
│ PPS:   OK   TS:   OK   │ WR-TAI: Fri Aug 25 10:14:28 2017                     │
└────────────────────────┴──────────────────────────────────────────────────────┘
╒═══════════════════════════════════════════════════════════════════════════════╕
│ Core #00                                                                      │
├────────────────────────┬──────────────────────────────────────────────────────┤
│ Status: 01 ErrCnt:   0 │   MsgCnt:      1446       TPrep:        150000 ns    │
├────────────────────────┼──────────────────────────────────────────────────────┤
│ Shared Mem: 0x04100000 │   Act Page: A 0x10000500  Inact Page: B 0x10000b4c   │
├────────────────────────┴──────────────────────────────────────────────────────┤
│          RUNNING        BUSY          -           OK            -             │
└───────────────────────────────────────────────────────────────────────────────┘
This is how it should look like normally. Try this a few times to see that MsgCnt increases.

Most Important Commands

FTM Cores are selected with '-c ' parameter. You can apply a command to all cores with n = -1.

  1. load firmware to all cores (ftm.bin)
    ftm-ctl <device> loadfw -c -1 <myfirmware.bin> 
  2. load control xml to core
    ftm-ctl <device> put -c <n> <mycontrol.xml> 
  3. start all cores
    ftm-ctl <device> run -c -1 
  4. softly stop all cores
             ftm-ctl <device> idle -c -1
             ftm-ctl <device> stop -c -1 
  5. forcefully stop all cores immediately
    ftm-ctl <device> fstop -c -1 
  6. show FTM status. It will show current flags for each core (like running, idle etc), a message counter showing the sent msgs for this plan and the active page
    ftm-ctl <device> 

Swapping

ftm-ctl put will only ever write to the inactive memorey page of a core. To make the new data take effect, you must issue a 'swap' command after the 'put'.
ftm-ctl <device> swap -c <n> 

Examples

double heartbeat example
  1. load accelerator control data to all cores
             ftm-ctl <device> put -c -1 heartbeat.xml
             ftm-ctl <device> swap -c -1 
  2. start all cores
             ftm-ctl <device> run -c -1 
  3. to conclude, set all cores to idle and stop
             ftm-ctl <device> idle -c -1 
             ftm-ctl <device> stop -c -1 

linac-to-ring example
  1. load accelerator control data for linac to core 0
             ftm-ctl <device> put -c 0 sourcelinac.xml
             ftm-ctl <device> swap -c 0 
  2. load accelerator control data for ring to core 1
             ftm-ctl <device> put -c 1 ring.xml
             ftm-ctl <device> swap -c 1 
  3. start all cores
             ftm-ctl <device> run -c -1 
  4. write initial condition to shared mem of core 0. The address is displayed with the status, try ftm-ctl without parameters.
             eb-write <device> 0xNNNNNNN/4 0x4712 
  5. to conclude, set all cores to idle and stop
             ftm-ctl <device> idle -c -1 
             ftm-ctl <device> stop -c -1  

Remark on Repo

For production, the tools are in our subversion repo.

Development is done in our git repo.

Additional Material

Only for members of the timing team:
  • gateware images for the data master can be found here.
  • November 2014. development branch for firmware and tools testsuite_wip)

  • May 2015
    • development branch for firmware and tools ftm2-devel
    • compile of firmware also at bel_projects/syn/gsi_pexarria5/ftm

-- DietrichBeck - 25 Aug 2017
Topic revision: r14 - 04 Dec 2017, DietrichBeck
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback