Creating a Schematic with Design Architect and Performing a DC Analysis with Accusim


1. Create a schematic of a simple Wheatstone bridge circuit with Design Architect
 
1.1 You should make a habit of using the Unix directory structure to manage your files (just as you use folders in Windows for the same purpose). You should create a directory under your home for each  class and keep all of your work for that class in that directory. You should also create directories under each class directory for each category of work such as "tutorial, "labs," "design_project'" etc.:
>> mkdir egre150
>> cd egre150
>> mkdir tutorials
>> cd tutorials
>> mkdir lab1
>> cd lab1
Don't forget to go back into this directory before you resume work if you logout and log back in at a later time...

1.2 Start the Design Architect tool (DA) to construct the schematic of the circuit:

>> da &
The ampersand character (&) after the da command puts the job in the background so you can use the terminal window for other things (remember that this terminal window will be the transcript window and so text from the DA session will continue to appear in it).

A new DA window should appear:

Note that when the tutorial refers to a "palette", it means the area to the right that is currently labeled session_palette. Also, when the term "menu item" is used, it refers to the menus at the top of the DA window.

1.3 Create a new component for the design called circuit1. Click on the  button in the session_palette to bring up the Open Sheet dialog box.  Place the cursor at the end of the Component Name item and click the left mouse button (LMB).  Type "/circuit1" without moving the cursor from that box. The result should be an Open Sheet dialog box like the one below:

If you make a mistake typing, use the backspace key, not the delete key to erase the incorrect characters. In the Mentor tools, the delete key will erase all of the highlighted characters, so you must be careful to not press the delete key unintentionally. If this happens, it is easiest to simply click the Cancel button and open the dialog box again.

When creating a new component in the Mentor tools, DO NOT CHANGE THE SHEET NAME FROM THE DEFAULT sheet1. Changing the Sheet name has some undesirable consequences for novice users, so always leave it as sheet1.

When the Open Sheet dialog box looks like the one above, click OK. A new schematic window labeled circuit1 like the one below should appear:

1.4 Use the Libraries->MGC Analog Libraries menu item along the top of the DA window to bring up the MGC Analog Libraries palette. Click on the Generic Parts item in the palette and then on the RESIST item. When you do this, a version of the resistor symbol will appear in the active component window above the palette. A ghost image of the resistor will appear in the schematic window when you move the cursor over it as shown below.

Place the cursor near the left side of the schematic window and click the LMB. This will place the resistor component in the schematic window.

1.5 Place 3 more resistors in the schematic until it looks like the one below:

Note that you may have to use the View->Zoom Out menu item to give you more area to place the components and the View->All menu item to zoom back in to see the same view as above.

1.6 Place the cursor in the schematic window and click and hold the right mouse button (RMB). This will cause a pop-up menu to appear. These pop-up menus are context sensitive in that they change based on which type of component in the schematic is selected (highlighted in white). Move the cursor down over the Unselect item and move the cursor to the right. A cascading menu will appear. Move the cursor over the All item and release the RMB. All of the components in the schematic will be unselected. You can also unselect all components by pressing the F2 key on the top row of the keyboard. The Mentor tools frequently give you multiple ways to perform common actions like this.

1.7 Place a V-SRC component between the resistors, and with it still selected, use the popup menu as above to select the Move->Rotated item.  Replace the V-SRC component and move it again if necessary so that it looks like this:

1.8 Place the cursor over the 5V text in the schematic and hit <Shift> <F7> (the shift and F7 keys together). This will cause a small dialog box like the one below to pop up in the bottom of the DA window;

Change the New Value item to 0V and click OK.

1.9 Place another V-SRC component and a GROUND component on the schematic so it looks like this:

1.8 Place the cursor in the palette area and press the RMB. Select the Display Schematic Palette item and release the RMB. The schematic_add_route palette will appear. Press the  button. A small Add Wire dialog box will appear at the bottom of the DA window and the cursor will change to a cross hair within the schematic window. Place the cursor over the bottom pin of one of the top resistors and click the LMB.  Move the cursor to the top pin of the resistor under it and double click the LMB. The result should be a single wire like this:

1.9 Add the remaining wires in a similar manner so that schematic looks like this:

Note that after starting a wire, you can single click on multiple points to add verticies to the wire and then double click at any point to terminate the wire. Also note that the wires at an angle are so that the schematic looks more like a traditional Wheatstone bridge, but in general it is a good idea to keep all wire segments at 90 degree angles to avoid a cluttered schematic and the resulting "not-dots" (you'll learn what "not-dots" are very quickly if you put wires at odd angles in a complex schematic!)

Click Cancel in the Add Wire dialog box to exit the wiring mode and hit the F2 key to unselect all of the wires.

1.11 Use mechanism described above to change the resistor values to the values shown below:

1.12 Now you will name the nets in the schematic so that they are easier to identify in the simulation. This is not strictly necessary, especially in a small schematic like the one you are building, but it is a good habit that will help debug complex designs. Place the cursor right on top if the place where the three wires come together at the top of the circuit and click the LMB. This should result in only the crossing point (the vertex as its called) being selected. Use the RMB to bring up the pop-up menu and select the Name Nets: item. Place the cursor in the Property Value item in the dialog box that comes up and type "net1" and hit Return. Move cursor into the schematic window and you will see a ghost image of the "net1" name following it. Place the cursor above the selected vertex and click the LMB to place the name.

Use the same mechanism to assign the name "net2" to the wire between the two 10K ohm resistors and "net3" to the wire between the 5K and 2.7K ohm resistors. Note that the one remaining net does not really need a name because it is connected to the ground component and will be called GND in the simulation. Your schematic should look something like this one:

1.13 Use the Check->Sheet menu item to check the sheet. The Check window that come up should say "circuit1/schematic/sheet1" passed check : 0 Errors, 0 Warnings at the bottom. Close the Check window.

1.14 Use the File->Save Sheet menu item to save the schematic sheet and then close the schematic window and close DA.
 

2. Create a simulation viewpoint using Design Viewpoint Editor
 
When you create a schematic using Design Architect, DA has no idea what you are going to use the schematic for, digital simulation, analog simulation, VLSI layout, etc. Before the schematic can be used for a specific purpose, a design viewpoint must be created for it. A viewpoint tells the down-stream tool (the tool that uses the schematic after it is created with DA) what information on the schematic is to be used and what properties on the instances contain the information. Some tools like the digital simulator Quicksim II, create the design viewpoint automatically if it does not exist, but Accusim does not, so we will create it explicitly using the Design Viewpoint Editor (DVE)

2.1 Open DVE on your circuit1 design:

>> dve circuit1 &
2.2 Use the Setup->Accusim menu item to setup the viewpoint for Accusim.

2.3 Use the File->Save Design Viewpoint menu item to save the viewpoint and exit DVE. Note that you will not have to redo the viewpoint if you change the schematic using DA.
 

3. Simulate your schematic using Accusim
 
3.1 Start the Accusim simulator on your circuit1 design:
>> accusim circuit1 &
You will see and Accusim window like the one below:


 

3.2 Click on the  button to bring up the Setup Analysis dialog box. Make sure that the DCOP (DC Operating Point) button is selected in the Analysis item and click OK.

3.3 Use the Setup->Keeps->Keeps... menu item to bring up the Add Keeps dialog box. Adding keeps tells the simulator what items it should retain data for during the simulation. If you don't "keep" an item, you can't plot it after simulation, but for large designs, "keeping" all items can result in large simulation databases that waste disk space. For this design, keep the defaults in the Add Keeps dialog box and click OK.

3.4 Click the  button in the DC Mode palette to run the simulation. The simulation should only take a few seconds to run.
 

4. Display the results of the simulation on your schematic
4.1 Make the schematic window larger and use the View->All menu item to view the entire schematic in the larger window. Select the net2net and use the RMB in the schematic window to open the pop-up menu. Use the Add->Flag Monitors->Selected to add a flag monitor to the schematic. This flag monitor will show the voltage of the node. Add another flag monitor to show the voltage on the net3 node.

4.2 Select each flag monitor and use the Edit->Move item in the pop-up menu to move it above the node it refers to. Use the Unselect item from the pop-up menu or F2 to unselect each flag monitor after you have moved it.

4.3 To measure the current flowing into a component, you select the "input pin"  (the pin into which you are interesting in measuring the current) of the component and add a flag monitor.  Add a flag monitor to measure the flowing across the bridge by selecting the left pin on the 0V voltage source and using the Add->Flag Monitors->Selected menu item. The result should be a schematic window like the one below:

4.4 Make sure that the schematic window is the active window and use the File->Print->Active Window... menu item to print the schematic window. Click Print/Plot and OK in the dialog box that comes up. Enter a printer name of mgcprint in the small dialog box that comes up next and click OK.

5. Plot the current across the bridge as a function of the value of one of the resistors
Often, you will want to plot a voltage or current (or more complex function like power) in the circuit and see how it varies as a parameter in the simulation is varied. In this circuit, we will assume that the 2.7K ohm resistor is the unknown resistance and we will plot the current into the 0V voltage source vs. the unknown resistance itself. The goal is to find the value of unknown resistance where the bridge current is zero (what value would that be based the remainder of the circuit?).

5.1 Before starting this process, make the schematic window small again and use the View->All menu item to see all of the schematic in the smaller window - you will see why in a moment.

5.1 Use the Setup->Results->Define Waveform menu item to bring up the Define Waveforms dialog box. Enter bridge_current in the Name item. Click the  button in the dialog box and scroll down to the I item and click it. You will see a get_nearest_net dialog box and the cursor will change to a vertical and horizontal red line. Move the cursor over the left pin of the 0V voltage source in the schematic window (if its under the dialog box, you have to close the dialog box, make the schematic window smaller, and start again). This should result in i(V_I$5/POS) being added to the expression item. Click Define in the dialog box and the result should look like the one below:

Click Close in the Define Waveforms dialog box.

5.2 Use the Setup->Analysis menu item to bring up the Setup Analysis dialog box again and make sure that the DCOP analysis button is selected and click OK.

5.3 Use the Setup->Keeps->Keeps... menu item again to bring up the Add Keeps dialog box again and click OK.

5.4 In the schematic window, click on the 2.7K ohm resistor so it is highlighted and use the Run->Sweep Runs->Property on Instance menu item to bring up the Sweep Property/Variable dialog box. Notice that the Instance Name item is already filled in with the instance name of the 3 ohm resistor. Click on the Select Property... button and select the instpar = 2.7K property item in the Select Property/Variable dialog box that pops up and click OK. Set the From: item to 2K, the To: item to 8K, and the Step: item to 0.5K. The result should look like this:

Click OK in the dialog box to close it.  The simulator will now start its series of runs for each value and it will take a minute or so to complete.

5.5 Use the Report->Waveforms menu item to bring up the Report Waveforms dialog box. Click on the top-most ../../results item (probably "/col/run/results (Default)")  and click OK. Scroll to the bottom of the results window that comes up and click on the W(BRIDGE_CURRENT) item to highlight it.

5.6 Use the Results->Chart->Family of Curves menu item to bring up the Chart Signal from Collection dialog box. Notice that the Signal item is already filled out with the LOAD_POWER waveform we defined earlier. Click on the Choose Collection... button and make sure that the sweep (DCOP) collection is selected in the dialog box that pops up and click OK. Leave the Reference item blank in the Chart Signal from Collection dialog box and click OK in it. The result should be a new chart window like the one below:

5.7 Place the cursor in the chart window and click the RMB to bring up the pop-up menu. Select the Chart->Add Cursor item. In the dialog box that comes up, enter a Cursor Name of test and a location of 3000 and click OK. Click the LMB over the cursor newly added to select it. You can move the cursor by clicking the LMB on the small box in the middle of the cursor and holding down the LMB as you move the mouse. Notice that the box at the top that tracks the measured power (incorrectly labeled Voltage on the Y axis) changes as you move the cursor. Find the spot where the current is as close to zero as you can get and read the corresponding value on the X axis. Is it close to what you'd expect? Remember that you only stepped the values at intervals of 0.5, so the graph is interpolated.

5.8 Move the test cursor out of the way and add a new cursor called zero at point 5000. What is the bridge current at this point?

5.9 Print the chart window(s) if you'd like using the method described above and use the MGC->Exit menu item to exit Accusim. Click on Without saving and OK in the Exit Simview dialog box.