Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
simuDAtor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Computer Engineering
simuDAtor
Commits
b0b8b9b5
Commit
b0b8b9b5
authored
10 months ago
by
Martin Högstedt
Browse files
Options
Downloads
Patches
Plain Diff
fixed comments
parent
0cea0499
Branches
Branches containing commit
No related tags found
1 merge request
!13
We know have asm instructions, can step forward and backward between clock cycle and asm instructions
Pipeline
#131571
passed
10 months ago
Stage: test
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/simudator/gui/gui.py
+2
-3
2 additions, 3 deletions
src/simudator/gui/gui.py
src/simudator/gui/pipeline.py
+10
-6
10 additions, 6 deletions
src/simudator/gui/pipeline.py
with
12 additions
and
9 deletions
src/simudator/gui/gui.py
+
2
−
3
View file @
b0b8b9b5
...
...
@@ -132,7 +132,8 @@ class GUI(QMainWindow):
self
.
cpu_running
=
False
self
.
pipeline
=
PipeLine
()
self
.
pipeline
.
show
()
# Hide pipeline for now since it is not implemented yet
# self.pipeline.show()
# Set Style, THESE ARE TEST AND DONT WORK
app
=
QApplication
.
instance
()
...
...
@@ -571,8 +572,6 @@ class GUI(QMainWindow):
"""
self
.
cpu
.
stop
()
# TODO: What is the difference between folderSaveDialog and folderLoadDialog?
def
folderSaveDialog
(
self
)
->
str
:
"""
Opens a file explorer in a new window. Returns the absolute path to the selected file.
...
...
This diff is collapsed.
Click to expand it.
src/simudator/gui/pipeline.py
+
10
−
6
View file @
b0b8b9b5
...
...
@@ -12,6 +12,8 @@ class PipeLine(QTableWidget):
def
__init__
(
self
):
super
().
__init__
()
# Values below are temporary test values
"""
self.setRowCount(5)
self.setColumnCount(5)
self.instructions = [
"
Add
"
,
"
Sub
"
,
"
Mult
"
,
"
Fetch
"
,
"
Nop
"
]
...
...
@@ -19,20 +21,22 @@ class PipeLine(QTableWidget):
self.set_item(1, 1, self.instructions[1])
self.set_item(2, 2, self.instructions[2])
self.set_item(3, 3, self.instructions[3])
"""
def
set_instruction
(
self
,
instructions
:
list
[
str
]):
def
set_instruction
(
self
,
instructions
:
list
[
str
])
->
None
:
"""
Give the pipeline the current CPU instructions.
"""
self
.
instrucitons
=
instructions
def
set_height
(
self
,
height
:
int
):
def
set_height
(
self
,
height
:
int
)
->
None
:
"""
Sets the height of the pipeline.
"""
self
.
setColumnCount
(
height
)
def
set_width
(
self
,
width
:
int
):
def
set_width
(
self
,
width
:
int
)
->
None
:
"""
Sets the width of the pipeline.
"""
self
.
setRowCount
(
width
)
def
set_row_labels
(
self
,
labels
:
list
[
str
]):
def
set_row_labels
(
self
,
labels
:
list
[
str
])
->
None
:
"""
Sets the lable for each row. Does not gurantee that number of labels match rows.
...
...
@@ -44,7 +48,7 @@ class PipeLine(QTableWidget):
"""
raise
NotImplemented
def
set_col_labels
(
self
,
labels
:
list
[
str
]):
def
set_col_labels
(
self
,
labels
:
list
[
str
])
->
None
:
"""
Sets the lable for each col. Does not gurantee that number of labels match cols.
...
...
@@ -54,7 +58,7 @@ class PipeLine(QTableWidget):
"""
raise
NotImplemented
def
set_item
(
self
,
row
:
int
,
col
:
int
,
text
:
str
):
def
set_item
(
self
,
row
:
int
,
col
:
int
,
text
:
str
)
->
None
:
"""
Sets the text at position col row to the given text.
"""
item
=
QTableWidgetItem
(
text
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment