From c4971ed867af4a970a3cd1c23825adee5073372e Mon Sep 17 00:00:00 2001 From: fahim Date: Tue, 4 Aug 2015 15:51:59 +0530 Subject: Subject: Updated User Manual Description: Updated User Manual --- src/browser/pages/User-Manual/eSim.html | 2108 ++++++++++---------- src/browser/pages/User-Manual/figures/Oscad.jpg | Bin 0 -> 229419 bytes .../pages/User-Manual/figures/logo-trimmed.jpg | Bin 0 -> 22169 bytes .../pages/User-Manual/figures/ngspiceoutput.png | Bin 18267 -> 26064 bytes .../pages/User-Manual/figures/oscad-new-web.png | Bin 0 -> 112506 bytes src/browser/pages/User-Manual/figures/oscad1.png | Bin 0 -> 115504 bytes .../figures/oscadBD-eps-converted-to-mistake.pdf | Bin 0 -> 11367 bytes .../figures/oscadBD-eps-converted-to-old.pdf | Bin 0 -> 9248 bytes .../figures/oscadBD-eps-converted-to.pdf | Bin 0 -> 11368 bytes src/browser/pages/User-Manual/figures/oscadBD.eps | 511 +++++ src/browser/pages/User-Manual/figures/oscadBD.fig | 162 ++ .../pages/User-Manual/figures/oscadicon.png | Bin 0 -> 46572 bytes .../pages/User-Manual/figures/pythonplot1.png | Bin 99009 -> 98758 bytes .../pages/User-Manual/figures/workspace.png | Bin 204842 -> 208523 bytes 14 files changed, 1706 insertions(+), 1075 deletions(-) create mode 100644 src/browser/pages/User-Manual/figures/Oscad.jpg create mode 100644 src/browser/pages/User-Manual/figures/logo-trimmed.jpg create mode 100644 src/browser/pages/User-Manual/figures/oscad-new-web.png create mode 100644 src/browser/pages/User-Manual/figures/oscad1.png create mode 100644 src/browser/pages/User-Manual/figures/oscadBD-eps-converted-to-mistake.pdf create mode 100644 src/browser/pages/User-Manual/figures/oscadBD-eps-converted-to-old.pdf create mode 100644 src/browser/pages/User-Manual/figures/oscadBD-eps-converted-to.pdf create mode 100644 src/browser/pages/User-Manual/figures/oscadBD.eps create mode 100644 src/browser/pages/User-Manual/figures/oscadBD.fig create mode 100644 src/browser/pages/User-Manual/figures/oscadicon.png (limited to 'src/browser/pages/User-Manual') diff --git a/src/browser/pages/User-Manual/eSim.html b/src/browser/pages/User-Manual/eSim.html index b98a4fa2..d14da283 100644 --- a/src/browser/pages/User-Manual/eSim.html +++ b/src/browser/pages/User-Manual/eSim.html @@ -6,491 +6,305 @@ - - - + + +

-

-

-

eSim

-An open source EDA tool for circuit design, -simulation, analysis and PCB design
- -PIC - -PIC
-Indian Institute of Technology Bombay
-August 2015

-
-

-

To
-Mr. Narendra Kumar Sinha, IAS
-An Electronics Engineer and a Bureaucrat,
-Who dreamt of educating all Indians through NMEICT and
-Who envisioned and made possible the Aakash Tablet

- -

-

Contents

Preface -
Acknowledgements -
List of Acronyms +href="#Q1-1-3">List of Acronyms
1 Introduction +href="#x1-30001" id="QQ2-1-4">Introduction
2 Installing and Setting up eSim +href="#x1-40002" id="QQ2-1-5">Installing and Setting up eSim
3 Architecture of eSim +href="#x1-50003" id="QQ2-1-6">Architecture of eSim
 3.1 Modules used in eSim +href="#x1-60003.1" id="QQ2-1-7">Modules used in eSim
  3.1.1 EEschema +href="#x1-70003.1.1" id="QQ2-1-8">EEschema
  3.1.2 CvPcb +href="#x1-80003.1.2" id="QQ2-1-9">CvPcb
  3.1.3 Pcbnew +href="#x1-90003.1.3" id="QQ2-1-10">Pcbnew
  3.1.4 KiCad to Ngspice converter +href="#x1-100003.1.4" id="QQ2-1-11">KiCad to Ngspice converter
  3.1.5 Model Builder +href="#x1-160003.1.5" id="QQ2-1-17">Model Builder
  3.1.6 Subcircuit Builder +href="#x1-170003.1.6" id="QQ2-1-18">Subcircuit Builder
  3.1.7 KiCad to Ngspice netlist converter +href="#x1-180003.1.7" id="QQ2-1-19">KiCad to Ngspice netlist converter
  3.1.8 Ngspice +href="#x1-190003.1.8" id="QQ2-1-20">Ngspice
 3.2 Work flow of eSim +href="#x1-200003.2" id="QQ2-1-21">Work flow of eSim
