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

Introduce optional netlisting to console #1201

Open
wants to merge 5 commits into
base: current
Choose a base branch
from

Conversation

ThomasZecha
Copy link
Contributor

CDL netlist will be written to console instead to file depending on qucs-s command-line parameter.

@ThomasZecha
Copy link
Contributor Author

Can be extended to the other SPICE dialects too.

@ra3xdh
Copy link
Owner

ra3xdh commented Jan 9, 2025

Can be extended to the other SPICE dialects too

This feature is already implemented for Ngspice and Xyce. Only CDL is missing.

  -o FILENAME    use file as output netlist
     --ngspice   create Ngspice netlist
     --xyce      Xyce netlist
     --run       execute Ngspice/Xyce immediately

@ra3xdh
Copy link
Owner

ra3xdh commented Jan 9, 2025

Also what happens if one generate CDL netlist and use --run CLI option?

@ra3xdh ra3xdh added this to the 25.2.0 milestone Jan 9, 2025
@ThomasZecha
Copy link
Contributor Author

Also what happens if one generate CDL netlist and use --run CLI option?

Ok, that's missing. I will add it.

@ThomasZecha
Copy link
Contributor Author

I would add something like doCdlNetList() if !run_flag && cdl_flag, either to console or to file depending on netlist2Console.
The combination cdl_flag && run_flag makes no sence since CDL does not contain any simulation stuff.

@ra3xdh: What do you think?

@ThomasZecha
Copy link
Contributor Author

CLI switch --cdl with the corresponding logic added

@ra3xdh
Copy link
Owner

ra3xdh commented Jan 19, 2025

I have recently noticed that you have a leftover bool chains in component.h:

virtual QString getExpression(bool isXyce = false, bool isCdl = false);
virtual QString getProbeVariable(bool isXyce = false);

This should be replaced by SpiceDialect too. You may include the fix in this PR, or open a separate PR.

ThomasZecha added 4 commits January 19, 2025 14:19
-Replaced qucs_s manual commandline parsing with QCommandLineParser
-Introduced new cli-parameter for netlisting to console

Signed-off-by: ThomasZecha <[email protected]>
-Implemented conditional netlisting to console for CDL
-forced using trailing a_ for class attributes instead ms-style m_ for
 class QucsApp
-removed unused attribute m_projModel from class QucsApp

Signed-off-by: ThomasZecha <[email protected]>
-Introduced cli parameter --cdl for netlisting CDL
-Implemented netlisting to console for ngspice and xyce
-Increased readability and introduced smart-pointer semantics for some
 qucs-s main.cpp functions
-Increased readability and introduced c++ cast's for casting to
 Schematic* for affected QucsApp::slotSimulateWithSpice and QucsApp::slotSaveNetlist

Signed-off-by: ThomasZecha <[email protected]>
-Replaced Component::getExpression(bool isXyce, bool isCdl) with
 Component::getExpression(spicecompat::SpiceDialect dialect)

Signed-off-by: ThomasZecha <[email protected]>
-Replaced Component::getProbeVariable(bool isXyce) with
 Component::getProbeVariable(spicecompat::SpiceDialect dialect)

Signed-off-by: ThomasZecha <[email protected]>
@ThomasZecha
Copy link
Contributor Author

I have recently noticed that you have a leftover bool chains in component.h:

virtual QString getExpression(bool isXyce = false, bool isCdl = false);
virtual QString getProbeVariable(bool isXyce = false);

This should be replaced by SpiceDialect too. You may include the fix in this PR, or open a separate PR.

Fixed.

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

Successfully merging this pull request may close these issues.

2 participants