Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spice4qucs tests #8

Open
ra3xdh opened this issue Jul 25, 2015 · 3 comments
Open

Spice4qucs tests #8

ra3xdh opened this issue Jul 25, 2015 · 3 comments

Comments

@ra3xdh
Copy link
Contributor

ra3xdh commented Jul 25, 2015

I have just added tests for qucs+ngspice backend. Both netlist and simulation tests were implemented. Sources are here: https://github.com/ra3xdh/qucs-test/tree/spice4qucs There was added four test projects:

  • NG_RCL_prj RCL circuit --- AC+TRAN
  • NG_BJT_prj BJT amplifier --- AC+TRAN
  • NG_BJT-swp_prj BJT amplifier --- AC+TRAN+Parameter sweep
  • NG_EDD-Q-test_prj Charge equations with EDD (Nonlinear capacitor) --- AC+TRAN

How it works: run.py automatically recognizes project names starting with NG_ and executes ngspice+qucs instead of qucsator.

I also have introduced command line option "--ngspice" for run.py. It have effect only together with --add-test or --reset. If this option is passsed schematic will be treated as ngspice simulation.

How to add new simulation tets:

run.py --add-test Schematic.sch --prefix where_qucs_installed/ --ngspice

I left --qucsator switch for ngspice-tests too. Test could be run as usual:

$ ./run.py --qucsator --project NG_EDD-Q-test_prj --prefix /mnt/Data2/qucs-0.0.19/bin/ 
Using Max. time: 90
Using rtol: 0.1
Using atol: 1e-05
Found Qucsator in: ['/mnt/Datei_2/qucs-0.0.19/bin/']
******************************************
** Test suite - Selected Test Projects  **
******************************************
['NG_EDD-Q-test_prj']
********************************
** Test simulation and output **
********************************
Project :  /home/vvk/qucs-test/testsuite/NG_EDD-Q-test_prj
Running :  /mnt/Datei_2/qucs-0.0.19/bin/qucs -n -i /home/vvk/qucs-test/testsuite/NG_EDD-Q-test_prj/EDD-Q-test.sch -o /home/vvk/qucs-test/testsuite/NG_EDD-Q-test_prj/test_EDD-Q-test.dat --ngspice --run
############################################
#  Report simulation result comparison     #
--> Simulator location: /mnt/Datei_2/qucs-0.0.19/bin/
--> No significant numerical differences found.
#                                          #
############################################
************************
* Qucsator test report *
************************
-----------------------------------------------------------------------
Project                        | Schem. Version   |   Sim. Runtime     
-----------------------------------------------------------------------
NG_EDD-Q-test_prj              | 0.0.19           | 0.465948            
-----------------------------------------------------------------------
Qucsator version:   Qucsator 0.0.19 
Report produced on: 2015-07-25 18:11:30
-----------------------------------------------------------------------
Saved simulation report: report_simulation_Qucsator_0.0.19.txt 
Saved coverage report: report_coverage_150725_181130.txt
###############  Done. Return status: PASS ###############
@ra3xdh
Copy link
Contributor Author

ra3xdh commented Jul 25, 2015

You need to use latest build of Qucs from rebase_spice4qucs branch with this modified testsuite.

@guitorri
Copy link
Member

I am bit confused to call --qucsator and run ngspice in the background.
I will try to run it locally.

@ra3xdh
Copy link
Contributor Author

ra3xdh commented Jul 26, 2015

I think we can in future replace --qucsator by --simulator (If multi-simulator paradigm will be accepted). It will mean "run all available simulations". Now I decided to preserve legacy options to avoid breaking anything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants