From building several layout templates, improvements could be made to make the whole process easier:
Consistent naming API, that matches the pathname of the HDL component. Two parts:
Hierarchical naming - the returned object should be a scope and automatically handle adding the container's pathname prefix as needed - the function code should not deal with this.
Character remapping - e.g., replace , with _, must match the behavior in the netlist compilers.
Generate consistent KiCad tstamps, to allow proper netlist updates in KiCad layout. Either tstamp generation could be part of a compiler pass and be part of the IR (unclear how this would work with the current structure - maybe passes can introduce new parameters?) or add a tstamp generation helper to SVGPCB.
Probably not possible to generate tstamps as part of the SVGPCB layout template generation pass, since it would need to name each individual element.
Some graphical library to avoid needing to add primitives like vector-add in each layout template
From building several layout templates, improvements could be made to make the whole process easier:
,
with_
, must match the behavior in the netlist compilers.