349
edits
Line 19: | Line 19: | ||
Below we show three methods for constructing the circuit data structure | Below we show three methods for constructing the circuit data structure | ||
* [[Ocs package#Build the AND GATE structure directly| using an Octave script ]] | |||
* [[Ocs package#Build the AND gate circuit structure parsing a .spc file| parsing a SPICE netlist]] | |||
* [[Ocs package#Build the AND gate circuit structure parsing an IFF netlist| parsing an IFF netlist]] | |||
Once the circuit data structure is loaded the simulation can be started by the following commands | |||
{{Code|Run the AND gate simulation |<syntaxhighlight lang="octave" style="font-size:13px"> | {{Code|Run the AND gate simulation |<syntaxhighlight lang="octave" style="font-size:13px"> | ||
Line 45: | Line 37: | ||
==== Build the AND GATE structure directly ==== | |||
==== Build the AND gate circuit structure parsing an IFF netlist ==== | |||
{{Code|Load the AND circuit structure parsing an IFF netlist |<syntaxhighlight lang="octave" style="font-size:13px"> | |||
outstruct = prs_iff ("and"); | |||
</syntaxhighlight> | |||
}} | |||
{{Code|IFF netlist for the AND gate (.cir file)|<syntaxhighlight lang="text" style="font-size:13px"> | {{Code|IFF netlist for the AND gate (.cir file)|<syntaxhighlight lang="text" style="font-size:13px"> | ||
% 0.1b1 | % 0.1b1 | ||
Line 172: | Line 173: | ||
endfunction | endfunction | ||
</syntaxhighlight> | |||
}} | |||
==== Build the AND gate circuit structure parsing a .spc file ==== | |||
{{Code|Load the AND circuit structure parsing a .spc file |<syntaxhighlight lang="octave" style="font-size:13px"> | |||
outstruct = prs_spice ("and"); | |||
</syntaxhighlight> | </syntaxhighlight> | ||
}} | }} |
edits