Production Test Suite (PTS) is the environment designed for running functionality tests on boards at the manufacturing site, right after production. It assures that boards comply with a minimum set of quality rules in terms of soldering, mounting and PCB fabrication process.
This PTS system is made to run only in the BE-CO labs, where CERN's General Machine Timing signal (GMT) is available. It also makes use of the BE-CO front-end computers infrastructure in terms of networking and drivers loading.
The main idea of this PTS is to pass the 1KHz GMT signal through all the channels of the DUT and then use CTRV timing receivers to validate the optical transmission/reception. The CTRVs check the quality of the pulse repetition and report errors if pulse periods or widths are out of specs.
Figure 1 shows the basic components of the PTS, which are:
1. ELMA crate housing:
- CTRV boards
- MENA-25 controller
2. ELMA crate housing:
- DUT connected to its front module CONV-TTL-RS485
- other ttl/opt and ttl/rs485 converter boards for essential conversions
3. PTS ubuntu computer running:
- an automated process that communicates with all the necessary equipment to validate the DUT.
To setup the PTS for the first time please follow the following steps (only for CERN).
1. ELMA crate for CTRVs
This crate houses:
- 4 x CTRVs; they are used to validate the DUT outputs.
- 1 x reference CTRV; it is used as a reference to validate the GMT input signal
- MENA25 controller; it is used to control the CTRVs.
Setup:
For this setup, we take advantage of the BE-CO FEC infrastructure that allows for the automatic loading of the CTRV drivers and the easy remote access to the MENA25 controller.
- Make a hardware front end installation request for an ELMA crate with MENA25 and 4 x CTRVs.
- Even if this is a lab FEC, ensure that the Create new FEC and A25 deployment procedures have been followed.
- The MENA25 should be declared with device name cfv-774-opt-pts1 in the LANDB and connection should be on convenient socket, close to a GMT socket. Note that this device name is written in the CONFIG.ini.
- The ELMA SYSMON is in principle not used by the PTS, so the plugging of this ethernet cable and the declaration of the cfvm-774-opt-pts1 in LANDB are optional. The PTS does ssh to this address for the retrieval of the status of the 5 x CTRVs.
- The reference CTRV is used to ensures that the GMT timing that is available in the lab is correct. This CTRV is receiving directly the GMT timing from a plug in the lab through a Db9-to-Db9 connector. The PTS software checks first that this board is receiving timing frames and its PLL is locked and only then it continues by checking the other 4 CTRVs associated to the repeaters.
- Make sure the declaration and placement of the MENA25 and 5 x CTRVs in CCDE is as shown below. The PTS is looking for the CTRVs in these predefined slots.
Cabling:
- 4 x LEMO 0 2pin to DB9 cables to connect from CTRV[1..4] Timing Frame input to CONV-TTL-RS485-RTM Output[2..5].
- 1 x DB9 to DB9 cable to connect form a lab GMT connector to the reference CTRV.
2. ELMA crate for DUT and other converters
This crate houses:
- 4 x CONV-TTL-RS485 front modules.
- 1 x CONV-TTL-RS485-RTM. Note that this RTM is twice as wide as the front modules. Note also that this RTM is a lab module, it is not a BE/CO supported product.
- 2 x validated CONV-RS485-OPT-RTM.
- The DUT is connected to the remaining CONV-TTL-RS485 front module.
Setup:
- Make a hardware front end installation request for an ELMA crate and 4 x CONV-TTL-RS485 and 2 x CONV-RS485-OPT-RTM.
- Even if this is a lab FEC, ensure that the Create new FEC procedure has been followed.
- The ELMA SYSMON should be declared with device name cfvm-774-opt-pts2 in LANDB and connection should be on convenient socket. Note that this device name is written in the CONFIG.ini. The PTS does telnet to this address for the retrieval of the DUT ID through the CONV-TTL-RS485 I2C.
Cabling:
- 1 x LEMO 0 2pin to DB9 cable to connect from a lab GMT connector to the input of the CONV-TTL-RS485-RTM Input[1].
- 5 x LEMO 00 cables to connect between inputs and outputs of the CONV-TTL-RS485.
- 7 x ST/PC optical fiber patch cords and 7 x ST/PC -10dB optical attenuators to connect between the DUT channels and the channels of the 2 x validated CONV-RS485-OPT-RTM.
3. Computer with PTS
This is a basic Ubuntu Deskop/Laptop that runs the PTS routine.
-
Download and install Ubuntu 16.04
- Do not check "download updates while installing" or "install this third-party software".
- Choose timezone and keyboard.
- Set username to "pts" and password to "baraka"; there is no restriction to the computer's name.
- After reboot, do not upgrade to another Ubuntu version, choose "Don't Upgrade" if asked. Also, do not update any software packages, if prompted to do so.
- Set date & time if not correct.
- Give admin access to "pts"
-
Declare the computer in the LANDB and request connection on convenient socket/portable if it is a laptop.
-
Install missing packages
Launch a terminal (press the "Windows" key once, then start typing the word "terminal" and click on the icon that will appear)
$ sudo apt-get install gedit git gitk terminator python2.7 python-pip python-configparser
$ sudo apt-get install snmp
- Install PTS
Clone the PTS repository:
$ cd ~
$ git config --global http.sslVerify false
$ git clone https://ohwr.org/project/conv-rs485-opt-rtm.git
There are no submodule dependencies and there is no need to compile.
- Make PTS Desktop icon
$ cd ~/conv-rs485-opt-rtm
$ echo -e "[Desktop Entry]
Type=Application
Terminal=false
Name=PTS-OPT-RTM
Exec=terminator -f --working-directory=/home/pts/conv-rs485-opt-rtm/pts -e \"python /home/pts/conv-rs485-opt-rtm/pts/run-pts.py ; exit\"
Icon=/home/pts/conv-rs485-opt-rtm/icon.png
Comment=
Path=
StartupNotify=false" > ~/Desktop/pts-opt-rtm.desktop
$ chmod +x ~/Desktop/pts-opt-rtm.desktop
- Make DUT-FEC-OFF Desktop icon
This can be used if by any chance the PTS halts while running a test and the DUT ELMA crate stays ON, prohibiting the user from unplugging the DUT.
$ echo -e "[Desktop Entry]
Type=Application
Terminal=false
Name=PTS-OPT-RTM
Exec=terminator -f --working-directory=/home/pts/conv-rs485-opt-rtm/pts -e \"python /home/pts/conv-rs485-opt-rtm/pts/dut-fec-off.py ; exit\"
Icon=/home/pts/conv-rs485-opt-rtm/icon-off.png
Comment=
Path=
StartupNotify=false" > ~/Desktop/dut-fec-off.desktop
$ chmod +x ~/Desktop/dut-fec-off.desktop
-
FEC user account
- For the ssh access to the FEC cfv-774-opt-pts1, the pts user needs to have its account included in the acc-all and acc-nfsdev-home groups and to have afs workspace. In agreement with CO sys-admins we created a temporary account optpts1, as a personal secondary CERN account. Note that this account does not need superuser rights to run the ctrvtest.
- In order to avoid providing the password of optpts1 each time the pts is accessing the CTRV FEC, a set of rsa keys needs to be created and stored, as follows. Note that the location of the private key id_rsa is indicated in the CONFIG.ini.
- Note that the optpts1 is a temporary account and after testing the first 120 units it might be deactivated by the BE-CO sysadmin. In this case one could either use their private account or create a new temporary account. In both cases, the CONFIG.ini CpuUserName needs to be modified and the following steps for the generation and storage of the rsa key should be followed.
On the pts computer launch a terminal:
$ ssh-keygen -t rsa
$ cd ~/.ssh
id_rsa id_rsa.pub // check that id_rsa and id_rsa.pub have been created //
$ scp id_rsa.pub optpts1@cs-ccr-dev1:/user/optpts1/.ssh/authorized_keys
- Check PTS configuration
This file holds the names and account access for the two ELMA crates. If you need to change something:
$ cd conv-rs485-opt-rtm/pts
$ gedit CONFIG.ini &
- "sh: pidof command not found"
If you see this message when the pts test02 is running, you may just need to change the bash profile settings of the optpts1 user. In any case this is not an error and the pts runs without problems despite this message.