Error: No Verilog File Chosen. \
- Please chose a Verilog file in Makerchip Tab",
+ Please choose a verilog file in Makerchip Tab",
QtWidgets.QMessageBox.Ok)
if reply == QtWidgets.QMessageBox.Ok:
self.obj_Appconfig.print_error(
- 'No VerilogFile. Please add a File in Makerchip Tab')
+ 'No Verilog File Chosen. '
+ 'Please choose a verilog file in Makerchip Tab'
+ )
return
self.fname = Maker.verilogFile[self.filecount]
@@ -136,7 +134,8 @@ class NgVeri(QtWidgets.QWidget):
else:
try:
shutil.copy(
- self.release_dir + "/src/xspice/icm/Ngveri/Ngveri.cm",
+ self.release_dir +
+ "/src/xspice/icm/Ngveri/Ngveri.cm",
self.nghdl_home + "/lib/ngspice/"
)
except FileNotFoundError as err:
@@ -147,8 +146,8 @@ class NgVeri(QtWidgets.QWidget):
terminalLog = self.entry_var[0].toPlainText()
if "error" not in terminalLog.lower():
self.entry_var[0].append('''
-
- Model Created Successfully!
+
Model Created Successfully!
''')
@@ -156,35 +155,37 @@ class NgVeri(QtWidgets.QWidget):
except BaseException as err:
self.entry_var[0].append(
- "Error in Ngspice code model generation from Verilog: " + str(err)
+ "Error in Ngspice code model generation " +
+ "from Verilog: " + str(err)
)
terminalLog = self.entry_var[0].toPlainText()
if "error" in terminalLog.lower():
self.entry_var[0].append('''
-
- There was an error during model creation,
-
- Please rectify the error and try again !
+
There was an error during model creation,
+
Please rectify the error and try again!
- ''')
-
- # This function is used to add additional files required by the verilog
- # top module
+ ''')
def addfile(self):
+ '''
+ This function is used to add additional files required
+ by the verilog top module
+ '''
if len(Maker.verilogFile) < (self.filecount + 1):
reply = QtWidgets.QMessageBox.critical(
None,
"Error Message",
"Error: No Verilog File Chosen. \
- Please chose a Verilog file in Makerchip Tab",
+ Please choose a verilog file in Makerchip Tab",
QtWidgets.QMessageBox.Ok)
if reply == QtWidgets.QMessageBox.Ok:
self.obj_Appconfig.print_error(
- 'No VerilogFile. Please chose\
- a Verilog File in Makerchip Tab')
+ 'No Verilog File Chosen. Please choose \
+ a verilog file in Makerchip Tab')
return
+
self.fname = Maker.verilogFile[self.filecount]
model = ModelGeneration.ModelGeneration(self.fname, self.entry_var[0])
# model.verilogfile()
@@ -198,12 +199,12 @@ class NgVeri(QtWidgets.QWidget):
None,
"Error Message",
"Error: No Verilog File Chosen. \
- Please chose a Verilog file in Makerchip Tab",
+ Please choose a verilog file in Makerchip Tab",
QtWidgets.QMessageBox.Ok)
if reply == QtWidgets.QMessageBox.Ok:
self.obj_Appconfig.print_error(
- 'No VerilogFile. Please chose \
- a Verilog File in Makerchip Tab')
+ 'No Verilog File Chosen. Please choose \
+ a verilog file in Makerchip Tab')
return
self.fname = Maker.verilogFile[self.filecount]
model = ModelGeneration.ModelGeneration(self.fname, self.entry_var[0])
@@ -260,7 +261,7 @@ class NgVeri(QtWidgets.QWidget):
return self.optionsbox
# This function is used to remove models in modlst of Ngspice folder if
- # the user wants to remove a model.Note: files do not get removed
+ # the user wants to remove a model. Note: files do not get removed
def edit_modlst(self, text):
if text == "Edit modlst":
return
@@ -268,7 +269,7 @@ class NgVeri(QtWidgets.QWidget):
self.entry_var[1].removeItem(index)
self.entry_var[1].setCurrentIndex(0)
ret = QtWidgets.QMessageBox.warning(
- None, "Warning", '''Do you want to remove model:''' +
+ None, "Warning", '''Do you want to remove the model: ''' +
text,
QtWidgets.QMessageBox.Ok, QtWidgets.QMessageBox.Cancel
)
@@ -297,15 +298,17 @@ class NgVeri(QtWidgets.QWidget):
)
except BaseException as err:
QtWidgets.QMessageBox.critical(
- None, "Error Message",
- "The verilog model '" + str(text) +
- "' could not be removed: " + str(err),
- QtWidgets.QMessageBox.Ok)
-
+ None, "Error Message",
+ "The verilog model '" + str(text) +
+ "' could not be removed: " + str(err),
+ QtWidgets.QMessageBox.Ok
+ )
- # This is to remove lint_off comments needed by the verilator warnings
- # This function writes to the lint_off.txt here in the same folder
def lint_off_edit(self, text):
+ '''
+ This is to remove lint_off comments needed by the verilator warnings.
+ This function writes to the lint_off.txt in the library/tlv folder.
+ '''
init_path = '../../'
if os.name == 'nt':
init_path = ''
@@ -332,14 +335,12 @@ class NgVeri(QtWidgets.QWidget):
file = open(init_path + "library/tlv/lint_off.txt", 'w')
for item in data:
file.write(item)
- return
-
- # else:
- # return
- # This is to add lint_off comments needed by the verilator warnings
- # This function writes to the lint_off.txt here in the same folder
def add_lint_off(self):
+ '''
+ This is to add lint_off comments needed by the verilator warnings.
+ This function writes to the lint_off.txt in the library/tlv folder.
+ '''
init_path = '../../'
if os.name == 'nt':
init_path = ''
diff --git a/src/maker/createkicad.py b/src/maker/createkicad.py
old mode 100755
new mode 100644
index c8b14b6e..af30cee0
--- a/src/maker/createkicad.py
+++ b/src/maker/createkicad.py
@@ -30,7 +30,6 @@
from . import Appconfig
import re
import os
-import sys # noqa F401
import xml.etree.cElementTree as ET
from PyQt5 import QtWidgets
@@ -68,40 +67,43 @@ class AutoSchematic:
if (str(self.modelname) + '.xml') in files:
xmlFound = root
print(xmlFound)
+ break
+
if xmlFound is None:
self.getPortInformation()
self.createXML()
self.createLib()
+
elif (xmlFound == os.path.join(self.xml_loc, 'Ngveri')):
print('Library already exists...')
ret = QtWidgets.QMessageBox.warning(
None, "Warning", '''Library files for this model''' +
''' already exist. Do you want to overwrite it?
If yes press ok, else cancel it and ''' +
- '''change the name of your vhdl file.''',
+ '''change the name of your verilog model.''',
QtWidgets.QMessageBox.Ok, QtWidgets.QMessageBox.Cancel
)
+
if ret == QtWidgets.QMessageBox.Ok:
print("Overwriting existing libraries")
self.getPortInformation()
self.createXML()
- self.removeOldLibrary() # Removes the exisitng library
+ self.removeOldLibrary() # Removes the existng library
self.createLib()
else:
print("Library Creation Cancelled")
return "Error"
else:
- print('Pre existing library...')
+ print('Pre-existing library...')
ret = QtWidgets.QMessageBox.critical(
self.parent, "Error", '''A standard library already ''' +
'''exists with this name.
Please change the ''' +
- '''name of your vhdl file and upload it again''',
+ '''name of your verilog model and add it again.''',
QtWidgets.QMessageBox.Ok
)
# getting the port information here
-
def getPortInformation(self):
portInformation = PortInfo(self, self.modelpath)
portInformation.getPortInfo()
@@ -267,7 +269,6 @@ class AutoSchematic:
port_list = []
j = 0
- k = 0 # noqa F841
for i in range(total):
if (i < inputs):
input_port[1] = inputName[i]
diff --git a/src/maker/makerchip.py b/src/maker/makerchip.py
index 29e1421d..152c6cbb 100755
--- a/src/maker/makerchip.py
+++ b/src/maker/makerchip.py
@@ -27,23 +27,15 @@
# =========================================================================
# importing the files and libraries
-import sys
-import os
from PyQt5 import QtWidgets
-from configuration.Appconfig import Appconfig
-from projManagement.Validation import Validation
-# from .Processing import PrcocessNetlist
from . import Maker
from . import NgVeri
-from xml.etree import ElementTree as ET
-
# filecount is used to count thenumber of objects created
filecount = 0
-# this class creates objects for creating the Maker and the Ngveri tabs
-
+# This class creates objects for creating the Maker and the Ngveri tabs
class makerchip(QtWidgets.QWidget):
# initialising the variables
diff --git a/src/projManagement/Kicad.py b/src/projManagement/Kicad.py
index 8f25b732..8c92c06b 100644
--- a/src/projManagement/Kicad.py
+++ b/src/projManagement/Kicad.py
@@ -96,11 +96,11 @@ class Kicad:
self.msg.setWindowTitle("Error Message")
self.msg.showMessage(
'Please select the project first. You can either ' +
- 'create new project or open existing project')
+ 'create new project or open an existing project')
self.msg.exec_()
self.obj_appconfig.print_warning(
'Please select the project first. You can either ' +
- 'create new project or open existing project')
+ 'create new project or open an existing project')
'''
# Commenting as it is no longer needed as PCB and Layout will open from
@@ -133,10 +133,10 @@ class Kicad:
self.msg.setModal(True)
self.msg.setWindowTitle("Error Message")
self.msg.showMessage('Please select the project first. You can'
- + 'either create new project or open existing project')
+ + 'either create new project or open an existing project')
self.msg.exec_()
self.obj_appconfig.print_warning('Please select the project'
- + 'first. You can either create new project or open existing'
+ + 'first. You can either create new project or open an existing'
+ 'project')
def openLayout(self):
@@ -166,10 +166,10 @@ class Kicad:
self.msg.setModal(True)
self.msg.setWindowTitle("Error Message")
self.msg.showMessage('Please select the project first. You can'
- + 'either create new project or open existing project')
+ + 'either create new project or open an existing project')
self.msg.exec_()
self.obj_appconfig.print_warning('Please select the project'
- + 'first. You can either create new project or open existing'
+ + 'first. You can either create new project or open an existing'
+ 'project')
'''
@@ -226,8 +226,8 @@ class Kicad:
self.msg.setWindowTitle("Error Message")
self.msg.showMessage(
'Please select the project first. You can either ' +
- 'create new project or open existing project')
+ 'create new project or open an existing project')
self.msg.exec_()
self.obj_appconfig.print_warning(
'Please select the project first. You can either ' +
- 'create new project or open existing project')
+ 'create new project or open an existing project')
--
cgit