@@ -42,7 +42,6 @@ class NgVeri(QtWidgets.QWidget):
4242
4343 # initialising the variables
4444 def __init__ (self , filecount ):
45- print (self )
4645 QtWidgets .QWidget .__init__ (self )
4746 # Maker.addverilog(self)
4847 self .obj_Appconfig = Appconfig ()
@@ -99,7 +98,8 @@ def addverilog(self):
9998 return
10099
101100 self .fname = Maker .verilogFile [self .filecount ]
102- model = ModelGeneration .ModelGeneration (self .fname , self .entry_var [0 ])
101+ currentTermLogs = QtWidgets .QTextEdit ()
102+ model = ModelGeneration .ModelGeneration (self .fname , currentTermLogs )
103103 file = (os .path .basename (self .fname )).split ('.' )[0 ]
104104 if self .entry_var [1 ].findText (file ) == - 1 :
105105 self .entry_var [1 ].addItem (file )
@@ -139,35 +139,38 @@ def addverilog(self):
139139 self .nghdl_home + "/lib/ngspice/"
140140 )
141141 except FileNotFoundError as err :
142- self . entry_var [ 0 ] .append (
142+ currentTermLogs .append (
143143 "Error in copying Ngveri code model: " + str (err )
144144 )
145145
146- terminalLog = self .entry_var [0 ].toPlainText ()
147- if "error" not in terminalLog .lower ():
148- self .entry_var [0 ].append ('''
146+ if "error" not in currentTermLogs .toPlainText ().lower ():
147+ currentTermLogs .append ('''
149148 <p style=\" font-size:16pt; font-weight:1000;
150149 color:#00FF00;\" > Model Created Successfully!
151150 </p>
152151 ''' )
153152
154- return
155-
156153 except BaseException as err :
157- self . entry_var [ 0 ] .append (
154+ currentTermLogs .append (
158155 "Error in Ngspice code model generation " +
159156 "from Verilog: " + str (err )
160157 )
161158
162- terminalLog = self .entry_var [0 ].toPlainText ()
163- if "error" in terminalLog .lower ():
164- self .entry_var [0 ].append ('''
159+ if "error" in currentTermLogs .toPlainText ().lower ():
160+ currentTermLogs .append ('''
165161 <p style=\" font-size:16pt; font-weight:1000;
166162 color:#FF0000;\" >There was an error during model creation,
167163 <br/>Please rectify the error and try again!
168164 </p>
169165 ''' )
170166
167+ self .entry_var [0 ].append (currentTermLogs .toHtml ())
168+
169+ # Force scroll the terminal widget at bottom
170+ self .entry_var [0 ].verticalScrollBar ().setValue (
171+ self .entry_var [0 ].verticalScrollBar ().maximum ()
172+ )
173+
171174 def addfile (self ):
172175 '''
173176 This function is used to add additional files required
0 commit comments