-
Notifications
You must be signed in to change notification settings - Fork 1
Home
Welcome to the pflib wiki!
As a true wiki, this is just a dumping ground for notes.
Caution
Since the code in pflib and our knowledge of the chips is evolving rapidly, please make sure to specify the pflib version you are using as well as any chip-setup that you did (relative to a HARD_RESET
e.g. parameters you applied).
Version Tag Before v3.1.2
Versions of pflib before v3.1.2 deduced the version at configure time and not at compile time, so you needed to make sure to re-configure the build whenever you wanted to re-build pflib so that the version stored in the binaries aligns with the version of the source code.cd build/
cmake .. && make
This will not force re-building of files that would not have otherwise needed to be rebuilt.
v3.1.2 pflib resolved this by deducing the version at compile-time, allowing the compiler to re-build the version target and any downstream binaries if need be.
Hosted on FNAL Indico so will need to login to access, ask on #hcal-electronics in the LDMX slack if you do not have FNAL Indico access.
- pflib C++ Introduction
- CMS HGCROC Tuning Procedure
- HGCROC3 Spec v2.0 (Silicon HGCROC)
- H2GCROC3 Datasheet 1.2 (Scintillator HGCROC)
- ECOND Specification Working Document (working document, feedback about confusing/incorrect points welcome)
- ECOND Data Formats Working Document (working document, feedback about confusing/incorrect points welcome)
- Compiler supporting C++20
- CMake
- readline
- yaml-cpp
Specifically, pflib is mostly tested in the standardized image Jeremy has shared via Google Drive.
Layer | Description |
---|---|
OS | AlmaLinux 9.4 |
gcc | 11.4.1 |
cmake | 3.26.5 |
readline | 8.1 |
yaml-cpp | 0.6.3 |
Versions 1 and 2 were designed with a different board setup where we were connecting to
an intermediate PolarFire board (hence the pf
in the name) that connected to the HGCROC.
This mode was used for a preliminary testbeam and a lot of additional development was done
on top of the basic setup.
We have now switched to a connection where we SSH to a ZCU board which then connects to
the HGCROC directly. This connection has been enabled after branching off of v2.0.6
and is the new main
branch which has led to a weird branch structure.
v2.0.6 tag
|
--o--o--o--o--o--o--o--o--o--o--o <- `main` branch where releases v3 and above will be
\
\o--o--o--o--o--o <- `v2` branch with releases >v2.0.6 and <v3
We (Jeremy and Tom) have decided to do this so that we can pick and choose which features that were developed for the testbeam to copy over to the new connection structure. Some of them rely on the old connection structure and so do not work with the new structure.
The more detailed documentation for this compilation can be found in the pflib/Compile.h file. The \hgcrocmanual is also a decent reference since that is where most of the parameter names are pulled from.
Translating YAML files containing named settings and their values into actual register values that can be written to the chip requires a (you guessed it) YAML parser. I have chosen to use yaml-cpp which is very light and easy to install. v0.6.3 is installed in the ZCU image Jeremy has shared.
Note: Make sure to build yaml-cpp with the YAML_BUILD_SHARED_LIBS=ON
cmake option so that we can link it properly to our code.
An outline of the terminal commands necessary to install yaml-cpp is given below.
mkdir yaml-cpp
wget -q -O - \
https://github.com/jbeder/yaml-cpp/archive/refs/tags/yaml-cpp-0.7.0.tar.gz |\
tar xz --strip-components=1 --directory yaml-cpp
cd yaml-cpp
cmake -B build -S . -DYAML_BUILD_SHARED_LIBS=ON
cd build
make install