summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/frontEnd/DockArea.py65
-rw-r--r--src/frontEnd/TerminalUi.ui2
-rwxr-xr-xsrc/maker/ModelGeneration.py18
3 files changed, 56 insertions, 29 deletions
diff --git a/src/frontEnd/DockArea.py b/src/frontEnd/DockArea.py
index 7037dcfd..e8989e34 100755
--- a/src/frontEnd/DockArea.py
+++ b/src/frontEnd/DockArea.py
@@ -248,35 +248,52 @@ class DockArea(QtWidgets.QMainWindow):
global count
projDir = self.obj_appconfig.current_project["ProjectName"]
- projName = os.path.basename(projDir)
- dockName = f'Subcircuit-{projName}-'
- self.subcktWidget = QtWidgets.QWidget()
- self.subcktLayout = QtWidgets.QVBoxLayout()
- self.subcktLayout.addWidget(Subcircuit(self))
+ """ Checks projDir variable has valid value
+ & is not None before calling os.path.basename """
- self.subcktWidget.setLayout(self.subcktLayout)
- dock[dockName +
- str(count)] = QtWidgets.QDockWidget(dockName
- + str(count))
- dock[dockName + str(count)] \
- .setWidget(self.subcktWidget)
- self.addDockWidget(QtCore.Qt.TopDockWidgetArea,
- dock[dockName + str(count)])
- self.tabifyDockWidget(dock['Welcome'],
- dock[dockName + str(count)])
+ if projDir is not None:
+ projName = os.path.basename(projDir)
+ dockName = f'Subcircuit-{projName}-'
- # CSS
- dock[dockName + str(count)].setStyleSheet(" \
- .QWidget { border-radius: 15px; border: 1px solid gray;\
- padding: 5px; width: 200px; height: 150px; } \
- ")
+ self.subcktWidget = QtWidgets.QWidget()
+ self.subcktLayout = QtWidgets.QVBoxLayout()
+ self.subcktLayout.addWidget(Subcircuit(self))
- dock[dockName + str(count)].setVisible(True)
- dock[dockName + str(count)].setFocus()
- dock[dockName + str(count)].raise_()
+ self.subcktWidget.setLayout(self.subcktLayout)
+ dock[dockName +
+ str(count)] = QtWidgets.QDockWidget(dockName
+ + str(count))
+ dock[dockName + str(count)] \
+ .setWidget(self.subcktWidget)
+ self.addDockWidget(QtCore.Qt.TopDockWidgetArea,
+ dock[dockName + str(count)])
+ self.tabifyDockWidget(dock['Welcome'],
+ dock[dockName + str(count)])
- count = count + 1
+ # CSS
+ dock[dockName + str(count)].setStyleSheet(" \
+ .QWidget { border-radius: 15px; border: 1px solid gray;\
+ padding: 5px; width: 200px; height: 150px; } \
+ ")
+
+ dock[dockName + str(count)].setVisible(True)
+ dock[dockName + str(count)].setFocus()
+ dock[dockName + str(count)].raise_()
+
+ count = count + 1
+
+ else:
+ """ when projDir is None that is clicking on subcircuit icon
+ without any project selection """
+ self.msg = QtWidgets.QErrorMessage()
+ 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'
+ )
+ self.msg.exec_()
def makerchip(self):
"""This function creates a widget for different subcircuit options."""
diff --git a/src/frontEnd/TerminalUi.ui b/src/frontEnd/TerminalUi.ui
index 9039984d..403ac344 100644
--- a/src/frontEnd/TerminalUi.ui
+++ b/src/frontEnd/TerminalUi.ui
@@ -151,7 +151,7 @@ p, li { white-space: pre-wrap; }
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="textInteractionFlags">
- <set>Qt::NoTextInteraction</set>
+ <set>Qt::LinksAccessibleByKeyboard|Qt::LinksAccessibleByMouse|Qt::TextBrowserInteraction|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
</property>
</widget>
</item>
diff --git a/src/maker/ModelGeneration.py b/src/maker/ModelGeneration.py
index 2591b26b..7dce1de7 100755
--- a/src/maker/ModelGeneration.py
+++ b/src/maker/ModelGeneration.py
@@ -23,7 +23,7 @@
# Nalinkumar S., Madras Institue of Technology
# ORGANIZATION: eSim Team at FOSSEE, IIT Bombay
# CREATED: Monday 29, November 2021
-# REVISION: Tuesday 25, January 2022
+# REVISION: Tuesday 2nd, September 2023
# =========================================================================
@@ -717,6 +717,9 @@ and set the load for input ports */
foo_func = '''
int foo_''' + self.fname.split('.')[0] + '''(int init,int count)
{
+ int argc=1;
+ char* argv[]={"fullverbose"};
+ Verilated::commandArgs(argc, argv);
static VerilatedContext* contextp = new VerilatedContext;
static V''' + self.fname.split('.')[0] + "* " + \
self.fname.split('.')[0] + '''[1024];
@@ -849,9 +852,16 @@ and set the load for input ports */
else:
self.cmd = ''
- self.cmd = self.cmd + "verilator -Wall " + wno + " \
- --cc --exe --no-MMD --Mdir . -CFLAGS -fPIC sim_main_" + \
- self.fname.split('.')[0] + ".cpp " + self.fname
+ # self.cmd = self.cmd + "verilator -Wall " + wno + " \
+ # --cc --exe --no-MMD --Mdir . -CFLAGS -fPIC sim_main_" + \
+ # self.fname.split('.')[0] + ".cpp " + self.fname
+ self.cmd = self.cmd + "verilator --stats -O3 -CFLAGS\
+ -O3 -LDFLAGS \"-static\" --x-assign fast \
+ --x-initial fast --noassert --bbox-sys -Wall " + wno + "\
+ --cc --exe --no-MMD --Mdir . -CFLAGS\
+ -fPIC -output-split 0 sim_main_" + \
+ self.fname.split('.')[0] + ".cpp --autoflush \
+ -DBSV_RESET_FIFO_HEAD -DBSV_RESET_FIFO_ARRAY " + self.fname
self.process = QtCore.QProcess(self)
self.process.readyReadStandardOutput.connect(self.readAllStandard)
self.process.start('sh', ['-c', self.cmd])