Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B-ASIC - Better ASIC Toolbox
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
B-ASIC - Better ASIC Toolbox
Commits
e09aa531
Commit
e09aa531
authored
2 years ago
by
Oscar Gustafsson
Browse files
Options
Downloads
Patches
Plain Diff
Test Simulation GUI
parent
f87edabd
No related branches found
No related tags found
No related merge requests found
Pipeline
#93789
failed
2 years ago
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
b_asic/gui_utils/plot_window.py
+12
-2
12 additions, 2 deletions
b_asic/gui_utils/plot_window.py
test/test_simulation_gui.py
+11
-0
11 additions, 0 deletions
test/test_simulation_gui.py
with
23 additions
and
2 deletions
b_asic/gui_utils/plot_window.py
+
12
−
2
View file @
e09aa531
...
@@ -100,8 +100,13 @@ class PlotWindow(QDialog):
...
@@ -100,8 +100,13 @@ class PlotWindow(QDialog):
self
.
_plot_axes
=
self
.
_plot_fig
.
add_subplot
(
111
)
self
.
_plot_axes
=
self
.
_plot_fig
.
add_subplot
(
111
)
self
.
_plot_axes
.
xaxis
.
set_major_locator
(
MaxNLocator
(
integer
=
True
))
self
.
_plot_axes
.
xaxis
.
set_major_locator
(
MaxNLocator
(
integer
=
True
))
ordered_for_plotting
=
{}
ordered_for_plotting
.
update
(
sim_res_others
)
ordered_for_plotting
.
update
(
sim_res_delays
)
ordered_for_plotting
.
update
(
sim_res_ins
)
ordered_for_plotting
.
update
(
sim_res_outs
)
self
.
_lines
=
{}
self
.
_lines
=
{}
for
key
in
sim_res_others
|
sim_res_delays
|
sim_res_ins
|
sim_res_outs
:
for
key
,
result
in
ordered_for_plotting
.
items
()
:
line
=
self
.
_plot_axes
.
plot
(
sim_result
[
key
],
label
=
key
)
line
=
self
.
_plot_axes
.
plot
(
sim_result
[
key
],
label
=
key
)
self
.
_lines
[
key
]
=
line
[
0
]
self
.
_lines
[
key
]
=
line
[
0
]
...
@@ -127,7 +132,12 @@ class PlotWindow(QDialog):
...
@@ -127,7 +132,12 @@ class PlotWindow(QDialog):
self
.
checklist
.
setSizePolicy
(
QSizePolicy
.
Preferred
,
QSizePolicy
.
Preferred
)
self
.
checklist
.
setSizePolicy
(
QSizePolicy
.
Preferred
,
QSizePolicy
.
Preferred
)
self
.
checklist
.
itemChanged
.
connect
(
self
.
_item_change
)
self
.
checklist
.
itemChanged
.
connect
(
self
.
_item_change
)
listitems
=
{}
listitems
=
{}
for
key
in
sim_res_ins
|
sim_res_outs
|
sim_res_delays
|
sim_res_others
:
ordered_for_checklist
=
{}
ordered_for_checklist
.
update
(
sim_res_ins
)
ordered_for_checklist
.
update
(
sim_res_outs
)
ordered_for_checklist
.
update
(
sim_res_delays
)
ordered_for_checklist
.
update
(
sim_res_others
)
for
key
in
ordered_for_checklist
:
listitem
=
QListWidgetItem
(
key
)
listitem
=
QListWidgetItem
(
key
)
listitems
[
key
]
=
listitem
listitems
[
key
]
=
listitem
self
.
checklist
.
addItem
(
listitem
)
self
.
checklist
.
addItem
(
listitem
)
...
...
This diff is collapsed.
Click to expand it.
test/test_simulation_gui.py
0 → 100644
+
11
−
0
View file @
e09aa531
import
pytest
try
:
from
b_asic.gui_utils.plot_window
import
PlotWindow
except
ImportError
:
pytestmark
=
pytest
.
mark
.
skip
(
"
Qt not setup
"
)
def
test_start
(
qtbot
):
widget
=
PlotWindow
({})
qtbot
.
addWidget
(
widget
)
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