4 Getting Started +href="#x1-210004" id="QQ2-1-23">Getting Started
 4.1 eSim Main Window +href="#x1-220004.1" id="QQ2-1-24">eSim Main Window
  4.1.1 Workspace +href="#x1-230004.1.1" id="QQ2-1-25">Workspace
  4.1.2 Main-GUI +href="#x1-240004.1.2" id="QQ2-1-27">Main-GUI
5 Schematic Creation +href="#x1-300005" id="QQ2-1-44">Schematic Creation
 5.1 Familiarising the Schematic Editor interface +href="#x1-310005.1" id="QQ2-1-45">Familiarizing the Schematic Editor interface
  5.1.1 Top menu bar +href="#x1-320005.1.1" id="QQ2-1-47">Top menu bar
  5.1.2 Top toolbar +href="#x1-330005.1.2" id="QQ2-1-49">Top toolbar
  5.1.3 Toolbar on the right +href="#x1-340005.1.3" id="QQ2-1-51">Toolbar on the right
  5.1.4 Toolbar on the left +href="#x1-350005.1.4" id="QQ2-1-53">Toolbar on the left
  5.1.5 Hotkeys +href="#x1-360005.1.5" id="QQ2-1-55">Hotkeys
 5.2 Schematic creation for simulation +href="#x1-370005.2" id="QQ2-1-56">Schematic creation for simulation
  5.2.1 Selection and placement of components +href="#x1-380005.2.1" id="QQ2-1-58">Selection and placement of components
  5.2.2 Wiring the circuit +href="#x1-390005.2.2" id="QQ2-1-62">Wiring the circuit
  5.2.3 Assigning values to components +href="#x1-400005.2.3" id="QQ2-1-64">Assigning values to components
  5.2.4 Annotation and ERC - +href="#x1-410005.2.4" id="QQ2-1-66">Annotation and ERC
  5.2.5 Netlist generation +href="#x1-420005.2.5" id="QQ2-1-70">Netlist generation
6 Simulation +href="#x1-430006" id="QQ2-1-72">Simulation +
 6.1 Analysis Inserter +href="#x1-440006.1" id="QQ2-1-73">Analysis Inserter
  6.1.1 Types of analysis +href="#x1-450006.1.1" id="QQ2-1-75">Types of analysis
  6.1.2 DC analysis inserter +href="#x1-490006.1.2" id="QQ2-1-79">DC analysis inserter
  6.1.3 AC analysis inserter +href="#x1-500006.1.3" id="QQ2-1-81">AC analysis inserter
  6.1.4 Transient analysis inserter +href="#x1-510006.1.4" id="QQ2-1-83">Transient analysis inserter
 6.2 Adding Source Details +href="#x1-520006.2" id="QQ2-1-85">Adding Source Details
 6.3 Adding Ngspice Model +href="#x1-530006.3" id="QQ2-1-88">Adding Ngspice Model
 6.4 Adding Device Model Library +href="#x1-540006.4" id="QQ2-1-89">Adding Device Model Library
 6.5 Adding Sub Circuit +href="#x1-550006.5" id="QQ2-1-92">Adding Sub Circuit
 6.6 Kicad to Ngspice Conversion +href="#x1-560006.6" id="QQ2-1-93">Kicad to Ngspice Conversion
 6.7 Simulation +href="#x1-570006.7" id="QQ2-1-95">Simulation
7 PCB Design +href="#x1-580007" id="QQ2-1-100">PCB Design
 7.1 Schematic creation for PCB design +href="#x1-590007.1" id="QQ2-1-101">Schematic creation for PCB design
  7.1.1 Netlist generation for PCB +href="#x1-600007.1.1" id="QQ2-1-103">Netlist generation for PCB
  7.1.2 Mapping of components using Footprint Editor +href="#x1-610007.1.2" id="QQ2-1-105">Mapping of components using Footprint Editor
  7.1.3 Familiarising the Footprint Editor tool +href="#x1-620007.1.3" id="QQ2-1-106">Familiarising the Footprint Editor tool
  7.1.4 Viewing footprints in 2D and 3D +href="#x1-640007.1.4" id="QQ2-1-110">Viewing footprints in 2D and 3D
  7.1.5 Mapping of components in the RC circuit +href="#x1-650007.1.5" id="QQ2-1-114">Mapping of components in the RC circuit
 7.2 Creation of PCB layout +href="#x1-660007.2" id="QQ2-1-116">Creation of PCB layout
  7.2.1 Familiarising the Layout Editor tool +href="#x1-670007.2.1" id="QQ2-1-117">Familiarizing the Layout Editor tool
  7.2.2 Hotkeys +href="#x1-690007.2.2" id="QQ2-1-121">Hotkeys
  7.2.3 PCB design example using RC circuit +href="#x1-700007.2.3" id="QQ2-1-122">PCB design example using RC circuit
8 Model Editor +href="#x1-710008" id="QQ2-1-137">Model Editor
 8.1 Creating New Model Library +href="#x1-720008.1" id="QQ2-1-139">Creating New Model Library
 8.2 Editing Current Model Library +href="#x1-730008.2" id="QQ2-1-144">Editing Current Model Library
 8.3 Converting Library file to XML file +href="#x1-740008.3" id="QQ2-1-146">Converting Library file to XML file
9 Sub-Circuit Builder +href="#x1-750009" id="QQ2-1-147">Sub-Circuit Builder
 9.1 Creating a Sub-Circuit +href="#x1-760009.1" id="QQ2-1-149">Creating a Sub-Circuit
A Solved Examples +href="#x1-77000A" id="QQ2-1-152">Solved Examples
 A.1 Solved Examples +href="#x1-78000A.1" id="QQ2-1-153">Solved Examples
  A.1.1 Basic RC Circuit +href="#x1-79000A.1.1" id="QQ2-1-154">Basic RC Circuit
  A.1.2 Half Wave Rectifier +href="#x1-82000A.1.2" id="QQ2-1-163">Half Wave Rectifier
  A.1.3 Inverting Amplifier +href="#x1-85000A.1.3" id="QQ2-1-173">Inverting Amplifier
  A.1.4 Precision Rectifier +href="#x1-88000A.1.4" id="QQ2-1-183">Precision Rectifier
  A.1.5 Half Adder Example +href="#x1-91000A.1.5" id="QQ2-1-194">Half Adder Example +
References
- -

Preface

List of Acronyms + -

eSim was formerlly known as freeEDA/Oscad. Seeds for eSim were sown when the National -Mission on Education through ICT (NMEICT) was launched: the mission document identified -Adaption & deployment of open source simulation packages equivalent to Matlab, -OrCAD, etc., as one of the areas NMEICT would concentrate on. The FOSSEE -(free and open source software in science and engineering education) group at IIT -Bombay, of which we are a part of, initially started working on Python and Scilab. The -Standing Committee of NMEICT encouraged us to contribute to other open source -software as well. This push helped us develop eSim, an open source alternative to -OrCAD. -

eSim is an electronic design automation (EDA) tool, developed using KiCad and Ngspice. -We have made the netlist files generated by KiCad suitable for simulation through -Ngspice. In order to provide an explanation facility, we have developed a method to -automatically generate differential equations that describe a given analog circuit. -Once satisfied with simulation results, the user can create a Gerber file for PCB -fabrication. -

The FOSSEE team has also created more than 160 Scilab Textbook Companions, -each of which contains Scilab code for worked out examples of standard textbooks, -mostly in engineering and science. These have been created by the students and -professors from various educational institutions in India. These textbooks can be -downloaded free of cost from  [?]. They can also be executed remotely on GARUDA cloud - [?]. -

