-
Notifications
You must be signed in to change notification settings - Fork 3
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
Hierarchical Schematics and Design Libraries #9
Comments
Thanks for the detailed report! The current logic for looking up symbol files is defined here: xschem-viewer/src/model/LibraryLoader.ts Lines 43 to 80 in 57c026d
It's pretty complex already - it first tries to look if the given path starts in one of the libraries listed here, then it loads the file from that library: Otherwise, it looks if the file exists at the same directory level as the current schematic pointed by Here are some things to take into account when finding a solution:
|
Thanks for the great work!
How do I include schematic and symbol libraries?
Could the web viewer understand the directory hierarchy when providing a schematic from GitHub using the ?file selection in the URL? i.e. Add directories above the schematic to XSCHEM_LIBRARY_PATH for it.
Example: https://xschem-viewer.com/?file=https://github.com/cascode-labs/bandgaps/blob/main/bandgaps/bandgap_sky130_v1/bandgap_1v_v01/bandgap_1v_v01.sch
Problem
You can see in the screenshot below from the web viewer that I am missing the amplifier symbol that is shown in the second screenshot using the desktop executable version of xschem.
Desktop Implementation
In the desktop version I just have to make sure the XSCHEM_LIBRARY_PATH is set in the xschemrc according to how I organize my design library files as explained in the xschem docs.
In order to define this more portably across projects without having seperate xschemrc file for each project, I add the following Tcl code to the end of my xschemrc. This then allows me to define an environment variable using one of the file structures in the xschem docs. In my case option 3 makes the most sense.
A Possible Solution
Could we have the web viewer understand the file structure from github so that it can capture the schematics and symbols up to 2 levels above the provided schematic. This would allow us to include the library from the same repo assuming you folllow a similar library structure.
Here's the library file structure in my example:
Issue in the web viewer
Here is the schematic from one of my github projects:
https://xschem-viewer.com/?file=https://github.com/cascode-labs/bandgaps/blob/main/bandgaps/bandgap_sky130_v1/bandgap_1v_v01/bandgap_1v_v01.sch
Expected Result
Here is the same schematic in the desktop app:
@urish, @StefanSchippers, @barakhoffer
The text was updated successfully, but these errors were encountered: