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 revisionBoth sides next revision
kicad:using_arbitrary_spice_engines_in_kicad_5 [2018/09/09 07:47] mithatkicad:using_arbitrary_spice_engines_in_kicad_5 [2018/09/09 14:21] mithat
Line 3: Line 3:
 Simulation support in KiCad 5 has been significantly reworked to make it a better simulation platform. One casualty of this is that the OldWays no longer work((At least not on my Debian sid system)). In particular, when KiCad generates ''*cir'' files, it no longer prepends ''-PSPICE''/''-GNUCAP'' or 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. Simulation support in KiCad 5 has been significantly reworked to make it a better simulation platform. One casualty of this is that the OldWays no longer work((At least not on my Debian sid system)). In particular, when KiCad generates ''*cir'' files, it no longer prepends ''-PSPICE''/''-GNUCAP'' or 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.
  
-I have a lot of simulations I built under KiCad 4. So I hacked together a 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 will probably be moving it to Git[lab|hub] soon.+I have a lot of simulations I built under KiCad 4. 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 will probably be moving it to Git[lab|hub] soon.
  
 <code bash> <code bash>
Line 14: Line 14:
 # Usage: # Usage:
 # * Put all the stuff to be prepended (e.g., -PSPICE stuff) in pre.cir. # * Put all the stuff to be prepended (e.g., -PSPICE stuff) in pre.cir.
-# * Put all the stuff to be appended  (e.g., +PSPICE stuff) in post.cir.+# * Put all the stuff to be appended (e.g., +PSPICE stuff) in post.cir.
 # * 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. (You'll need to
 #         hack the line where it's invoked to add command line #         hack the line where it's invoked to add command line
 #         parameters or if it's weird.) #         parameters or if it's weird.)
-# * Set the simulator in Kicad to this file using an absolute path. +# * In the KiCad Netlist dialog SPICE tab, set the simulator to this file using an absolute path. 
-# * Run Simulator+# * In KiCad, Run Simulator
  
 ### --- config ------------------------------------------------------- # ### --- config ------------------------------------------------------- #
-# The name of the cir file to simulate with (w/o extension).+# The name of the cir file to simulate with (w/o extension):
 CIRCUITNAME=opa-x5-spice CIRCUITNAME=opa-x5-spice
  
-# The SPICE engine you want to use.+# The command for the SPICE engine you want to use:
 SPICE_ENGINE=spiceopus SPICE_ENGINE=spiceopus
 # -------------------------------------------------------------------- # # -------------------------------------------------------------------- #
kicad/using_arbitrary_spice_engines_in_kicad_5.txt · Last modified: 2019/01/04 21:41 by mithat

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki