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
855868ba
Commit
855868ba
authored
10 months ago
by
Martin Högstedt
Browse files
Options
Downloads
Patches
Plain Diff
asm instr and clock cycle stepping is now fixed
parent
db4cd213
No related branches found
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
#131563
failed
10 months ago
Stage: test
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/simudator/core/processor.py
+0
-3
0 additions, 3 deletions
src/simudator/core/processor.py
src/simudator/gui/gui.py
+0
-1
0 additions, 1 deletion
src/simudator/gui/gui.py
src/simudator/processor/mia/mia.py
+13
-1
13 additions, 1 deletion
src/simudator/processor/mia/mia.py
with
13 additions
and
5 deletions
src/simudator/core/processor.py
+
0
−
3
View file @
855868ba
...
...
@@ -253,10 +253,7 @@ class Processor:
try
:
module_states
=
self
.
module_history
[
cycle_index
]
print
(
cycle_index
)
except
IndexError
:
print
(
cycle_index
)
print
(
321
)
raise
IndexError
...
...
This diff is collapsed.
Click to expand it.
src/simudator/gui/gui.py
+
0
−
1
View file @
855868ba
...
...
@@ -928,7 +928,6 @@ class GUI(QMainWindow):
"""
Undos as many processor cycles as the number entered in the box.
"""
print
(
self
.
cpu
.
assembly_cycles
)
try
:
steps
=
self
.
asm_jump_value_box
.
value
()
self
.
cpu
.
undo_asm_instruction
(
steps
)
...
...
This diff is collapsed.
Click to expand it.
src/simudator/processor/mia/mia.py
+
13
−
1
View file @
855868ba
...
...
@@ -335,9 +335,16 @@ class MIA_CPU(Processor):
said number of asm intructions started and loading that clock cycle.
"""
current_clock_cycle
=
self
.
clock
index
=
len
(
self
.
assembly_cycles
)
saved_cycle
=
self
.
assembly_cycles
[
index
-
1
]
# Make sure we are undoing the instruction(s) we are currently on
while
saved_cycle
>=
current_clock_cycle
:
index
-=
1
saved_cycle
=
self
.
assembly_cycles
[
index
-
1
]
index
-=
num_instructions
index
-=
1
# We cant undo more instructions than we have performed.
if
index
<
0
:
...
...
@@ -346,6 +353,11 @@ class MIA_CPU(Processor):
clockcycle
=
self
.
assembly_cycles
[
index
]
self
.
load_cycle
(
clockcycle
)
# Need +1 here since we save the start state to enable to
# load the start state. This is done since we only append clock
# cycles to the list self.assembly_cycles when we reach a new state
# that has uPC set to 0, which wont happend when we load a new file.
self
.
assembly_cycles
=
self
.
assembly_cycles
[:
index
+
1
]
...
...
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