Professional Documents
Culture Documents
Physics Problems
Either way, there's something you're looking for in ocean.While not perfect, the tool provides a
much-needed console-based interface into Spectrefor those of us who need text to simulate
circuits, and a scripting interface into the simulator for those who need to run more complicated
simulations.
In this tutorial, I'll try to address both constituencies. The tutorial will be organized into several
lessons, broadly divided into two groups. The first few lessons will discuss how to start the
console-based oceaninterface into Spectreand carry out some basic analyses. In these lessons I
have in mind the reader fitting the profile of the first paragraph above--the one who, like me, wants
to run Spectrefrom a text console just like Spice. In the following lessons I'll cover more
advanced scripting techniques, which will be more of interest to the designer profiled in the second
paragraph above. But designers in this camp might also profit from following through the first few
lessons as well, just to get a sense of what console-based circuit simulation is really like.
A Preliminary Word: Using hofe
The oceanprogram provided in the Analog Artist suite is really more like a back-
end than a front-end processor. It goes as far as presenting a prompt on the console
and allowing the user to type in commands--but no farther. In particular, it has no
command-line editing, no facility for paging its text output in a sensible way, and no
error-checking to catch typos that can hang the internal command parser.
For that reason, I recommend that students of this tutorial first download my hofe
program, which is a wrapper utility for the oceaninterface that provides a slightly
higher level of user-friendliness than oceanitself. Specifically, hofeprovides
command-line editing and history, a paging feature to prevent the simulator's output
from scrolling off the top of the screen, a syntax-checking mechanism to prevent you
from accidentally entering commands that could hang the oceanparser, some
command aliases to shortcut long commands, and more. Getting set up with hofe
now will undoubtedly save you many headaches as you proceed through this tutorial.
Having said that, none of what I cover in this tutorial requires the use of hofe. Every
command in this tutorial works just as well at the oceanconsole as at the hofe
console, although from time to time I will include boxes like this with hints specially
intended for hofeusers.
So let's suppose we've just finished editing our test bench schematic in Cadence Composer, and now we want to netlist it and read it into ocean. To do this, we
first open the Analog Artist window. (In my version this is done by choosing "Analog Environment" from the "Tools" menu at the top of the schematic editor
window.) Open the "Setup" menu from the tool bar at the top of the Analog Artist window and choose "Simulator/Directory/Host." In the "Project Directory" text
box, enter the directory from which you intend to invoke ocean. Personally, I like to create a new directory called spectrefor this purpose--for example, in this
case, the full path to my target directory is /home/homer/circuits/emerald/spectre.So in my case the screen would look like this:
Choose "OK" to confirm the new project directory. Then, back in the Analog Artist window, open the "Simulation" menu from the tool bar and choose "Netlist--
>Create." If your circuit contains no errors, a window containing the text of the netlist will pop up; you can close this window, unless you want to read through the
netlist.
Note: The above procedure for setting the netlist directory can be obviated by including the line
asimenv.startup projectDir string "./spectre"
in the .cdsenvfile in your home directory. With this line, the netlist directory hierarchy will be written to the spectre
subdirectory of the directory from which you started icfb.(You can, of course, replace "./spectre"in the above
line with any other directory you like).
After this step, the directory you specified as the Project Directory should have a new subdirectory called tfdopamp(or whatever your circuit was named).
Looking into this subdirectory reveals an extensive hierarchy of files and further subdirectories. The actual netlist that describes your circuit is written to a file called
netlistin subdirectory spectre/schematic/netlist.So, for example, in my case the full path to the file would be
/home/homer/circuits/emerald/spectre/tfdopamp/spectre/schematic/netlist/netlist
If you have successfully created this file, let's proceed on to Lesson One!