Adds 44 SPICE mappers, 58 custom metadata entries, and 12 visual Web Components covering logic gates, transistors, op-amps, regulators, sources, electromechanical parts and integrated-circuit packaging. Fase 9 — component catalog expansion ------------------------------------ - 7 logic gates (AND/OR/NAND/NOR/XOR/XNOR + NOT) as SPICE B-sources - 8 multi-input gates (AND/OR/NAND/NOR with 3 and 4 inputs) - 9 transistors: 5 BJTs (incl. PNP 2N3906/BC557) + 4 MOSFETs (incl. P-channel IRF9540/FQP27P06). NMOS refactored from Level=3 W=0.1 (hangs ngspice) to Level=1 with sane W/L - 5 op-amps: LM358, LM741, TL072, LM324 with per-chip saturation rails + opamp-ideal - 4 linear regulators (7805, 7812, 7905, LM317) with dropout - 3 batteries (9V, AA, coin-cell) with realistic ESR - Signal generator (sine / square / DC) - 2 Schottky diodes (1N5817, 1N5819) + photodiode (lux-driven current source) Fase 10 — electromechanical + ICs --------------------------------- - Relay (SPDT): coil + L + S-switch with native hysteresis + flyback diode, inverted-control trick for the NC contact - Optocouplers 4N25 and PC817 (LED + CCCS with CTR=0.5 / 1.0) - 7 74HC ICs as DIP-14 packages emitting 4 or 6 B-sources per component (first mapper pattern emitting multiple device cards) - 3 flip-flops (D, T, JK) — digital-sim only (edge detection is not representable in ngspice .op) - L293D dual H-bridge motor driver Infrastructure -------------- - scripts/component-overrides.json gains a _customComponents[] array that lets new Velxio-only parts survive metadata regeneration (previously applyOverrides() could only patch wokwi-elements components that had already been scanned) - scripts/generate-component-metadata.ts injects custom entries before the patch loop - New ComponentCategory values: 'logic', 'analog', 'electromech' - frontend/src/components/DynamicComponent.tsx PASSIVE tracing extended from just ['resistor','resistor-us'] to 9 two-terminal passives with per-part pin name maps - New CI workflow test-circuit.yml runs the sandbox on push/PR - frontend-tests.yml regenerates metadata and fails if committed JSON is stale - Documented 2 new ngspice gotchas in circuit-emulation-gotchas.md: unicode in netlist titles silently hangs the parser, and MOSFET Level=3 + W=0.1m causes .op to hang - 164/164 sandbox tests passing in ~9 s (was 88 pre-fase-9) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| README.md | ||
| phase_0_scope.md | ||
| phase_1_libraries.md | ||
| phase_2_solver.md | ||
| phase_3_passives.md | ||
| phase_4_actives.md | ||
| phase_5_avr_integration.md | ||
| phase_6_end_to_end.md | ||
| phase_7_ngspice.md | ||
| phase_8_velxio_implementation.md | ||
| phase_9_component_catalog_expansion.md | ||
| phase_10_electromech_and_ics.md | ||
| plan1.md | ||
README.md
test_circuit — plan
Carpeta de planificación para la campaña de pruebas de emulación de circuitos.
Estructura
plan1.md— plan maestro original (SPICE + ngspice WASM, propuesta grande)phase_0_scope.md— alcance inicialphase_1_libraries.md— librerías evaluadasphase_2_solver.md— solver hand-rolled (legacy, baseline de comparación)phase_3_passives.md— pasivos (R, C, L)phase_4_actives.md— activos (diodo, LED, BJT, MOSFET)phase_5_avr_integration.md— integración con avr8js (estilo Velxio)phase_6_end_to_end.md— E2E pot→PWM-LED y termistorphase_7_ngspice.md— ngspice-WASM víaeecircuit-engine+ co-simulación avr8jsphase_8_velxio_implementation.md— plan de implementación en Velxio (definitivo): componentes nuevos (genéricos + reales), instrumentos, fases 8.1–8.6phase_9_component_catalog_expansion.md— expansión del catálogo: XNOR, SPICE mappers para las gates existentes, PNP/P-MOSFET, op-amps reales, reguladores, fuentes (complementa fase 8 con los huecos detectados enautosearch/05_velxio_component_inventory.md)phase_10_electromech_and_ics.md— electromecánica (relé), aislamiento óptico (optoacopladores), packaging de lógica (74HC00/04/08/14/32), flip-flops (D/JK/T) y driver de motores L293D
Cómo correr
cd test/test_circuit
npm install
npm test
Resultados se documentan progresivamente en ../autosearch/.