User Tools

Site Tools


kicad:using_arbitrary_spice_engines_in_kicad_5

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
kicad:using_arbitrary_spice_engines_in_kicad_5 [2018/10/17 15:22] mithatkicad:using_arbitrary_spice_engines_in_kicad_5 [2019/01/04 21:41] (current) mithat
Line 3: Line 3:
 Simulation support in KiCad 5 has been significantly reworked to make it a better simulation platform. However, you might have a lot of SPICE projects that you created in KiCad 4, and reworking them to fit the way things work in KiCad 5 might be more work than you want to undertake. Also, you might be running KiCad on a Debian system, which (as of this writing) [[http://kicad-pcb.org/download/debian/#_build_from_source| doesn't have]] the new simulation support. Simulation support in KiCad 5 has been significantly reworked to make it a better simulation platform. However, you might have a lot of SPICE projects that you created in KiCad 4, and reworking them to fit the way things work in KiCad 5 might be more work than you want to undertake. Also, you might be running KiCad on a Debian system, which (as of this writing) [[http://kicad-pcb.org/download/debian/#_build_from_source| doesn't have]] the new simulation support.
  
-The UI bits for the OldWays (//Generate netlist// dialog, //Spice// tab//Run Simulator//) are still there in KiCad 5, but they no longer work the same way((At least not on my Debian sid system)). In particular, when KiCad generates ''*cir'' files, it no longer prepends ''-PSPICE''/''-GNUCAP'' nor appends ''+PSPICE''/''+GNUCAP'' text blocks found on your schematic to the file. But it does add a ''.title'' directive to the file that my simulator doesn't understand and chokes on.+The UI bits for the OldWays((Open the //Generate netlist// dialog, click the //Spice// tab and then the //Run Simulator// button)) are still there in KiCad 5, but they no longer work the same way --- at least not on my Debian sid system. In particular, when KiCad generates ''*cir'' files, it no longer prepends ''-PSPICE''/''-GNUCAP'' nor appends ''+PSPICE''/''+GNUCAP'' text blocks found on the schematic to the file. But it does add a ''.title'' directive to the file that my simulator doesn't understand and chokes on.
  
 So, I hacked together a bash script that makes it relatively easy to convert KiCad 4 simulations to something that works in KiCad 5. I'm dumping the source code here for now but may move it to Git[lab|hub] soon. So, I hacked together a bash script that makes it relatively easy to convert KiCad 4 simulations to something that works in KiCad 5. I'm dumping the source code here for now but may move it to Git[lab|hub] soon.
Line 19: Line 19:
 # * In this script: # * In this script:
 #       * Set CIRCUITNAME to point to the .cir file KiCad 5 generates. #       * Set CIRCUITNAME to point to the .cir file KiCad 5 generates.
-#       * Set SPICE_ENGINE to your desired SPICE engine. (You'll need to +#       * Set SPICE_ENGINE to your desired SPICE engine. (Hack the line 
-#         hack the line where it's invoked to add command line +#         where it's invoked to add any needed command line parameters.) 
-#         parameters or if it's weird.) +# * In the KiCad Netlist dialog's Spice tab, set the simulator to this 
-# * In the KiCad Netlist dialog SPICE tab, set the simulator to this file using +#   file using an absolute path. 
-#   an absolute path. +# * In the KiCad Netlist dialog's Spice tab, Run Simulator.
-# * In KiCad, Run Simulator.+
    
 # ----- config --------------------------------------------------------- # ----- config ---------------------------------------------------------
Line 31: Line 30:
    
 # The command for the SPICE engine you want to use: # The command for the SPICE engine you want to use:
-SPICE_ENGINE=spiceopus+SPICE_ENGINE="xterm -e ngspice"
 # ---------------------------------------------------------------------- # ----------------------------------------------------------------------
    
kicad/using_arbitrary_spice_engines_in_kicad_5.1539789742.txt.gz · Last modified: 2018/10/17 15:22 by mithat

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki