ESim/C3/Editing-a-Subcircuit/English-timed
From Script | Spoken-Tutorial
Time | Narration |
00:01 | Welcome to the spoken tutorial on Editing a Subcircuit in eSim. |
00:08 | In this tutorial, using eSim we will learn to-
To edit a Subcircuit. To modify the component schematic. |
00:19 | To record this tutorial, we will use-
Ubuntu Linux OS version 16.04 eSim version 2.0 |
00:32 | To practice this tutorial, you should know
To create and simulate a circuit and a subcircuit in eSim. |
00:41 | If not, watch the prerequisite eSim tutorials on this website. |
00:47 | To launch eSim, you need to double-click on the eSim icon on your Desktop. |
00:53 | I have already opened eSim. |
00:57 | On the eSim window, click on the Subcircuit button from the left toolbar. |
01:04 | A subcircuit tab will open up. |
01:08 | In the previous tutorial, we have seen to create a Subcircuit. |
01:14 | Let us now edit a Subcircuit of a Half adder. |
01:19 | In the subcircuit tab, click on the Edit Subcircuit Schematic button. |
01:25 | The Subcircuit library opens up. |
01:29 | Select the Half underscore adder and click on the Open button. |
01:37 | The schematic of Half adder subcircuit opens in eeschema. |
01:43 | Press F1 key to zoom in the schematic. |
01:48 | Let us connect an additional Inverter gate to the output of the AND gate. |
01:54 | On eeschema, click on the Place Component tool from the right toolbar. |
02:01 | Click on the editor. In the Filter field, type eSim underscore Digital. |
02:09 | Select d underscore Inverter and click on the OK button. Place it below the PORT D. |
02:17 | The inverter is tied to the cursor. Place it below the PORT D. |
02:25 | Connect a wire from Pin 3 of the AND gate to Pin 1 of the Inverter gate. |
02:33 | A junction will be placed. |
02:36 | Now, we will connect a Port to the Inverter output. |
02:41 | Click on the Place Component tool from the right toolbar. Click on the editor. |
02:49 | In the Filter field, type eSim underscore Miscellaneous. Select Port from the list. |
02:59 | Click on the drop-down arrow. Select Unit E and click on the OK button. |
03:08 | Place the Port E near the output pin of the Inverter. |
03:13 | Place the cursor on the Port Unit E and press the R key to rotate. |
03:20 | In the Clarify selection window, select component Port U and press the R key. |
03:27 | Connect the output pin of the Inverter to Port Unit E. |
03:33 | The Port Unit E will be pin 5 of the component schematic. |
03:39 | Now we will annotate the schematic. |
03:43 | Click on the Annotate schematic components icon from the top toolbar. |
03:49 | Keep the default settings. Click on the Annotate button. Click on the OK button. |
03:57 | Press Ctrl+S keys together to save the schematic. |
04:02 | To generate a netlist, click on Generate Netlist. |
04:07 | Select the Spice tab and check the Default Format. |
04:14 | Click on the Generate button. Then click on the Save button. |
04:22 | This creates the KiCad netlist of the Half adder subcircuit. |
04:28 | Let us go back to the eSim window. |
04:32 | In the Subcircuit tab, click on the Convert Kicad to Ngspice button. |
04:39 | You can specify the transient analysis parameters or leave them blank. |
04:45 | I am leaving these values blank. Skip the Ngspice Model and Device Modeling tabs. |
04:54 | If any device modeling or subcircuit is used, please specify here. |
05:00 | Press the Convert button in the Kicad to Ngspice tab. |
05:05 | Click on the OK button in the Information dialog box. |
05:10 | This creates the Ngspice netlist of the subcircuit. |
05:15 | An additional port is added to the Half adder subcircuit. |
05:20 | Hence, the component schematic has to be modified to include pin 5. |
05:26 | Go back to the Half Adder schematic. |
05:30 | On the schematic editor, click on the Library Editor icon from the top toolbar. |
05:37 | It directs us to the Part Library Editor window. |
05:42 | Click on the File option from the top menu, and click on the Current Library option. |
05:51 | Scroll down and choose eSim underscore Subckt. Click on the OK button. |
06:00 | You can see the path of the selected library is displayed on top of the Part Library window. |
06:08 | Click on the Load component to edit from the current library icon in the top toolbar. |
06:16 | Click on the Half underscore adder and click on the OK button. |
06:24 | Place the cursor on Pin 4, Cout. |
06:28 | Press M key to move the pin and place it just below pin 3. |
06:34 | Click on Add pins to component tool from the right toolbar. |
06:40 | Click on the editor. Pin Properties window will appear. Enter Pin name as Out. |
06:50 | If you wish, you can give any other Pin name of your choice. |
06:55 | Pin Number should match with the Port Unit name. |
06:59 | Port E represents Pin 5 of the subcircuit. Enter Pin Number as 5. |
07:08 | Enter Orientation as left as it is an output pin. Enter Electrical Type as Output. |
07:18 | Keep Graphic Style as Line. |
07:22 | You can choose Orientation and Electrical Type based on the requirement of the subcircuit. Click on the OK button. |
07:33 | The pin is attached to the cursor. Place it below Pin 4 with a single click. |
07:40 | Now, let us save the schematic symbol. Press Ctrl+S keys together to save the schematic. |
07:49 | In the Confirmation box click on the Yes button. |
07:54 | In the second Confirmation box, click on the Yes button |
07:59 | You can save the component using the Save Current Library to Disc icon from the top toolbar. |
08:07 | You can select the current library using the Select Working Library option. |
08:14 | You can delete the component using the Delete option. |
08:19 | You can also use Update current component in current library option from the top toolbar. |
08:27 | This will save the modified component to the current library. |
08:32 | There is an option Create a new component from the current one in the top toolbar. |
08:39 | This imports the schematic of the components and can be used to create a new one. |
08:45 | Let us now close the Part Library Editor window. |
08:50 | Now, let us simulate a circuit with the newly added subcircuit and its component. |
08:57 | Let us open the Half underscore Adder from the Example folder of eSim. |
09:03 | On the eSim window, click on the Open Project button from the top menu. |
09:09 | Locate the directory where eSim is installed and click on the Example folder. Select Half underscore Adder and then click on Open. |
09:24 | The Half underscore Adder is added to the eSim window under Projects. |
09:30 | To open the schematic, select Half Adder from Projects. |
09:35 | Click on the Open Schematic button from the left toolbar. |
09:40 | It directs us to the schematic editor. Zoom in the schematic by pressing F1 key. |
09:49 | Let us replace the Half Adder subcircuit with the modified Half Adder component. |
09:55 | Click on the Place Component tool from the left toolbar. Click on the editor. |
10:03 | In the Filter field, type eSim underscore Subckt. |
10:08 | Scroll down and select the Half underscore adder. Click on the OK button. |
10:16 | Place and connect it as shown here. |
10:20 | Similarly connect DAC, plot V1 and global label out as shown here. |
10:27 | Now annotate the schematic using Annotate Schematic Components from the top toolbar. |
10:34 | Generate the Spice netlist. Refer to previous tutorials to learn annotation and generating netlist of the schematic. |
10:44 | Save the schematic by pressing Ctrl+S keys together. |
10:49 | Let us go back to the eSim window. |
10:53 | Click on Convert Kicad to Ngspice from the left toolbar |
10:59 | Let us not change the Transient Analysis parameters. |
11:04 | Click on the Source details tab. Enter 5V for DC source, V1 and V2. |
11:13 | Skip the Ngspice Model and Device Modeling tab. |
11:17 | In the Subcircuit tab, click on the ADD button. |
11:22 | Click on Half underscore Adder and then click on the Open button. |
11:29 | In the KiCad to Ngspice tab, press the Convert button. Click the OK button in the Information box. |
11:40 | Now to generate plots, click on the Simulation button from the left toolbar. |
11:47 | An Ngspice terminal and plot windows open along with a python plot window. |
11:53 | Since both the inputs are 5 volts, the sum is 0, carry will be 5 volts and the Output will be 0 volts. |
12:04 | Close the Ngspice plots and terminal windows. |
12:08 | In the Python plot, check the Sum node,cout node and the Out node. |
12:15 | Click on the Plot button. You can see the plots for sum, cout and Out nodes. |
12:24 | Close the Python plot window. |
12:27 | Let us now summarise. In this tutorial, we learnt-
To edit a Subcircuit and To modify the component schematic. |
12:40 | Do you have questions in this Spoken Tutorial? Please visit this site. |
12:46 | For any general or technical questions on eSim, visit the FOSSEE forum and post your question. |
12:54 | The FOSSEE team coordinates the Circuit Simulation project. |
12:59 | We give Certificates and Honorarium to the contributors. For more details, please visit this site. |
13:09 | The FOSSEE team coordinates the Lab Migration project. For more details, please visit this site. |
13:18 | Spoken Tutorial Project is funded by NMEICT, MHRD, Govt. of India. For more details, visit this site. |
13:26 | This is Gloria N from IIT Bombay signing off. Thank you |