We are embarking on a similar methodology for eSim as well: we have solved most of the -worked out examples of  [?] and given the solution in Appendix A. We hope to create eSim -Textbook Companions for all other relevant standard textbooks as well in the near future, -once again through students and other volunteers. -

Solving the worked out examples of  [?] was a good exercise, as it helped identify and -include some missing features. The yet to be created eSim Textbook Companions -are expected to help in this regard, while simultaneously increasing the available -documentation. -

Lab migration is another important activity that the FOSSEE team is involved in. It -provides equivalent Scilab code for Matlab based labs. This is also carried out through -students and volunteers. We are starting this activity for eSim as well: we will try to provide - -equivalent eSim based solution to all circuit design labs that currently use proprietary -software. -

Another important project supported by NMEICT is the Teach 10,000 Teachers (T10KT) -programme. This methodology, pioneered at IIT Bombay  [??] has demonstrated that it is -possible for the best people in the field to provide extremely high quality training -to a large number of learners simultaneously. eSim is expected to be used in the -forthcoming T10KT course on Analog Electronics, organised by IIT Kharagpur - [?]. -

We invite all EDA enthusiasts to work with us through the following resources: -1. URL for all FOSSEE activities: http://fossee.in 2. URL for all eSim resources: -http://oscad.in 3. Textbook companion: textbook-companion@oscad.in 4. Lab migration: -lab-migration@oscad.in 5. SELF workshops: SELF-workshop@oscad.in 6. eSim -development and enhancing its capabilities: Oscad-dev@oscad.in 7. Feedback on this book: -Oscad-textbook@oscad.in. -We also hope to establish forum based discussion services for eSim. -

Finally, an electronic version of this book is available for noncommercial purposes at -http://oscad.in. -

Acknowledgements

- -

We would first like to thank Mr. N. K. Sinha, IAS, for without him, there would -have been no National Mission on Education through ICT (NMEICT), without -which, there would have been no FOSSEE, without which, there would have been -no eSim. The idealistic guiding principles of NMEICT, namely, reliance on open -source software, providing free access to e-content and Internet connectivity for all -educational institutions, egged us to contribute our best and one of the outcomes is -eSim. -

We would like to thank the former Human Resource Development Minister (HRM) Mr. -Arjun Singh for getting NMEICT started. We would like to acknowledge the former HRM Mr. -Kapil Sibal for his unstinting support and the faith he had in the NMEICT administration -team. We would like to thank the current HRM Dr. Pallam Raju for extending the tenure of -NMEICT by five more years. -

We want to thank the Members of the Standing Committee of NMEICT who met once in -two weeks for almost two years to review project proposals and to recommend them for -funding or giving suggestions for improvement. We also want to thank them for urging us to -work on more FOSS systems than what we were prepared for. Without this kind of active -support, the ecosystem required for projects like eSim to flourish, established at IIT -Bombay through the many projects funded through NMEICT, would not have -materialised. -

We want to thank the FOSSEE faculty members Profs. Prabhu Ramachandran, Madhu -Belur, Mani Bhushan, Shiva Gopalakrishnan, Jayendran Venkateswaran, Ashutosh -Mahajan and Supratik Chakraborty for establishing a vibrant FOSSEE group at -IIT Bombay. We want to thank Prof. D. B. Phatak for being a constant source -of inspiration and encouragement and for supporting our activities. We want to -thank other faculty members with NMEICT projects at IIT Bombay, namely, Profs. -Kavi Arya, Ravi Poovaiah, Santosh Noronha, Anil Kulkarni, Sridhar Iyer, Sahana -Murthy and Shishir Jha for sharing their dreams, processes and facilities. We want to -thank the staff members of all NMEICT projects at IIT Bombay in general and of -FOSSEE and Spoken Tutorial projects in particular, for providing a wonderful work -environment. -

We want to thank the IIT Bombay administration in general and R&D office in particular -for providing us with an excellent environment to make us work efficiently. We want to thank -the researchers and faculty members in our departments for providing us with necessary space -and for putting up with our tantrums. -

