Configuration files#

Introduction#

Components like DC/DC converters, PLLs or even the FPGA mailbox are configurable. the configuration is a file in text, CSV or YAML format. It is usually generated by a GUI provide by the component vendor.

File Naming convention#

Naming convention for configuration files is given in the table below. Values between {} are mandatory while those between [] are optional.

grammar

definition

exemple

{label}[_specifiers]_{version}.{extension}

unique file name

ltm4677a_100.txt

{label}

label of the component in the map

ltm1677a

[_specifiers]

series of words separated by underscore

{version}

semantic versioning 102 for 1.0.2

100

{extension}

extension of the file

csv, txt, yml

CLI option to supersede map defined in scenario#

  • The path to configuration file is defined in the scenario file.

  • It can be supersed by using the CLI option starting with --cfg_

  • Configuration files are located either in the invocation directory of the CLI or in the package p400cfg. The file is search in the invocation directory and then in the package. It can be abbreviated to the file name, e.g. ltm4677a_100.txt

Path to configuration files in python code#

  • The path to the package p400cfg is stored in the variable PATH_CFG:

        from p400cfg import PATH_CFG
        pcfg = PATH_CFG.joinpath("ltm4677a_100.txt")
        print(pcfg.exists())