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

DC source issue when do the interconnect simulation. #183

Open
xxma94 opened this issue Aug 29, 2022 · 4 comments
Open

DC source issue when do the interconnect simulation. #183

xxma94 opened this issue Aug 29, 2022 · 4 comments

Comments

@xxma94
Copy link

xxma94 commented Aug 29, 2022

Hi
In my SiEPIC-Tools 0.3.91, the code of find electrical IO pins:
DCsources += "N" + str(Vn) + NetName + " dcsource amplitude=0 sch_x=%s sch_y=%s\n" % (-2-Vn/3., -2+Vn/8.)
will raise an error in my interconnect (2022 R1), which is (1) Error loading netlist: the element 'dcsource' is not available in the library.
The auto generated netlist will need an element called 'dcsource'. However, in lumerical the dc source is called 'DC Source'. When I manually change the 'dcsource' to 'DC Source' in netlist file (*.spi), the netlist works well.

@jevillegasd
Copy link
Contributor

I am using 2021-R2.3 and I see the same specification for the DC Source name. I wonder on which version of Lumerical the source used the previous naming.

@jevillegasd
Copy link
Contributor

Similar to this issue, currently spice_netlist_export replaces spaces in the names of components by '_' characters. This is necessary because the spice netlist reading needs to see the whole string as a single parameter, and leaving spaces would just go to the next parameter, making the reading incorrect.

However netlist reading does support space characters, but to use them double quotes need to be added on the spice netlist text, for example:
This is incorrect:

Ring_0 N$1 N$0 Optical Ring Modulator library="Modulators/Optical" length= 628.319u loss=11.262u "effective index"=2.253 "group index"=2.636 dispersion=400.000u

But this is correct:

Ring_0 N$1 N$0 "Optical Ring Modulator" library="Modulators/Optical" length= 628.319u loss=11.262u "effective index"=2.253 "group index"=2.636 "dispersion"=400.000u

Currently, if I include a component that wants to use said model (from the standard Interconnect Library), it would export the netlist as:

"Optical_Ring_Modulator"_0 N$1 N$0 "Optical_Ring_Modulator" library="Modulators/Optical" "length"= 628.319u "loss"=11.262u "effective index"=2.253 "group index"=2.636 "dispersion"=400.000u

This of course generates an error in the netlist importing because no such component exists. There is no workaround that I could find other than changing the spice_netlist_export method. The change would be small, but it might generate compatibility issues with components that currently rely on SiEPIC changing the space character in their name to a '_' character.

What do you guys think??

@lukasc-ubc
Copy link
Member

lukasc-ubc commented Sep 8, 2022 via email

@jevillegasd
Copy link
Contributor

I made the change in #185 , and included get and set methods for SPICE params (the set method finds the text in the component and replaces it, the get is a wrapper of the existing get_parameter method)

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

No branches or pull requests

3 participants