From 0e79a51c47aaba58bb33831f7d77f2a78045547b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konrad=20Ja=C5=82owiecki?= Date: Sat, 28 Sep 2024 16:36:00 -0700 Subject: [PATCH] Add examples with through ports --- tests/qref/data/valid_programs/example_7.yaml | 107 +++++++++++++++++ tests/qref/data/valid_programs/example_8.yaml | 110 ++++++++++++++++++ 2 files changed, 217 insertions(+) create mode 100644 tests/qref/data/valid_programs/example_7.yaml create mode 100644 tests/qref/data/valid_programs/example_8.yaml diff --git a/tests/qref/data/valid_programs/example_7.yaml b/tests/qref/data/valid_programs/example_7.yaml new file mode 100644 index 0000000..dd0a82a --- /dev/null +++ b/tests/qref/data/valid_programs/example_7.yaml @@ -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 diff --git a/tests/qref/data/valid_programs/example_8.yaml b/tests/qref/data/valid_programs/example_8.yaml new file mode 100644 index 0000000..5b8018d --- /dev/null +++ b/tests/qref/data/valid_programs/example_8.yaml @@ -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