Documentation
¶
Index ¶
Constants ¶
const ( RuleSupplyContract = "RULE_SUPPLY_CONTRACT" RuleLogicLevelContract = "RULE_LOGIC_LEVEL_CONTRACT" RuleBusRoleContract = "RULE_BUS_ROLE_CONTRACT" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BusRoleContractRule ¶ added in v0.2.8
type BusRoleContractRule struct{}
BusRoleContractRule checks obvious bus-role conflicts without guessing when contracts are incomplete.
func (BusRoleContractRule) Check ¶ added in v0.2.8
func (r BusRoleContractRule) Check(design *ir.DesignIR, contractIR *contracts.ContractIR) []Finding
func (BusRoleContractRule) ID ¶ added in v0.2.8
func (BusRoleContractRule) ID() string
type Finding ¶ added in v0.2.8
type Finding struct {
RuleID string `json:"rule_id"`
Severity string `json:"severity"`
Net string `json:"net,omitempty"`
Message string `json:"message"`
Provider string `json:"provider,omitempty"`
Consumer string `json:"consumer,omitempty"`
Ref string `json:"ref,omitempty"`
Pin string `json:"pin,omitempty"`
}
Finding is the rule-engine result type before it is adapted into report JSON.
type LogicLevelContractRule ¶ added in v0.2.8
type LogicLevelContractRule struct{}
LogicLevelContractRule catches signal outputs that exceed contracted input logic tolerance, for example 5 V GPIO into a 3.3 V-only input.
func (LogicLevelContractRule) Check ¶ added in v0.2.8
func (r LogicLevelContractRule) Check(design *ir.DesignIR, contractIR *contracts.ContractIR) []Finding
func (LogicLevelContractRule) ID ¶ added in v0.2.8
func (LogicLevelContractRule) ID() string
type Rule ¶ added in v0.2.8
type Rule interface {
ID() string
Check(design *ir.DesignIR, contracts *contracts.ContractIR) []Finding
}
Rule is the only interface rule implementations need. It deliberately exposes DesignIR + ContractIR and nothing from any importer package.
func DefaultRules ¶ added in v0.2.8
func DefaultRules() []Rule
DefaultRules returns the scan-time contract rule set.
type SupplyContractRule ¶ added in v0.2.8
type SupplyContractRule struct{}
SupplyContractRule compares power providers on a net with power consumers on the same net. It reports only when contracts contain enough voltage data.
func (SupplyContractRule) Check ¶ added in v0.2.8
func (r SupplyContractRule) Check(design *ir.DesignIR, contractIR *contracts.ContractIR) []Finding
func (SupplyContractRule) ID ¶ added in v0.2.8
func (SupplyContractRule) ID() string