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

How to make a Library from subcircuits with parameter passing like Xanalogue.lib #1148

Closed
tomhajjar opened this issue Dec 18, 2024 · 3 comments · Fixed by #1197
Closed

How to make a Library from subcircuits with parameter passing like Xanalogue.lib #1148

tomhajjar opened this issue Dec 18, 2024 · 3 comments · Fixed by #1197
Labels

Comments

@tomhajjar
Copy link

tomhajjar commented Dec 18, 2024

Does anyone know how @MikeBrinson made Xanalogue.lib or have the original project?

I can't figure out how to make a Library using "SPICE netlist" subcircuits with parameter passing. Parameter passing to subcircuits is used in Xanalogue.lib. I have a number of new libraries to make but all require parameter passing. Until "SPICE Library device" allows parameter passing, the method used to make Xanalogue.lib looks like an option.

I made CSWO_lib.sch and CSWO_net.sch using CSWO.cir but. Only CSWO_lib.sch passes parameters but it cannot be made into a Library.

I made XA_CSWO_tran.sch using Xanalogue.lib and it allows passing parameters.

When I compare the XA_CSWO_tran.cir netlist to CSWO_net.cir, there is a seemingly redundant subcircuit in CSWO_net.sch that "overrides" out_low=-2 and out_high=2. Is there a reason this added subcircuit exists when netlists made using Xanalogue.lib don't need it?

2024-12-18_145702
2024-12-18_145524
2024-12-18_145549

XSPICE_Analog_prj.zip

@ra3xdh
Copy link
Owner

ra3xdh commented Dec 19, 2024

The Xanalogue.lib was probably made by hands. Unfortunately I don't posses the sources and cannot give an exact answer.

@ra3xdh
Copy link
Owner

ra3xdh commented Dec 29, 2024

The requested feature will be implemented as the part of #846. Closing a separate issue.

@ra3xdh ra3xdh closed this as completed Dec 29, 2024
@ra3xdh ra3xdh reopened this Jan 8, 2025
@ra3xdh
Copy link
Owner

ra3xdh commented Jan 8, 2025

The requested feature implemented by #1197

@ra3xdh ra3xdh linked a pull request Jan 8, 2025 that will close this issue
@ra3xdh ra3xdh added the ngspice label Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants