Horizon
Loading...
Searching...
No Matches
rule_clearance_same_net.hpp
1#pragma once
2#include "common/common.hpp"
3#include "rules/rule.hpp"
4#include "rules/rule_match.hpp"
5
6namespace horizon {
7class RuleClearanceSameNet : public Rule {
8public:
9 static const auto id = RuleID::CLEARANCE_SAME_NET;
10 RuleID get_id() const override
11 {
12 return id;
13 }
14
15 RuleClearanceSameNet(const UUID &uu);
16 RuleClearanceSameNet(const UUID &uu, const json &j, const RuleImportMap &import_map);
17 json serialize() const override;
18
19 std::string get_brief(const class Block *block = nullptr, class IPool *pool = nullptr) const override;
20 bool is_match_all() const override;
21 bool can_export() const override;
22
23 int64_t get_clearance(PatchType a, PatchType b) const;
24 void set_clearance(PatchType a, PatchType b, int64_t c);
25 uint64_t get_max_clearance() const;
26
27 RuleMatch match;
28 int layer = 10000;
29
30private:
31 std::map<std::pair<PatchType, PatchType>, int64_t> clearances;
32};
33} // namespace horizon
A block is one level of hierarchy in the netlist.
Definition block.hpp:29
Definition ipool.hpp:15
Definition rule_clearance_same_net.hpp:7
Definition rule.hpp:38
Definition rule_match.hpp:9
Definition rule.hpp:58
This class encapsulates a UUID and allows it to be uses as a value type.
Definition uuid.hpp:16
a class to store JSON values
Definition json.hpp:177