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
a943f1fe
Commit
a943f1fe
authored
1 year ago
by
Oscar Gustafsson
Browse files
Options
Downloads
Patches
Plain Diff
More architecture tests
parent
76a2df00
No related branches found
No related tags found
1 merge request
!415
More architecture tests
Pipeline
#98776
passed
1 year ago
Stage: test
Stage: deploy
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/test_architecture.py
+21
-1
21 additions, 1 deletion
test/test_architecture.py
with
21 additions
and
1 deletion
test/test_architecture.py
+
21
−
1
View file @
a943f1fe
...
@@ -118,19 +118,27 @@ def test_architecture(schedule_direct_form_iir_lp_filter: Schedule):
...
@@ -118,19 +118,27 @@ def test_architecture(schedule_direct_form_iir_lp_filter: Schedule):
'
digraph {
\n\t
node [shape=record]
\n\t
MEM0 [label=
"
{{<in0> in0}|<MEM0>
'
'
digraph {
\n\t
node [shape=record]
\n\t
MEM0 [label=
"
{{<in0> in0}|<MEM0>
'
'
MEM0|{<out0> out0}}
"
fillcolor=
"
#00CFB5
"
style=filled]
\n
}
'
'
MEM0|{<out0> out0}}
"
fillcolor=
"
#00CFB5
"
style=filled]
\n
}
'
)
)
assert
memory
.
schedule_time
==
18
assert
memory
.
_digraph
().
source
in
(
s
,
s
+
'
\n
'
)
assert
memory
.
_digraph
().
source
in
(
s
,
s
+
'
\n
'
)
assert
memory
.
schedule_time
==
18
# Smoke test
memory
.
show_content
()
assert
not
memory
.
is_assigned
assert
not
memory
.
is_assigned
memory
.
assign
()
memory
.
assign
()
assert
memory
.
is_assigned
assert
memory
.
is_assigned
assert
len
(
memory
.
_assignment
)
==
4
assert
len
(
memory
.
_assignment
)
==
4
# Smoke test
memory
.
show_content
()
# Set invalid name
# Set invalid name
with
pytest
.
raises
(
ValueError
,
match
=
'
32 is not a valid VHDL identifier
'
):
with
pytest
.
raises
(
ValueError
,
match
=
'
32 is not a valid VHDL identifier
'
):
adder
.
set_entity_name
(
"
32
"
)
adder
.
set_entity_name
(
"
32
"
)
assert
adder
.
entity_name
==
"
adder
"
assert
adder
.
entity_name
==
"
adder
"
assert
repr
(
adder
)
==
"
adder
"
assert
repr
(
adder
)
==
"
adder
"
# Smoke test
adder
.
show_content
()
# Create architecture from
# Create architecture from
architecture
=
Architecture
(
architecture
=
Architecture
(
processing_elements
,
memories
,
direct_interconnects
=
direct_conn
processing_elements
,
memories
,
direct_interconnects
=
direct_conn
...
@@ -154,6 +162,18 @@ def test_architecture(schedule_direct_form_iir_lp_filter: Schedule):
...
@@ -154,6 +162,18 @@ def test_architecture(schedule_direct_form_iir_lp_filter: Schedule):
assert
architecture
.
resource_from_name
(
'
adder
'
)
==
adder
assert
architecture
.
resource_from_name
(
'
adder
'
)
==
adder
assert
architecture
.
get_interconnects_for_memory
(
'
MEM0
'
)
==
(
{
adder
:
2
,
multiplier
:
2
,
input_pe
:
1
},
{
adder
:
4
,
multiplier
:
4
},
)
assert
architecture
.
get_interconnects_for_pe
(
'
adder
'
)
==
(
[
{(
multiplier
,
0
):
2
,
(
memory
,
0
):
1
,
(
adder
,
0
):
1
},
{(
memory
,
0
):
3
,
(
multiplier
,
0
):
1
},
],
[{(
adder
,
0
):
1
,
(
output_pe
,
0
):
1
,
(
memory
,
0
):
2
,
(
multiplier
,
0
):
1
}],
)
def
test_move_process
(
schedule_direct_form_iir_lp_filter
:
Schedule
):
def
test_move_process
(
schedule_direct_form_iir_lp_filter
:
Schedule
):
# Resources
# Resources
...
...
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