B2 Spice A/D Tutorial Author: B. Mealy revised: July 27, 2006 The B 2 Spice A/D software allows for the simulation of digital, analog, and hybrid circuits. CPE 169, however, is only concerned with the simulation of digital circuits. This tutorial is designed to provide an introduction to B 2 Spice A/D which will in-turn order to view several characteristics associated with actual circuits. This tutorial describes only a small portion the B 2 Spice A/D capabilities. Students and instructors alike are encouraged to explore further possibilities of the software beyond what is required in this experiment. Circuit simulation is a valuable design and test tool. Simulating circuits before they are implemented can save development time by flushing out errors in the circuit. Simulation can also be used to test portions of circuits that are not directly testable by any other means. The validity of the simulation process is dependent upon the how well the simulation matches the output of a circuit if the circuit was actually implemented. If the models used in the simulation process accurately represent the actual device characteristics, the simulation output will match the actual output. In other words, the validity of the simulation is based upon the quality of the models used. The B 2 Spice A/D simulator allows you to change model parameters to more accurately represent the devices used in your circuit. The following tutorial shows you how to alter the default values associated several standard digital devices. 1. Launch the B 2 Spice A/D program. The associated icon should appear on the Windows Desktop. If the B 2 icon is not present, the launch the program from the Start menu. The resulting display should appear similar to the window shown in Figure 1. Figure 1: Window appearing after launching B2 Spice A/D.
2. Capture a Circuit: Use B 2 Spice A/D to capture the circuit shown in Figure 2. A step-by step description of the procedure used to capture the circuit of Figure 2 is provided below. Figure 2: Pulse narrowing circuit used in this tutorial. (1) From the File menu, select Switch to Digital Mode. (2) From the Digital Devices menu, select an inverter and place on the workspace. (3) From the Digital Devices menu, select an AND gate and place on the workspace. (4) From the Digital Devices menu, select an Output Port gate and place on the workspace. (5) Hit the space bar to select another Output Port and place on the workspace. (6) From the Digital Devices menu, select an Input Port gate and place on the workspace. NOTE: The circuit shown in the Figure 2 only has one output. Placing a second Output Port in the design is used to view the inverter output in the subsequent timing diagram. (7) Use the selection tool or the wire tool to connect the various circuit elements. Your final circuit should appear as shown in Figure 3. (8) Verify that the circuit is wired properly by selecting the Check for Wiring Errors option under the Digital Simulation menu. Correct any errors that are detected. WARNING: If your circuit appears to be correct but the simulator tells you there are wiring errors that you can t seem to find or get rid of, close the simulator and re-launch. This should make these errors go away. Figure 3: Window shot after capturing the schematic of Figure 2.
3. Change the circuit element names: Place the cursor over element names ln1, Out1, and Out2. Double-click the left mouse button and change the circuit element names to A, Z, and Inv_out, respectively. Your circuit should now look similar to the circuit shown in Figure 4. Figure 4: Window shot after changing input and output port names. 4. View the Trace Window: Select the Show Timing Diagram option under the View pull-down menu. This bring ups a window similar to what is shown in Figure 5. The window you ll see mostly likely has a different color scheme than the one in shown Figure 5. Feel free to change the colors if you so desire. Figure 5: The trace window used in simulating the circuit.
5. Simulating the Circuit: Use the Step button ( ) to start the circuit simulation. Use the Selection Tool ( ) to change the input stimulus on the Input Port device. The trace window should look similar to the window shown in Figure 6. Tweak the input stimulus and then take a few Steps. Figure 6: Example simulation output. 5. Change the default propagation delay times: The models of the devices you used in your circuit have many properties associated with them. You can change these properties to more accurately represent the circuit you are testing. Listed below is a procedure that shows how to change the default propagation delay times. The prop delay times are one of many characteristics associated with the individual device models. (1) Right-click on the inverter. (2) Select Edit Part Properties Edit Model Edit Pin Properties. (3) Select the output pin from the dialog window on the left. This brings the Tphl and Tplh times to the windows on the right. (4) Select the Custom radio button. (5) Change the Tplh time to 4ns and the Tphl time to 5ns. (6) Select the Accept button. (7) Select OK, OK, OK to remove the three dialog boxes from the screen. 6. Change the Simulation Step Size: Often times, finer resolution in the output timing diagram is required to enable you to discern certain aspects of your circuit simulation output. Changing the simulation step size allows you to control certain aspects of your simulation output. (1) Under the Digital Simulation menu, select the Digital Simulation Options and enter a Step Size of 10ns. Make sure the schematic window is highlighted when implementing this step. 7. Re-simulate the Circuit: The circuit is now ready to be simulated using the new simulation parameters. (1)Under the Digital Simulation menu, select Reset Simulation.
(2)Perform another simulation on the circuit using the directions in Step 5. The trace window should appear similar to the window shown in Figure 7. Figure 7: Trace window after step interval change and re-simulated.