I am using docker for the tool: Xschem, but I am n...
# xschem
k
I am using docker for the tool: Xschem, but I am not getting the waveform. Could you please help. (Also how to save the circuit (.sch file), since saved file (.sch) getting deleted automatically once I come out of the docker.) @Harald Pretl
h
Inside the Docker you should work in the directory
/foss/designs
which is mapped in your host system wherever you specify (default is
…/eda/designs
). Generally, the filesystem of most locations in Docker is read-only, this is to protect it. But the
/foss/designs
is read/writeable.
k
Thank you for your reply, I saved my .sch file in /foss/designs when i come out of the docker and after some time run the docker again, i searched for the file in /foss/designs, it was not there so cant I save the .sch file in host OS so that I can use same circuit again?
@Harald Pretl 2nd thing I am able to simulate but unable to generate waveform, could you please help in this?
h
@Georg Zachl can you please help on the design folder issue. For plotting in xschem @Stefan Schippers is the right person to ask.
p
@Kamta Kesharwani Have you installed gaw ?
k
If I am using docker, do I need to install Gaw?
p
Don't know about that.
k
p
I can see gaw in the installed tools list
Maybe you can try selecting batch mode simulation and then hit waves button
k
Yes, I did that way also but was unable to get waveform.
Okay, I will try once more will let you know again if not working.
s
you can try to run gaw offline manually from the terminal, like: gaw /your/spice/file.raw
Just to ensure gaw is running and the .raw file is existing in the directory where ngspice ran the simulation.
g
Hey @Kamta Kesharwani, how have you started the container? Using the start script?
k
@Georg Zachl In ubuntu terminal I run the code "sudo docker run hpretl/iic-osic-tool". then i connected via VNC viewer, after that there in the terminal i just wrote xschem and hit enter.
@Stefan Schippers I am getting waveform for examples which are already there, so I think gaw is working but don't know why i am not getting waveform for the circuit I designed. Could there be any other reason?
s
@Kamta Kesharwani first of all check that the <circuit_name>.raw file is existing in the directory where netlist and simulation is run.
g
Oh, then I know what the issue is! Look at the readme in the github repository: https://github.com/hpretl/iic-osic-tools/blob/main/README.md You are missing the mounting of the /foss/designs directory into the docker container. That is probably, why it does not work as expected. We have start-scripts in the repo, that do the work for you!
If you want to start the container manually, you can also take a look at the commands, the startscripts would execute, if you set the environment variable "DRY_RUN" beforehand like:
DRY_RUN=1 ./start_x.sh
k
Thank you so much @Georg Zachl @Stefan Schippers I will be looking into that. Also parallelly I have installed xschem, ngspice, and installing open_pdks from http://opencircuitdesign.com/open_pdks/index.html I hope all will go fine.
g
xschem, ngspice and open_pdks are all installed in the docker container. No further install required!
k
@Harald Pretl Thank you so much. now I can save my all files by mounting of the /foss/designs directory into the docker container, when I use docker for xschem . I have one more question , can I go with docker for my entire circuit design?
@Georg Zachl Thank you so much. now I can save my all files by mounting of the /foss/designs directory into the docker container, when I use docker for xschem . I have one more question , can I go with docker for my entire circuit design?
h
@Kamta Kesharwani “I have one more question , can I go with docker for my entire circuit design?” Not sure what you require for that, but ngspice, magic, netgen, etc. are all installed, see here for a full list: https://github.com/hpretl/iic-osic-tools/blob/main/README.md
2
k
@Stefan Schippers Sorry to disturb you again, Could you please let me know why i am getting this error and how I can correct? This is the error I got when i simulate the circuit. Failed: sh -c {cd /headless/.xschem/simulations; ngspice -b -r "/headless/.xschem/simulations/my_inv.raw" -o "/headless/.xschem/simulations/my_inv.out" "/headless/.xschem/simulations/my_inv.spice"} stderr: child process exited abnormally data: ****** ** ngspice-37 : Circuit level simulation program ** The U. C. Berkeley CAD Group ** Copyright 1985-1994, Regents of the University of California. ** Copyright 2001-2022, The ngspice team. ** Please get your ngspice manual from http://ngspice.sourceforge.net/docs.html ** Please file your bug-reports at http://ngspice.sourceforge.net/bugrep.html ** Creation Date: Thu May 26 094750 UTC 2022 ****** child process exited abnormally data: ****** Batch mode Simulation output goes to rawfile: /headless/.xschem/simulations/my_inv.raw Comments and warnings go to log-file: /headless/.xschem/simulations/my_inv.out
s
@Kamta Kesharwani as explained in the messages above check the log file
/headless/.xschem/simulations/my_inv.out
for the reason ngspice exited with an error.
k
@Stefan Schippers @Georg Zachl Sir I am using docker for tools like xschem.... where is the model files (like TT_MODEL, FF_MODEL ...etc) that we can use for designing the inverter ?
s
@Kamta Kesharwani if you are using a docker container you need to ask to the docker creator. He knows where all files are located. You probably need to set up a PDK_ROOT variable before starting xschem. But this is my speculation, you need to ask to the docker maintainer.
k
Okay, Thank you
g
PDK_ROOT is set in our container per default, so you can just read it (by executing "printenv PDK_ROOT"). But in general, the PDK (or PDKs in the future probably) are located in "/foss/pdk" in our container.
k
@Georg Zachl Sir i did not find such file, could you please help me .... here is the screen shot.
g
look into the examples. All files are there. On the screenshot you sent: left is the /foss/pdk/sky130A .... where all the PDK files are. Right you see the contents of the selected directory. On the bottom is the up button to navitage to the super directory.
also, if you start xschem, you should be greeted with the example project. Then look into the examples on how to locate the files and add them to your project. This is probably the easiest way 🙂
k
@Georg Zachl Thank you so much , I got all the library files. Thank you again for your time.
@Stefan Schippers Sir, If I am using nmos4, pmos4 for my inverter, which library file or Model file should I use so that my circuit work in 130nm technology?
g
There is an inverter example on the left in the example project. This is an ring-oszillator but you can traverse into one of the inverters and then you see the actually used transistors. AFAIK the pmos4 and nmos4 are just general spice models, not specific to the PDK. Those are then called like nfet_01v8_lvt (the 1.8V low Vt nfet, which is used for the inverter example).
s
@Kamta Kesharwani you need to use FET symbols in library
sky130_fd_pr
, as George said. nmos4 and pmos4 are generic mos devices, if you want to use those you need to provide yourself models for these. These generic symbols are mostly used for discrete devices (like Power MOSFEFS etc).
k
Okay, Thank you
@Stefan Schippers Sir I made inverter using pfet_01v8 and nfet_01v8 and TT_Model (copied from example) but I am getting error, trying but unable to correct....could you please look into it once? .out message is here...
🌍 1
s
@Kamta Kesharwani set transistor length to 0.15 instead of 0.13. Although it is a 130nm process the drawn minimum dimension for length is 0.15
k
@Stefan Schippers So sir it means if i have to scale down technology from 180nm to 130 nm , should I scale it to 150nm?
s
@Kamta Kesharwani yes from my understanding 150nm is the minimum length for generic analog/logic circuitry. Lower lenghts are allowed in special structures, like SRAM cells.
k
Okay, thank you sir
@Georg Zachl Sir, where I can check technology parameter of FET like threshold voltage of pmos/nmos, mobility of electron etc in the xschem (using docker) ? In the location /foss/pdk/sky130A/libs.tech/xschem/sky130_fd_pr/ there is only symbols.
g
https://skywater-pdk.readthedocs.io/en/main/ It is hard to find but everything is in this documentation.
k
Thank you sir, the link is very helpful for me to navigate.
155 Views