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
0fc247d2
Commit
0fc247d2
authored
11 months ago
by
Martin Högstedt
Browse files
Options
Downloads
Patches
Plain Diff
saving clock cycles for each new asm instruction
parent
e4ead8b9
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!13
We know have asm instructions, can step forward and backward between clock cycle and asm instructions
Pipeline
#131508
passed
11 months ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/simudator/processor/mia/mia.py
+8
-3
8 additions, 3 deletions
src/simudator/processor/mia/mia.py
with
8 additions
and
3 deletions
src/simudator/processor/mia/mia.py
+
8
−
3
View file @
0fc247d2
...
@@ -280,17 +280,22 @@ class MIA_CPU(Processor):
...
@@ -280,17 +280,22 @@ class MIA_CPU(Processor):
self
.
micro_memory
=
uM
self
.
micro_memory
=
uM
# List containing all clock cycles where a new asm instruction started
self
.
assembly_cycles
=
[]
self
.
lambdas
=
{}
self
.
lambdas
=
{}
def
do_tick
(
self
)
->
None
:
def
do_tick
(
self
)
->
None
:
"""
After each tick Mia checks for a new instruction
.
"""
Mia has special assembly related behaviour
.
This is done by checking if the value of the micro PC is equal to zero.
"""
This includes fetching the curret asm instruction, and saving the current clock
cycle in a list to enable stepping back over assembly instructions.
"""
super
().
do_tick
()
super
().
do_tick
()
if
self
.
get_module
(
"
uPC
"
).
value
==
0
:
if
self
.
get_module
(
"
uPC
"
).
value
==
0
:
self
.
new_instruction
=
True
self
.
new_instruction
=
True
self
.
current_instruction
=
self
.
get_current_instrution
()
self
.
current_instruction
=
self
.
get_current_instrution
()
print
(
self
.
current_instruction
)
self
.
assembly_cycles
.
append
(
self
.
get_clock
()
)
else
:
else
:
self
.
new_instruction
=
False
self
.
new_instruction
=
False
...
...
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