aktos-io / aecad

Open Source Circuit Board Design Software that runs on the browser and desktop
https://aktos.io/aecad
54 stars 10 forks source link

Circuit definitions must support external circuits as "modules" #83

Open ceremcem opened 2 years ago

ceremcem commented 2 years ago

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"
        ...
ceremcem commented 2 years ago

2 cases should be handled: