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.
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.
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.
- load firmware to all cores (ftm.bin)
ftm-ctl <device> loadfw -c -1 <myfirmware.bin>
- load control xml to core
ftm-ctl <device> put -c <n> <mycontrol.xml>
- start all cores
ftm-ctl <device> run -c -1
- softly stop all cores
ftm-ctl <device> idle -c -1
ftm-ctl <device> stop -c -1
- forcefully stop all cores immediately
ftm-ctl <device> fstop -c -1
- 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
- load accelerator control data to all cores
ftm-ctl <device> put -c -1 heartbeat.xml
ftm-ctl <device> swap -c -1
- start all cores
ftm-ctl <device> run -c -1
- 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
- load accelerator control data for linac to core 0
ftm-ctl <device> put -c 0 sourcelinac.xml
ftm-ctl <device> swap -c 0
- load accelerator control data for ring to core 1
ftm-ctl <device> put -c 1 ring.xml
ftm-ctl <device> swap -c 1
- start all cores
ftm-ctl <device> run -c -1
- 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
- to conclude, set all cores to idle and stop
ftm-ctl <device> idle -c -1
ftm-ctl <device> stop -c -1
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