I want to know how to write a ocean script that can create a file to display all MOS' region,but I don't know the function.
How to know that where are All MOS in ??
If you mean that you need to determine a region which each MOS in after some simulation, I'm affraid there is no one function to do this and you'll have to read skill docs to obtain a methodology.
If you are talking about values of the CDF description of each MOS (some CDF descriptions have the "reagion" parameter) I think "dbGet" function coul help you.
In reply to VKhlyupin:
If you're using OCEAN, and you've run a DC operating point simulation, then you can use the report() function to do this.
analysis('dc ?saveOppoint t)run()selectResult('dcOpInfo)report(?param "region")
You'll get the region of each device returned as a number. If you look at "spectre -h modelType" - e.g. "spectre -h bsim4" you get:
1 region=triode Estimated operating region. Spectre outputs the number (0-4) in a rawfile. Possible values are off, triode, sat, subth, and breakdown.
and for "spectre -h bjt" you get:
3 region=fwd Estimated operating region. Spectre outputs number (0-4) in a rawfile. Possible values are off, fwd, rev, sat, and breakdown.
So the numbers correspond to the various regions. So for a MOS, 2 means it is in the saturation region.
The previous reply talking about CDF parameters is not relevant - that was (presumably) talking about the instance parameter region - which is merely a hint to the simulator as to which region the device is in, to help with DC convergence (an option that is rarely set, because it's not that practical to set it on each transistor, and anyway it's not the final region - just a clue to the simulator to tell it (say) that the device is off and hence to expect it to be off when trying to reach DC convergence).
In reply to Andrew Beckett:
Thank you,the results are displayed in terminal using your function .But I want to save the results into a text file,can you give me some suggestions?
Can i use such a way to write the results into a text file?
Thank you very much!
In reply to MOSMOS:
ocean> ocnHelp 'report PROTOTYPE report([?output t_filename | p_port] [?type t_type] [?name t_name] [?param t_param] [?format s_reportStyle] [?maxLineWidth charsPerLine]) => t/nil...
So you can do report(?output "./region.txt" ?param "region") or report(?output p ?param "region")
Is there a way to loop through all the transistors and print their operating points using OCEAN or any other tool? I don't want to type the name of the transistors manually.
In reply to Venkatraman Natarajan:
The OCEAN report() function can do that. See the documentation or just type ocnHelp('report) for more details.
Thanks! It works. Is it possible to do mathematical operations like vgs-vth for all transistors and report it?
If it's possible to do that for specific transistors (for example, transistors that end with "_sat"), it would be great.
Can you please reply to my previous message in case you missed it. I really appreciate your help.