Setting up DDS demo system on a CERN VME Crate
Requirements:
Hardware:*
- A VME crate with a MEN A20 CPU
- 2 SVECs with 2 DDS FMCs installed in slot 1.
- A WR Switch & fibers.
Software:*
- An LM32 toolchain to build the realtime software. Until it becomes
officially supported, the is one installed in
/user/twlostow/apps/gcc-lm32
Setup instructions:
- Note: you must do the following operations from a PC with Internet access, so that Git can fetch the necessary submodules. *
- Clone the repository of the project and ensure the submodules are up-to-date:
$ git clone git:https://www.ohwr.org/white-rabbit/wr-d3s.git
$ cd wr-d3s
$ git submodule update --init
- Edit
software/applications/wr_d3s/rt/common/wrnode.mk
and point it to the correct LM32 compiler location:
CROSS_COMPILE=/user/twlostow/apps/gcc-lm32/bin/lm32-elf-
- Build the real-time firmware and tools:
$ cd software/
$ make
Loading the drivers
- Make sure the SVECs are declared in
/etc/transfer.ref
. There's no need to declare the mezzanines. - Go to the
scripts/
subdirectory of the repo and run:
$ sudo ./load-vme-cern.ch
This should output something like:
svec: insmod with lun=0,1 slot=10,12 vme_base=0x500000,0x600000 vector=0xd8,0xd9 fw_name=fmc/svec-golden.bin,fmc/svec-golden.bin vme_am=0x39,0x39 vme_size=0x80000,0x80000
Loading FPGA for SVEC LUN=0
Loading FPGA for SVEC LUN=1
mount: none already mounted or /sys/kernel/debug/ busy
mount: according to mtab, none is already mounted on /sys/kernel/debug
Loading WR Core firmware for SVEC @ lun 0 slot 10
Loading WR Core firmware for SVEC @ lun 1 slot 12
By default, the script assumes there are 2 SVECs in the system. The drivers can be installed for any number of SVEC cards by editing the line:
# SVECs to load the firmware to
SVECS="0 1"
- put the LUN list of the SVECs here.
To load your own FPGA firmware, change the path in the following line of the script to the path of your binary:
# FPGA firmware path
FW=/lib/firmware/fmc/test/svec-wr-d3s-test-20150907a.bin
Building and running the realtime software.
The RT software & tools reside in the software/applications/wr_d3s/rt
subdirectory.