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

Add system library of Verilog-A defined devices #343

Open
ra3xdh opened this issue Oct 28, 2023 · 15 comments
Open

Add system library of Verilog-A defined devices #343

ra3xdh opened this issue Oct 28, 2023 · 15 comments

Comments

@ra3xdh
Copy link
Owner

ra3xdh commented Oct 28, 2023

The microstrip devices models #94 will be most likely implemented in form of Verilog-A modules. These modules should be compiled with OpenVAF and attached to Ngspice. It's need to provide a way to attach Verilog-A model to system devices. I propose the following approach:

  • Put a set of VA models in share/qucs-s/va_library directory in the installation root.

The two ways to integrate these models are possible:

  • Add a button named like Compile system libraries in the application setting dialog near the OpenVAF configuration input field. Compiled OSDI modules will be placed to the $HOME/.qucs/osdi_modules location and attached automatically while forming .spiceinit config. Modules should be build once.

  • Scan schematic recursively and compile OSDI modules automatically before the simulation if some device referencing Verilog-A model is found.

The combination of these two approaches is also possible. This feature should be added in order to implement #94 in the next release.

@zergud
Copy link
Collaborator

zergud commented Oct 30, 2023

there is a more flexible solution for library location:

  • SYSTEM - located in share/qucs-s/va_library (readonly)
  • USER - located in user home dir $HOME/.qucs/va_library
  • PROJECT - located in project folder

USER and PROJECT directory are writeble for user

all compiled OSDI modules will be placed to the $HOME/.qucs/osdi_modules location and attached automatically while forming .spiceinit config

compilation approach, control duplicated name and recompilation condition (e.g. via file timestamp) are subject to discuss

@ra3xdh
Copy link
Owner Author

ra3xdh commented Feb 17, 2024

The development of the OpenVAF compiler seems to be suspended. See pascalkuthe/OpenVAF#111 (comment) for more details. By this reason I am removing this issue from the development plan for the next release. Let's wait for more news about OpenVAF future, because the support of Verilog-A in Qucs-S+Ngspice is strongly depends on OpenVAF.

@ra3xdh ra3xdh added the wontfix label Sep 10, 2024
@ra3xdh
Copy link
Owner Author

ra3xdh commented Sep 10, 2024

The development of OpenVAF compiler still be suspended. No more visible contributions since October 2023. I would close this task, because the future of OpenVAF still be not clear. May be reopened if some maintainer will appear in OpenVAF project.

@ra3xdh ra3xdh closed this as not planned Won't fix, can't repro, duplicate, stale Sep 10, 2024
@zergud
Copy link
Collaborator

zergud commented Sep 10, 2024

https://openvaf.semimod.de/blog/vacask/
"some maintainer" appear :)

@ra3xdh
Copy link
Owner Author

ra3xdh commented Sep 10, 2024

Maybe it makes sense to switch to openvaf-reloaded fork and use it by default.

@tomhajjar
Copy link

Windows builds not provided...

@zergud
Copy link
Collaborator

zergud commented Sep 10, 2024

@tomhajjar
Copy link

One of the problems with OpenVAF is it requires external resources. #373 , #100

After it was decided OpenVAF was dead I deleted these resources so I'm back to square one...

@Kreijstal
Copy link

Kreijstal commented Nov 26, 2024

Windows builds not provided...

OpenVaf compiles with msys2 (After an immense effort)
https://github.com/Kreijstal/OpenVAF/actions/runs/12016195403/job/33495922743
But it doesn't compile with clang yet

@tomhajjar
Copy link

tomhajjar commented Nov 26, 2024

I reloaded all the MS tools so I can compile va files using OpenVAF once more.

As stated in link below, some osdi files cannot be created inside Qucs-S so the Dietmar/Holger created batch file is used. I bodged the bat file to work on my PC. Will this new branch of OpenVAF have all the same functions as the original?

Below is a snippet of my bat file for VBIC:

openvaf.exe -D__NGSPICE__ -o vbic_4T_et_cf.osdi C:\OpenVAF\code\vbic\vacode\vbic_4T_et_cf.va
openvaf.exe -D__NGSPICE__ -o vbic_1p3.osdi C:\OpenVAF\code\vbic\vacode\vbic_1p3.va
openvaf.exe -D__NGSPICE__ -DfiveTerminal -o vbic_1p3_5t.osdi C:\OpenVAF/code/vbic/vacode/vbic_1p3.va

