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

Digital Libraries for ngspice #1034

Closed
tomhajjar opened this issue Oct 30, 2024 · 13 comments · Fixed by #1184
Closed

Digital Libraries for ngspice #1034

tomhajjar opened this issue Oct 30, 2024 · 13 comments · Fixed by #1184
Labels
Milestone

Comments

@tomhajjar
Copy link

tomhajjar commented Oct 30, 2024

Files updated 1/07/25

Issue #900 was getting too long...

@ra3xdh since you are assigning this task to a student I though this info might help.

ngspice supports multiple Digital Libraries but the ones one from "MicroCap" offer the most devices. These are XSPICE based models that support gate delays and I/O voltage levels.

MicroCap_dig000.lib has 74, AC, LS, HC...etc. Unfortunately there are many missing devices.
MicroCap_74lv.lib has a wide selection of 74LV devices.
MicroCap_cmos.lib has CD4000 devices.
MicroCap_ecl.lib has ECL devices.

There may be other MicroCap Digital Libraries. They would need to be tested to work in ngspice.

I have created projects containing 74HC, 74LV and CD4000 devices.

Digital_HC_prj to create and test sub-circuits for Digital_HC.lib

Digital_LV_prj to create and test sub-circuits for Digital_LV.lib

Digital_CD_prj to create and test sub-circuits for Digital_CD.lib

symbols_logic.sch contains some useful symbols.

One can convert devices from one family to another. You would need to alter all the delays, capacitances and voltages.

IMPORTANT: These are XSPICE based models. There are dozens of "support" devices like Clocks, ADC/DAC-Bridges..etc that haven't been made into a Library because they use Parameter Passing. They are in the dozen XSPICE Digital/Analog projects that are attached and in the discussion section. They speed understanding how to make subcircuits with Parameter Passing, make schematics and do XSPICE simulations. At some future date an XSPICE Support Library will be made.

Digital_device_projects.zip

Digital Libraries.zip

@tomhajjar
Copy link
Author

I found additional MicroCap Digital Libraries. The following are included above.

dig000.lib
74lv.lib
cmos.lib
ecl.lib

MicroCap_digital_libs.zip

@tomhajjar
Copy link
Author

tomhajjar commented Nov 4, 2024

Found a NXP 74HC component-level library. Might be useful for mixed-signal analysis, I used the 74HCU04.
https://assets.nexperia.com/documents/spice-model/hc.zip
https://forum.allaboutcircuits.com/threads/74hcu04.185257/

To make individual Spice models requires a lot of copy-paste. A device might have 6 sub-circuits throughout the files.

NXP 74HC_component-level.zip

@ra3xdh
Copy link
Owner

ra3xdh commented Nov 4, 2024

Found a NXP 74HC component-level library.

Thanks! This would be the best library for analog mode simulations.

@tomhajjar
Copy link
Author

LTspice uses sub-circuits called dviewX making calls to dview.lib to create Timing Diagrams. This is another option.

2024-11-04_111735

LTspice Digital-View.zip

@tomhajjar
Copy link
Author

tomhajjar commented Nov 26, 2024

@ra3xdh

Any digital libraries from your students you want me to review? Always best to catch issues early. ;-)

@ra3xdh
Copy link
Owner

ra3xdh commented Nov 26, 2024

There is no progress on this subject yet.

@tomhajjar
Copy link
Author

tomhajjar commented Jan 5, 2025

Updated Digital_CD on 1/05/25 to add CD4066 and CD4069UB.

Latest version of the Digital Libraries on 1/04/25. I added a dozen new devices.

Digital_CD4000 -> Digital_CD

Digital Libraries.zip

@ra3xdh ra3xdh linked a pull request Jan 5, 2025 that will close this issue
@ra3xdh ra3xdh modified the milestones: 25.2.0, 25.1.0 Jan 5, 2025
@ra3xdh
Copy link
Owner

ra3xdh commented Jan 5, 2025

I have uploaded the updated libraries by #1184. This issues may be closed. The additional devices may be uploaded later. The CD4066 device still be missing. It is often used in analog circuits. I will try to finish my transistor level model for this IC and upload the library.

@tomhajjar
Copy link
Author

tomhajjar commented Jan 5, 2025

CD4066 from LTspice. One model shows "real-life" Ron versus supply.

CD4066.zip

@tomhajjar
Copy link
Author

tomhajjar commented Jan 5, 2025

Updated all files:

I modified the above CD4066 model slightly. Did a quick test and added it to the end of Digital_CD.lib.

Built the following Oscillator with a single Vdd supply from link below.
http://zpostbox.ru/the_relaxation_oscillator_circuit_with_cmos_ic_cd4066.html

2025-01-05_102248
2025-01-05_170209

CD4066_prj.zip

@ra3xdh
Copy link
Owner

ra3xdh commented Jan 5, 2025

CD4066 model uploaded by #1187. Thanks!

@tomhajjar
Copy link
Author

tomhajjar commented Jan 5, 2025

I decided to add the CD4069UB. Since it's "analog" like the CD4066 it was added to the end of the Library.

Digital_CD.lib updated above.

2025-01-05_183215

CD4069UB_prj.zip

@ra3xdh
Copy link
Owner

ra3xdh commented Jan 6, 2025

CD4069 model uploaded by #1190

@ra3xdh ra3xdh unpinned this issue Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants