When hspice runs and the spice file contains a line which reads .options post it creates special output file(s) which can be read by a post-processing program called CosmosScope (CScope). The names of these files will contain the input-file name with the .cir or .ckt extension replaced by a different extension based on the simulation type.
For example, the command we ran earlier for the example circuit was:
hspice lowpass.cir >! lowpass.out
A ls of the current directory shows:
2:10pm dizzy : ls amp* lowpass.ac0 lowpass.tr0 lowpass.cir lowpass.out lowpass.st0
Hspice created the lowpass.tr0 and the lowpass.ac0 file because we put a .options post line in our spice file. The lowpass.tr0 is an CosmosScope readable file containing all the simulation data from our transient analysis. Similarly, the lowpass.ac0 file contains information about the AC-analysis.
To view the contents of these files, we run cscope on these files. To start the CosmosScope program, simply type cscope& at the prompt. If this command appears to have been ignored, you must add a line cscope in your .software file.
When CosmosScope opens, you will see one blank graph, and the program will wait for user input. Go to File > Open > Plotfiles… and browse to the directory where you ran hspice. As an example, select the frequency sweep analysis (the .ac0 file). Two new windows will appear, the Signal Manager window and a Node Selection window. Double click one of the nodes in order to see the Phase and Amplitude graphed against the frequency, for that node.
Double clicking more nodes will append them to the bottom of the current graph window. If the graph gets too messy, go to Graph > Clear Graph.
We can use the graph window to change the x-axis of the graph windowto a logarithmic scale rather than a linear scale (which is the typical scale used when viewing a frequency response). To do this, double click on the x-axis label on the graph you want to change. When the next window appears, click on the logarithmic radio button next to the label “Scale” and then click OK. The graph should now change from a linear graph to a logarithmic graph like the one shown below:
As the file name indicated, we can see that this circuit does indeed display the properties of a low pass filter. It is important to note that by double clicking an axis many options can be modified, not just the scale. Further options can be found by right clicking on the graph.
We are now finished learning about the basic capabilities of Hspice and CosmosScope.
Click here to return to the hspice overview page.