Transistor operating point printer
This script can be used to print the operating point parameters of all transistors in your design.
Navigate to the folder you want to save the script in (this tutorial uses the home (./) directory) and create a new file in the terminal by entering touch transistors.ocn
. Open the file by writing gedit transistors.ocn &
and copy the following script into the document. Change ./transistors.csv in the script if you want another output file name and/or location. Save the file.
selectResult('dcOpInfo) report(?output "./transistors.csv" ?param list("gm" "gmb" "gmoverid" "gds" "id" "idsat" "vth" "region" "cgs" "cgd" "self_gain" "type" "vds" "vdsat" "vgs") ?format "spice" ?maxLineWidth 1000) file = outfile("./transistors.csv" "a") fprintf(file "\n\nRegion 0 is cutoff.\nRegion 1 is linear.\nRegion 2 is saturation .\nRegion 3 is subthreshold.\nRegion 4 is breakdown.\n\nType 0 is nMOS. \nType 1 is pMOS.") close(file)
For the IHP design kit use:
selectResult('dcOpInfo) report(?output "./transistors.csv" ?param list("model" "gm" "gmb" "gds" "ids" "idsat" "vth" "region" "cgs" "cgd" "vds" "vsat" "vgs") ?format "spice" ?maxLineWidth 1000) file = outfile("./transistors.csv" "a") fprintf(file "\n\nRegion 0 is cutoff.\nRegion 1 is linear.\nRegion 2 is saturation .\nRegion 3 is subthreshold.\nRegion 4 is breakdown.\n\nType 0 is nMOS. \nType 1 is pMOS.") close(file)
This script uses the results from the previous Debug Test (from ADE XL Test Editor). Before running the script, run a Debug Test with DC analysis:
After running DC analysis, run the script by entering the following into the Virtuoso Log Window (with file name and location as mentioned above): load("./transistors.ocn")
After running the script, you can open the results file from the terminal using for example: gedit transistors.csv &
The results file can also be imported into LibreOffice Calc (similar to Microsoft Excel) using File->Open, then choose the .csv file and enter the settings as in the following image: