openMMC
Open Source Modular MMC for AMCs
|
Guide to configure the clock switching inside the uTCA crate (NAT MCH + Schroff Crate + AFC board)
The AFC board has a crossbar clock switch that is configured upon payload activation (Hotswap handle pressed - Blue LED off).
The outputs configuration is defined inside the file openMMC/port/board/<board-name>/adn4604_usercfg.h .
In this file you can change the clock outputs (ADN4604_CFG_OUT_n). For example:
You must also set (in the same header) which outputs will be enabled. To do that, just set the corresponding output enable flag (ADN4604_EN_OUT_n) to 1, like the following:
In order to receive the clock in the AFC board, the signal must be available in one of the uTCA user clock lanes (TCLKA-D) and be correctly switched to the AFC board (the MCH uses a star topology to connect the clocks to the AFCs).
The NAT Clock switch is configured using a text file that'll be parsed by the FPGA. In this file all the clock connection are defined (source, destination). A default configuration file can be obtained on the MCH webserver, under the Script Management
menu.
The user clocks are treated here by different names:
To configure the clock switching, download the current configuration file and search for the line clk_phys_out = dst, src
Here you can edit the source for each destination, for example, if you want to route the TCLKB from AMC3 to TCLKA from AMC4 one will write:
Keep in mind that one MCH only has access to one pair of TCLK signals, either TCLKA and TCLKB or TCLKC and TCLKD. The other pair is routed to the redundant MCH slot.
After editing the needed options, save the file and upload it using the Webserver feature. Here you can choose to overwrite the startup default configuration with your new file, if you don't select this option your changes will be lost on the next reboot.