Skip to content

Commit

Permalink
Merge pull request #162 from rahulp13/master
Browse files Browse the repository at this point in the history
fixed crash issues
  • Loading branch information
rahulp13 committed Jan 8, 2021
2 parents a61c3ed + 1b5e071 commit 840090d
Show file tree
Hide file tree
Showing 18 changed files with 263 additions and 108 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTION.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ If you want to add any enhancement feature or have found any bug and want to wor
#### Points on how to make pull request
* You need to fork this repository to your account.

* Clone it using ``` git clone https://github.com/[username]/eSim.git ```
* Clone it using ``` git clone https://github.com/FOSSEE/eSim.git ```

* Always create a new branch before making any changes. You can create new branch using ```git branch <branch-name> ```

Expand Down
40 changes: 21 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,26 @@
![GitHub release (latest by date)](https://img.shields.io/github/v/release/fossee/esim?color=blueviolet)
![GitHub](https://img.shields.io/github/license/fossee/esim?color=blue)
![Python](https://img.shields.io/badge/python-v3.6+-blue.svg)
[![PEP8](https://img.shields.io/badge/code%20style-pep8-orange.svg)](https://www.python.org/dev/peps/pep-0008/)
![Travis (.org)](https://img.shields.io/travis/fossee/esim)
[![Documentation Status](https://readthedocs.org/projects/esim/badge/?version=latest)](https://esim.readthedocs.io/en/latest/?badge=latest)
[![GitHub forks](https://img.shields.io/github/forks/fossee/esim)](https://github.com/fossee/esim/network)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat)](https://github.com/fossee/esim)
![GitHub contributors](https://img.shields.io/github/contributors/fossee/esim)

## eSim

[eSim](https://esim.fossee.in/) is an open source EDA tool for circuit design, simulation, analysis and PCB design, developed by [FOSSEE Team](https://www.fossee.in/) at [IIT Bombay](http://www.iitb.ac.in/).
It is an integrated tool build using open source softwares such as KiCad, Ngspice and GHDL.

## Releases
## Releases and Installation
eSim is released for the following distributions (operating systems):
* Ubuntu 16.04 OS and above LTS versions.
* Microsoft Windows 7, 8 and 10.

> Note: Refer [`installers`](https://github.com/fossee/eSim/tree/installers) branch for documentation on packaging for above mentioned platforms.
To use eSim on your machine having above distributions, please refer to link [here](https://esim.fossee.in/downloads) for installation and other guidelines.

> Note for other distributions: You can refer [`installers`](https://github.com/fossee/eSim/tree/installers) branch for documentation on packaging (for above mentioned distributions) to build installers for your operating system in a similar way. For providing your build, please check the `Contribution` section mentioned below.
## Features
* An open-source EDA tool.
Expand All @@ -20,28 +33,17 @@ It is an integrated tool build using open source softwares such as KiCad, Ngspic

## Open-Source Softwares Used
* [Python](https://www.python.org/)
* [KiCad](http://www.kicad-pcd.org)
* [Ngspice](http://ngspice.sourcefouge.net/)
* [GHDL](http://ghdl.free.fr/)

## Pre-requisites
1. Python v3.5+
2. Ngspice v31+
3. KiCad v4.0.7
4. [NGHDL](https://github.com/fossee/nghdl)

## eSim Installation:

To use eSim on your machine please refer to link [here](https://esim.fossee.in/downloads) for installation and other guidelines.
* [KiCad](https://kicad.org/)
* [NGHDL](https://github.com/fossee/nghdl)

## eSim Manual
To know everything about eSim, how it works and it's feature please download manual [here](https://static.fossee.in/esim/installation-files/eSim_Manual_2.0.pdf)
To know everything about eSim, how it works and it's feature please download manual [here](https://static.fossee.in/esim/manuals/eSim_Manual_2020_August.pdf)

## Contact
For any queries regarding eSim please write us on at this [address](mailto:contact-esim@fossee.in).
For any queries regarding eSim please write us on at this [email address](mailto:contact-esim@fossee.in).

## Contribution
Please refer [here](https://github.com/FOSSEE/eSim/tree/master/CONTRIBUTION.md) for further details.
Please refer [here](https://github.com/FOSSEE/eSim/blob/master/CONTRIBUTION.md) for further details.

## License
It is developed by FOSSEE Team at IIT Bombay. It is released under GNU GPL License.
It is developed by FOSSEE Team at IIT Bombay and is released under GNU GPL License.
1 change: 1 addition & 0 deletions library/browser/welcome.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

p{
margin: 0px 10px 0px 10px;
font-size: 13pt;
}

pre{
Expand Down
1 change: 1 addition & 0 deletions library/kicadLibrary/template/kicad.pro
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,4 @@ LibName33=eSim_Miscellaneous
LibName34=eSim_Power
LibName35=eSim_Sources
LibName36=eSim_Subckt
LibName37=eSim_Nghdl
32 changes: 25 additions & 7 deletions src/frontEnd/Application.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# MODIFIED: Rahul Paknikar, rahulp@iitb.ac.in
# ORGANIZATION: eSim Team at FOSSEE, IIT Bombay
# CREATED: Tuesday 24 February 2015
# REVISION: Saturday 01 August 2020
# REVISION: Sunday 13 December 2020
# =========================================================================

import os
Expand Down Expand Up @@ -293,13 +293,20 @@ def new_project(self):
text, ok = QtWidgets.QInputDialog.getText(
self, 'New Project Info', 'Enter Project Name:'
)
updated = False

if ok:
self.projname = (str(text))
self.project = NewProjectInfo()
directory, filelist = self.project.createProject(self.projname)
self.obj_Mainview.obj_projectExplorer.addTreeNode(
directory, filelist)
else:

if directory and filelist:
self.obj_Mainview.obj_projectExplorer.addTreeNode(
directory, filelist
)
updated = True

if not updated:
print("No new project created")
self.obj_appconfig.print_info('No new project created')
try:
Expand Down Expand Up @@ -532,16 +539,27 @@ def open_ngspice(self):
break
except Exception:
pass
time.sleep(0.5)
time.sleep(1)

# Fail Safe ===>
count += 1
if count >= 10:
raise Exception(
print(
"Ngspice taking too long for simulation. "
"Check netlist file to change simulation parameters."
)

self.msg = QtWidgets.QErrorMessage()
self.msg.setModal(True)
self.msg.setWindowTitle("Warning Message")
self.msg.showMessage(
'Ngspice taking too long for simulation. '
'Check netlist file to change simulation parameters.'
)
self.msg.exec_()

return

# Calling Python Plotting
try:
self.obj_Mainview.obj_dockarea.plottingEditor()
Expand Down Expand Up @@ -703,7 +721,7 @@ def open_OMedit(self):
'Please select the project first. ' +
'You can either create a new project or open existing project'
)
self.exec_()
self.msg.exec_()

def open_OMoptim(self):
"""
Expand Down
12 changes: 8 additions & 4 deletions src/frontEnd/Workspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# MODIFIED: Rahul Paknikar, rahulp@iitb.ac.in
# ORGANIZATION: eSim Team at FOSSEE, IIT Bombay
# CREATED: Wednesday 05 February 2015
# REVISION: Saturday 25 July 2020
# REVISION: Sunday 13 December 2020
# =========================================================================

from PyQt5 import QtCore, QtGui, QtWidgets
Expand Down Expand Up @@ -172,7 +172,11 @@ def createWorkspace(self):

def browseLocation(self):
print("Function : Browse Location")
self.workspace_directory = QtWidgets.QFileDialog.getExistingDirectory(
self, "Browse Location", os.path.expanduser("~")
self.workspace_directory = QtCore.QDir.toNativeSeparators(
QtWidgets.QFileDialog.getExistingDirectory(
self, "Browse Location", os.path.expanduser("~")
)
)
self.workspace_loc.setText(self.workspace_directory)

if self.workspace_directory:
self.workspace_loc.setText(self.workspace_directory)
9 changes: 7 additions & 2 deletions src/kicadtoNgspice/DeviceModel.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from PyQt5 import QtWidgets
from PyQt5 import QtWidgets, QtCore
import os
from xml.etree import ElementTree as ET
from . import TrackWidget
Expand Down Expand Up @@ -368,10 +368,15 @@ def trackLibrary(self):
if os.name == 'nt':
init_path = ''

self.libfile = QtWidgets.QFileDialog.getOpenFileName(
self.libfile = QtCore.QDir.toNativeSeparators(
QtWidgets.QFileDialog.getOpenFileName(
self, "Open Library Directory",
init_path + "library/deviceModelLibrary", "*.lib"
)[0]
)

if not self.libfile:
return

# Setting Library to Text Edit Line
self.entry_var[self.widgetObjCount].setText(self.libfile)
Expand Down
27 changes: 19 additions & 8 deletions src/kicadtoNgspice/SubcircuitTab.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from PyQt5 import QtWidgets
from PyQt5 import QtWidgets, QtCore
from . import TrackWidget
from projManagement import Validation
import os
Expand Down Expand Up @@ -151,34 +151,45 @@ def trackSubcircuit(self):
init_path = ''

self.subfile = str(
QtWidgets.QFileDialog.getExistingDirectory(
self, "Open Subcircuit",
init_path + "library/SubcircuitLibrary")
QtCore.QDir.toNativeSeparators(
QtWidgets.QFileDialog.getExistingDirectory(
self, "Open Subcircuit",
init_path + "library/SubcircuitLibrary"
)
)
)

if not self.subfile:
return

self.reply = self.obj_validation.validateSub(
self.subfile, self.numPorts[self.widgetObjCount - 1])
self.subfile, self.numPorts[self.widgetObjCount - 1]
)

if self.reply == "True":
# Setting Library to Text Edit Line
self.entry_var[self.widgetObjCount].setText(self.subfile)
self.subName = self.subDetail[self.widgetObjCount]

# Storing to track it during conversion

self.obj_trac.subcircuitTrack[self.subName] = self.subfile

elif self.reply == "PORT":
self.msg = QtWidgets.QErrorMessage(self)
self.msg.setModal(True)
self.msg.setWindowTitle("Error Message")
self.msg.showMessage(
"Please select a Subcircuit with correct number of ports.")
"Please select a Subcircuit with correct number of ports."
)
self.msg.exec_()
elif self.reply == "DIREC":
self.msg = QtWidgets.QErrorMessage(self)
self.msg.setModal(True)
self.msg.setWindowTitle("Error Message")
self.msg.showMessage(
"Please select a valid Subcircuit directory "
"(Containing '.sub' file).")
"(Containing '.sub' file)."
)
self.msg.exec_()

def trackSubcircuitWithoutButton(self, iter_value, path_value):
Expand Down
Loading

0 comments on commit 840090d

Please sign in to comment.