summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsrc/maker/Maker.py4
-rwxr-xr-xsrc/maker/ModelGeneration.py19
2 files changed, 22 insertions, 1 deletions
diff --git a/src/maker/Maker.py b/src/maker/Maker.py
index 4e71d7fd..f3f8b93e 100755
--- a/src/maker/Maker.py
+++ b/src/maker/Maker.py
@@ -125,6 +125,10 @@ class Maker(QtWidgets.QWidget):
QtWidgets.QMessageBox.Ok | QtWidgets.QMessageBox.Cancel)
if reply == QtWidgets.QMessageBox.Ok:
self.addverilog()
+
+ if self.verilogfile == "":
+ return
+
self.obj_Appconfig.print_info('Add Verilog File Called')
elif reply == QtWidgets.QMessageBox.Cancel:
diff --git a/src/maker/ModelGeneration.py b/src/maker/ModelGeneration.py
index a87a04e1..0a6df82c 100755
--- a/src/maker/ModelGeneration.py
+++ b/src/maker/ModelGeneration.py
@@ -1012,23 +1012,32 @@ and set the load for input ports */
init_path = '../../'
if os.name == 'nt':
init_path = ''
+
includefile = QtCore.QDir.toNativeSeparators(
QtWidgets.QFileDialog.getOpenFileName(
self,
"Open adding other necessary files to be included",
init_path + "home")[0])
+
if includefile == "":
reply = QtWidgets.QMessageBox.critical(
None, "Error Message",
"<b>Error: No File Chosen. Please chose a file</b>",
QtWidgets.QMessageBox.Ok | QtWidgets.QMessageBox.Cancel
)
+
if reply == QtWidgets.QMessageBox.Ok:
self.addfile()
+
+ if includefile == "":
+ return
+
self.obj_Appconfig.print_info('Add Other Files Called')
elif reply == QtWidgets.QMessageBox.Cancel:
self.obj_Appconfig.print_info('No File Chosen')
+ return
+
filename = os.path.basename(includefile)
self.modelpath = self.digital_home + \
"/" + self.fname.split('.')[0] + "/"
@@ -1045,9 +1054,9 @@ and set the load for input ports */
print("Added the File:" + filename)
self.termtitle("Added the File:" + filename)
+
# This function is used to add additional folder required by the verilog
# top module
-
def addfolder(self):
# self.cur_dir = os.getcwd()
print("Adding the folder required by the top level module file")
@@ -1055,23 +1064,31 @@ and set the load for input ports */
init_path = '../../'
if os.name == 'nt':
init_path = '' # noqa:F841
+
includefolder = QtCore.QDir.toNativeSeparators(
QtWidgets.QFileDialog.getExistingDirectory(
self, "open", "home"
)
)
+
if includefolder == "":
reply = QtWidgets.QMessageBox.critical(
None, "Error Message",
"<b>Error: No Folder Chosen. Please chose a folder</b>",
QtWidgets.QMessageBox.Ok | QtWidgets.QMessageBox.Cancel
)
+
if reply == QtWidgets.QMessageBox.Ok:
self.addfolder()
+
+ if includefolder == "":
+ return
+
self.obj_Appconfig.print_info('Add Folder Called')
elif reply == QtWidgets.QMessageBox.Cancel:
self.obj_Appconfig.print_info('No File Chosen')
+ return
self.modelpath = self.digital_home + \
"/" + self.fname.split('.')[0] + "/"