From 8adedce3434b397366f3dc0eef0e7a29b202deac Mon Sep 17 00:00:00 2001 From: KrzysztofHerman Date: Tue, 16 Jul 2024 13:26:47 +0200 Subject: [PATCH] major change in ngspice model referencing, xschem testcases update, qucs-s examples updated Signed-off-by: KrzysztofHerman --- ihp-sg13g2/libs.tech/ngspice/.spiceinit | 21 ++++++ ihp-sg13g2/libs.tech/qucs/examples/README.md | 9 +++ .../libs.tech/qucs/examples/ac_mim_cap.sch | 7 +- .../libs.tech/qucs/examples/dc_diode_op.sch | 7 +- .../libs.tech/qucs/examples/dc_hbt_13g2.sch | 5 +- .../libs.tech/qucs/examples/dc_hv_nmos.sch | 4 +- .../libs.tech/qucs/examples/dc_hv_pmos.sch | 4 +- .../libs.tech/qucs/examples/dc_lv_nmos.sch | 9 ++- .../libs.tech/qucs/examples/dc_lv_pmos.sch | 4 +- .../libs.tech/qucs/examples/resistors.sch | 7 +- .../libs.tech/qucs/examples/symbols.sch | 2 +- ihp-sg13g2/libs.tech/qucs/install.py | 66 +++++++++++++------ ihp-sg13g2/libs.tech/xschem/install.py | 23 ++++--- .../xschem/sg13g2_tests/ac_lv_nmosrf.sch | 17 +++-- .../xschem/sg13g2_tests/dc_hv_nmos.sch | 15 ++--- .../xschem/sg13g2_tests/dc_hv_pmos.sch | 19 +++--- .../xschem/sg13g2_tests/dc_logic_not.sch | 6 +- .../xschem/sg13g2_tests/dc_lv_nmos.sch | 16 ++--- .../xschem/sg13g2_tests/dc_lv_pmos.sch | 22 +++---- .../xschem/sg13g2_tests/dc_mos_cs_temp.sch | 13 ++-- .../xschem/sg13g2_tests/dc_mos_temp.sch | 12 ++-- .../sg13g2_tests/mc_hv_nmos_cs_loop.sch | 6 +- .../sg13g2_tests/mc_hv_pmos_cs_loop.sch | 7 +- .../sg13g2_tests/mc_lv_nmos_cs_loop.sch | 5 +- .../sg13g2_tests/mc_lv_pmos_cs_loop.sch | 7 +- .../xschem/sg13g2_tests/tran_logic_nand.sch | 11 ++-- .../xschem/sg13g2_tests/tran_logic_not.sch | 8 +-- 27 files changed, 174 insertions(+), 158 deletions(-) create mode 100644 ihp-sg13g2/libs.tech/ngspice/.spiceinit create mode 100644 ihp-sg13g2/libs.tech/qucs/examples/README.md diff --git a/ihp-sg13g2/libs.tech/ngspice/.spiceinit b/ihp-sg13g2/libs.tech/ngspice/.spiceinit new file mode 100644 index 00000000..299a450c --- /dev/null +++ b/ihp-sg13g2/libs.tech/ngspice/.spiceinit @@ -0,0 +1,21 @@ +* a custom spiceinit file for IHP-Open-PDK + +* export PDK_ROOT first +setcs sourcepath = ( $sourcepath $PDK_ROOT/ihp-sg13g2/libs.tech/ngspice/models $PDK_ROOT/ihp-sg13g2/libs.ref/sg13g2_stdcell/spice ) +*echo $sourcepath + +*option tnom=28 +option list +option klu +option node +option list +option opts +option warn=1 +option maxwarns=10 +option savecurrents + +set ngbehavior=hsa +set noinit + +osdi '$PDK_ROOT/ihp-sg13g2/libs.tech/ngspice/openvaf/psp103_nqs.osdi' + diff --git a/ihp-sg13g2/libs.tech/qucs/examples/README.md b/ihp-sg13g2/libs.tech/qucs/examples/README.md new file mode 100644 index 00000000..e3fc27cd --- /dev/null +++ b/ihp-sg13g2/libs.tech/qucs/examples/README.md @@ -0,0 +1,9 @@ +#################################################### + IMPORTANT +#################################################### + +In order to use the SG13G3 PDK sample schematics, you must add the SG13G3 PDK library to the Qucs-S subcircuit search path: + +1) Go to File ->Application Settings ... +2) Click on the "Locations" tab +3) On the bottom, click on the "Add Path With Subfolders" button and select the SG13G3 PDK library folder (/home//.qucs/user_lib) diff --git a/ihp-sg13g2/libs.tech/qucs/examples/ac_mim_cap.sch b/ihp-sg13g2/libs.tech/qucs/examples/ac_mim_cap.sch index ba7eb5bc..32dfd961 100644 --- a/ihp-sg13g2/libs.tech/qucs/examples/ac_mim_cap.sch +++ b/ihp-sg13g2/libs.tech/qucs/examples/ac_mim_cap.sch @@ -1,6 +1,6 @@ - + @@ -16,18 +16,17 @@ - + <.AC AC1 1 70 190 0 40 0 0 "log" 1 "100k" 1 "300 GHz" 1 "101" 1 "no" 0> - - + <360 610 360 650 "" 0 0 0 ""> diff --git a/ihp-sg13g2/libs.tech/qucs/examples/dc_diode_op.sch b/ihp-sg13g2/libs.tech/qucs/examples/dc_diode_op.sch index d642d5b5..8bab47b4 100644 --- a/ihp-sg13g2/libs.tech/qucs/examples/dc_diode_op.sch +++ b/ihp-sg13g2/libs.tech/qucs/examples/dc_diode_op.sch @@ -1,6 +1,6 @@ - + @@ -19,14 +19,13 @@ <.SW SW1 1 90 280 0 68 0 0 "DC1" 1 "lin" 1 "V2" 1 "0" 1 "1" 1 "301" 1 "false" 0> - - <.DC DC1 1 90 180 0 41 0 0 "26.85" 0 "0.001" 0 "1 pA" 0 "1 uV" 0 "no" 0 "150" 0 "no" 0 "none" 0 "CroutLU" 0> + - + <270 590 270 610 "" 0 0 0 ""> diff --git a/ihp-sg13g2/libs.tech/qucs/examples/dc_hbt_13g2.sch b/ihp-sg13g2/libs.tech/qucs/examples/dc_hbt_13g2.sch index 3c75968c..19e6cefa 100644 --- a/ihp-sg13g2/libs.tech/qucs/examples/dc_hbt_13g2.sch +++ b/ihp-sg13g2/libs.tech/qucs/examples/dc_hbt_13g2.sch @@ -1,6 +1,6 @@ - + @@ -16,8 +16,6 @@ - - <.DC DC1 1 40 160 0 46 0 0 "26.85" 0 "0.001" 0 "1 pA" 0 "1 uV" 0 "no" 0 "150" 0 "no" 0 "none" 0 "CroutLU" 0> <.SW SW1 1 50 250 0 77 0 0 "DC1" 1 "lin" 1 "V2" 1 "0" 1 "1.5" 1 "301" 1 "false" 0> <.SW SW2 1 50 470 0 77 0 0 "SW1" 1 "lin" 1 "I1" 1 "0" 1 "5u" 1 "10" 1 "false" 0> @@ -28,6 +26,7 @@ + <170 770 170 800 "" 0 0 0 ""> diff --git a/ihp-sg13g2/libs.tech/qucs/examples/dc_hv_nmos.sch b/ihp-sg13g2/libs.tech/qucs/examples/dc_hv_nmos.sch index 812f3d1e..14280c66 100644 --- a/ihp-sg13g2/libs.tech/qucs/examples/dc_hv_nmos.sch +++ b/ihp-sg13g2/libs.tech/qucs/examples/dc_hv_nmos.sch @@ -1,6 +1,6 @@ - + @@ -24,7 +24,7 @@ - + <.DC DC1 1 90 180 0 41 0 0 "26.85" 0 "0.001" 0 "1 pA" 0 "1 uV" 0 "no" 0 "150" 0 "no" 0 "none" 0 "CroutLU" 0> <.SW SW2 1 260 280 0 68 0 0 "SW1" 1 "lin" 1 "V1" 1 "0" 1 "0.9" 1 "10" 1 "false" 0> diff --git a/ihp-sg13g2/libs.tech/qucs/examples/dc_hv_pmos.sch b/ihp-sg13g2/libs.tech/qucs/examples/dc_hv_pmos.sch index 3b89f616..8bbc2240 100644 --- a/ihp-sg13g2/libs.tech/qucs/examples/dc_hv_pmos.sch +++ b/ihp-sg13g2/libs.tech/qucs/examples/dc_hv_pmos.sch @@ -1,6 +1,6 @@ - + @@ -26,7 +26,7 @@ - + diff --git a/ihp-sg13g2/libs.tech/qucs/examples/dc_lv_nmos.sch b/ihp-sg13g2/libs.tech/qucs/examples/dc_lv_nmos.sch index a94d3767..ba5ee00d 100644 --- a/ihp-sg13g2/libs.tech/qucs/examples/dc_lv_nmos.sch +++ b/ihp-sg13g2/libs.tech/qucs/examples/dc_lv_nmos.sch @@ -1,6 +1,6 @@ - + @@ -24,10 +24,9 @@ - - <.DC DC1 1 90 180 0 41 0 0 "26.85" 0 "0.001" 0 "1 pA" 0 "1 uV" 0 "no" 0 "150" 0 "no" 0 "none" 0 "CroutLU" 0> <.SW SW2 1 260 280 0 68 0 0 "SW1" 1 "lin" 1 "V1" 1 "0" 1 "0.9" 1 "10" 1 "false" 0> + <270 810 270 840 "" 0 0 0 ""> @@ -43,8 +42,8 @@ <160 830 160 840 "" 0 0 0 ""> - - <"ngspice/sw1.i(pr1)" #0000ff 0 3 0 0 0> + + <"ngspice/i(pr1)" #ff00ff 0 3 0 0 0> diff --git a/ihp-sg13g2/libs.tech/qucs/examples/dc_lv_pmos.sch b/ihp-sg13g2/libs.tech/qucs/examples/dc_lv_pmos.sch index 5ce30f40..4d57e52f 100644 --- a/ihp-sg13g2/libs.tech/qucs/examples/dc_lv_pmos.sch +++ b/ihp-sg13g2/libs.tech/qucs/examples/dc_lv_pmos.sch @@ -1,6 +1,6 @@ - + @@ -26,7 +26,7 @@ - + diff --git a/ihp-sg13g2/libs.tech/qucs/examples/resistors.sch b/ihp-sg13g2/libs.tech/qucs/examples/resistors.sch index 136db237..292abcb9 100644 --- a/ihp-sg13g2/libs.tech/qucs/examples/resistors.sch +++ b/ihp-sg13g2/libs.tech/qucs/examples/resistors.sch @@ -1,6 +1,6 @@ - + @@ -22,7 +22,7 @@ <.SW SW1 1 90 280 0 68 0 0 "DC1" 1 "lin" 1 "V2" 1 "0" 1 "10" 1 "301" 1 "false" 0> - + @@ -43,7 +43,6 @@ - <.DC DC1 1 90 180 0 41 0 0 "26.85" 0 "0.001" 0 "1 pA" 0 "1 uV" 0 "yes" 1 "150" 0 "no" 0 "none" 0 "CroutLU" 0> <110 830 110 950 "" 0 0 0 ""> @@ -71,7 +70,7 @@ <"ngspice/v(div2)" #ff0000 2 3 0 0 0> - + <"ngspice/i(pr1)" #ff0000 2 3 0 0 0> <"ngspice/v(div1)" #ff00ff 2 3 0 0 0> <"ngspice/v(div3)" #00ff00 2 3 0 0 0> diff --git a/ihp-sg13g2/libs.tech/qucs/examples/symbols.sch b/ihp-sg13g2/libs.tech/qucs/examples/symbols.sch index 4bf0b2d5..32412ec1 100644 --- a/ihp-sg13g2/libs.tech/qucs/examples/symbols.sch +++ b/ihp-sg13g2/libs.tech/qucs/examples/symbols.sch @@ -1,6 +1,6 @@ - + diff --git a/ihp-sg13g2/libs.tech/qucs/install.py b/ihp-sg13g2/libs.tech/qucs/install.py index 23035aac..98fe9189 100644 --- a/ihp-sg13g2/libs.tech/qucs/install.py +++ b/ihp-sg13g2/libs.tech/qucs/install.py @@ -49,10 +49,9 @@ def copy_files(source_dir, destination_dir): def info(): msg = """ - This script copies the Qucs-S user library files into - /home/$USER/.qucs/user_lib directory. - It also creates a symbolic link there and compiles and places - PSP103 model in ~/.qucs/ location. + This script: + - copies the Qucs-S user library files into /home/$USER/.qucs/user_lib directory. + - compiles and copy PSP103 model in ../ngspice/openvaf location Please make sure that you have set up the PDK_ROOT env variable export PDK_ROOT=your_location/IHP-Open-PDK """ @@ -82,28 +81,53 @@ def info(): copy_files(source_directory, destination_directory) - original_file = pdk_root - symbolic_link = "/home/" + username + "/.qucs/IHP-Open-PDK-main" - # Create the symbolic link - if not os.path.exists(symbolic_link): - try: - os.symlink(original_file, symbolic_link) - print(f"Symbolic link '{symbolic_link}' created successfully.") - except OSError as e: - print(f"Failed to create symbolic link: {e}") + # Copy examples to "Qucs Home" (/home//.qucs/) + print("Copying examples into Qucs-S Home...") + source_directory=pdk_root + "/ihp-sg13g2/libs.tech/qucs/examples" + destination_directory = "/home/" + username + "/.qucs/IHP-Open-PDK-SG13G2-Examples_prj" + + if not os.path.exists(destination_directory): + os.makedirs(destination_directory) + + copy_files(source_directory, destination_directory) + print("Examples copied") + print("\n\n#############################################") + print(" IMPORTANT NOTE") + print("#############################################\n") + print("Before using the PDK example schematics, you must add the PDK library path to the Qucs-S search path list.\n") + print("Please read the instructions provided in " + destination_directory + "/README.txt\n") + print("#############################################\n\n") + + + + source_directory = pdk_root + "/ihp-sg13g2/libs.tech/ngspice/openvaf" + destination_directory = pdk_root + "/ihp-sg13g2/libs.tech/ngspice/openvaf" program_name = "openvaf" if is_program_installed(program_name): - command = "openvaf psp103_nqs.va --output " + "/home/" + username + "/.qucs/psp103_nqs.osdi" - directory = pdk_root + "/ihp-sg13g2/libs.tech/ngspice/openvaf" - print(f"{program_name} is installed and about to run the command '{command}' in a location: {directory} ") - exec_app_in_directory(command, directory) + command = "openvaf psp103_nqs.va --output " + destination_directory + "/psp103_nqs.osdi" + print(f"{program_name} is installed and about to run the command '{command}' in a location: {source_directory} ") + exec_app_in_directory(command, source_directory) else: print(f"{program_name} is not installed.") + original_file = pdk_root + "/ihp-sg13g2/libs.tech/ngspice/.spiceinit" + symbolic_link = "/home/" + username + "/.spiceinit" + # Create the symbolic link + if not os.path.exists(symbolic_link): + try: + os.symlink(original_file, symbolic_link) + print(f"Symbolic link '{symbolic_link}' created successfully.") + except OSError as e: + print(f"Failed to create symbolic link: {e}") - - - - + original_file = pdk_root + symbolic_link = "/home/" + username + "/.qucs/IHP-Open-PDK-main" + # Create the symbolic link + if not os.path.exists(symbolic_link): + try: + os.symlink(original_file, symbolic_link) + print(f"Symbolic link '{symbolic_link}' created successfully.") + except OSError as e: + print(f"Failed to create symbolic link: {e}") diff --git a/ihp-sg13g2/libs.tech/xschem/install.py b/ihp-sg13g2/libs.tech/xschem/install.py index 33e561ba..add5776d 100644 --- a/ihp-sg13g2/libs.tech/xschem/install.py +++ b/ihp-sg13g2/libs.tech/xschem/install.py @@ -39,10 +39,10 @@ def is_program_installed(program_name): def info(): msg = """ - This script compiles and places - PSP103 model in ./simulations/ location. - Please make sure that you have set up the PDK_ROOT env variable - export PDK_ROOT=your_location/IHP-Open-PDK + This script: + - compiles and places PSP103 model in ../ngspice/openvaf/ location. + - creates a symlink to the ../ngspice/.spiceinit file in your $HOME directory + Please make sure that you have set up the PDK_ROOT env variable export PDK_ROOT=your_location/IHP-Open-PDK """ print(msg) @@ -57,16 +57,12 @@ def info(): source_directory=pdk_root + "/ihp-sg13g2/libs.tech/ngspice/openvaf" username = os.environ.get("USER") - destination_directory = pdk_root + "/ihp-sg13g2/libs.tech/xschem/simulations" + destination_directory = pdk_root + "/ihp-sg13g2/libs.tech/ngspice/openvaf" # Check if the source directory exists if not os.path.exists(source_directory): print(f"Source directory '{source_directory}' does not exist.") - # Check if the destination directory exists, if not, create it - if not os.path.exists(destination_directory): - os.makedirs(destination_directory) - print(f"Destination directory '{destination_directory}' created.") program_name = "openvaf" if is_program_installed(program_name): @@ -77,6 +73,15 @@ def info(): print(f"{program_name} is not installed.") + original_file = pdk_root + "/ihp-sg13g2/libs.tech/ngspice/.spiceinit" + symbolic_link = "/home/" + username + "/.spiceinit" + # Create the symbolic link + if not os.path.exists(symbolic_link): + try: + os.symlink(original_file, symbolic_link) + print(f"Symbolic link '{symbolic_link}' created successfully.") + except OSError as e: + print(f"Failed to create symbolic link: {e}") diff --git a/ihp-sg13g2/libs.tech/xschem/sg13g2_tests/ac_lv_nmosrf.sch b/ihp-sg13g2/libs.tech/xschem/sg13g2_tests/ac_lv_nmosrf.sch index 4ffdeeba..2bc35d0c 100644 --- a/ihp-sg13g2/libs.tech/xschem/sg13g2_tests/ac_lv_nmosrf.sch +++ b/ihp-sg13g2/libs.tech/xschem/sg13g2_tests/ac_lv_nmosrf.sch @@ -7,8 +7,8 @@ S {} E {} L 4 -240 -300 -220 -300 {} B 2 360 -410 1160 -10 {flags=graph -y1=0.0088 -y2=0.022 +y1=0.0014 +y2=0.0015 ypos1=0 ypos2=2 divy=10 @@ -98,14 +98,13 @@ lab=Vout2} C {devices/code_shown.sym} -200 160 0 0 {name=MODEL only_toplevel=true format="tcleval( @value )" value=" -.lib $::SG13G2_MODELS/cornerMOSlv.lib mos_tt -.lib $::SG13G2_MODELS/cornerRES.lib res_typ +.lib cornerMOSlv.lib mos_tt +.lib cornerRES.lib res_typ "} C {devices/code_shown.sym} 1190 -310 0 0 {name=NGSPICE only_toplevel=true value=" .param temp=27 .control -pre_osdi ./psp103_nqs.osdi save all ac dec 1001 10meg 10000meg let vd1 = abs(Vout1) @@ -117,8 +116,8 @@ write ac_lv_nmosrf.raw "} C {devices/gnd.sym} 160 50 0 0 {name=l1 lab=GND} C {devices/gnd.sym} 30 50 0 0 {name=l2 lab=GND} -C {devices/vsource.sym} 30 0 0 0 {name=Vgs value="dc 0.75 ac 0.01 "} -C {devices/vsource.sym} 290 -40 0 0 {name=Vds value=1.5} +C {devices/vsource.sym} 30 0 0 0 {name=Vgs value="dc 0.45 ac 0.01 "} +C {devices/vsource.sym} 290 -40 0 0 {name=Vds value=1.2} C {devices/gnd.sym} 290 50 0 0 {name=l3 lab=GND} C {devices/gnd.sym} 210 50 0 0 {name=l4 lab=GND} C {devices/title.sym} -130 260 0 0 {name=l5 author="Copyright 2023 IHP PDK Authors"} @@ -128,8 +127,8 @@ tclcommand="xschem raw_read $netlist_dir/ac_lv_nmosrf.raw ac"} C {devices/lab_pin.sym} 150 -110 1 0 {name=p1 sig_type=std_logic lab=Vout1} C {devices/gnd.sym} -170 60 0 0 {name=l6 lab=GND} C {devices/gnd.sym} -300 60 0 0 {name=l7 lab=GND} -C {devices/vsource.sym} -300 10 0 0 {name=Vgs1 value="dc 0.75 ac 0.01 "} -C {devices/vsource.sym} -40 -30 0 0 {name=Vds2 value=1.5} +C {devices/vsource.sym} -300 10 0 0 {name=Vgs1 value="dc 0.45 ac 0.01 "} +C {devices/vsource.sym} -40 -30 0 0 {name=Vds2 value=1.2} C {devices/gnd.sym} -40 60 0 0 {name=l8 lab=GND} C {devices/gnd.sym} -120 60 0 0 {name=l9 lab=GND} C {devices/lab_pin.sym} -180 -100 1 0 {name=p2 sig_type=std_logic lab=Vout2} diff --git a/ihp-sg13g2/libs.tech/xschem/sg13g2_tests/dc_hv_nmos.sch b/ihp-sg13g2/libs.tech/xschem/sg13g2_tests/dc_hv_nmos.sch index 4b3fd329..895967b7 100644 --- a/ihp-sg13g2/libs.tech/xschem/sg13g2_tests/dc_hv_nmos.sch +++ b/ihp-sg13g2/libs.tech/xschem/sg13g2_tests/dc_hv_nmos.sch @@ -6,8 +6,8 @@ V {} S {} E {} B 2 150 -490 950 -90 {flags=graph -y1=0 -y2=2e-05 +y1=-0 +y2=0.00012 ypos1=0 ypos2=2 divy=5 @@ -49,18 +49,13 @@ lab=#net1} C {devices/code_shown.sym} -200 160 0 0 {name=MODEL only_toplevel=true format="tcleval( @value )" value=" -.lib $::SG13G2_MODELS/cornerMOShv.lib mos_tt +.lib cornerMOShv.lib mos_tt "} C {devices/code_shown.sym} 310 -30 0 0 {name=NGSPICE only_toplevel=true value=" .param temp=27 -.control -pre_osdi ./psp103_nqs.osdi -save all -op -print all -reset -dc Vds 0 3 0.01 Vgs 0. 0.9 0.1 +.control +dc Vds 0 3.0 0.01 Vgs 0.3 1.5 0.05 write dc_hv_nmos.raw .endc "} diff --git a/ihp-sg13g2/libs.tech/xschem/sg13g2_tests/dc_hv_pmos.sch b/ihp-sg13g2/libs.tech/xschem/sg13g2_tests/dc_hv_pmos.sch index ca5b5cd1..81588337 100644 --- a/ihp-sg13g2/libs.tech/xschem/sg13g2_tests/dc_hv_pmos.sch +++ b/ihp-sg13g2/libs.tech/xschem/sg13g2_tests/dc_hv_pmos.sch @@ -7,7 +7,7 @@ S {} E {} B 2 150 -510 950 -110 {flags=graph y1=-1.1e-05 -y2=0 +y2=-0 ypos1=0 ypos2=2 divy=5 @@ -17,14 +17,14 @@ x1=-2 x2=0 divx=5 subdivx=1 -node="i(vds) -i(vd)" -color="4 4" + + dataset=-1 unitx=1 logx=0 logy=0 -} +color=4 +node=i(vd)} N -110 70 -110 90 { lab=GND} N -110 -0 -110 10 { @@ -50,20 +50,17 @@ lab=#net3} C {devices/code_shown.sym} -200 160 0 0 {name=MODEL only_toplevel=true format="tcleval( @value )" value=" -.lib $::SG13G2_MODELS/cornerMOShv.lib mos_tt +.lib cornerMOShv.lib mos_tt "} C {devices/code_shown.sym} 290 -10 0 0 {name=NGSPICE only_toplevel=true value=" .param temp=27 .control -pre_osdi ./psp103_nqs.osdi -save all -op +save all +op print I(Vd) -reset dc Vds 0 -2 -0.01 Vgs -0.45 -1.1 -0.05 write dc_hv_pmos.raw -*plot all .endc "} C {devices/gnd.sym} 20 90 0 0 {name=l1 lab=GND} diff --git a/ihp-sg13g2/libs.tech/xschem/sg13g2_tests/dc_logic_not.sch b/ihp-sg13g2/libs.tech/xschem/sg13g2_tests/dc_logic_not.sch index 4c90701d..03903297 100644 --- a/ihp-sg13g2/libs.tech/xschem/sg13g2_tests/dc_logic_not.sch +++ b/ihp-sg13g2/libs.tech/xschem/sg13g2_tests/dc_logic_not.sch @@ -1,4 +1,4 @@ -v {xschem version=3.4.4 file_version=1.2 +v {xschem version=3.4.5 file_version=1.2 } G {} K {} @@ -72,14 +72,12 @@ lab=in} C {devices/code_shown.sym} -300 170 0 0 {name=MODEL only_toplevel=true format="tcleval( @value )" value=" -.lib $::SG13G2_MODELS/cornerMOSlv.lib mos_tt -.lib $::SG13G2_MODELS/cornerRES.lib res_typ +.lib cornerMOSlv.lib mos_tt "} C {devices/code_shown.sym} -360 -260 0 0 {name=NGSPICE only_toplevel=true value=" .param temp=27 .control -pre_osdi ./psp103_nqs.osdi save all dc Vin 0 1.8 1m let gain = -deriv(V(out))/10 diff --git a/ihp-sg13g2/libs.tech/xschem/sg13g2_tests/dc_lv_nmos.sch b/ihp-sg13g2/libs.tech/xschem/sg13g2_tests/dc_lv_nmos.sch index 667b8852..d89e0242 100644 --- a/ihp-sg13g2/libs.tech/xschem/sg13g2_tests/dc_lv_nmos.sch +++ b/ihp-sg13g2/libs.tech/xschem/sg13g2_tests/dc_lv_nmos.sch @@ -6,15 +6,15 @@ V {} S {} E {} B 2 240 -350 1040 50 {flags=graph -y1=-2.4e-11 -y2=0.00015 +y1=-6.4e-14 +y2=7.9e-06 ypos1=0 ypos2=2 divy=5 subdivy=1 unity=1 x1=0 -x2=3 +x2=1.2 divx=5 subdivx=1 node=i(vd) @@ -48,17 +48,15 @@ N -110 0 -20 0 { lab=#net1} C {devices/code_shown.sym} -290 190 0 0 {name=MODEL only_toplevel=true format="tcleval( @value )" -value=".lib $::SG13G2_MODELS/cornerMOSlv.lib mos_tt +value=".lib cornerMOSlv.lib mos_tt "} C {devices/code_shown.sym} -300 -320 0 0 {name=NGSPICE only_toplevel=true value=" .param temp=27 .control -pre_osdi ./psp103_nqs.osdi save all op -*reset -dc Vds 0 3 0.01 Vgs 0. 0.9 0.1 +dc Vds 0 1.2 0.01 Vgs 0.3 0.5 0.05 write dc_lv_nmos.raw .endc "} @@ -76,8 +74,8 @@ tclcommand="xschem raw_read $netlist_dir/dc_lv_nmos.raw dc" C {devices/ammeter.sym} 80 -70 1 0 {name=Vd} C {sg13g2_pr/sg13_lv_nmos.sym} 0 0 2 1 {name=M1 l=0.13u -w=12.7u -ng=2 +w=1.0u +ng=1 m=1 model=sg13_lv_nmos spiceprefix=X diff --git a/ihp-sg13g2/libs.tech/xschem/sg13g2_tests/dc_lv_pmos.sch b/ihp-sg13g2/libs.tech/xschem/sg13g2_tests/dc_lv_pmos.sch index 4a8f3ff5..4ea3638d 100644 --- a/ihp-sg13g2/libs.tech/xschem/sg13g2_tests/dc_lv_pmos.sch +++ b/ihp-sg13g2/libs.tech/xschem/sg13g2_tests/dc_lv_pmos.sch @@ -6,18 +6,18 @@ V {} S {} E {} B 2 150 -510 950 -110 {flags=graph -y1=-1.4e-11 -y2=5.2e-05 +y1=-5e-05 +y2=1.4e-11 ypos1=0 ypos2=2 divy=5 subdivy=1 unity=1 -x1=0 -x2=-2 +x1=-1.2 +x2=0 divx=5 subdivx=1 -node=i(vds) +node=i(vd) color=4 dataset=-1 unitx=1 @@ -53,20 +53,14 @@ lab=#net3} C {devices/code_shown.sym} -200 160 0 0 {name=MODEL only_toplevel=true format="tcleval( @value )" value=" -.lib $::SG13G2_MODELS/cornerMOSlv.lib mos_tt +.lib cornerMOSlv.lib mos_tt "} C {devices/code_shown.sym} 290 -10 0 0 {name=NGSPICE only_toplevel=true value=" .param temp=27 .control -pre_osdi ./psp103_nqs.osdi -save all -op -print I(Vd) -*reset -dc Vds 0 -2 -0.01 Vgs -0.45 -1.1 -0.05 +dc Vds 0 -1.2 -0.01 Vgs -0.35 -1.1 -0.05 write dc_lv_pmos.raw -*plot all .endc "} C {devices/gnd.sym} 20 90 0 0 {name=l1 lab=GND} @@ -82,7 +76,7 @@ tclcommand="xschem raw_read $netlist_dir/dc_lv_pmos.raw dc" } C {sg13g2_pr/sg13_lv_pmos.sym} 0 0 2 1 {name=M1 l=0.45u -w=5.0u +w=1.0u ng=1 m=1 model=sg13_lv_pmos diff --git a/ihp-sg13g2/libs.tech/xschem/sg13g2_tests/dc_mos_cs_temp.sch b/ihp-sg13g2/libs.tech/xschem/sg13g2_tests/dc_mos_cs_temp.sch index 9f41aa8f..2a0970b1 100644 --- a/ihp-sg13g2/libs.tech/xschem/sg13g2_tests/dc_mos_cs_temp.sch +++ b/ihp-sg13g2/libs.tech/xschem/sg13g2_tests/dc_mos_cs_temp.sch @@ -6,8 +6,8 @@ V {} S {} E {} B 2 250 -620 1050 -220 {flags=graph -y1=-1.5 -y2=1 +y1=-1.3 +y2=0.92 ypos1=0 ypos2=2 @@ -36,8 +36,6 @@ N -20 80 -20 140 { lab=GND} N -20 50 30 50 { lab=GND} -N 80 50 80 140 { -lab=GND} N -90 50 -60 50 { lab=Vgs1} N -20 0 -20 20 { @@ -117,15 +115,13 @@ lab=Vgs2} C {devices/code_shown.sym} -320 -630 0 0 {name=MODEL only_toplevel=true format="tcleval( @value )" value=" -.lib $::SG13G2_MODELS/cornerMOSlv.lib mos_tt -.lib $::SG13G2_MODELS/cornerMOShv.lib mos_tt +.lib cornerMOSlv.lib mos_tt +.lib cornerMOShv.lib mos_tt "} C {devices/code_shown.sym} -310 -510 0 0 {name=NGSPICE only_toplevel=true value=" -.savecurrents .param temp=27 .control -pre_osdi ./psp103_nqs.osdi save all dc temp -40 125 1 write mos_temp.raw @@ -133,7 +129,6 @@ wrdata mos_temp.csv Vgs1 Vgs2 Vgs3 Vgs4 .endc "} C {devices/gnd.sym} -20 140 0 0 {name=l1 lab=GND} -C {devices/gnd.sym} 80 140 0 0 {name=l4 lab=GND} C {devices/title.sym} -130 260 0 0 {name=l5 author="Copyright 2023 IHP PDK Authors"} C {devices/launcher.sym} -210 -250 0 0 {name=h5 descr="load waves Ctrl + left click" diff --git a/ihp-sg13g2/libs.tech/xschem/sg13g2_tests/dc_mos_temp.sch b/ihp-sg13g2/libs.tech/xschem/sg13g2_tests/dc_mos_temp.sch index bf41022d..cba02e35 100644 --- a/ihp-sg13g2/libs.tech/xschem/sg13g2_tests/dc_mos_temp.sch +++ b/ihp-sg13g2/libs.tech/xschem/sg13g2_tests/dc_mos_temp.sch @@ -1,4 +1,4 @@ -v {xschem version=3.4.4 file_version=1.2 +v {xschem version=3.4.5 file_version=1.2 } G {} K {} @@ -105,16 +105,14 @@ lab=Vdsp} C {devices/code_shown.sym} -330 -530 0 0 {name=MODEL only_toplevel=true format="tcleval( @value )" value=" -.lib $::SG13G2_MODELS/cornerMOSlv.lib mos_tt -.lib $::SG13G2_MODELS/cornerMOShv.lib mos_tt +.lib cornerMOSlv.lib mos_tt +.lib cornerMOShv.lib mos_tt "} C {devices/code_shown.sym} -320 -410 0 0 {name=NGSPICE only_toplevel=true value=" -.savecurrents .param temp=27 .control -pre_osdi ./psp103_nqs.osdi -save all +save all dc temp -40 125 1 write mos_temp.raw wrdata mos_temp.csv I(Vm1) I(Vm2) I(Vm3) I(Vm4) @@ -123,7 +121,7 @@ wrdata mos_temp.csv I(Vm1) I(Vm2) I(Vm3) I(Vm4) C {devices/gnd.sym} -20 200 0 0 {name=l1 lab=GND} C {devices/gnd.sym} -280 200 0 0 {name=l2 lab=GND} C {devices/vsource.sym} -280 150 0 0 {name=Vgs value=0.75} -C {devices/vsource.sym} -280 -30 0 0 {name=Vds value=1.5} +C {devices/vsource.sym} -280 -30 0 0 {name=Vds value=1.2} C {devices/gnd.sym} -280 60 0 0 {name=l3 lab=GND} C {devices/gnd.sym} 30 200 0 0 {name=l4 lab=GND} C {devices/title.sym} -130 260 0 0 {name=l5 author="Copyright 2023 IHP PDK Authors"} diff --git a/ihp-sg13g2/libs.tech/xschem/sg13g2_tests/mc_hv_nmos_cs_loop.sch b/ihp-sg13g2/libs.tech/xschem/sg13g2_tests/mc_hv_nmos_cs_loop.sch index 74fdac23..096b90d4 100644 --- a/ihp-sg13g2/libs.tech/xschem/sg13g2_tests/mc_hv_nmos_cs_loop.sch +++ b/ihp-sg13g2/libs.tech/xschem/sg13g2_tests/mc_hv_nmos_cs_loop.sch @@ -1,4 +1,4 @@ -v {xschem version=3.4.4 file_version=1.2 +v {xschem version=3.4.5 file_version=1.2 } G {} K {} @@ -28,8 +28,7 @@ lab=Vgs} C {devices/code_shown.sym} 260 110 0 0 {name=MODEL only_toplevel=true format="tcleval( @value )" value=" -.lib $::SG13G2_MODELS/cornerMOSlv.lib mos_tt_stat -.lib $::SG13G2_MODELS/cornerMOShv.lib mos_tt_stat +.lib cornerMOShv.lib mos_tt_stat "} C {devices/code_shown.sym} -300 -440 0 0 {name=NGSPICE only_toplevel=true @@ -39,7 +38,6 @@ value=" .param temp=27 .control -pre_osdi ./psp103_nqs.osdi let mc_runs = 1000 let run = 0 diff --git a/ihp-sg13g2/libs.tech/xschem/sg13g2_tests/mc_hv_pmos_cs_loop.sch b/ihp-sg13g2/libs.tech/xschem/sg13g2_tests/mc_hv_pmos_cs_loop.sch index bd64efd3..eb763111 100644 --- a/ihp-sg13g2/libs.tech/xschem/sg13g2_tests/mc_hv_pmos_cs_loop.sch +++ b/ihp-sg13g2/libs.tech/xschem/sg13g2_tests/mc_hv_pmos_cs_loop.sch @@ -1,4 +1,4 @@ -v {xschem version=3.4.4 file_version=1.2 +v {xschem version=3.4.5 file_version=1.2 } G {} K {} @@ -28,8 +28,7 @@ lab=Vgs} C {devices/code_shown.sym} 260 110 0 0 {name=MODEL only_toplevel=true format="tcleval( @value )" value=" -.lib $::SG13G2_MODELS/cornerMOSlv.lib mos_tt_stat -.lib $::SG13G2_MODELS/cornerMOShv.lib mos_tt_stat +.lib cornerMOShv.lib mos_tt_stat "} C {devices/code_shown.sym} -300 -440 0 0 {name=NGSPICE only_toplevel=true value=" @@ -38,8 +37,6 @@ value=" .param temp=27 .control -pre_osdi ./psp103_nqs.osdi - let mc_runs = 1000 let run = 0 set curplot=new diff --git a/ihp-sg13g2/libs.tech/xschem/sg13g2_tests/mc_lv_nmos_cs_loop.sch b/ihp-sg13g2/libs.tech/xschem/sg13g2_tests/mc_lv_nmos_cs_loop.sch index 59506d14..68c2d93a 100644 --- a/ihp-sg13g2/libs.tech/xschem/sg13g2_tests/mc_lv_nmos_cs_loop.sch +++ b/ihp-sg13g2/libs.tech/xschem/sg13g2_tests/mc_lv_nmos_cs_loop.sch @@ -1,4 +1,4 @@ -v {xschem version=3.4.4 file_version=1.2 +v {xschem version=3.4.5 file_version=1.2 } G {} K {} @@ -28,7 +28,7 @@ lab=Vgs} C {devices/code_shown.sym} 260 110 0 0 {name=MODEL only_toplevel=true format="tcleval( @value )" value=" -.lib $::SG13G2_MODELS/cornerMOSlv.lib mos_tt_stat +.lib cornerMOSlv.lib mos_tt_stat "} C {devices/code_shown.sym} -300 -440 0 0 {name=NGSPICE only_toplevel=true value=" @@ -37,7 +37,6 @@ value=" .param temp=27 .control -pre_osdi ./psp103_nqs.osdi let mc_runs = 1000 let run = 0 diff --git a/ihp-sg13g2/libs.tech/xschem/sg13g2_tests/mc_lv_pmos_cs_loop.sch b/ihp-sg13g2/libs.tech/xschem/sg13g2_tests/mc_lv_pmos_cs_loop.sch index 8252dcba..6e3dee51 100644 --- a/ihp-sg13g2/libs.tech/xschem/sg13g2_tests/mc_lv_pmos_cs_loop.sch +++ b/ihp-sg13g2/libs.tech/xschem/sg13g2_tests/mc_lv_pmos_cs_loop.sch @@ -1,4 +1,4 @@ -v {xschem version=3.4.4 file_version=1.2 +v {xschem version=3.4.5 file_version=1.2 } G {} K {} @@ -28,8 +28,7 @@ lab=Vgs} C {devices/code_shown.sym} 260 110 0 0 {name=MODEL only_toplevel=true format="tcleval( @value )" value=" -.lib $::SG13G2_MODELS/cornerMOSlv.lib mos_tt_stat -.lib $::SG13G2_MODELS/cornerMOShv.lib mos_tt_stat +.lib cornerMOSlv.lib mos_tt_stat "} C {devices/code_shown.sym} -300 -440 0 0 {name=NGSPICE only_toplevel=true value=" @@ -38,8 +37,6 @@ value=" .param temp=27 .control -pre_osdi ./psp103_nqs.osdi - let mc_runs = 1000 let run = 0 set curplot=new diff --git a/ihp-sg13g2/libs.tech/xschem/sg13g2_tests/tran_logic_nand.sch b/ihp-sg13g2/libs.tech/xschem/sg13g2_tests/tran_logic_nand.sch index a57d83b1..4e672c67 100644 --- a/ihp-sg13g2/libs.tech/xschem/sg13g2_tests/tran_logic_nand.sch +++ b/ihp-sg13g2/libs.tech/xschem/sg13g2_tests/tran_logic_nand.sch @@ -1,4 +1,4 @@ -v {xschem version=3.4.4 file_version=1.2 +v {xschem version=3.4.5 file_version=1.2 } G {} K {} @@ -144,13 +144,12 @@ lab=out} C {devices/code_shown.sym} -290 190 0 0 {name=MODEL only_toplevel=true format="tcleval( @value )" value=" -.lib $::SG13G2_MODELS/cornerMOSlv.lib mos_ff +.lib cornerMOSlv.lib mos_ff "} C {devices/code_shown.sym} -330 -530 0 0 {name=NGSPICE only_toplevel=true value=" .param temp=127 .control -pre_osdi ./psp103_nqs.osdi save all tran 50p 20n meas tran tdelay TRIG v(b) VAl=0.9 FALl=1 TARG v(out) VAl=0.9 RISE=1 @@ -159,8 +158,8 @@ write tran_logic_nand.raw "} C {devices/gnd.sym} 100 130 0 0 {name=l1 lab=GND} C {devices/gnd.sym} -170 130 0 0 {name=l2 lab=GND} -C {devices/vsource.sym} -170 90 0 0 {name=VinA value="dc 0 ac 0 pulse(0, 1.8, 2n, 100p, 100p, 4n, 6n ) "} -C {devices/vsource.sym} 410 -80 0 0 {name=Vdd value=1.8} +C {devices/vsource.sym} -170 90 0 0 {name=VinA value="dc 0 ac 0 pulse(0, 1.2, 2n, 100p, 100p, 4n, 6n ) "} +C {devices/vsource.sym} 410 -80 0 0 {name=Vdd value=1.2} C {devices/gnd.sym} 410 130 0 0 {name=l3 lab=GND} C {devices/gnd.sym} 150 130 0 0 {name=l4 lab=GND} C {devices/title.sym} -130 260 0 0 {name=l5 author="Copyright 2023 IHP PDK Authors"} @@ -204,5 +203,5 @@ spiceprefix=X } C {devices/gnd.sym} 200 40 0 0 {name=l6 lab=GND} C {devices/gnd.sym} -270 50 0 0 {name=l7 lab=GND} -C {devices/vsource.sym} -270 10 0 0 {name=VinB value="dc 0 ac 0 pulse(0, 1.8, 0, 100p, 100p, 2n, 4n ) "} +C {devices/vsource.sym} -270 10 0 0 {name=VinB value="dc 0 ac 0 pulse(0, 1.2, 0, 100p, 100p, 2n, 4n ) "} C {devices/lab_pin.sym} -290 -40 0 0 {name=p3 sig_type=std_logic lab=B} diff --git a/ihp-sg13g2/libs.tech/xschem/sg13g2_tests/tran_logic_not.sch b/ihp-sg13g2/libs.tech/xschem/sg13g2_tests/tran_logic_not.sch index bd09c652..1bc4bc68 100644 --- a/ihp-sg13g2/libs.tech/xschem/sg13g2_tests/tran_logic_not.sch +++ b/ihp-sg13g2/libs.tech/xschem/sg13g2_tests/tran_logic_not.sch @@ -71,14 +71,12 @@ lab=out} C {devices/code_shown.sym} -300 170 0 0 {name=MODEL only_toplevel=true format="tcleval( @value )" value=" -.lib $::SG13G2_MODELS/cornerMOSlv.lib mos_tt -.lib $::SG13G2_MODELS/cornerRES.lib res_typ +.lib cornerMOSlv.lib mos_tt "} C {devices/code_shown.sym} 160 -70 0 0 {name=NGSPICE only_toplevel=true value=" .param temp=27 .control -pre_osdi ./psp103_nqs.osdi save all tran 50p 20n meas tran tdelay TRIG v(in) VAl=0.9 FALl=1 TARG v(out) VAl=0.9 RISE=1 @@ -87,8 +85,8 @@ write tran_logic_not.raw "} C {devices/gnd.sym} -160 110 0 0 {name=l1 lab=GND} C {devices/gnd.sym} -440 110 0 0 {name=l2 lab=GND} -C {devices/vsource.sym} -440 60 0 0 {name=Vin value="dc 0 ac 0 pulse(0, 1.8, 0, 100p, 100p, 2n, 4n ) "} -C {devices/vsource.sym} 100 20 0 0 {name=Vdd value=1.8} +C {devices/vsource.sym} -440 60 0 0 {name=Vin value="dc 0 ac 0 pulse(0, 1.2, 0, 100p, 100p, 2n, 4n ) "} +C {devices/vsource.sym} 100 20 0 0 {name=Vdd value=1.2} C {devices/gnd.sym} 100 110 0 0 {name=l3 lab=GND} C {devices/gnd.sym} -110 110 0 0 {name=l4 lab=GND} C {devices/title.sym} -130 260 0 0 {name=l5 author="Copyright 2023 IHP PDK Authors"}