TraceMaker
C++ API of the engine
Loading...
Searching...
No Matches
catalogue.hpp File Reference

Component-rule catalogue (design doc 15 §6.1): categories of components with their detectors, roles and layout rules. More...

#include <cstdint>
#include <regex>
#include <string>
#include <string_view>
#include <utility>
#include <vector>
#include <nlohmann/json.hpp>

Go to the source code of this file.

Classes

struct  tmk::crules::Detector
struct  tmk::crules::RuleSpec
struct  tmk::crules::Category
struct  tmk::crules::Catalogue

Namespaces

namespace  tmk
namespace  tmk::crules

Enumerations

enum class  tmk::crules::Signal : std::uint8_t {
  tmk::crules::RefPrefix , tmk::crules::LibId , tmk::crules::Value , tmk::crules::Keywords ,
  tmk::crules::PinName , tmk::crules::NetName , tmk::crules::Topology
}
 What a detector looks at (doc 15 §3.1). More...
enum class  tmk::crules::Severity : std::uint8_t { tmk::crules::Hard , tmk::crules::Soft , tmk::crules::Advisory }

Functions

const char * tmk::crules::signal_name (Signal s)
const char * tmk::crules::severity_name (Severity s)
Catalogue tmk::crules::parse_catalogue (std::string_view json_text)
 Parses the catalogue JSON.
Catalogue tmk::crules::load_catalogue_file (const std::string &path)
const Catalogue & tmk::crules::builtin_catalogue ()
 The catalogue embedded at build time (src/crules/catalogue.json), parsed once.
std::string_view tmk::crules::builtin_catalogue_json ()

Detailed Description

Component-rule catalogue (design doc 15 §6.1): categories of components with their detectors, roles and layout rules.

The source is docs/component_rules.yaml; scripts/crules_catalogue.py converts it to src/crules/catalogue.json, which the build embeds (the engine has no YAML parser), and a ctest keeps the two identical.

Definition in file catalogue.hpp.