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
d2b4cc01
Commit
d2b4cc01
authored
10 months ago
by
Martin Högstedt
Browse files
Options
Downloads
Plain Diff
merge
parents
c685c783
450458f0
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/simudator/core/modules/memory.py
+1
-1
1 addition, 1 deletion
src/simudator/core/modules/memory.py
src/simudator/processor/mia/gui/mia_memory_graphic.py
+11
-3
11 additions, 3 deletions
src/simudator/processor/mia/gui/mia_memory_graphic.py
with
12 additions
and
4 deletions
src/simudator/core/modules/memory.py
+
1
−
1
View file @
d2b4cc01
...
...
@@ -31,7 +31,7 @@ class Memory(Module):
self
.
output_s
=
output_signal
# Internal state
self
.
memory
=
[
0
for
i
in
range
(
size
)]
self
.
memory
=
[
0
for
_
in
range
(
size
)]
self
.
current_adress
=
0
self
.
is_write
=
False
...
...
This diff is collapsed.
Click to expand it.
src/simudator/processor/mia/gui/mia_memory_graphic.py
+
11
−
3
View file @
d2b4cc01
...
...
@@ -7,6 +7,7 @@ from qtpy.QtWidgets import (
QTextEdit
,
QVBoxLayout
,
QWidget
,
QErrorMessage
,
)
from
simudator.core.modules
import
Memory
...
...
@@ -57,6 +58,7 @@ class MiaMemoryGraphicsItem(MemoryGraphicsItem):
def
__init__
(
self
,
memory_module
:
Memory
,
**
kwargs
):
super
().
__init__
(
memory_module
,
**
kwargs
)
self
.
memory_window
=
None
self
.
errorMessageWidget
=
QErrorMessage
()
def
draw_graphics_item
(
self
)
->
None
:
# Same as normal memory but no control signal
...
...
@@ -145,6 +147,12 @@ class MiaMemoryGraphicsItem(MemoryGraphicsItem):
)
else
:
module_state
=
self
.
module
.
get_state
()
module_state
[
'
memory
'
][
parsed_adress
]
=
parsed_value
self
.
module
.
set_state
(
module_state
)
self
.
update_graphics_signal
.
emit
()
try
:
module_state
[
'
memory
'
][
parsed_adress
]
=
parsed_value
except
IndexError
:
self
.
errorMessageWidget
.
showMessage
(
"
Address entered was larger than memory space. Max address is 0xff
"
)
else
:
self
.
module
.
set_state
(
module_state
)
self
.
update_graphics_signal
.
emit
()
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