Hi all, I'm trying to install ihp open pdk in a do...
# ihp-sg13g2
a
Hi all, I'm trying to install ihp open pdk in a docker container using the scripts on iic-osic-tools repo. Some questions arise • Is the compilation of the
.va
files into
.osdi
required to use the pdk? • Compilation of openvaf fails, and using the shared executables crash when using on
<http://psp103_nqs.va|psp103_nqs.va>
. How can I debug this? Or is it documented somewhere? Thanks for the effort put into making another free and open source PDK alternative 🙂
I've figured that to generate the OSDI the terminal should to be on the same folder of the other file, to solve the dependencies. Still, compilation with rust fails, the error is something about llvm and polly
Copy code
error: could not find native static library `Polly`, perhaps an -L flag is missing?
...
error: could not compile `llvm` (lib) due to previous error
warning: build failed, waiting for other jobs to finish...
warning: `hir` (lib) generated 1 warning (run `cargo fix --lib -p hir` to apply 1 suggestion)
Another confusion, we have 4 different
.va
files (psp103.va psp103_nqs.va juncap200.va psp103t.va) All of them should be compiled with openvaf? There are more files?
m
@aquiles viza You need root privileges, so use start_shell.sh, and then compile in /foss/pdks/sg13g2/libs.tech/ngspice/openvaf
a
I'm not using iic-osic-tools docker, just the scripts used by Dockerfile when compiling the image. The compilation of
.va
into
.osdi
happens because I was not on the
.../ngspice/openvaf
directory, now I can compile that, Thanks. The main confusion I have is on the openvaf installation script because it applies a patch in the
<http://build.rs|build.rs>
file. Is that patch required?
m
I'm not involved, but a cursory look shows that Harald's patch has not been merged into Pascal's GitHub master branch. The patch is not required on Ubuntu-22.04/arm64/[clang-15,clang-16]
a
I've discovered that the openvaf 23_2 was the problem. Using 23_5 makes the simulation works. The image I'm developing uses Ubuntu 24.04, does it require the patch? The simulation works fine so maybe not. Thanks for the feedback.
m
Nice to hear about your success. Regarding the patch I see no difference between 22.04 and 24.04
k
@Michael Strothjohann @aquiles viza have you met any other issues regarding the Ubuntu 24.04. We would like to update OS support.
a
The main issue I have is the "Polly" and "llvm" error when building openvaf, I depend on the website shared executables. I think that could be related with ubuntu, because it work on iic osic tools (22.04) but not on ubuntu 24.04.
👍 1
m
@Krzysztof Herman @aquiles viza Yes, there are problems with Polly and llvm when compiling OpenVaf on Ubuntu 24.04. To fix this, here is a script (tested on a bare Ubuntu 24.04):
sudo apt install -y g++ cargo
mkdir -p temp && cd temp
wget <https://openva.fra1.cdn.digitaloceanspaces.com/llvm-15.0.7-x86_64-unknown-linux-gnu-FULL.tar.zst>
zstd -d -c --long=31 llvm-15.0.7-x86_64-unknown-linux-gnu-FULL.tar.zst | tar -xf -
LLVM_CONFIG=${PWD}/LLVM/bin/llvm-config
PATH=${PWD}/LLVM/bin:$PATH
git clone <https://github.com/pascalkuthe/OpenVAF.git> && cd OpenVAF
git checkout "a9697ae7780518f021f9f64e819b3a57033bd39f"
cargo build --release --bin openvaf
Besides setting LLVM_CONFIG (as stated in https://github.com/pascalkuthe/OpenVAF/blob/master/README.md) it is required to set PATH (so llvm, clang-cl, and others ... can be found)
a
Hi Michael, Thanks a lot for the script, openvaf is builded with it. Still, I'm a bit confused about why is the download of a pre-compiled llvm required. Why can't I just compile it? Maybe there's a patch. I'm going to test it. I'm still developing so I will bring more questions later, if ihp doesn't compile.
Also, the patch that iic-osic-tools applies was required to compile openvaf.
IHP PDK compilation .va into .osdi worked and simulation gives the expected output. Thanks a lot
k
@Michael Strothjohann thank you for reporting the issue and sharing the script,
m
@aquiles viza It's about different versions of clang/llvm and their libraries. If you are using 22.04 and are NOT using the additional download, the patch is actually required. Basically, the patch skips the first stage in a link chain. The same (and more) is true if you are using 24.04 (example: sudo apt install clang installs a link to clang-18, but openvaf must use clang-15/LLVM/libs). The advantage of the download is that you compile in a temporary clang/LLVM-15 environment and are therefore independent of the clang/LLVM/Libs installed on your system.
👀 1