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

Create Library from Spice library device #1210

Merged
merged 3 commits into from
Jan 19, 2025
Merged

Conversation

ra3xdh
Copy link
Owner

@ra3xdh ra3xdh commented Jan 19, 2025

This PR resolves a restriction reported by #944 The automatic extraction of SPICE .SUBCKT code from SPICE libraries is not possible, because some subcircuits may have complex dependencies. It is not possible to process these dependencies without implementing a full SPICE parser. So, I propose the following logic:

  • The SPICE File device works as before. The user must extract the subcircuit code with dependencies manually and put it in a separate file for every subcircuit. One device represent one subcircuit. The SPICE code is embedded in Qucs XML library in <Spice> </Spice section when creating the library contaning the subcircuits with SpiceFile devices.
  • The SPICE Library device is only referencing the external SPICE library instead. When creating library, the application checks if the schematic contains Spice Library device and copies the library file to the subdirectory with the same name as the library name. The SPICE libraries relative file names are referenced in <SpiceAttach> section of the XML file. The attached library and source project illustrate this workflow. Copy the library files to the $HOME/QucsWorkspace/user_lib. The SPICE library is in TriacST/ subdirectory.

Thyristor_ST_prj.zip
TriacST.zip

Besides the Spice Library Device extension, this patch adds an Analog models only switch to the Create library dialog. This is active by default and suppress the generation of dummy digital VHDL/Verilog models for analog devices.

image

@ra3xdh ra3xdh added this to the 25.1.0 milestone Jan 19, 2025
@ra3xdh ra3xdh linked an issue Jan 19, 2025 that may be closed by this pull request
This was referenced Jan 19, 2025
@ra3xdh ra3xdh force-pushed the 944_splibcomp_library branch from 108f7e6 to 2261b6c Compare January 19, 2025 11:32
@ra3xdh ra3xdh merged commit a09b9c6 into current Jan 19, 2025
7 checks passed
@ra3xdh ra3xdh mentioned this pull request Jan 22, 2025
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

Successfully merging this pull request may close these issues.

SPICE Library device limitation
1 participant