pflib v2.7.0-1-gd371ab6a
Polarfire Interaction Library
Compile.h File Reference

Definition of compiling and decompiling functions between page numbers, register numbers, and register values to and from page names, parameter names, and parameter values. More...

#include <map>
#include <string>
#include <vector>
Include dependency graph for Compile.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  pflib
 Polarfire Interaction Library.
 
namespace  pflib::detail
 Hidden functions to avoid misuse.
 

Functions

int pflib::str_to_int (std::string str)
 Get an integer from the input string. More...
 
std::string pflib::upper_cp (const std::string &str)
 Get a copy of the input string with all caps.
 
void pflib::compile (const std::string &page, const std::string &param, const int &val, std::map< int, std::map< int, uint8_t > > &registers)
 Overlay a single parameter onto the input register map. More...
 
std::map< int, std::map< int, uint8_t > > pflib::compile (const std::string &page_name, const std::string &param_name, const int &val)
 Compile a single parameter into the (potentially several) registers that it should set. More...
 
std::map< int, std::map< int, uint8_t > > pflib::compile (const std::map< std::string, std::map< std::string, int > > &settings)
 Compiling which translates parameter values for the HGCROC into register values that can be written to the chip. More...
 
std::map< std::string, std::map< std::string, int > > pflib::decompile (const std::map< int, std::map< int, uint8_t > > &compiled_config, bool be_careful)
 unpack register values into the page names, parameter names and parameter values mapping More...
 
std::vector< std::stringpflib::parameters (const std::string &page)
 get the parameter names for the input page-type More...
 
std::map< std::string, std::map< std::string, int > > pflib::defaults ()
 get the default parameter values as specified in the manual More...
 
void pflib::extract (const std::vector< std::string > &setting_files, std::map< std::string, std::map< std::string, int > > &settings)
 Extract the page name, parameter name, and parameter values from the YAML files into the passed settings map. More...
 
std::map< int, std::map< int, uint8_t > > pflib::compile (const std::vector< std::string > &setting_files, bool prepend_defaults=true)
 compile a series of yaml files More...
 
std::map< int, std::map< int, uint8_t > > pflib::compile (const std::string &setting_file, bool prepend_defaults=true)
 short hand for a single setting file More...
 
void pflib::detail::extract (YAML::Node params, std::map< std::string, std::map< std::string, int > > &settings)
 Extract a map of page_name, param_name to their values by crawling the YAML tree. More...
 

Detailed Description

Definition of compiling and decompiling functions between page numbers, register numbers, and register values to and from page names, parameter names, and parameter values.