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

XSPICE Digital_AUX Library preliminary work #1193

Closed
tomhajjar opened this issue Jan 6, 2025 · 20 comments · Fixed by #1200
Closed

XSPICE Digital_AUX Library preliminary work #1193

tomhajjar opened this issue Jan 6, 2025 · 20 comments · Fixed by #1200
Assignees
Labels
Milestone

Comments

@tomhajjar
Copy link

tomhajjar commented Jan 6, 2025

I started preliminary work on the Digital_AUX.lib to determine what will be in the Library.

As an experiment I made the Library knowing it would be missing most of the Spice models to see what it would look like. Since multiple Qucs-S Libraries like Xanalogue.lib also have Parameter-Passing and were made by hand I figured I might be able to add the missing info. I was surprised to see the following Verilog sections since they don't exist in any Qucs Library I have seen.

@ra3xdh ra3xdh added the library label Jan 6, 2025
@ra3xdh
Copy link
Owner

ra3xdh commented Jan 6, 2025

Can you tell me what in my subcircuits causes Qucs "Create Library..." to add these entries?

I suspect that some devices used in subcircuits contain pure digital model (Verilog/VHDL). There is no way to supress it inclusion in the library if such model is found.

@tomhajjar
Copy link
Author

tomhajjar commented Jan 6, 2025

I can't find any Library in Qucs, QucsStudio or Qucs-S that used "Verilog/VHDL". Seems like a lot of work for little return.

QucsStudio does have "Compiled Models" but not many use that feature.

Any idea if this will hinder adding Spice Library device with parameter passing to Create Library?

@ra3xdh
Copy link
Owner

ra3xdh commented Jan 6, 2025

I cannot remember such libraries too. I am not sure if this feature (VHDL/Verilog support in libraries) was ever used after it was introduced.

@tomhajjar
Copy link
Author

Any idea if this will hinder adding Spice Library device with parameter passing to Create Library?

@tomhajjar
Copy link
Author

@andresmmera

Since you make Libraries by hand, any hints how to make a Library of this project?

@andresmmera
Copy link
Collaborator

andresmmera commented Jan 6, 2025

I'll take a look as soon as I can, but I've no clue at this moment

@tomhajjar
Copy link
Author

tomhajjar commented Jan 6, 2025

Mike Brinson made Xanalogue.lib. Some of the subcircuits in this project should have similar structure.

Issue #944 adds more context.

@tomhajjar
Copy link
Author

tomhajjar commented Jan 7, 2025

Goals:
Libraries with XSPICE devices need parameter passing or they are useless. Parameter passing would be useful for other Libraries as well. We need to be able to make Libraries supporting parameter passing without resorting to making them manually like Xanalogue.lib. Presently only subcircuits made with the "Spice library device" support parameter passing but they cannot be made into a library using Qucs Create Library utility.

I made a simplified test project with XSPICE ADC & DAC Bridges, digital Clock and Analog Clock. I made two subcircuits each of the ADC & DAC Bridges using "Spice library" and "Spice netlist". Subcircuits made using Spice library support parameter passing and subcircuits made using Spice netlist do not.

Unfortunately the Qucs Create Library utility supports making a Library from subcircuits made using Spice netlist but doesn't support making one from subcircuits made using Spice library.

I decided to make two Libraries "Digital_slib.lib" and "Digital_snet.lib" to see what the syntax differences looked like. As expected the devices in "Digital_snet.lib" "function" but don't support parameter passing. The devices in "Digital_slib.lib" don't work.

In the case of subcircuits made with "digital" devices, Qucs Create Library inserts unrelated Verilog/VHDL sections into the Library cluttering it with spurious entries.

2025-01-07_115420
2025-01-07_115452

@ra3xdh
Copy link
Owner

ra3xdh commented Jan 7, 2025

Parameter passing would be useful for other Libraries as well.

Probably I will implement a way to pass parameters to SPICE file device. This task could be done before the release. Otherwise its need to wait #944 in the next release cycle.

Verilog/VHDL sections into the Library cluttering it with spurious entries.

The Verilog/VHDL section should not affect the analog simulation.

@ra3xdh ra3xdh added this to the 25.1.0 milestone Jan 7, 2025
@tomhajjar
Copy link
Author

tomhajjar commented Jan 7, 2025

When comparing "Digital_snet.lib" to "Xanalogue.lib" there are numerous extra entries that don't seem to do anything like "ModelIncludes "ADC_bridge.cir.lst" and "ModelIncludes "DAC_bridge.cir.lst" which are temp files never used again.

Digital_snet.lib also has more "subcircuit" and "parameter" entries than Xanalogue.lib even though both are for simple XSPICE devices.

@ra3xdh
Copy link
Owner

ra3xdh commented Jan 7, 2025

there are numerous extra entries that don't seem to do anything like "ModelIncludes "ADC_bridge.cir.lst" and "ModelIncludes "DAC_bridge.cir.lst"

LST files are for Qucsator. These directives has no effect in SPICE simulation.

@tomhajjar
Copy link
Author

LST files are never used after the Library is made. They also don't exist on anyone's PC other than the original Author. I delete them all the time.

@ra3xdh
Copy link
Owner

ra3xdh commented Jan 8, 2025

@tomhajjar The PR #1197 allows parameter passing for SPICE file component. You may proceed with the library design.

@tomhajjar
Copy link
Author

tomhajjar commented Jan 8, 2025

Great work Vadim. First test Library with Parameter Passing is successful. Only a hundred devices left to convert...

Just have to remember copying the parameter info from the Spice library device before deleting/replacing it with Spice netlist. The symbol and parameter info+data are not effected.

2025-01-08_081256
2025-01-08_081319

@tomhajjar
Copy link
Author

One nice thing about Spice library is you can copy-paste parameter info from the Spice file into the parameter field.

@tomhajjar
Copy link
Author

tomhajjar commented Jan 8, 2025

First cut at Digital_AUX.lib. I deleted a number of sources and pull-up/downs I deemed redundant.

One minor issue is sometimes a Digital simulation doesn't need a "ground" so instead of adding a resistor to ground I "grounded ground". Without it simulation failed.

2025-01-08_115901

Digital_AUX_library_projects.zip

@tomhajjar
Copy link
Author

tomhajjar commented Jan 8, 2025

null

@ra3xdh
Copy link
Owner

ra3xdh commented Jan 9, 2025

First cut at Digital_AUX.lib.

Is this library ready for upload in the repository?

@tomhajjar
Copy link
Author

tomhajjar commented Jan 9, 2025

Yes.

Also the goal is to also have all the files used to make the Libraries be available in the Discussion section. It should help with expansion of the Libraries and spawn new ones.

Having had to "reverse engineer" many of the original "Qucs" Libraries wasn't fun...

@ra3xdh ra3xdh linked a pull request Jan 9, 2025 that will close this issue
@ra3xdh
Copy link
Owner

ra3xdh commented Jan 9, 2025

Library uploaded by #1200

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.

3 participants