Skip to content

Generalise rule areas, add to IPC nolead generator

This moves the rule area processing logic into the declarative_defs module, as it can now be handled in a much more general fashion using the AST interpreter system (see !1013 (merged)). Major changes:

  • increase modularisation of the rule area handling, both in terms of reasding the YAML dicts and in terms of transforming into shapes
  • Extend shape handling to work with centre/size rectangles and AST expressions more generally
    • This modifies the shape definition declaration format, but this is not yet used by any generators (SS4 is not merged yet)
  • Remove a lot of logic from the connector generator where it can be replaced with the new common logic.
  • Add a generic README for the shared functionality, link from the Connector README

Finally, use it in the IPC nolead (QFN) generator to add a rule_area definition option. This is only a few lines to implement as the logic is centralised. A basic AST evalutator is added, but more dedicated variable (e.g. body size, etc) can be added later as needed. For the current purposes, only simple literals are needed in the evaluation.

A similar system can also be used to add declarative graphic items, and adding keepouts to other generators will also be easy if needed.

Example (MR !1128 (merged))

image.png

The connector rule area support still work, but the definition needs a small adjustment:

image.png

samtec_ss4.yaml

Edited by John Beard

Merge request reports