diff options
-rw-r--r-- | doc/readme.md | 4 | ||||
-rwxr-xr-x | install.sh | 6 | ||||
-rw-r--r-- | readme.md | 2 | ||||
-rw-r--r-- | src/Appconfig.py | 2 | ||||
-rwxr-xr-x | src/ngspice_ghdl.py | 20 |
5 files changed, 18 insertions, 16 deletions
diff --git a/doc/readme.md b/doc/readme.md index 0df4032..e68c373 100644 --- a/doc/readme.md +++ b/doc/readme.md @@ -30,7 +30,7 @@ for that model it will actually call the ghdl to get the result. ##Few words about installed code structure. 1. Ngspice will be installed in home directory $HOME. If you already have ngspice-26 directory there it will take its backup. -2. Source code for all other file will be present in ~/.FreeEDA +2. Source code for all other file will be present in ~/.esim-nghdl 3. symlink nghdl is stored in /usr/local/bin ##How to use? @@ -47,5 +47,5 @@ for that model it will actually call the ghdl to get the result. ##FUTURE WORK 1. Make changes to have more than one output. 2. Making changes to include use of more than one code models. -3. Interfacing it with FreeEDA formely known as Oscad so that we can use it in our schematic. +3. Interfacing it with esim formely known as Oscad so that we can use it in our schematic. @@ -12,13 +12,13 @@ # BUGS: --- # NOTES: --- # AUTHOR: Fahim Khan , fahim.elex@gmail.com -# ORGANIZATION: FreeEDA, FOSSEE group at IIT Bombay +# ORGANIZATION: eSim, FOSSEE group at IIT Bombay # CREATED: Tuesday 02 December 2014 17:01 # REVISION: --- #=============================================================================== ngspice="ngspice-26" -src_loc=".FreeEDA" +src_loc=".esim-nghdl" config_file="config.ini" cur_dir=`pwd` @@ -141,7 +141,7 @@ fi #Creating directory to put source if [ -d "$HOME/$src_loc" ];then - echo "(.)FreeEDA directory already in $HOME,removing it and copying new code" + echo "(.)esim-nghdl directory already in $HOME,removing it and copying new code" rm -rf ~/$src_loc mkdir -p ~/$src_loc else @@ -30,7 +30,7 @@ for that model it will actually call the ghdl to get the result. ##Few words about installed code structure. 1. Ngspice will be installed in home directory $HOME. If you already have ngspice-26 directory there it will take its backup. -2. Source code for all other file will be present in ~/.FreeEDA +2. Source code for all other file will be present in ~/.esim-nghdl 3. symlink nghdl is stored in /usr/local/bin ##How to use? diff --git a/src/Appconfig.py b/src/Appconfig.py new file mode 100644 index 0000000..51bd7c1 --- /dev/null +++ b/src/Appconfig.py @@ -0,0 +1,2 @@ + +nghdl_src_loc = ".esim-nghdl" diff --git a/src/ngspice_ghdl.py b/src/ngspice_ghdl.py index 9a73d26..3f4990b 100755 --- a/src/ngspice_ghdl.py +++ b/src/ngspice_ghdl.py @@ -12,7 +12,7 @@ import subprocess from PyQt4 import QtGui from PyQt4 import QtCore from ConfigParser import SafeConfigParser - +from Appconfig import nghdl_src_loc class Mainwindow(QtGui.QWidget): def __init__(self): @@ -20,11 +20,11 @@ class Mainwindow(QtGui.QWidget): QtGui.QMainWindow.__init__(self) print "Initializing.........." self.home = os.path.expanduser("~") - licensefile = os.path.join(self.home+'/.FreeEDA/', "LICENSE") + licensefile = os.path.join(os.path.join(self.home,nghdl_src_loc), "LICENSE") fileopen = open(licensefile, 'r') print fileopen.read() self.parser = SafeConfigParser() - self.parser.read(self.home+'/.FreeEDA/config.ini') + self.parser.read(os.path.join(self.home,nghdl_src_loc+'/config.ini')) self.file_list = [] #to keep the supporting files self.initUI() @@ -160,7 +160,7 @@ class Mainwindow(QtGui.QWidget): print "Create Model Files Called" os.chdir(self.cur_dir) print "Current Working directory changed to ",self.cur_dir - cmd = "python ~/.FreeEDA/model_generation.py "+str(self.ledit.text()) + cmd = "python ~/"+nghdl_src_loc+"/model_generation.py "+str(self.ledit.text()) stdouterr = os.popen4(cmd)[1].read() print stdouterr #Moving file to model directory @@ -176,12 +176,12 @@ class Mainwindow(QtGui.QWidget): shutil.move(self.modelname+"_tb.vhdl",path+"/DUTghdl/") shutil.copy(str(self.filename),path+"/DUTghdl/") - shutil.copy(self.home+"/.FreeEDA/ghdlserver/compile.sh",path+"/DUTghdl/") - shutil.copy(self.home+"/.FreeEDA/ghdlserver/uthash.h",path+"/DUTghdl/") - shutil.copy(self.home+"/.FreeEDA/ghdlserver/ghdlserver.c",path+"/DUTghdl/") - shutil.copy(self.home+"/.FreeEDA/ghdlserver/ghdlserver.h",path+"/DUTghdl/") - shutil.copy(self.home+"/.FreeEDA/ghdlserver/Utility_Package.vhdl",path+"/DUTghdl/") - shutil.copy(self.home+"/.FreeEDA/ghdlserver/Vhpi_Package.vhdl",path+"/DUTghdl/") + shutil.copy(os.path.join(self.home,nghdl_src_loc)+"/ghdlserver/compile.sh",path+"/DUTghdl/") + shutil.copy(os.path.join(self.home,nghdl_src_loc)+"/ghdlserver/uthash.h",path+"/DUTghdl/") + shutil.copy(os.path.join(self.home,nghdl_src_loc)+"/ghdlserver/ghdlserver.c",path+"/DUTghdl/") + shutil.copy(os.path.join(self.home,nghdl_src_loc)+"/ghdlserver/ghdlserver.h",path+"/DUTghdl/") + shutil.copy(os.path.join(self.home,nghdl_src_loc)+"/ghdlserver/Utility_Package.vhdl",path+"/DUTghdl/") + shutil.copy(os.path.join(self.home,nghdl_src_loc)+"/ghdlserver/Vhpi_Package.vhdl",path+"/DUTghdl/") for file in self.file_list: shutil.copy(str(file), path+"/DUTghdl/") |