We would like to thank the professors, staff and students affiliated with the Wadhwani -Electronics lab at IIT Bombay for trying out eSim in lab courses and for the useful -suggestions. We would like to thank Abhishek Pawar for creating Spoken Tutorials on KiCad. -We would like to thank Saket Choudhary for making the netlist files generated by KiCad - -compatible with Ngspice.
-

-

-

- -
Kannan M. Moudgalya
   
IIT Bombay
22 August 2015
-
- -

List of Acronyms

- -
- - + style="vertical-align:baseline;" id="TBL-1-33-">
ADCADC

Analog to Digital Converter

BJT BJT

Bipolar Junction Transistor

BV BV

Breakdown Voltage

CCCS CCCS

Current Controlled Current Source

CCVS CCVS

Current Controlled Voltage Source

CPU CPU

Central Processing Unit

DAC DAC

Digital to Analog Converter

DRC DRC

Design Rules Check

DXF DXF

Drawing Interchange Format or Drawing Exchange Format

EDA EDA

Electronic Design Automation

ERC ERC

Electric Rules Check

FOSS FOSS

Free and Open Source Software

FPGA FPGA

Field Programmable Gate Array

gEDA gEDA

Electronic Design Automation released under GPL

GUI GUI

Graphical User Interface

HDL HDL

Hardware Descrition Language

HPGL HPGL

Hewlett-Packard Graphics Language

IC IC

Integrated Circuit

ICT ICT

Information and Communication Technology

IGBT IGBT

Insulated Gate Bipolar Transistor

JFET JFET

Junction Field Effect Transistor

KCE KCE

Kirchoff’s Current Law

KVE KVE

Kirchoff’s Voltage Law

LXDE LXDE

Lightweight X11 Desktop Environment

MNA MNA

Modified Nodal Analysis

MOSFETMOSFET

Metal Oxide Semiconductor Field Effect Transistor

NMEICT NMEICT

National Mission on Education through ICT

Op-amp Op-amp

Operational Amplifier

OTC

Oscad Textbook Companion

PCB PCB

Printed Circuit Board

RS RS

Ohmic Resistance

SELF SELF

Spoken Tutorial based Education and Learning through Free FOSS study

SMCSim

Scilab based Mini Circuit Simulator

SVF

Serial Vector Format

T10KT

Teach 10,000 Teachers

SVF

Serial Vector Format

T10KT

Teach 10,000 Teachers

VCCS VCCS

Voltage Controlled Current Source

VCVS VCVS

Voltage Controlled Voltage source

@@ -499,7 +313,7 @@ class="td11">

Chapter 1
Introduction

Electronic systems are an integral part of human life. They have + id="x1-30001">Introduction Electronic systems are an integral part of human life. They have simplified our lives to a great extent. Starting from small systems made of a few discrete components to the present day integrated circuits (ICs) with millions of logic gates, electronic systems have undergone a sea change. As a result, design of @@ -509,27 +323,27 @@ and efficient designs. These are called Electronic Design Automation or EDA tools. + id="dx1-3001">tools.

Let us see the steps involved in EDA. In the first stage, the specifications of the system are + id="dx1-3002"> In the first stage, the specifications of the system are laid out. These specifications are then converted to a design. The design could be in the form of a circuit schematic, logical description using an HDL language, etc. The design is then simulated and re-designed, if needed, to achieve the desired results. Once simulation achieves the specifications, the design is either converted to a PCB, a chip layout, or ported to an FPGA. The final product is again tested for specifications. The whole cycle is repeated until desired results are obtained - [?]. + [9].

A person who builds an electronic system has to first design the circuit, produce a virtual representation of it through a schematic for easy comprehension, simulate it and finally convert it into a Printed Circuit Board (PCB). There are various tools available that help do + id="dx1-3003">There are various tools available that help do this. Some of the popular EDA tools are those of Cadence, Synopys, Mentor Graphics and Xilinx. Although these are fairly comprehensive and high end, their licences are expensive, +class="cmtt-10x-x-109">Xilinx. Although these are fairly comprehensive and high end, their licenses are expensive, being proprietary.

