Try   HackMD

在centos中安裝ngspice電路模擬器

1. 進入ngspcie官網

2. 點選Tutorials

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

3. 點選tutorials for beginners
Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

4. 點選Download and Install ngspice(Linux),進入此畫面
Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

5. 下載ngspice-31.tar.gz
Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

6. 點2下後即可解壓縮
Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

7. 進入解壓後資料夾,右鍵以終端機開啟

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

8. 輸入這個指令(全部複製):

sudo yum install gcc make readline-devel libXaw-devel && ./configure --with-x --enable-xspice --enable-cider --with-readline=yes --enable-openmp --disable-debug CFLAGS="-m64 -O2" LDFLAGS="-m64 -s" && make -j8 && sudo make install

9. 中途會要求管理員密碼,輸入即可

10. 開啟文字編輯器,貼上以下,並存成test.sp檔:

* Simple spice netlist v1 vdd 0 1.8V m1 out in vdd vdd pch m2 out in 0 0 nch c1 out 0 1f v2 in 0 pwl 0ps 0 100ps 0 200ps 1.8 500ps 1.8 600ps 0 900ps 0 1100ps 1.8 1400ps 1.8 1600ps 0 1900ps 0 1950ps 1.8 2300ps 1.8 2350ps 0 .model nch nmos .model pch pmos .tran 1p 2600p .end

11. 找到test.sp的資料夾,右鍵以終端機開啟
Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

12. 輸入ngspice test.sp
Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

13. 輸入run
Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

14. 輸入plot v(in) v(out)
Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

15. 成功顯示波形
Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

有任何問題歡迎email : frakwu@gmail.com

tags: ngspice centos 安裝 教學