aecad
aecad copied to clipboard
Circuit definitions must support external circuits as "modules"
Circuit definitions support sub-circuits via schemas: property. Those schemas and circuit components are included into the target (main) circuit and resulting circuit does have one single schema.
However, sometimes we need to handle two different circuits as modules of each other. The "module" should be present as a black box within the target circuit.
Proposal
circuit1 = (config) -> (value) ->
iface: "a b c"
netlist: ...
circuit2 = (config) -> (value) ->
iface: "d e f"
modules:
module1: circuit1
bom:
module1:
"myvalue": "m1 m2"
netlist:
1: "m1.a m2.c"
...
2 cases should be handled:
- Any footprint might be interpreted as if it were an external circuit
- An external circuit might suggest its corresponding footprint(s).