tscircuitt
tscircuit6mo ago
15 replies
Seve

Seve - @shibo I think I know what we need to do...

@shibo I think I know what we need to do on the spice side. It took me a while to figure out but we need to run the spice simulation inside of core with a "plugin" SPICE engine so that we don't need to bundle any WASM. Just going to jot some thoughts:

- We need to introduce
simulation_*
circuit json properties
- Each
simulation_*
has a
simulation_experiment_id
, there is stuff like
simulation_voltage_graph
and
simulation_current_graph
(tbd exact names, but these are probably ok to start)
- Each
<simulation>
tag in tsx defines a separate experiment
-
platformConfig.spiceEngine
specifies what will run SPICE
- We need a basic SPICE engine for testing that is in JS, this may be easy or hard no idea, but it just needs to be basic so that core has a default
-
<voltageprobe />
/
<ammeter />
will be added and their names become the nodes for SPICE
- SPICE code generation happens in core
- Experiments are run while rendering (async)
- In the docs, inside CircuitPreview, but also in the RunFrame analog tab, we show the simulation with the probes also shown, with color. This makes it clear what part you're looking at
- Circuit-to-svg should also be able to output SPICE graphs
image.png
Was this page helpful?