There are some free and open source EDA tools like gEDA, computer class="cmbx-10x-x-109">aided design. eSim is created using open source software packages, such as KiCad, Ngspice, Scilab and Python. Using eSim, one can create circuit schematics, perform simulations -and design PCB layouts. It can create or edit new device models, and create or -edit subcircuits for simulation. It also has a Scilab based Mini Circuit Simulator -(SMCSim), which is capable of giving the circuit equations for each simulation -step. This feature is unique to eSim. Because of these reasons, eSim is expected to + id="dx1-3004"> Using eSim, one can create circuit schematics, perform simulations and +design PCB layouts. It can create or edit new device models, and create or edit subcircuits for +simulation. This feature is unique to eSim. Because of these reasons, eSim is expected to be useful to students, teachers and other professionals who would want to study and/or design electronic systems. eSim is also useful for entrepreneurs and small scale enterprises who do not have the capability to invest in heavily priced proprietary tools. -

This book introduces eSim to the reader and illustrates all the features of eSim with -examples. Chapter ?? gives step by step instructions to install eSim on a typical computer - +

This book introduces eSim to the reader and illustrates all the features of eSim with +examples. Chapter 2 gives step by step instructions to install eSim on a typical computer system and to validate the installation. The software architecture of eSim is presented in Chapter 3. Chapter 4 gets the user started with eSim. It takes them through a tour of eSim +href="#x1-50003">3. Chapter 4 gets the user started with eSim. It takes them through a tour of eSim + with the help of a simple RC circuit example. Chapter 5 explains how to create circuit +href="#x1-300005">5 explains how to create circuit schematics using eSim, in detail using examples. Chapter 6 illustrates how to simulate +href="#x1-430006">6 illustrates how to simulate circuits using eSim. Chapter 7 explains PCB design using eSim, in detail. The advanced -features of eSim such as Model Builder covered in Chapter ?? and Sub circuiting is -covered in Chapter ??. Appendix A presents examples, that have been worked +href="#x1-580007">7 explains PCB design using eSim, in detail. The advanced +features of eSim such as Model Builder covered in Chapter 8 and Sub circuiting +is covered in Chapter 9. Appendix A presents examples, that have been worked out using eSim, from the book Microelectronic Circuits by Sedra and Smith - [?]. Appendix ?? explains the resources available for the use and promotion of -eSim. -

The following convention has been adopted throughout this book. All the menu names, + [1]. +

The following convention has been adopted throughout this book. All the menu names, options under each menu item, tool names, certain points to be noted, etc., are given in italics. Some keywords, names of certain windows/dialog boxes, names of some @@ -602,14 +410,33 @@ yes, etc., are also mentioned in typewriter font.

Chapter 2
Installing and Setting up eSim

+ id="x1-40002">Installing and Setting up eSim +
+ 1.
eSim installation in Ubuntu:
After downloading the zip file from https://github.com/FOSSEE/eSim to a local + directory unpack it using:
      $ unzip eSim.zip
Now change directories in to the top-level source directory (where this INSTALL + file can be found). +

To install eSim and other dependecies run the following command.
      $ ../install-linux.sh –install
Above script will install eSim along with dependencies. +

eSim will be installed to /opt/eSim +

To run eSim you can directly run it from terminal as
      $ esim
or you can double click on eSim icon created on desktop after installation.

Chapter 3
Architecture of eSim

+ id="x1-50003">Architecture of eSim

eSim is a CAD tool that helps electronic system designers to design, test and analyse their + id="dx1-5001">tool that helps electronic system designers to design, test and analyse their circuits. But the important feature of this tool is that it is open source and hence the user can modify the source as per his/her need. The software provides a generic, modular and extensible platform for experiment with electronic circuits. This software runs on all @@ -627,61 +454,61 @@ have the capability to explain the circuit by giving symbolic equations and nume values. The architecture of eSim has been designed by keeping these objectives in mind.

3.1 Modules used in eSim

+ id="x1-60003.1">Modules used in eSim

Various open-source tools have been used for the underlying build-up of eSim. In this section we will give a brief idea about all the modules used in eSim.

3.1.1 EEschema

+ id="x1-70003.1.1">EEschema + id="dx1-7001"> + id="dx1-7002">

