Hi All, I am a recently retired Analog / Mixed Sig...
# analog-design
l
Hi All, I am a recently retired Analog / Mixed Signal circuit designer. I have been trying to set up my home Linux workstation to run all these open source cad tools and the Sky130 pdk. As expected of an old fart like myself, I am having difficulty with the downloads. Would someone point me to the correct repository and the correct scripts in order to download and install the open source cad tools and the Sky130 pdk. I have a new linux workstation running the Ubuntu 20.04 operating system. Your help is greatly appreciated.
🌍 1
a
Hi Larry, the easiest way is to use a Docker image such as Harald Pretl’s one: https://github.com/hpretl/iic-osic-tools If you want to install each tool individually, old school, I've written a tutorial on my site: anthonywall.ie/opentools
l
Thanks Anthony, I appreciate the help.
a
Best of luck, get in touch if you've any trouble:)
l
Hi Anthony, I've ran into a little difficulty with installing MAGIC. I have been following your step by step instructions. When I ran your instruction 6.8 sudo make install magic installed with 2 error messages.
Here are the two error messages:
make[2]: * [../rules.mak26 EFantenna.o] Error 1 make[2]: Leaving directory '/tools/magic/extflat' make[1]: * [Makefile52 modules] Error 1 make[1]: Leaving directory '/tools/magic' make: * [Makefile26 tcl] Error 2
a
Interesting, can you show a bit more of the log? That's not an error I've seen
l
it was instruction 6.7 not 6.8
I ignored the errors and went to instruction 6.8 sudo make install
a
Did that work?
l
I then tried launching MAGIC with instruction 6.9 /tools/**m and my computer didn't understand the instruction
a
Could you paste a little more info from your log? It doesn't sound like magic has installed
l
Here is the exact response I got back when I typed /tools/**m
larry@larry-Precision-3560:/tools/magic$ /tools/**m bash: /tools/xschem: Is a directory
I then typed in the word magic to try to launch magic that way and here is what my computer's response
larry@larry-Precision-3560:/tools/magic$ magic Command 'magic' not found, but can be installed with: sudo apt install magic
a
Can you navigate to the /tools/magic/install/bin directory? I'm not too sure where you're getting the ‘/tools/**m’ command?
l
here is an ls command of that directory
larry@larry-Precision-3560:/tools/magic/install/bin$ ls ext2sim ext2spice magic
a
Can you run the following command to launch magic:
./magic
I see the problem, a typo got into my installation tutorial - I'll fix that now
l
Yes, when I typed magic in the direcotory /tools/magic/install/bin that launched MAGIC
a
Great! Thanks for helping me find that typo too:) let me know if you've any more issues
l
Thanks for your help. Is there a way to launch MAGIC without being in the /tools/magic/install/bin directory? That is the only directory where the command MAGIC is recognized.
Please note that the command I typed is magic and not MAGIC.
By the way, where are you? I am in Austin TX
a
Yes, you'll see once all the tools are installed, section 15 adds them to the path using the ~/.bashrc file
Also, I need to change the OpenROAD installation, so hold off on that one (section 14). What is there should work but it's not best practice
l
I have successfully installed netgen.
now I am having problems with installing the open_pdks. I am on your step 8,2
larry@larry-Precision-3560:/pdk$ pwd /pdk larry@larry-Precision-3560:/pdk$ git clone git://opencircuitdesign.com/open_pdks fatal: could not create work tree dir 'open_pdks': Permission denied
I solved that problem by typing:
I am stuck.
I typed your command 8.7 "make" and get an error
larry@larry-Precision-3560:/pdk/open_pdks$ make make: * No targets specified and no makefile found. Stop.
here is a listing of the directory /pdk/open_pdks
larry@larry-Precision-3560:/pdk/open_pdks$ ls common docs.txt install Makefile.in runtime sky130 configure gf180mcu LICENSE README.md scripts VERSION
m
looks like you may have skipped 8.6. You need to configure to create
Makefile
.
l
Hi Mitch, thanks for stepping into the conversation. I did set 8.6 and still have the same problem. About 5 hours ago, I logged off my computer. When I logged back on about 15 minutes ago, I re-ran set 8.6, 8.7 and still have same problems.
Do I need to re-log into the Git Hub?
m
Ok. Maybe it's a permissions problem. Need to check that configure completed successfully. As there was no
Makefile
shown in your directory, I doubt that it did. How about trying this
Copy code
cd /pdk
sudo rm -rf open_pdks
sudo chmod a+rw .
git clone <https://github.com/RTimothyEdwards/open_pdks.git>
Followed by
./configure ...
and then
make
l
I'm still having problems. Here are the commands I typed:
Copy code
cd /pdk
sudo rm -rf open_pdks
sudo chmod a+rw .
git clone <https://github.com/RTimothyEdwards/open_pdks.git>
m
What results?
l
It created the open_pdk directory
Here are the commands I tried after the open_pdk directory was created.
larry@larry-Precision-3560:/pdk$ ./configure bash: ./configure: No such file or directory
arry@larry-Precision-3560:/pdk$ ls open_pdks larry@larry-Precision-3560:/pdk$ cd open_pdks
arry@larry-Precision-3560:/pdk/open_pdks$ ./configure checking for a Python interpreter with version >= 3.4... python3 checking for python3... /usr/bin/python3 checking for python3 version... 3.8 checking for python3 platform... linux checking for python3 script directory... ${prefix}/lib/python3.8/site-packages checking for python3 extension module directory... ${exec_prefix}/lib/python3.8/site-packages checking python3 module: distutils... yes checking for a sed that does not truncate output... /usr/bin/sed configure: Found technology directories: gf180mcu sky130 Checking technology gf180mcu... Checking technology sky130... configure: Found tools: klayout magic netgen irsim openlane qflow xschem checking for magic... no configure: error: You need 'magic' to generate the needed various cell views.
larry@larry-Precision-3560:/pdk/open_pdks$ make make: * No targets specified and no makefile found. Stop.
m
configure didn't work.
need magic in your path.
Copy code
8.5 OpenPDK requires the already-installed tools for its build process. We will temporarily add them to $PATH for the build process to find them. We will add them in a more permanent manner later. Run:
PATH=/tools/magic/install/bin:/tools/netgen/install/bin:/tools/xschem/install/bin:$PATH
Also make sure to use the correct options to
configure
.
l
The path is probably the issue. I have not set that yet. Also, what options do I use on the configure command?
m
Copy code
8.6 Configure OpenPDKs
  8.6.1 This step depends on the CPU architecture you have:
  8.6.2 If you have an x86_64 (AMD/Intel) CPU, the build is configured as follows: ./configure --enable-sky130-pdk --prefix=/pdk/open_pdks/install
  8.6.3 If you have an aarch64 (ARM) CPU, the build is configured as follows: ./configure --enable-sky130-pdk --prefix=/pdk/open_pdks/install CFLAGS="" LDFLAGS=""
use
uname -a
to find your architecture.
l
Thanks Mitch, the "make" command is now running. It looks like it will be several minutes before the make command is done. I think you solved my issue.
I think the command I originally missed early today was the sudo chmod a+rw . command inside the pdk directory
👍 1
I'm back with more questions
The make command finished and I have one error message about the SKY130A directory not being found.
mkdir -p "/pdk/open_pdks/sources/sky130-pdk/env/downloads/conda-pkgs" mkdir -p "/pdk/open_pdks/sources/sky130-pdk/env/conda/envs" touch "/pdk/open_pdks/sources/sky130-pdk/env/downloads/conda-pkgs/urls.txt" source /pdk/open_pdks/sources/sky130-pdk/env/conda/bin/activate && conda env update --name skywater-pdk-scripts --file environment.yml ConfigurationLoadError: Unable to load configuration file. path: /pdk/open_pdks/sources/sky130-pdk/env/conda/.condarc reason: invalid yaml at line 3, column 0 make[2]: * [/pdk/open_pdks/sources/sky130-pdk/third_party/make-env/conda.mk145 /pdk/open_pdks/sources/sky130-pdk/env/conda/envs/skywater-pdk-scripts/bin/python] Error 1 make[2]: Leaving directory '/pdk/open_pdks/sources/sky130-pdk' make[1]: * [Makefile606 pdk-repo] Error 2 make[1]: Leaving directory '/pdk/open_pdks/sky130' make: * [Makefile130 tech-sky130] Error 2
I have a new Ubuntu 20.04 workstation, this open_pdk software is the 1st software that I've tried loading. I think I am missing "YML". How do I load up "YML" ?
I am missing "python-yaml". I am going to start over with this installation. I will install "python-yaml" and start over.
👍 1
Hi Mitch and Anthony, I am still having problems with the "make" command. The /pdk/open_pdks/sky130/sky130A file directory is not getting built. The following is what is being echoed back to my terminal.
Preparing transaction: done Executing transaction: done installation finished. touch "/pdk/open_pdks/sources/sky130-pdk/env/conda/bin/python" source /pdk/open_pdks/sources/sky130-pdk/env/conda/bin/activate && conda config --system --add pkgs_dirs /pdk/open_pdks/sources/sky130-pdk/env/downloads/conda-pkgs source /pdk/open_pdks/sources/sky130-pdk/env/conda/bin/activate && conda config --system --add envs_dirs /pdk/open_pdks/sources/sky130-pdk/env/conda/envs echo "include-system-site-packages=false" >> /pdk/open_pdks/sources/sky130-pdk/env/conda/pyvenv.cfg mkdir -p "/pdk/open_pdks/sources/sky130-pdk/env/conda/envs" mkdir -p "/pdk/open_pdks/sources/sky130-pdk/env/downloads/conda-pkgs" touch "/pdk/open_pdks/sources/sky130-pdk/env/downloads/conda-pkgs/urls.txt" source /pdk/open_pdks/sources/sky130-pdk/env/conda/bin/activate && conda env update --name skywater-pdk-scripts --file environment.yml ConfigurationLoadError: Unable to load configuration file. path: /pdk/open_pdks/sources/sky130-pdk/env/conda/.condarc reason: invalid yaml at line 3, column 0 make[2]: * [/pdk/open_pdks/sources/sky130-pdk/third_party/make-env/conda.mk145 /pdk/open_pdks/sources/sky130-pdk/env/conda/envs/skywater-pdk-scripts/bin/python] Error 1 make[2]: Leaving directory '/pdk/open_pdks/sources/sky130-pdk' make[1]: * [Makefile606 pdk-repo] Error 2 make[1]: Leaving directory '/pdk/open_pdks/sky130' make: * [Makefile130 tech-sky130] Error 2
when I type in ls /pdk/open_pdks/install/share/pdk/sky130A I see the libs.ref and libs.tech directories. However, both these directories are empty.
m
Maybe related to this https://open-source-silicon.slack.com/archives/C016UL7AQ73/p1661557650822719 Can you figure out how to single thread? Maybe
export THREADS=1
before running?
l
Hi Mitch and Anthonywall, I have been unable to download and install the PDK for SKY130. I've tried multiple things that you have suggested. The download hangs up. Here is a screen shot of the error message.
Screenshot from 2022-08-28 21-29-03.png
I have a DELL Precision 3560 workstation with an Intel I7 processor that has 4 cores. The operating system is Unbuntu 20.04 LTS
From the error message, it appears to be getting stuck on the LEF directory creation.
m
Copy code
The installer is not able to run magic.
Install magic. Make sure
magic
is in your path.
l
I have already installed magic, xschem, and netgen. Now I am trying to install the PDK. Do I have the correct location for the PDK. Here is what I have been using. git://opencircuitdesign.com/open_pdks
I have been following the instructions from anthonywall web page. https://anthonwall.ie/opentools/
I have followed all of his instructions down to step 8, which is where the PDK is loaded.
m
There was a step to temporarily set the path (8.5), that has to be executed in the terminal before you install open_pdks. Try
which magic
to make sure that magic is in the path.
l
Yes. magic is working. I am able to launch it from the installed binary. The the path to the binary is /tools/magic/install/bin.
excuse me, when I type which magic, the path that is reported is /usr/bin/magic.
Maybe that is my problem, I may have the wrong PATH set in the PATH command.
👍 1
Thanks Mitch, let me try the install again, and using the PATH that "which magic" reports. Hopefully that is the problem
Thank you Mitch, the "make" command with the correct PATH set appears to have fixed the problem. All the sky130A directories and files appear to have been created. I won't know if this worked until I try to use the PDK with ngspice and xschem. For now I'm am very happy. Thank you for your guidance and help.
👍 1
By the way there were two errors reported back about the digital libraries. I am not so concerned about the digital libraries. Myself, being an Analog / Mixed Signal Engineer, I can always create my own digital library. The following is a screen shot of the reported errors.
file:///home/larry/Pictures/Screenshot%20from%202022-08-30%2005-23-11.png
The "make Install" command ran just fine with no reported errors.
m
I'll need more of your logs to identify a problem with the digital library creation/installation.l
l
The sky130B_make.log file size is 5318655 bits in size. I opened up the file with VI and found that there are 11 errors reported. Let me know how you want me to send the file to you.
I made a copy of the "sky130B_make.log" file and called it "copy_sky130B_make.log". I then ran gzip on the "copy_sky130B_make.log" file.
m
Can you post
/pdk/open_pdks/sky130/sky130B/libs.tech/magic/sky130B.tech
?
l
I made a copy of the "sky130B.tech" file and called it "copy_sky130B.tech". I then ran gzip on the "copy_sky130B.tech" file.
m
Don't know if this is the cause or not but looks like you have an older version of magic installed. (From the make log)
Copy code
Magic 8.2 revision 157 - Compiled on Thu, 07 Nov 2019 21:14:45 +0100.
While the rule file requires a more recent version. (From the tech file)
Copy code
version
 version 1.0.327-0-g56b129b
 description "SkyWater SKY130: Open Source rules and DRC"
 requires magic-8.3.306
end
Can you install a more recent version of magic? run
magic -dnull -noc < /dev/null
to show the version.
l
Here is the result when I run "magic -dnull -noc < /dev/null" Magic 8.2 revision 157 - Compiled on Thu, 07 Nov 2019 211445 +0100.
How do I install a more recent version of Magic?
I have been following the directions posted by anthonywall
Here is the web page of the directions https://anthonywall.ie/opentools
By the way, I just tried installing "ngspice" using anthonywall.ie instructions and it appears that I do not have ngspice installed correctly. I suspect anthonywall's instructions are missing instructions steps.
a
Hi Larry, sorry I have not been too active recently, working on a tapeout for my main project. I wrote the instructions a few months ago now, which is a long time in this world - so please feel free to send me a list of things that didn’t work when you’ve got the tools up and running. I installed ngspice as per the instructions recently and had no issues, what were your errors?
l
Thanks for the response Anthonywall, I have a Ubuntu 20.04 operating system. It appears that it comes loaded with ngspice. All I had to do is type the "sudo apt update" command and then "sudo apt install ngspice". Unfortunately, after I did all the PATH edits to my .bashrc file --- item 15 on your Open Toolchain Installation file ---- magic now crashes about 10 seconds after it launches. The attached word document shows what commands I did in order to install "xschem", "magic", "netgen", the PDK, and "ngspice". I'm not sure why my magic crashes. I don't know if is related to my "ngspice" installation or if I messed up the .bashrc file.
a
Ahh yes, that is a problem. The version of ngspice installed by apt is an old version and can cause problems. I’ll take a look at your document later this afternoon and see if I can help
In general, it’s a bad idea to rely on apt to install these tools - they’re all beta software, and the apt repos are not up to date - compiling from source also ensures that they are set up the way you want them (e.g. with ngspice shared libraries etc)
l
Thanks Anthonywall, my document shows what I did.
a
Looking at your doc now… it seems like you’re overriding the manual install from the guide with apt installs. That’s why your paths are incorrect, because apt installs to /usr/bin/x Can you give some logs for your ngspice installation ? Have you ensured that all the dependencies are installed on your system? I’ve installed all of these tools using the guide verbatim on clean install ubuntu 20.04, 21.10 and 22.04 machines without issue
l
I will see if I can find the logs
a
That would be helpful. Using the apt version of the tools will give all kinds of errors. It might also be worthwhile using the docker install if the issues continue
l
I can't find the log file for the ngspice install
a
if you try follow the ngspice install steps verbatim, and share the log as soon as you get any errors, that would be helpful.
l
Ok, I will follow your ngspice install steps verbatim, Do I first need to "Uninstall" ngspice ?
a
yes, you should be able to run ‘sudo apt purge ngspice’ to remove it. You should run the same with the other tools you’ve used apt to install also.
On second thought, you might be better to start from the beginning, since the dependancies are installed as you go. Can you start from the start, as soon as you see an error, post the log here and we can work through it
so starting from step 4
l
I have been installing all this on my new Linux workstation. This Open Source Cad tools is the first software that I have loaded up on this workstation. Should I restore my machine to it's factory settings and start all the installation over from step 1?
a
That would be the optimal solution, but I don’t want you to lose other work. Try deleting everything in /tools and /pdk, and purging all the tools you’ve installed with apt. that should be an ok starting point. Then we’ll go one tool at a time through the install. If any of the lines in the guide don’t work as expected, or you get any errors, then attach the logs and we’ll figure out the root cause
l
The only thing I have on this machine is the document I just sent you. If I restore my machine to it's factory settings, do I need to set up a new "github" account and set up new "ssh" keys?
a
Ok, if you’re happy to do that, it will guarantee a clean install. You won’t have to create a new GitHub account, but you will have to set up new SSH keys, since the machine will appear as a different machine if you restore it.
Then just go from step 1, and let me know as soon as you come across any friction
l
Ok, I will see if I remember my GitHub account name. If not I will just create a new GitHub account
a
you should be able to log into your github with your email also, if that helps.
l
Ok, I starting from scratch. Thanks for the help. I will be online with my Windows Machine while my Linux machine is being restored to it's factory settings.
a
great, I hope this goes smoothly
l
Python3 comes installed on my Linux machine, are there any other software packages that I need to enable before I start the CAD Tool installation?
a
I think you should be ok, the guide asks you to install dependencies at various points (e.g. 4.4), so as long as they're installed ok you should be fine
l
My Dell Workstation is backup after the Operating System Re-Install. I also ran "sudo apt update" as well as "sudo apt upgrades". The attached screen-shot is the technical specs of my Linux workstation. I am starting the CAD Tool install following all your instructions from step 1. My workstation is a Dell Precision 3560
Anthonywall, I was able to get "xschema", "magic", and "netgen" installed. I executed all your listed commands down to command 8.7 "make". The "make" command ran for about 1 hour and it reported a couple of errors. The attached screen shot is the what was displayed on my terminal.
Anthonywall Let me know if you want me to ignore the error message and go to step 8.9 "make install" ? I will be waiting on your response.
a
Hi Larry, can you check if the python yaml package is installed on your machine?
l
Hi Anthonywall, it doesn't appear that I have ymal installed. I typed in the command "whereis python-yaml" and my machine just echos back "python-yaml". It does no show any path to yaml. I have a brand new Linux workstation, and I don't believe all the software that I need is installed. I am going to remove the "open_pdk" directory. Then type in "sudo apt-get -y install python-yaml". Is there any other software packages I need to install before I try to install the open_pdk software?
I also just installed "conda" and "json" using the sudo apt-get command
I just realized json is for servers, which I don't have. So json is not installed. And"conda" is not installed. I assume "conda" is part of Anaconda. Do I need to install Anaconda?
After I installed python-yaml, I re-ran the make command (step 8.7) of your instructions. After about 3 hours, I get the same error message. The attached 2 screen shots are: the error message reflected on the terminal I ran the "make command" on. The other screen shot is the "ls" command of the /pdk/open_pdks/sources/sky13--pdk/env/conda/bin
I re-checked and it looks like python-yaml did not get installed. What is the correct command to install yaml?
I am installing ANACONDA
m
How about
python3 -m pip install pyyaml
?
l
Hi Mitch, thanks for the help. Here is a screen shot of the above command on my machine.
I am beginning to suspect that my new machine doesn't have all the needed software packages installed.
I am in the process of installing Anaconda. Hopefully that will added the stuff that I am missing.
m
How about this https://www.educative.io/answers/installing-pip3-in-ubuntu Followed by
Copy code
pip3 install pyyaml
l
Thanks Mitch, I am going to bed now and will try all this stuff again in the morning. It's 11 pm here in Austin. I suspect I am missing several software packages. I going to do a System Recovery tomorrow morning and start over from scratch. I will then install pip3, and pyyaml. I will also install Anaconda, which is one of my favorite software packages, I will then start all over with the installation of these Open Tools and Open PDK. --- again I appreciate the help. --- On another note, I guess I got pretty spoiled though out my career by having entire I.T. departments setting up the workstation that I used. All I had to do was design circuits, which in my case, was the easy part. I never really bothered with learning how to do the I.T. departments job.
👍 1
Hi Mitch, I got up in the middle of the night and followed your instruction on how to install YAML. I then did
Copy code
git clone <https://github.com/RTimothyEdwards/open_pdks.git>
and followed all the instructions on Anthonywall "how to" instruction sheet". The make command finished up with no errors. Thank you for your help. I did not do a System Recovery and start over from scratch. I am now going to do the "make install" command.
👍 1
a
I’m happy to hear you’re making progress Larry - sounds like you’ve got the main tools and pdk installed now. the digital tools at the end of the tutorial are still a WIP, so I’d recommend leaving them for a little while
*still a WIP in terms of me not having written a tutorial, the tools work
l
I Still need to install "ngspice". Anthonwall, should I follow your install instructions (9. Installing ngspice), or do you have an updated instruction set?
a
I think you should be ok to use the install instructions - I’m online for another 5 or 6 hours today, so let me know if you come up against any errors
l
Thanks, I let you know what happens
Hi Anthonywall, I get an error message when I installed ngspice. I followed all your steps and step 9.9 gave an error message about not being able to create /usr/local/lib/ngspice directory. The attache screen shot is the error message.
Here is my current protection settings on /usr/local/lib
Do I need to run "chmod 777" on directory /usr/local/lib, And then re-run "./compile_linux.sh" ?
a
Hi Larry, no need to run the chmod command, you wouldn't want that directory to become rwx for all users. It looks like your —prefix configuration for ngspice is not correct. Could you send me your /tools/ngspice/compile_linux.sh file?
I want to make sure that you have followed 9.6.1.6 and 9.6.1.7 correctly
l
Right now, I am the only user and only employee. On all your commands, I have copied and paste all the commands, I didn't want to make any typos. The following file is the /tools/ngspice/compile_linux.sh file.
compile_linux.sh
The attached file is a listing of the /usr/local/lib directory.
a
Ahh I see your problem. If you check steps 9.6.1.6 and 9.6.1.7, you are missing part of lines 55 and 62, could you edit configure_linux.sh according to the sub-steps of 9.6?
basically you’re missing the prefix part of both lines
l
Thanks Anthonywall. That fixed the problem.
I am skipping step 10 and moving on to step 11, "installing & Configuring the Python Virtual Environmet". After I do step 11, I will skip forward to step 13, "Installing the GAW waveform viewer". Then I will skip forward to step 15 "Adding the tools to the Path".
Hi Anthonywall, I did steps 11, 13, and 15. No error messages. I opened up a new terminal and check to see if everything would launch. -----------
a
How did that go?
l
magic, netgen, ngspice, and xschem launched just fine. HOWEVER, when I typed in xschem-gaw, the terminal echoed back "command not found".
Here is a screen snap-shot of the PATH in my .bashrc file. Note that I did not install klayout or xyce
a
the command should be just ‘gaw’, that’s an error on my part - correcting it now
try launch with gaw
l
YES, gaw worked. THANK YOU SO MUCH.
a
Yes! Delighted it’s working for you:)
You should try get Klayout installed at some point it’s a nice tool for layout - but enjoy your progress for the moment and try get some schematics drawn up. Try clone Thomas Parry’s example github and look around at it