Marco Inacio
c6cbc9ec95
Fixes: lp:1646224 (Simulation: small tune field)
...
https://bugs.launchpad.net/kicad/+bug/1646224
2016-12-02 08:58:01 +01:00
Maciej Suminski
af3d5befa7
Solve codemodel libraries loading problem in ngspice
...
Fixes: lp:1630675
* https://bugs.launchpad.net/kicad/+bug/1630675
2016-10-17 10:11:27 +02:00
Maciej Suminski
26ee676278
Handle Spice_Netlist_Enabled attribute in Spice netlist exporter
...
Fixes: lp:1630502
* https://bugs.launchpad.net/kicad/+bug/1630502
2016-10-07 16:50:47 +02:00
jean-pierre charras
673b094b2b
Fix a few missing override qualifiers and shadowed vars.
2016-09-27 10:58:05 +02:00
Maciej Suminski
9e587a1ea2
Fixed an assertion in SIM_PLOT_FRAME
...
wxListCtrl cannot have wxLC_REPORT and wxLC_SMALL_ICON enabled at the same time (Windows)
2016-09-22 18:27:56 +02:00
jean-pierre charras
0719f8d214
Fixes: lp:1624659 (fix some issues in countries which are not using a point as decimal separator)
...
https://bugs.launchpad.net/kicad/+bug/1624659
Small enhancement in dialog_spice_model_base.cpp: add comments about spice values notation.
2016-09-17 18:34:44 +02:00
jean-pierre charras
48f916bd63
Kicad manger: add .cir netlist files to the list of files to show in project tree.
...
Simulator: open/save worbook file dialog: the dialog opens the current project folder by default.
2016-09-17 09:34:16 +02:00
jean-pierre charras
cd94da7972
Spice simulator and netlist generation: use only netnames (outdated option "use net numbers as net names removed" removed)
...
netlist generation: remove option "replace IC and U ref by X" (broken option).
All component refs are now prefixed by the Spice_Primitive field value.
Therefore the netlist used by Kicad ngsipce simulator and the spice netlist generated from dialog are the same.
(note: like previously, forbidden chars like ( and ) are replaced by _ in netnames)
2016-09-16 20:36:19 +02:00
Maciej Suminski
fcedef836a
Revert "Do not use double component primitives in Spice netlist exporter"
...
This commit creates more issues than resolves. It could happen that
there are components with different reference types (e.g. U1 and IC1)
that would be later converted to X1, causing a conflict.
2016-08-31 11:51:17 +02:00
Maciej Suminski
81e015036e
Fixes for drawing color labels in simulator's signal list
2016-08-30 14:25:59 +02:00
Maciej Suminski
67573f15be
Do not use double component primitives in Spice netlist exporter
...
Fixes: lp:1617768
* https://bugs.launchpad.net/kicad/+bug/1617768
2016-08-30 14:25:56 +02:00
Johannes Maibaum
b87bac22c7
Simulator: Fix probe and tune cursors on OSX.
2016-08-30 10:48:40 +02:00
jp-charras
26b1c732de
Simulator: add simulator icon, and colored icons to identify more easily traces in trace list and cursor list.
2016-08-29 11:39:54 +02:00
jean-pierre charras
7e3aedda82
Slightly modify the way DIALOG_SIM_SETTINGS m_settingsDlg is created in SIM_PLOT_FRAME frame: for an obscure reason, if it is created in ctor SIM_PLOT_FRAME, m_settingsDlg has an annoying issue on Windows: when shown, the parent SIM_PLOT_FRAME is sent to the background. When created outside the ctor, this issue is gone.
2016-08-20 19:51:33 +02:00
jean-pierre charras
2456db3817
Simulator: Make a few strings translatable.
2016-08-20 17:37:51 +02:00
Maciej Suminski
42f6cf33a1
Unbind REPORTER from NGSPICE before deleting
2016-08-19 16:39:46 +02:00
Maciej Suminski
fe30985742
Do not delete the NGSPICE singleton
2016-08-19 16:33:31 +02:00
Maciej Suminski
2a6b8f153b
NGSPICE as a singleton
...
One cannot call ngSpice_Init() twice without unloading the dll. When calling
ngSpice_Init, we pass a pointer to a NGSPICE instance and thus it cannot be changed.
When any of the callback function is called with a stale pointer everything crashes.
2016-08-19 15:51:19 +02:00
Maciej Suminski
cac571c056
Initialize ngspice only once
2016-08-18 18:10:00 +02:00
Maciej Suminski
43d93682a2
Fix locale in NGSPICE methods using LOCALE_IO instead of setlocale.
...
More information: https://lists.launchpad.net/kicad-developers/msg25763.html
2016-08-15 15:52:07 +02:00
Maciej Suminski
75f8b20493
libngspice is linked at compile time
2016-08-15 13:52:13 +02:00
Maciej Suminski
497b2a9442
CMake module for libngspice
2016-08-12 15:56:51 +02:00
jean-pierre charras
6e5628ceaf
Avoid simulator crash if the simulation was not run, when using most of main menu commands, due to a null pointer not tested.
2016-08-12 15:36:43 +02:00
jean-pierre charras
dd395a6854
Fix deprecated and shadowed var compil warnings
2016-08-12 11:00:58 +02:00
Maciej Suminski
18e99fa30f
Fixed a crash with certain shared library versions
2016-08-11 14:42:21 +02:00
Maciej Suminski
6b3584ce9b
fxup system ngspice.h
2016-08-11 14:42:19 +02:00
Maciej Suminski
0cb1e80e00
Activate eeschema on tune/probe
2016-08-11 14:42:19 +02:00
Maciej Suminski
dfb5c6bfdd
Do not update values if simulation is rerun Otherwise sometimes the signal list might be cleared and a new list is not yet available, resulting in loss of signals and cursors.
2016-08-11 14:42:19 +02:00
Maciej Suminski
d15eef06f9
Removed redundant debugging info
2016-08-11 14:42:18 +02:00
Maciej Suminski
2c29133c57
Use system ngspice.h file
2016-08-11 14:42:18 +02:00
Maciej Suminski
0667b7ba63
Fixed ngspice freeze when there is an error in the simulated netlist Does not work with current ngspice head, it has to be compiled from the official master branch.
2016-08-11 14:42:18 +02:00
Maciej Suminski
8227cd6d80
Do not recreate the simulator every time simulation is run
2016-08-11 14:42:17 +02:00
Maciej Suminski
eeeb3e0a9a
Simulator code formatting and clean up
2016-08-11 14:42:17 +02:00
Maciej Suminski
957c6ec417
Removed hard limit for ngspice netlist
2016-08-11 14:42:17 +02:00
Maciej Suminski
0a6390701d
NGSPICE uses a more convenient function to generate DLL name
2016-08-11 14:42:16 +02:00
Maciej Suminski
46ecfd8139
Resized simulator dialogs
2016-08-11 14:42:16 +02:00
Johannes Maibaum
c78462c4f5
sim: Modifications to compile the simulator on OSX.
2016-08-11 14:42:15 +02:00
Maciej Suminski
c9a1b45666
Fixed probe & tune cursors under Windows.
2016-08-11 14:42:15 +02:00
Tomasz Wlostowski
1930cd4d66
sim: display labels on current scale when only currents are added to transient plot
2016-08-11 14:42:14 +02:00
Maciej Suminski
e452992a6c
Cursor centering fix
2016-08-11 14:42:14 +02:00
Maciej Suminski
ca36f15fee
Temporary disable cursor centering
2016-08-11 14:42:14 +02:00
Maciej Suminski
2c576afdf3
Fixed menu entries
2016-08-11 14:42:13 +02:00
Maciej Suminski
ca13dc93b1
Support for simulation workbooks
2016-08-11 14:42:12 +02:00
Maciej Suminski
7b81516b61
Fixed SIM_PLOT_FRAME::CurrentPlot()
2016-08-11 14:42:12 +02:00
Tomasz Wlostowski
b20f941bd0
sim: hopefully final version of plot axis unit/suffix handling.
2016-08-11 14:42:10 +02:00
Maciej Suminski
01d18bad97
Save simulation command directive for every plot
2016-08-11 14:42:10 +02:00
Maciej Suminski
fb56420654
Do not store Spice vector names, but regenerate them
2016-08-11 14:42:10 +02:00
Maciej Suminski
ed8f555331
Remove plots that are invalid after component removal
2016-08-11 14:42:09 +02:00
Maciej Suminski
672fd76995
Remove tuners for components that were removed
2016-08-11 14:42:09 +02:00
Maciej Suminski
06287e4986
Display an error message for unannotated schematics
2016-08-11 14:42:09 +02:00
Maciej Suminski
dbf0fd6156
Better normalization rules for SPICE_VALUE
2016-08-11 14:42:07 +02:00
Maciej Suminski
bf758dce3e
Tuners are common for all plots
2016-08-11 14:42:07 +02:00
Maciej Suminski
5772938a71
New cursor shows up in the center, can be dragged by its axis
2016-08-11 14:42:07 +02:00
Maciej Suminski
2f8f92cf0a
Closing tabs with middle button click I could not find a way to make tab close button work in wxWidgets..
2016-08-11 14:42:07 +02:00
Maciej Suminski
fccf71aadd
Change 'Run Simulation' button icon when simulation is running
2016-08-11 14:42:06 +02:00
Maciej Suminski
8306cd3b9b
Fixed tuners layout after a tuner is removed
2016-08-11 14:42:06 +02:00
Tomasz Wlostowski
e691565fe3
sim: updated label generation code to match changes in the mathplot api
2016-08-11 14:42:04 +02:00
Maciej Suminski
7d268d2608
Reset scales upon simulation relaunch
2016-08-11 14:42:04 +02:00
Maciej Suminski
9d8b40b93d
Reset scales when a plot is removed
2016-08-11 14:42:03 +02:00
Maciej Suminski
ba3ce9b566
Fixed tuner autoplacement
2016-08-11 14:42:03 +02:00
Maciej Suminski
bc433764fe
Fixed layout proportions
2016-08-11 14:42:02 +02:00
Tomasz Wlostowski
36297f84c3
sim: further locale hacks, fixed plot/welcome message sizing
2016-08-11 14:42:02 +02:00
Tomasz Wlostowski
8e4ae1968f
sim: working on improved UX [wip]
2016-08-11 14:42:01 +02:00
Tomasz Wlostowski
2bcd8af25c
sim: fix trailing zero removal
2016-08-11 14:42:01 +02:00
Tomasz Wlostowski
bba57097b7
sim: use C locale for SPICE simulation. Added error callback
2016-08-11 14:42:01 +02:00
Tomasz Wlostowski
8c14f2f6b1
sim: working on UX
2016-08-11 14:42:00 +02:00
Tomasz Wlostowski
ec1b8be528
sim: fixed build errors & locale issues
2016-08-11 14:41:58 +02:00
Maciej Suminski
7406aad8ea
Display current plots using the current axis
2016-08-11 14:41:57 +02:00
Maciej Suminski
ce59b282d3
Display both axis names in the cursor list
2016-08-11 14:41:56 +02:00
Maciej Suminski
973a3d7bcb
Fixed a crash when a signal was removed
2016-08-11 14:41:56 +02:00
Maciej Suminski
07b451f4b1
Do not draw cursors outside margins
2016-08-11 14:41:55 +02:00
Maciej Suminski
cdf758b173
Automatically update cursor coordinates
2016-08-11 14:41:55 +02:00
Maciej Suminski
b25781814d
Fixed cursors
2016-08-11 14:41:55 +02:00
Maciej Suminski
65a0327e85
Better normalization rules for SPICE_VALUE
2016-08-11 14:41:55 +02:00
Maciej Suminski
65c7520544
Bulletproof Simulation settings dialog
2016-08-11 14:41:54 +02:00
Maciej Suminski
16fec4d73e
Strip comas from a Spice value
2016-08-11 14:41:54 +02:00
Maciej Suminski
920cf09ac1
Fixed plot for DC sweep analysis
2016-08-11 14:41:53 +02:00
Maciej Suminski
38810930ec
Removed redundant TRACE_* classes
2016-08-11 14:41:53 +02:00
Maciej Suminski
806b862a5e
Corrected Spice vector name for voltages
2016-08-11 14:41:53 +02:00
Maciej Suminski
5fdc32b79a
AC analysis plots using linear frequency scale
2016-08-11 14:41:52 +02:00
Maciej Suminski
0f993ba98c
Current probing
2016-08-11 14:41:52 +02:00
Maciej Suminski
caef84d622
SPICE_SIMULATOR::GetXAxis()
2016-08-11 14:41:51 +02:00
Maciej Suminski
27a7a9b1a5
Spice fields enum values renamed from SPICE_* to SF_*
2016-08-11 14:41:51 +02:00
Maciej Suminski
cf28e843ba
Fix for crash when AC simulation is relaunched
2016-08-11 14:41:50 +02:00
Maciej Suminski
e5604fee1c
SPICE_VALUE bugfix
2016-08-11 14:41:50 +02:00
Maciej Suminski
ef45cd696d
Refresh plots after simulation is relaunched
2016-08-11 14:41:50 +02:00
Tomasz Wlostowski
e8d6a42e1a
simulator: working on magnitude/phase plots
2016-08-11 14:41:49 +02:00
Tomasz Wlostowski
e5bf70996b
eeschema: migrate SIM_PLOT_PANEL to improved wxMathPlot [wip]
2016-08-11 14:41:49 +02:00
Maciej Suminski
d869771f04
Display an error message if ngspice DLL is missing
2016-08-11 14:41:48 +02:00
Maciej Suminski
a717194b1e
Enable tuner for RLC components only
2016-08-11 14:41:45 +02:00
Maciej Suminski
92a3e405c2
Tuner tool.
2016-08-11 14:41:45 +02:00
Maciej Suminski
4f9a418694
Moved SPICE_VALUE to a separate source file
2016-08-11 14:41:43 +02:00
Maciej Suminski
f62a6425a3
Changed the simulator code license to GPLv3+
2016-08-11 14:41:43 +02:00
Maciej Suminski
51f0564119
Signals are added using a separate dialog
2016-08-11 14:41:42 +02:00
Maciej Suminski
b897af7eb9
Added a few checks for SIM_PLOT_FRAME to improve robustness
2016-08-11 14:41:41 +02:00
Maciej Suminski
6bfe6342fc
Simulator fixes for Windows
2016-08-11 14:41:41 +02:00
Maciej Suminski
3e2061158e
SIM_PLOT_FRAME: Do not update plots if the just run a different type of simulation
2016-08-11 14:41:39 +02:00
Maciej Suminski
06463252d7
wxMathPlot: Limited zooming and panning
2016-08-11 14:41:37 +02:00
Maciej Suminski
78526ee913
Additional options for netlist exporter (fix passive values, library include paths)
2016-08-11 14:41:36 +02:00
Maciej Suminski
6580a355ab
Strip 'stdout' & 'stderr' from ngspice log
2016-08-11 14:41:35 +02:00
Maciej Suminski
90b6112c5d
Rearranged SIM_PLOT_FRAME, changed console log from wxRichTextCtrl to wxTextCtrl
2016-08-11 14:41:35 +02:00
Maciej Suminski
e90fcaa6d9
New type of simulation opens a new plot
2016-08-11 14:41:35 +02:00
Maciej Suminski
ab8c88f10b
SIM_TYPE enum
2016-08-11 14:41:34 +02:00
Maciej Suminski
0da13052dd
SPICE_SIMULATOR interface allows to obtain different types of plots (mag, phase, real, imag)
2016-08-11 14:41:31 +02:00
Maciej Suminski
2b1784cfc6
Simulation settings combo boxes are filled with net/power source choices
2016-08-11 14:41:30 +02:00
Maciej Suminski
a2b16ae640
Initial 'Simulation settings' dialog
2016-08-11 14:41:29 +02:00
Maciej Suminski
17294aaf6a
Simulation plot CSV & PNG export
2016-08-11 14:41:28 +02:00
Maciej Suminski
1d4fe279db
Menu entries to toggle legend & coordinates
2016-08-11 14:41:27 +02:00
Maciej Suminski
8c138312fb
Cursors are updated on request instead of using update UI events Previously CPU was busy updating the list of cursors even though nothing was changing.
2016-08-11 14:41:27 +02:00
Maciej Suminski
e364cfdbac
Renamed wxEVT_SIM* events to EVT_SIM*
2016-08-11 14:41:27 +02:00
Maciej Suminski
fa4ba69661
Simplified SIM_PLOT_FRAME layout Removed unnecessary panels & sizers, changed wxAuiNotebook to wxNotebook
2016-08-11 14:41:26 +02:00
Maciej Suminski
433f934dc1
Simulation frame displays a list of cursors and their values
2016-08-11 14:41:26 +02:00
Maciej Suminski
f3fabeb9fb
Right click context menu for signals (including adding cursors)
2016-08-11 14:41:25 +02:00
Maciej Suminski
88adcc894a
SIM_PLOT_FRAME::CurrentPlot() made public
2016-08-11 14:41:25 +02:00
Maciej Suminski
cd25e62052
CURSOR does not take mpWindow* in constructor
2016-08-11 14:41:24 +02:00
Maciej Suminski
0b0885f6cd
Removed 'Parameters' listbox, expanded 'Signals' list
2016-08-11 14:41:24 +02:00
Maciej Suminski
8b61bb4acc
Signals toggling in SIM_PLOT_PANEL
2016-08-11 14:41:24 +02:00
Maciej Suminski
ba99dfdabf
CURSOR class for simulation plot
2016-08-11 14:41:22 +02:00
Maciej Suminski
24bccb00d6
Menu event handlers for simulation plot frame
2016-08-11 14:41:22 +02:00
Maciej Suminski
51906625ee
Replaced sim plotting widget with wxMathPlot
2016-08-11 14:41:21 +02:00
Maciej Suminski
951d16c655
Fixed Spice netlist export options and added a few new flags
2016-08-11 14:41:20 +02:00
Maciej Suminski
9f3324bac7
Changed the way ngspice is executed Previously it was run in a wxThread, but it did not allow to issue commands while the simulation is running. If you check ngspice shared library source code, then you will discover "bg_*" commands that executes commands in background, so the simulator still can be controlled.
2016-08-11 14:41:19 +02:00
Maciej Suminski
544da3feda
Handle 'Simulate' button label in idle event handler
2016-08-11 14:41:19 +02:00
Maciej Suminski
aea29fc730
Update already plotted signals upon simulation run
2016-08-11 14:41:18 +02:00
Maciej Suminski
38042ac9e0
NGSPICE class minor cleanup
2016-08-11 14:41:17 +02:00
Maciej Suminski
8fdb9e8307
SIM_PLOT_FRAME::NewPlot() -> SIM_PLOT_FRAME::NewPlotPanel()
2016-08-11 14:41:17 +02:00
Maciej Suminski
8a6e6f2d36
Do not add a trace if it is already plotted
2016-08-11 14:41:16 +02:00
Maciej Suminski
cb463f48b1
Add a signal on double click
2016-08-11 14:41:16 +02:00
Maciej Suminski
0d764741f9
Simulation commands moved from eeschema menu to SIM_PLOT_FRAME buttons
2016-08-11 14:41:16 +02:00
Maciej Suminski
751a335503
Minor SIM_PLOT_FRAME redesign
2016-08-11 14:41:16 +02:00
Maciej Suminski
2b1d2d7bd1
Fixed Kiway problems in SIM_PLOT_FRAME
2016-08-11 14:41:15 +02:00
Maciej Suminski
40224f48fb
Minor simulation plot style changes
2016-08-11 14:41:14 +02:00
Maciej Suminski
781a12222c
Fixed simulation plot legend
2016-08-11 14:41:14 +02:00
Maciej Suminski
0261a0e59c
Axis autorange
2016-08-11 14:41:14 +02:00
Maciej Suminski
91d1f7135b
SIM_PLOT_PAINTER class
2016-08-11 14:41:12 +02:00
Maciej Suminski
ae5424c44a
Probe cursor (TODO: has to be discussed)
2016-08-11 14:41:12 +02:00
Maciej Suminski
ac17165947
Initial version of simulator probe tool
2016-08-11 14:41:11 +02:00
Maciej Suminski
aa3e251cdd
Sim plots get consecutive numbers
2016-08-11 14:41:11 +02:00
Maciej Suminski
a4868a0e5a
Minor fixes to debug output
2016-08-11 14:41:10 +02:00
Maciej Suminski
0d8c095215
Fill the signal list box when a simulation is finished
2016-08-11 14:41:10 +02:00
Maciej Suminski
402a438339
NETLIST_EXPORTER_PSPICE adjusts paths for .include directives
2016-08-11 14:41:09 +02:00
Maciej Suminski
9ef2cb94bf
Simulation executes in a separate thread
2016-08-11 14:41:07 +02:00
Maciej Suminski
e72b54a6e0
Code cleanup
2016-08-11 14:41:07 +02:00
Maciej Suminski
9e2485ea97
SPICE_SIMULATOR: Code formatting & clean up
2016-08-11 14:41:07 +02:00
Maciej Suminski
9dc681b198
Build fixes (for mathgl2)
2016-08-11 14:41:04 +02:00
Tomasz Wlostowski
7b05dc2a13
Fbp files for simulator
2016-08-11 14:41:04 +02:00
Tomasz Wlostowski
095af6e77a
wip
2016-08-11 14:41:01 +02:00
Tomasz Wlostowski
f1f69979e6
ngspice: something starts to work
2016-08-11 14:41:01 +02:00