<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="https://script.spoken-tutorial.org/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://script.spoken-tutorial.org/index.php?action=history&amp;feed=atom&amp;title=ESim%2FC3%2FUploading-a-spice-Subcircuit-file%2FEnglish-timed</id>
		<title>ESim/C3/Uploading-a-spice-Subcircuit-file/English-timed - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://script.spoken-tutorial.org/index.php?action=history&amp;feed=atom&amp;title=ESim%2FC3%2FUploading-a-spice-Subcircuit-file%2FEnglish-timed"/>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=ESim/C3/Uploading-a-spice-Subcircuit-file/English-timed&amp;action=history"/>
		<updated>2026-04-09T13:14:48Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.23.17</generator>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php?title=ESim/C3/Uploading-a-spice-Subcircuit-file/English-timed&amp;diff=55300&amp;oldid=prev</id>
		<title>Pratik kamble: Created page with &quot;{| border=&quot;1&quot; |- | '''Time''' | '''Narration'''  |- |00:01 |Welcome to the spoken tutorial on '''Uploading a spice Subcircuit file''' in '''eSim'''.  |-		 |00:08 |In this tuto...&quot;</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=ESim/C3/Uploading-a-spice-Subcircuit-file/English-timed&amp;diff=55300&amp;oldid=prev"/>
				<updated>2021-06-28T10:30:52Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;{| border=&amp;quot;1&amp;quot; |- | &amp;#039;&amp;#039;&amp;#039;Time&amp;#039;&amp;#039;&amp;#039; | &amp;#039;&amp;#039;&amp;#039;Narration&amp;#039;&amp;#039;&amp;#039;  |- |00:01 |Welcome to the spoken tutorial on &amp;#039;&amp;#039;&amp;#039;Uploading a spice Subcircuit file&amp;#039;&amp;#039;&amp;#039; in &amp;#039;&amp;#039;&amp;#039;eSim&amp;#039;&amp;#039;&amp;#039;.  |-		 |00:08 |In this tuto...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| '''Time'''&lt;br /&gt;
| '''Narration'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00:01&lt;br /&gt;
|Welcome to the spoken tutorial on '''Uploading a spice Subcircuit file''' in '''eSim'''.&lt;br /&gt;
&lt;br /&gt;
|-		&lt;br /&gt;
|00:08&lt;br /&gt;
|In this tutorial, using '''eSim''' we will learn to upload an external '''spice subcircuit''' file in '''eSim'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00:17	&lt;br /&gt;
|To record this tutorial, we will use-&lt;br /&gt;
&lt;br /&gt;
'''Ubuntu Linux OS''' version 16.04  &lt;br /&gt;
&lt;br /&gt;
'''eSim''' version 2.0&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00:29&lt;br /&gt;
|To practice this tutorial, you should know how to create and '''simulate''' a '''circuit''' and '''subcircuit''' in '''eSim'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00:38&lt;br /&gt;
|If not, watch the prerequisite '''eSim''' tutorials on this website.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00:44&lt;br /&gt;
|The '''subcircuit''' file always begins with the '''dot subckt''' statement.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00:50&lt;br /&gt;
|'''Subname''' is the '''subcircuit component''' name.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00:55&lt;br /&gt;
|'''N1, N2'''  are the nodes. The '''subcircuit''' ends with '''dot Ends''' followed by the '''subcircuit''' name.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:05&lt;br /&gt;
|This option is available in the '''eSim 2 point 0''' and later versions.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:12&lt;br /&gt;
|The '''subcircuit''' file is added to the '''eSim subcircuit library'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:18&lt;br /&gt;
|You can also refer to the '''subcircuit''' files available in the '''Ngspice''' manual.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:25&lt;br /&gt;
|To launch '''eSim''', you need to double-click on the '''eSim''' icon on your '''Desktop'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:31&lt;br /&gt;
|I have already opened '''eSim'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:35&lt;br /&gt;
|On the '''eSim''' main window, click on the '''Subcircuit''' button from the left toolbar.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:41&lt;br /&gt;
|In the previous tutorial, we have seen how to create a new''' subcircuit''' and edit an existing '''subcircuit'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:51&lt;br /&gt;
|Pause the video here. Download '''Fulladder_using_Nand''' text file from the '''Code file''' section available on this page.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|02:01&lt;br /&gt;
|Save it on '''Desktop''' with a  '''dot sub''' extension.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|02:06&lt;br /&gt;
|Now, on the '''Subcircuit''' tab, click on '''Upload a Subcircuit''' option. I have saved this file on my '''Desktop'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|02:16&lt;br /&gt;
|Double-click on the '''Desktop''' folder.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|02:19&lt;br /&gt;
|Click on '''Full_adder_using_Nand dot sub''' and then click on the '''Open''' button.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|02:27&lt;br /&gt;
|The '''subcircuit''' uploaded using '''Upload''' option loads only '''dot sub''' file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|02:34&lt;br /&gt;
|As you can see here, only '''dot sub''' files will be available.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|02:39&lt;br /&gt;
|No '''sch''' or '''cir''' files will be present in this folder.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|02:45&lt;br /&gt;
|Let us simulate the '''Full Adder''' example with the newly added '''subcircuit library'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|02:52&lt;br /&gt;
|Open the '''FullAdder''' example from the '''Examples''' folder of '''eSim''' installer.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|02:59&lt;br /&gt;
|Click on the '''Open Project''' option from the top menu.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:04&lt;br /&gt;
|Locate the directory where the '''eSim''' is installed and double-click on the '''Examples''' folder.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:13&lt;br /&gt;
|Now select the '''FullAdder''' example and click on the '''Open''' button.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:20&lt;br /&gt;
|On the '''eSim''' window, select '''FullAdder''' under '''Projects'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:25&lt;br /&gt;
|Then click on '''Convert Kicad to Ngspice''' button from the left toolbar.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:31&lt;br /&gt;
|Let the '''transient analysis parameters''' and '''Source details''' be the same. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:37&lt;br /&gt;
|We will not change it. Skip the '''Ngspice Model''' and '''Device Modeling''' tab.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:44&lt;br /&gt;
|Under the '''Subcircuits''' tab, click the '''ADD''' button.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:49&lt;br /&gt;
|Click on '''FA using NAND''' dot '''sub''' file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:54&lt;br /&gt;
|Now click on the '''Open''' button. On the  '''Kicad to Ngspice''' tab, click on the '''Convert''' button.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:04&lt;br /&gt;
|On the '''eSim''' window, click on the '''Simulation''' button from the left toolbar.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:10&lt;br /&gt;
|An '''Ngspice terminal''' and '''plot''' windows open along with a '''Python plot''' window.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:17&lt;br /&gt;
|We have given the '''inputs''' as '''5, 5''' and '''0'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:25&lt;br /&gt;
|Hence, the '''output''' for '''Sum''' is '''0''' volts and '''Carry''' is '''5''' volts. Close the '''Ngspice terminal''' and '''plot''' windows.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:36&lt;br /&gt;
|In the '''Python plot''' window, check the '''Sum''' node and '''Cout''' node.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:43&lt;br /&gt;
|And click on the '''Plot''' button. You can see the output of the '''sum''' and '''carry''' node.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:51&lt;br /&gt;
|Close the '''Python''' plot window.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:54&lt;br /&gt;
|The '''subcircuit''' file can also have '''model''' or '''subcircuit components''' within it.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:01&lt;br /&gt;
|These '''components''' can be from existing '''eSim libraries'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:06&lt;br /&gt;
|If the '''models''' or '''subcircuits''' are not present in '''eSim library''' then the user has to define the same.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:14&lt;br /&gt;
|For example: Let us open the '''UJT subcircuit''' file present in '''eSim'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:21&lt;br /&gt;
|In this file, there is a '''subcircuit''' of a '''Half adder''' and this is from '''eSim libraries'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:29&lt;br /&gt;
|Hence the statement, '''dot include''' is added in this file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:35&lt;br /&gt;
|Here, the '''model RMOD''' and '''Emitter''' are the two '''models''' which are defined by the user.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:43&lt;br /&gt;
|These '''model''' files are not available under '''eSim libraries'''.&lt;br /&gt;
 &lt;br /&gt;
|-&lt;br /&gt;
|05:48&lt;br /&gt;
|Hence, you need to mention the '''parameters''' in the '''spice model''' format.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:54&lt;br /&gt;
|If any '''subcircuit''' is used, then the '''parameters''' are defined in the '''spice subcircuit''' format.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|06:04&lt;br /&gt;
|Let us summarize. &lt;br /&gt;
&lt;br /&gt;
In this tutorial, we learnt to upload an external '''spice subcircuit''' file in '''eSim'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|06:11&lt;br /&gt;
|Do you have questions in this '''Spoken Tutorial'''? Please visit this site.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|06:17&lt;br /&gt;
|For any general or  technical questions on '''eSim''', visit the '''FOSSEE''' forum and post your question.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|06:25&lt;br /&gt;
|The '''FOSSEE''' team coordinates the '''Circuit Simulation''' project.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|06:30&lt;br /&gt;
|We give '''Certificates''' and '''Honorarium''' to the contributors. For more details, please visit this site.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|06:40&lt;br /&gt;
|The '''FOSSEE''' team coordinates the '''Lab Migration''' project. For more details, please visit this site.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|06:50&lt;br /&gt;
|'''Spoken Tutorial''' Project is funded by '''NMEICT''', '''MHRD''', '''Govt. of India'''.&lt;br /&gt;
		&lt;br /&gt;
|-	&lt;br /&gt;
|06:57&lt;br /&gt;
|This is Gloria N  from IIT Bombay signing off. Thank you&lt;/div&gt;</summary>
		<author><name>Pratik kamble</name></author>	</entry>

	</feed>