EEschema is an integrated software where all functions of circuit drawing, control, layout, library management and access to the PCB design software are carried out within itself. It is -the schematic editor tool used in KiCad  [?]. EEschema is intended to work with PCB layout -software such as Pcbnew. It provides netlist that describes the electrical connections of the -PCB. EEschema also integrates a component editor which allows the creation, editing and -visualisation of components. It also allows the user to effectively handle the symbol +the schematic editor tool used in KiCad  [11]. EEschema is intended to work with PCB +layout software such as Pcbnew. It provides netlist that describes the electrical connections of +the PCB. EEschema also integrates a component editor which allows the creation, editing and +visualization of components. It also allows the user to effectively handle the symbol libraries i.e; import, export, addition and deletion of library components. EEschema also integrates the following additional but essential functions needed for a modern schematic capture software: 1. Design rules check (1. Design rules check (DRC) for the automatic control of incorrect connections and inputs of components left unconnected. 2. Generation of + id="x1-7005r2">2. Generation of layout files in POSTSCRIPT or or HPGL format. 3. Generation of layout files printable via + id="dx1-7007">format. 3. Generation of layout files printable via printer. 4. Bill of material generation. 5. Netlist generation for PCB layout or for + id="x1-7009r4">4. Bill of material generation. 5. Netlist generation for PCB layout or for simulation. This module is indicated by the label 1 in Fig. 3.1. +href="#x1-200011">3.1.

As Eeschema is originally intended for PCB Design, there are no fictitious components1 +href="oscad2.html#fn1x3">1 such as voltage or current sources. Thus, we have added a new library for different types of voltage and current sources such as sine, pulse and square wave. We have also built a library which gives printing and plotting solutions. This extension, developed by us for eSim, is indicated by the label 2 in Fig. 3.1. +href="#x1-200011">3.1.

3.1.2 CvPcb

+ id="x1-80003.1.2">CvPcb + id="dx1-8001">

CvPcb is a tool that allows the user to associate components in the schematic to component footprints when designing the printed circuit board. CvPcb is the footprint editor tool in -KiCad  [?]. Typically the netlist file generated by EEschema does not specify which printed +KiCad  [11]. Typically the netlist file generated by EEschema does not specify which printed circuit board footprint is associated with each component in the schematic. However, this is not always the case as component footprints can be associated during schematic capture by setting the component’s footprint field. CvPcb provides a convenient method of associating @@ -695,15 +522,15 @@ This is because CvPcb not only allows automatic association, but also allows to see the list of available footprints and displays them on the screen to ensure the correct footprint is being associated. This module is indicated by the label 3 in Fig. 3.1. +href="#x1-200011">3.1.

3.1.3 Pcbnew

+ id="x1-90003.1.3">Pcbnew + id="dx1-9001">

Pcbnew is a powerful printed circuit board software tool. It is the layout editor tool -used in KiCad  [?]. It is used in association with the schematic capture software +used in KiCad  [11]. It is used in association with the schematic capture software EEschema, which provides the netlist. Netlist describes the electrical connections of the circuit. CvPcb is used to assign each component, in the netlist produced by EEschema, to a module that is used by Pcbnew. The features of Pcbnew are given @@ -712,7 +539,7 @@ below:

This module is indicated by the label 4 in Fig. 3.1. +href="#x1-200011">3.1.

3.1.4 KiCad to Ngspice converter

+ id="x1-100003.1.4">KiCad to Ngspice converter

It converts KiCad generated netlists to Ngspice compatible format. Also it facilitates adding model library of components and subcircuits. Following are the different functionality lies under conversion.

Analysis Inserter
+ id="x1-110003.1.4">Analysis Inserter

This feature helps the user to perform different types of analysis such as Operating point analysis, DC analysis, AC analysis, transient analysis, etc. It has the facility + id="dx1-11001">DC analysis, AC analysis, transient analysis, etc. It has the facility to

Source Details
+ id="x1-120003.1.4">Source Details

eSim sources are added from eSim-sources package. Sources auch as SINE, AC, DC, PULSE -are in this lobrary. Input to allthe sources adde in the circuit are given in source +are in this library. Input to all the sources added in the circuit are given in source details.

Ngspice Model
+ id="x1-130003.1.4">Ngspice Model

eSim adds Ngspice model using this facility.

Device Modeling
-

Devices like Diode, JFET, MOSFET, IGBT, MOS etc added in the circut can be modeled -using device model libraries. eSim also proveides editing and adding new model libraries. -While converting Kicad to Ngspice these library files added to the corresponding devices uesd -in the circuit. + id="x1-140003.1.4">Device Modeling +

Devices like Diode, JFET, MOSFET, IGBT, MOS etc added in the circuit can be modeled +using device model libraries. eSim also provides editing and adding new model libraries. While +converting Kicad to Ngspice these library files added to the corresponding devices used in the +circuit.

Subcircuits
+ id="x1-150003.1.4">Subcircuits

Subcircuits are the circuits within a circuits. Subcircuiting helps to reuse the part of the circuits. The sub circuit in the main circuits are added using this facility. Also, eSim provides -us with editing the already exixting subcircuits. Sub circuits are saved separately in different +us with editing the already existing subcircuits. Sub circuits are saved separately in different folders.

3.1.5 Model Builder

+ id="x1-160003.1.5">Model Builder + id="dx1-16001">

This tool provides the facility to define a new model for devices such as, 1. Diode 2. Bipolar + id="x1-16002r1">1. Diode 2. Bipolar Junction Transistor (BJT) 3. Metal Oxide Semiconductor Field Effect Transistor + id="x1-16004r3">3. Metal Oxide Semiconductor Field Effect Transistor (MOSFET) 4. Junction Field Effect Transistor (JFET) 5. IGBT and 6. Magnetic + id="x1-16005r4">4. Junction Field Effect Transistor (JFET) 5. IGBT and 6. Magnetic core. This module also helps edit existing models. It is developed by us for eSim and it is indicated by the label 5 in Fig. 3.1. +href="#x1-200011">3.1.

3.1.6 Subcircuit Builder

+ id="x1-170003.1.6">Subcircuit Builder + id="dx1-17001">

This module allows the user to create a subcircuit for a component. Once the subcircuit for a component is created, the user can use it in other circuits. It has the facility to define new components such as, Op-amps and IC-555. This component also helps edit existing subcircuits. This module is developed by us for eSim and it is indicated by the label 6 in Fig. 3.1. +href="#x1-200011">3.1.

3.1.7 KiCad to Ngspice netlist converter

+ id="x1-180003.1.7">KiCad to Ngspice netlist converter + id="dx1-18001"> + id="dx1-18002"> + id="dx1-18003">

It converts KiCad generated netlists to Ngspice (see Sec. 3.1.8) compatible format. It has the +href="#x1-190003.1.8">3.1.8) compatible format. It has the capability to 1. Insert parameters for fictitious components 2. Convert IC into discrete + id="x1-18004r1">1. Insert parameters for fictitious components 2. Convert IC into discrete blocks 3. Insert D-A and A-D converter at appropriate places 4. Insert plotting + id="x1-18006r3">3. Insert D-A and A-D converter at appropriate places 4. Insert plotting and printing statements in netlist and 5. Find current through all components. + id="x1-18008r5">5. Find current through all components.

This module is developed by us for eSim and it is indicated by the label 7 in Fig. 3.1. +href="#x1-200011">3.1.

3.1.8 Ngspice

+ id="x1-190003.1.8">Ngspice + id="dx1-19001">

Ngspice is a general purpose circuit simulation program for nonlinear dc, nonlinear transient, -and linear ac analyses  [?]. Circuits may contain resistors, capacitors, inductors, mutual +and linear ac analyses  [12]. Circuits may contain resistors, capacitors, inductors, mutual inductors, independent voltage and current sources, four types of dependent sources, lossless and lossy transmission lines (two separate implementations), switches, uniform distributed RC lines, and the five most common semiconductor devices: diodes, BJTs, JFETs, MESFETs, and MOSFET. This module is indicated by the label 9 in + id="dx1-19002">BJTs, JFETs, MESFETs, and MOSFET. This module is indicated by the label 9 in Fig. 3.1. +href="#x1-200011">3.1.

3.2 Work flow of eSim

+ id="x1-200003.2">Work flow of eSim

Fig. 3.1 shows the work flow in eSim. The block diagram consists of mainly three +href="#x1-200011">3.1 shows the work flow in eSim. The block diagram consists of mainly three parts: