Skip to content
This repository was archived by the owner on Dec 2, 2020. It is now read-only.

Pixie Booting Procedure

JJ van Zyl edited this page Nov 5, 2018 · 7 revisions

A special thanks to H. Tan of XIA, LLC. for providing this information.

Updates to the CPLD

XIA found a fix for the issue described below. It involves reprogramming the CPLDs on the modules. This fix was released on September 7, 2016. If you have bought Pixie16 modules before that date, it's highly suggested you contact XIA for support on how to update your modules.

Booting Procedure

The booting of the Pixie-16 works like this: the host computer sends the FPGA configuration words (stored in the firmware files) to the onboard CPLD word by word with a software controlled delay between two consecutive words; the CPLD receives the FPGA configuration word and then converts it into a serial data stream and programs the serial data stream into the FPGA. It takes the CPLD a little bit less than 1 microsecond to complete serializing and programming each FPGA configuration word. So the host computer has to leave sufficient time in between two consecutive words, otherwise, those configuration words could get corrupted if the CPLD has not finished programming the previous word to the FPGA.

The ​NSMULTIPLIER is a method introduced to adjust the time delay between two consecutive FPGA configuration words. Since the delay generated by the host computer will very much depend on the speed of the host computer processors, the NSMULTIPLIER will probably need to be adjusted based on the specifications of the computer.

There is not a rule, per se, for how to set the ​NSMULTIPLIER. If you look at the boot code in pixie16sys.c file, you can see we require a 2 us delay after each FPGA configuration word download. The question is how to ensure the wait is indeed at least 2 us. The function get_ns_per_cycle in tools.c is supposed to report the correct time that takes to execute one cycle in a particular CPU, but if the computer is already working with a heavy load at the time of booting, the returned value by the function get_ns_per_cycle might be skewed to the high side, and therefore the actual wait when downloading the FPGA configuration words might be less than expected. So I agree it might still involve some form of trial and error, unfortunately.

Changing NSMULTIPLIER

  1. Edit the value of NSMULTIPLER in /root/xia-api/software/sys/include/pixie16sys_defs.h
  2. Recompile the software in /opt/xia/ to generate the updated libPixie16Sys.a. Do this by building with ccmake ../ -DCMAKE_INSTALL_PREFIX=/opt/ and toggle the flag USE_USLEEP to ON (you may have to select the advanced view in ccmake by pressing t).
  3. Recompile and reinstall PAASS to link to the new libraries. Use the following commands in the PAASS build directory.
make clean
make install