-const struct wp_coord circuit1[] = {
- { .i = 11, .j = 6, .end = 0, },
- { .i = 10, .j = 6, .end = 0, },
- { .i = 9, .j = 5, .end = 0, },
- { .i = 8, .j = 5, .end = 0, },
- { .i = 7, .j = 4, .end = 0, },
- { .i = 6, .j = 4, .end = 0, },
- { .i = 5, .j = 4, .end = 0, },
- { .i = 4, .j = 5, .end = 0, },
- { .i = 3, .j = 5, .end = 0, },
- { .i = 2, .j = 6, .end = 0, },
- { .i = 1, .j = 6, .end = 0, },
- { .i = 1, .j = 5, .end = 0, },
- { .i = 1, .j = 4, .end = 0, },
- { .i = 1, .j = 3, .end = 0, },
- { .i = 1, .j = 2, .end = 0, },
- { .i = 1, .j = 1, .end = 0, },
- { .i = 2, .j = 2, .end = 0, },
- { .i = 3, .j = 2, .end = 0, },
- { .i = 4, .j = 3, .end = 0, },
- { .i = 5, .j = 3, .end = 0, },
- { .i = 6, .j = 4, .end = 0, },
- { .i = 7, .j = 3, .end = 0, },
- { .i = 8, .j = 3, .end = 0, },
- { .i = 9, .j = 2, .end = 0, },
- { .i = 10, .j = 2, .end = 0, },
- { .i = 11, .j = 1, .end = 0, },
- { .i = 11, .j = 2, .end = 0, },
- { .i = 11, .j = 3, .end = 0, },
- { .i = 11, .j = 4, .end = 0, },
- { .i = 11, .j = 5, .end = 0, },
- { .i = 11, .j = 6, .end = 1, },
+#ifdef VERBOSE
+#define DPR(fmt, ...) printf_P(PSTR(fmt), ##__VA_ARGS__)
+#else
+#define DPR(args...) do {} while (0)
+#endif
+
+struct circuit {
+ const char *name;
+ uint8_t len;
+ const struct wp_coord *path;
+};
+
+const struct wp_coord butterfly_tab[] = {
+ { .i = 11, .j = 6, },
+ { .i = 10, .j = 6, },
+ { .i = 9, .j = 5, },
+ { .i = 8, .j = 5, },
+ { .i = 7, .j = 4, },
+ { .i = 6, .j = 4, },
+ { .i = 5, .j = 3, },
+ { .i = 4, .j = 3, },
+ { .i = 3, .j = 2, },
+ { .i = 2, .j = 2, },
+ { .i = 1, .j = 1, },
+ { .i = 1, .j = 2, },
+ { .i = 1, .j = 3, },
+ { .i = 1, .j = 4, },
+ { .i = 1, .j = 5, },
+ { .i = 1, .j = 6, },
+ { .i = 2, .j = 6, },
+ { .i = 3, .j = 5, },
+ { .i = 4, .j = 5, },
+ { .i = 5, .j = 4, },
+ { .i = 6, .j = 4, },
+ { .i = 7, .j = 3, },
+ { .i = 8, .j = 3, },
+ { .i = 9, .j = 2, },
+ { .i = 10, .j = 2, },
+ { .i = 11, .j = 1, },
+ { .i = 11, .j = 2, },
+ { .i = 11, .j = 3, },
+ { .i = 11, .j = 4, },
+ { .i = 11, .j = 5, },
+ { .i = 11, .j = 6, },
+};
+
+const struct circuit butterfly_circuit = {
+ .name = "butterfly",
+ .len = sizeof(butterfly_tab)/sizeof(struct wp_coord),
+ .path = butterfly_tab,
+};
+
+const struct wp_coord losange_tab[] = {
+ { .i = 11, .j = 6, },
+ { .i = 10, .j = 6, },
+ { .i = 9, .j = 5, },
+ { .i = 9, .j = 4, },
+ { .i = 9, .j = 3, },
+ { .i = 10, .j = 4, },
+ { .i = 11, .j = 4, },
+ { .i = 11, .j = 5, },
+ { .i = 11, .j = 6, },
+};
+
+const struct circuit losange_circuit = {
+ .name = "losange",
+ .len = sizeof(losange_tab)/sizeof(struct wp_coord),
+ .path = losange_tab,
+};
+
+const struct wp_coord triangle_tab[] = {
+ { .i = 11, .j = 6, },
+ { .i = 10, .j = 6, },
+ { .i = 9, .j = 5, },
+ { .i = 8, .j = 5, },
+ { .i = 7, .j = 4, },
+ { .i = 6, .j = 4, },
+ { .i = 7, .j = 3, },
+ { .i = 8, .j = 3, },
+ { .i = 9, .j = 2, },
+ { .i = 10, .j = 2, },
+ { .i = 11, .j = 1, },
+ { .i = 11, .j = 2, },
+ { .i = 11, .j = 3, },
+ { .i = 11, .j = 4, },
+ { .i = 11, .j = 5, },
+ { .i = 11, .j = 6, },
+};
+
+const struct circuit triangle_circuit = {
+ .name = "triangle",
+ .len = sizeof(triangle_tab)/sizeof(struct wp_coord),
+ .path = triangle_tab,
+};
+
+const struct wp_coord answer_d_tab[] = {
+ { .i = 11, .j = 6, },
+ { .i = 11, .j = 5, },
+ { .i = 11, .j = 4, },
+ { .i = 11, .j = 3, },
+ { .i = 11, .j = 2, },
+ { .i = 11, .j = 1, },
+ { .i = 10, .j = 2, },
+ { .i = 9, .j = 2, },
+ { .i = 8, .j = 3, },
+ { .i = 9, .j = 3, },
+ { .i = 10, .j = 4, },
+ { .i = 11, .j = 4, },
+ { .i = 11, .j = 5, },
+ { .i = 11, .j = 6, },
+};
+
+const struct circuit answer_d_circuit = {
+ .name = "answer_d",
+ .len = sizeof(answer_d_tab)/sizeof(struct wp_coord),
+ .path = answer_d_tab,
+};
+
+const struct wp_coord h_lambda_tab[] = {
+ { .i = 11, .j = 6, },
+ { .i = 10, .j = 6, },
+ { .i = 9, .j = 5, },
+ { .i = 8, .j = 5, },
+ { .i = 7, .j = 4, },
+ { .i = 6, .j = 4, },
+ { .i = 5, .j = 3, },
+ { .i = 5, .j = 4, },
+ { .i = 5, .j = 5, },
+ { .i = 5, .j = 6, },
+ { .i = 6, .j = 6, },
+ { .i = 7, .j = 5, },
+ { .i = 8, .j = 5, },
+ { .i = 9, .j = 5, },
+ { .i = 10, .j = 6, },
+ { .i = 11, .j = 6, },
+};
+
+const struct circuit h_lambda_circuit = {
+ .name = "h_lambda",
+ .len = sizeof(h_lambda_tab)/sizeof(struct wp_coord),
+ .path = h_lambda_tab,
+};
+
+const struct wp_coord asym_butterfly_tab[] = {
+ { .i = 11, .j = 6, },
+ { .i = 10, .j = 6, },
+ { .i = 9, .j = 5, },
+ { .i = 8, .j = 5, },
+ { .i = 7, .j = 4, },
+ { .i = 6, .j = 4, },
+ { .i = 5, .j = 3, },
+ { .i = 4, .j = 3, },
+ { .i = 3, .j = 2, },
+ { .i = 3, .j = 3, },
+ { .i = 3, .j = 4, },
+ { .i = 3, .j = 5, },
+ { .i = 4, .j = 5, },
+ { .i = 5, .j = 4, },
+ { .i = 6, .j = 4, },
+ { .i = 7, .j = 3, },
+ { .i = 8, .j = 3, },
+ { .i = 9, .j = 2, },
+ { .i = 10, .j = 2, },
+ { .i = 11, .j = 1, },
+ { .i = 11, .j = 2, },
+ { .i = 11, .j = 3, },
+ { .i = 11, .j = 4, },
+ { .i = 11, .j = 5, },
+ { .i = 11, .j = 6, },
+};
+
+const struct circuit asym_butterfly_circuit = {
+ .name = "asym_butterfly",
+ .len = sizeof(asym_butterfly_tab)/sizeof(struct wp_coord),
+ .path = asym_butterfly_tab,
+};
+
+const struct wp_coord big_h_lambda_tab[] = {
+ { .i = 11, .j = 6, },
+ { .i = 10, .j = 6, },
+ { .i = 9, .j = 5, },
+ { .i = 8, .j = 5, },
+ { .i = 7, .j = 4, },
+ { .i = 6, .j = 4, },
+ { .i = 5, .j = 4, },
+ { .i = 4, .j = 5, },
+ { .i = 3, .j = 5, },
+ { .i = 2, .j = 6, },
+ { .i = 1, .j = 6, },
+ { .i = 1, .j = 5, },
+ { .i = 1, .j = 4, },
+ { .i = 1, .j = 3, },
+ { .i = 1, .j = 2, },
+ { .i = 1, .j = 1, },
+ { .i = 2, .j = 2, },
+ { .i = 3, .j = 2, },
+ { .i = 4, .j = 3, },
+ { .i = 5, .j = 3, },
+ { .i = 6, .j = 4, },
+ { .i = 7, .j = 4, },
+ { .i = 8, .j = 5, },
+ { .i = 9, .j = 5, },
+ { .i = 10, .j = 6, },
+ { .i = 11, .j = 6, },
+};
+
+const struct circuit big_h_lambda_circuit = {
+ .name = "big_h_lambda",
+ .len = sizeof(big_h_lambda_tab)/sizeof(struct wp_coord),
+ .path = big_h_lambda_tab,
+};
+
+const struct wp_coord letter_v_tab[] = {
+ { .i = 11, .j = 6, },
+ { .i = 10, .j = 6, },
+ { .i = 9, .j = 5, },
+ { .i = 8, .j = 5, },
+ { .i = 7, .j = 4, },
+ { .i = 6, .j = 4, },
+ { .i = 5, .j = 4, },
+ { .i = 4, .j = 5, },
+ { .i = 3, .j = 5, },
+ { .i = 2, .j = 6, },
+ { .i = 1, .j = 6, },
+ { .i = 1, .j = 5, },
+ { .i = 1, .j = 4, },
+ { .i = 2, .j = 4, },
+ { .i = 3, .j = 3, },
+ { .i = 4, .j = 3, },
+ { .i = 5, .j = 2, },
+ { .i = 6, .j = 2, },
+ { .i = 7, .j = 2, },
+ { .i = 8, .j = 3, },
+ { .i = 9, .j = 3, },
+ { .i = 10, .j = 4, },
+ { .i = 11, .j = 4, },
+ { .i = 11, .j = 5, },
+ { .i = 11, .j = 6, },
+};
+
+const struct circuit letter_v_circuit = {
+ .name = "letter_v",
+ .len = sizeof(letter_v_tab)/sizeof(struct wp_coord),
+ .path = letter_v_tab,