Transistor operating point printer: Difference between revisions

From ift
(Added a script and description to get the file out from mikroserver and convert it to useable data)
m (Remember to check the box with "Save DC Operating Point" !)
Line 19: Line 19:
  close(file)
  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:
This script uses the results from the previous Debug Test (from ADE XL Test Editor). Before running the script, run a test with DC analysis, and remember to check the box with "Save DC Operating Point" :


[[File:Run_debug_simulation.png | 500px]]
[[File:Run_debug_simulation.png | 500px]]

Revision as of 12:48, 1 November 2017

DC operating parameters from simulation

This script can be used to print the operating point parameters of all transistors in your design.

Get the DC operating points from a previous simulation

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 test with DC analysis, and remember to check the box with "Save DC Operating Point" :

Run debug simulation.png


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")

Run transistors script.png

Copy the file to your computer and convert the values

After running the script, you can open the results file from the terminal using for example: gedit transistors.csv & or alternatively to get the file out from mikroserver to another computer try this:


Create a file named "Makefile" and put this into it:

all: get fix clean 

get :
       scp fli091@mikroserver3.ift.uib.no:~/tsmc/transistors.csv ~/transistors_raw.csv        

fix :
       sed -e 's/\([0-9]\+\)m/\1E-3/g' -e 's/\([0-9]\+\)u/\1E-6/g' -e 's/\([0-9]\+\)n/\1E-9/g' -e 's/\([0-9]\+\)p/\1E-12/g' -e 's/\([0-9]\+\)f/\1E-15/g' -e 's/\([0-9]\+\)a/\1E-18/g' -e 's/\([0-9]\+\)z/\1E-21/g' -e 's/\([0-9]\+\)y/\1E-24/g' -e 's/\([0-9]\+\)K/\1E+3/g' -e 's/\([0-9]\+\)M/\1E+6/g' -e 's/\([0-9]\+\)G/\1E+9/g' -e 's/\([0-9]\+\)T/\1E+12/g' transistors_raw.csv > transistors.csv

clean: 
       rm transistors_raw.csv

Modify the scp-command to use

  • The username(and not fli091) in the scp-command
  • change mikroserver if you are not using mikroserver3.
  • change the folder on mikroserver where the transistors.csv is created, default is /home/$user/tsmc/
  • change the local folder where you want your copy to be placed, default is /home/$user/


A short explanation of the Makefile

  • The get-target gets the file from mikroserver3 and copies it to your computer in the root of your homefolder
  • The fix-target converts transitors.csv to a copy where all the postfixes for the SI units generated from Virtuoso (m, f, K etc), has been replaced with E-3, E-15, E+3 etc, so the values are useable in LibreOffice
  • The clean-target just removes the not-fixed copy

Now you can type make in the folder you created the Makefile and the latestst simulation data will appear in your homefolder.


Open the file in Libre Office

The resulting transistors.csv can then 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:

Csv import libreoffice.png


Troubleshooting

For the scp-command to work without password you have to set up your connection as described in MikroserverSetup