From c9e17b4f67c287c21b02bccbaecf36e48939d6e8 Mon Sep 17 00:00:00 2001 From: gator Date: Sun, 16 Aug 2026 17:41:49 +0000 Subject: [PATCH] part: surface the functional mixed-signal model separately MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The `spice` field on a digital part is a power and loading macromodel — it draws the right quiescent current and cannot shift a bit. Showing it under a single "SPICE model" heading implies the part is simulatable, which for the digital parts it was not. `spice_mixed` is a model that performs the part's actual function, verified by simulation, and it is now shown as its own section with what was verified and what is not modelled. The download bundles both, so a deck gets the functional model and keeps the supply behaviour. --- assets/part.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/assets/part.js b/assets/part.js index d9b5601..67fe91d 100644 --- a/assets/part.js +++ b/assets/part.js @@ -105,7 +105,12 @@ window.ppcbReady(async () => { ${ser} ${pinsList ? `

Pins & pads

${pinsList}
` : ''} ${(tagList || kr) ? `

Requirement tags

${kr}${tagList}
` : ''} - ${p.spice ? `

SPICE model

show model
${esc(p.spice)}
` : ''} + ${p.spice_mixed ? `

Mixed-signal model ✓ simulatable

+

${esc(p.spice_mixed_note || '')}

+ ${p.spice_mixed_verified ? `

Verified — ${esc(p.spice_mixed_verified)}

` : ''} + ${(p.spice_mixed_ports || []).length ? `

.SUBCKT ${esc(p.spice_mixed_subckt || '')} ${esc((p.spice_mixed_ports || []).join(' '))}

` : ''} +
show model
${esc(p.spice_mixed)}
` : ''} + ${p.spice ? `

Supply / loading model

show model
${esc(p.spice)}
` : ''} `; @@ -121,7 +126,9 @@ window.ppcbReady(async () => { document.getElementById('dl-all').onclick = async () => { try { const wrl = await (await fetch(p.model_3d)).text(); dl(`${p.id}.wrl`, wrl); } catch {} - dl(`${p.id}.cir`, `* ${p.mpn} SPICE model — PromptPCB Parts\n${p.spice || ''}\n`); + dl(`${p.id}.cir`, `* ${p.mpn} — PromptPCB Parts\n` + + (p.spice_mixed ? `* functional mixed-signal model (${p.spice_mixed_subckt})\n${p.spice_mixed}\n\n` : '') + + (p.spice ? `* supply / loading macromodel\n${p.spice}\n` : '')); dl(`${p.id}.json`, JSON.stringify(p, null, 2), 'application/json'); }; document.getElementById('lib').onclick = () => {