diff options
author | Fahim | 2016-02-04 22:10:39 +0530 |
---|---|---|
committer | Fahim | 2016-02-04 22:10:39 +0530 |
commit | 50b33879a606e28d85e5f7df12194ee4820e87b9 (patch) | |
tree | 7a8208e542642eaef0a1278d80b38411475adfd6 | |
parent | 53e1c1467890592441c1612c9c6b3592e019fb97 (diff) | |
download | nghdl-50b33879a606e28d85e5f7df12194ee4820e87b9.tar.gz nghdl-50b33879a606e28d85e5f7df12194ee4820e87b9.tar.bz2 nghdl-50b33879a606e28d85e5f7df12194ee4820e87b9.zip |
Modified Appconfig.py,model_generation.py and createKicadLibrary.py to accomodate changes for new installation script.
-rw-r--r-- | src/Appconfig.py | 10 | ||||
-rw-r--r-- | src/createKicadLibrary.py | 6 | ||||
-rw-r--r-- | src/model_generation.py | 4 |
3 files changed, 10 insertions, 10 deletions
diff --git a/src/Appconfig.py b/src/Appconfig.py index f35d290..2d610c1 100644 --- a/src/Appconfig.py +++ b/src/Appconfig.py @@ -1,8 +1,14 @@ import os.path +from ConfigParser import SafeConfigParser -class Appconfig: - xml_loc = "/opt/eSim/src/modelParamXML/" +class Appconfig: + home = os.path.expanduser("~") + #Reading all varibale from eSim config.ini + parser = SafeConfigParser() + parser.read(os.path.join(home, os.path.join('.esim','config.ini'))) + src_home = parser.get('eSim','eSim_HOME') + xml_loc = os.path.join(src_home,'src/modelParamXML')#"/opt/eSim/src/modelParamXML/" lib_loc = os.path.expanduser('~') esimFlag = 0 diff --git a/src/createKicadLibrary.py b/src/createKicadLibrary.py index 3513f5e..a789709 100644 --- a/src/createKicadLibrary.py +++ b/src/createKicadLibrary.py @@ -3,23 +3,17 @@ import re import os import xml.etree.cElementTree as ET from PyQt4 import QtGui, QtCore -from ConfigParser import SafeConfigParser class AutoSchematic(QtGui.QWidget): def __init__(self, modelname): QtGui.QWidget.__init__(self) - self.home = os.path.expanduser("~") self.modelname = modelname.split('.')[0] self.template = Appconfig.kicad_lib_template self.xml_loc = Appconfig.xml_loc self.lib_loc = Appconfig.lib_loc self.kicad_nghdl_lib = 'eSim_kicad.lib' - #Reading all varibale from config.ini - self.parser = SafeConfigParser() - self.parser.read(os.path.join(self.home, os.path.join('.esim','config.ini'))) - self.src_home = self.parser.get('SRC','SRC_HOME') def createKicadLibrary(self): diff --git a/src/model_generation.py b/src/model_generation.py index c520708..4f2d7dd 100644 --- a/src/model_generation.py +++ b/src/model_generation.py @@ -464,7 +464,7 @@ for item in cm_event_get_ptr: cfunc.write(systime_info) cfunc.write("\n") cfunc.write("\t\tchar command[1024];") -cfunc.write('\t\tsnprintf(command,1024,"'+home+'/ngspice-26/src/xspice/icm/ghdl/'+fname.split('.')[0]+'/DUTghdl/start_server.sh %d &",sock_port);\n') +cfunc.write('\t\tsnprintf(command,1024,"'+home+'/ngspice-nghdl/src/xspice/icm/ghdl/'+fname.split('.')[0]+'/DUTghdl/start_server.sh %d &",sock_port);\n') cfunc.write('\t\tsystem(command);') cfunc.write("\t}") cfunc.write("\n") @@ -767,7 +767,7 @@ start_server.write("###This server run ghdl testebench for infinite time till ng start_server.write("#gcc -c ghdlserver.c\n") start_server.write("#ghdl -a Utility_Package.vhdl &&\n") start_server.write("#ghdl -a Vhpi_Package.vhdl &&\n") -start_server.write("cd "+home+"/ngspice-26/src/xspice/icm/ghdl/"+fname.split('.')[0]+"/DUTghdl/\n") +start_server.write("cd "+home+"/ngspice-nghdl/src/xspice/icm/ghdl/"+fname.split('.')[0]+"/DUTghdl/\n") start_server.write("chmod 775 sock_pkg_create.sh &&\n") start_server.write("./sock_pkg_create.sh $1 &&\n") start_server.write("ghdl -a sock_pkg.vhdl &&\n") |