Skip to content

Commit

Permalink
Add examples with through ports
Browse files Browse the repository at this point in the history
  • Loading branch information
dexter2206 committed Sep 28, 2024
1 parent 779fbdd commit 0e79a51
Show file tree
Hide file tree
Showing 2 changed files with 217 additions and 0 deletions.
107 changes: 107 additions & 0 deletions tests/qref/data/valid_programs/example_7.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
description: Program with a through port
input:
program:
children:
- name: child_1
ports:
- direction: input
name: in_0
size: 1
- direction: output
name: out_0
size: 1
- name: child_2
ports:
- direction: input
name: in_0
size: 1
- direction: output
name: out_0
size: 1
- name: child_3
ports:
- direction: input
name: in_0
size: 1
- direction: output
name: out_0
size: 1
- name: child_4
ports:
- direction: input
name: in_0
size: 1
- direction: output
name: out_0
size: 1
- name: child_5
ports:
- direction: input
name: in_0
size: 1
- direction: output
name: out_0
size: 1
- name: child_6
ports:
- direction: input
name: in_0
size: 1
- direction: output
name: out_0
size: 1
- direction: through
name: thru_0
size: 1
- name: child_7
ports:
- direction: input
name: in_0
size: 1
- direction: input
name: in_1
size: 1
- direction: output
name: out_0
size: 1
connections:
- source: in_0
target: child_1.in_0
- source: in_1
target: child_4.in_0
- source: in_2
target: child_5.in_0
- source: child_1.out_0
target: child_2.in_0
- source: child_2.out_0
target: child_3.in_0
- source: child_3.out_0
target: out_0
- source: child_4.out_0
target: child_6.in_0
- source: child_5.out_0
target: child_6.thru_0
- source: child_6.out_0
target: child_7.in_0
- source: child_6.thru_0
target: child_7.in_1
- source: child_7.out_0
target: out_1
name: root
ports:
- direction: input
name: in_0
size: 1
- direction: input
name: in_1
size: 1
- direction: input
name: in_2
size: 1
- direction: output
name: out_0
size: 1
- direction: output
name: out_1
size: 1
version: v1
110 changes: 110 additions & 0 deletions tests/qref/data/valid_programs/example_8.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
description: Program with several through ports in leafs and non-leafs
input:
program:
children:
- name: container
ports:
- direction: through
name: thru_0
size: 1
- direction: input
name: in_0
size: N
- direction: output
name: out_0
size: N
children:
- name: child_0
ports:
- direction: through
name: thru_0
size: N
connections:
- {source: in_0, target: child_0.thru_0}
- {source: child_0.thru_0, target: out_0}
- name: child_4
ports:
- direction: input
name: in_0
size: 1
- direction: output
name: out_0
size: 1
- name: child_5
ports:
- direction: input
name: in_0
size: 1
- direction: output
name: out_0
size: 1
- name: child_6
ports:
- direction: input
name: in_0
size: 1
- direction: output
name: out_0
size: 1
- direction: through
name: thru_0
size: 1
- name: child_7
ports:
- direction: input
name: in_0
size: 1
- direction: input
name: in_1
size: 1
- direction: output
name: out_0
size: 1

connections:
- source: in_0
target: container.thru_0
- source: in_1
target: child_4.in_0
- source: in_2
target: child_5.in_0
- source: container.thru_0
target: out_0
- source: child_4.out_0
target: child_6.in_0
- source: child_5.out_0
target: child_6.thru_0
- source: child_6.out_0
target: child_7.in_0
- source: child_6.thru_0
target: child_7.in_1
- source: child_7.out_0
target: out_1
- source: in_3
target: container.in_0
- source: container.out_0
target: out_3
name: root
ports:
- direction: input
name: in_0
size: 1
- direction: input
name: in_1
size: 1
- direction: input
name: in_2
size: 1
- direction: output
name: out_0
size: 1
- direction: output
name: out_1
size: 1
- direction: input
name: in_3
size: N
- direction: output
name: out_3
size: N
version: v1

0 comments on commit 0e79a51

Please sign in to comment.