#1100

@Kreijstal
Copy link

I reloaded all the MS tools so I can compile va files using OpenVAF once more.

As stated in link below, some osdi files cannot be created inside Qucs-S so the Dietmar/Holger created batch file is used. I bodged the bat file to work on my PC. Will this new branch of OpenVAF have all the same functions as the original?

Below is a snippet of my bat file for VBIC:

openvaf.exe -D__NGSPICE__ -o vbic_4T_et_cf.osdi C:\OpenVAF\code\vbic\vacode\vbic_4T_et_cf.va openvaf.exe -D__NGSPICE__ -o vbic_1p3.osdi C:\OpenVAF\code\vbic\vacode\vbic_1p3.va openvaf.exe -D__NGSPICE__ -DfiveTerminal -o vbic_1p3_5t.osdi C:\OpenVAF/code/vbic/vacode/vbic_1p3.va

#1100

This is based on openvaf-reloaded by https://github.com/arpadbuermen/OpenVAF/ which is mantaining it.
I did manage to make it buildable using msys2 toolchain, so no MS tools required. (I don't have them anyway)

@tomhajjar
Copy link

tomhajjar commented Nov 26, 2024

You might want to try Dietmar's batch file and see if all the va files in the code folder compile. You only need the code folder.

Copy code folder to C:\code

Run openvaf-compile-va.bat which creates C:\osdilibs

Copy OpenVAF.exe to C:\osdilibs

Run bat file again and all the osdi files should be created in C:\osdilibs

https://github.com/dwarning/VA-Models

@Kreijstal
Copy link

(venv) kreijstal@kreijstalnuc:~/git/VA-Models/code$ ./openvaf-compile-va.sh
Finished building angelov.va in 0.18s
Finished building angelov_gan.va in 0.20s
Finished building asmhemt.va in 4.15s
Finished building bsim4.va in 2.73s
Finished building BSIM6.1.1.va in 1.53s
Finished building bsimbulk106.va in 1.77s
Finished building bsimbulk.va in 2.30s
Finished building bsimcmg.va in 1.57s
Finished building bsimcmg.va in 3.76s
Finished building bsimimg.va in 1.34s
Finished building bsimsoi.va in 1.42s
Finished building diode_cmc.va in 0.66s
Finished building ekv26.va in 0.18s
Finished building ekv3.va in 0.54s
Finished building epfl_hemt.va in 0.11s
Finished building fbh_hbt-2_1.va in 0.16s
Finished building fbh_hbt-2_3.va in 0.23s
Finished building hicumL0_v2p1p0.va in 0.31s
Finished building hicumL2.va in 0.61s
Finished building hicumL2V3p0p0.va in 0.57s
Finished building hisim2.va in 3.27s
Finished building hisimhv.va in 6.45s
Finished building hisimsoi.va in 2.17s
Finished building hisimsotb.va in 1.34s
Finished building igbt3.va in 0.09s
Finished building L_UTSOI_102.va in 1.99s
Finished building bjt504.va in 0.28s
Finished building bjt504t.va in 0.39s
Finished building bjt505.va in 0.34s
Finished building bjt505t.va in 0.47s
Finished building mosvar.va in 0.27s
Finished building mvsg_cmc_3.2.0.va in 1.47s
Finished building psp102.va in 1.46s
Finished building juncap200.va in 0.35s
Finished building psp103.va in 2.62s
Finished building psp103_nqs.va in 5.85s
Finished building psp104.va in 2.76s
Finished building psphv.va in 4.65s
Finished building r2_cmc.va in 0.07s
Finished building r2_et_cmc.va in 0.08s
Finished building r3_cmc.va in 0.24s
Finished building vbic_4T_et_cf.va in 0.23s
Finished building vbic_1p3.va in 0.33s
Finished building vbic_1p3.va in 0.35s
done

I had to change openvaf to openvaf-r in the script.

@tomhajjar
Copy link

Where is the "new" openvaf-r for Windows?

As stated earlier, I need to test on a different Windows PC that doesn't have MS tools loaded.

@ra3xdh ra3xdh reopened this Dec 2, 2024
@ra3xdh
Copy link
Owner Author

ra3xdh commented Dec 2, 2024

Reopened. Everything seems to work with openvaf-r The library of the Verilog-A defined devices may be implemented in the future. The #980 will be a part of this feature.

@ra3xdh ra3xdh removed the wontfix label Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants