initial doc commit
diff --git "a/doc/\350\275\257\344\273\266\350\231\232\346\213\237\345\274\200\345\217\221\347\216\257\345\242\203 \347\240\224\345\210\266\346\212\200\346\234\257\346\200\273\347\273\223\346\212\245\345\221\212.docx" "b/doc/\350\275\257\344\273\266\350\231\232\346\213\237\345\274\200\345\217\221\347\216\257\345\242\203 \347\240\224\345\210\266\346\212\200\346\234\257\346\200\273\347\273\223\346\212\245\345\221\212.docx"
old mode 100755
new mode 100644
index 536eaba..7abaae1
Binary files "a/doc/\350\275\257\344\273\266\350\231\232\346\213\237\345\274\200\345\217\221\347\216\257\345\242\203 \347\240\224\345\210\266\346\212\200\346\234\257\346\200\273\347\273\223\346\212\245\345\221\212.docx" and "b/doc/\350\275\257\344\273\266\350\231\232\346\213\237\345\274\200\345\217\221\347\216\257\345\242\203 \347\240\224\345\210\266\346\212\200\346\234\257\346\200\273\347\273\223\346\212\245\345\221\212.docx" differ
diff --git "a/doc/\350\275\257\344\273\266\350\231\232\346\213\237\345\274\200\345\217\221\347\216\257\345\242\203 \347\240\224\345\210\266\346\212\200\346\234\257\346\200\273\347\273\223\346\212\245\345\221\212.docx" "b/doc/\350\275\257\344\273\266\350\231\232\346\213\237\345\274\200\345\217\221\347\216\257\345\242\203 \347\240\224\345\210\266\346\212\200\346\234\257\346\200\273\347\273\223\346\212\245\345\221\212.docx"
index 7abaae1..f6c351f 100644
Binary files "a/doc/\350\275\257\344\273\266\350\231\232\346\213\237\345\274\200\345\217\221\347\216\257\345\242\203 \347\240\224\345\210\266\346\212\200\346\234\257\346\200\273\347\273\223\346\212\245\345\221\212.docx" and "b/doc/\350\275\257\344\273\266\350\231\232\346\213\237\345\274\200\345\217\221\347\216\257\345\242\203 \347\240\224\345\210\266\346\212\200\346\234\257\346\200\273\347\273\223\346\212\245\345\221\212.docx" differ
diff --git "a/doc/\350\275\257\344\273\266\350\231\232\346\213\237\345\274\200\345\217\221\347\216\257\345\242\203 \344\275\277\347\224\250\347\273\264\346\212\244\350\257\264\346\230\216\344\271\246.docx" "b/doc/\350\275\257\344\273\266\350\231\232\346\213\237\345\274\200\345\217\221\347\216\257\345\242\203 \344\275\277\347\224\250\347\273\264\346\212\244\350\257\264\346\230\216\344\271\246.docx"
old mode 100755
new mode 100644
index f3a2449..b7e5f1b
Binary files "a/doc/\350\275\257\344\273\266\350\231\232\346\213\237\345\274\200\345\217\221\347\216\257\345\242\203 \344\275\277\347\224\250\347\273\264\346\212\244\350\257\264\346\230\216\344\271\246.docx" and "b/doc/\350\275\257\344\273\266\350\231\232\346\213\237\345\274\200\345\217\221\347\216\257\345\242\203 \344\275\277\347\224\250\347\273\264\346\212\244\350\257\264\346\230\216\344\271\246.docx" differ
diff --git "a/doc/\350\275\257\344\273\266\350\231\232\346\213\237\345\274\200\345\217\221\347\216\257\345\242\203 \347\240\224\345\210\266\346\212\200\346\234\257\346\200\273\347\273\223\346\212\245\345\221\212.docx" "b/doc/\350\275\257\344\273\266\350\231\232\346\213\237\345\274\200\345\217\221\347\216\257\345\242\203 \347\240\224\345\210\266\346\212\200\346\234\257\346\200\273\347\273\223\346\212\245\345\221\212.docx"
index f6c351f..54f4908 100644
Binary files "a/doc/\350\275\257\344\273\266\350\231\232\346\213\237\345\274\200\345\217\221\347\216\257\345\242\203 \347\240\224\345\210\266\346\212\200\346\234\257\346\200\273\347\273\223\346\212\245\345\221\212.docx" and "b/doc/\350\275\257\344\273\266\350\231\232\346\213\237\345\274\200\345\217\221\347\216\257\345\242\203 \347\240\224\345\210\266\346\212\200\346\234\257\346\200\273\347\273\223\346\212\245\345\221\212.docx" differ
编写研制总结报告中的第六章——遇到的问题及解决方法
diff --git "a/doc/\350\275\257\344\273\266\350\231\232\346\213\237\345\274\200\345\217\221\347\216\257\345\242\203 \347\240\224\345\210\266\346\212\200\346\234\257\346\200\273\347\273\223\346\212\245\345\221\212.docx" "b/doc/\350\275\257\344\273\266\350\231\232\346\213\237\345\274\200\345\217\221\347\216\257\345\242\203 \347\240\224\345\210\266\346\212\200\346\234\257\346\200\273\347\273\223\346\212\245\345\221\212.docx"
index 0ac7835..e4ef594 100644
Binary files "a/doc/\350\275\257\344\273\266\350\231\232\346\213\237\345\274\200\345\217\221\347\216\257\345\242\203 \347\240\224\345\210\266\346\212\200\346\234\257\346\200\273\347\273\223\346\212\245\345\221\212.docx" and "b/doc/\350\275\257\344\273\266\350\231\232\346\213\237\345\274\200\345\217\221\347\216\257\345\242\203 \347\240\224\345\210\266\346\212\200\346\234\257\346\200\273\347\273\223\346\212\245\345\221\212.docx" differ
diff --git "a/doc/\350\275\257\344\273\266\350\231\232\346\213\237\345\274\200\345\217\221\347\216\257\345\242\203 \347\240\224\345\210\266\346\212\200\346\234\257\346\200\273\347\273\223\346\212\245\345\221\212.docx" "b/doc/\350\275\257\344\273\266\350\231\232\346\213\237\345\274\200\345\217\221\347\216\257\345\242\203 \347\240\224\345\210\266\346\212\200\346\234\257\346\200\273\347\273\223\346\212\245\345\221\212.docx"
index e4ef594..900c0ef 100644
Binary files "a/doc/\350\275\257\344\273\266\350\231\232\346\213\237\345\274\200\345\217\221\347\216\257\345\242\203 \347\240\224\345\210\266\346\212\200\346\234\257\346\200\273\347\273\223\346\212\245\345\221\212.docx" and "b/doc/\350\275\257\344\273\266\350\231\232\346\213\237\345\274\200\345\217\221\347\216\257\345\242\203 \347\240\224\345\210\266\346\212\200\346\234\257\346\200\273\347\273\223\346\212\245\345\221\212.docx" differ
diff --git "a/doc/\350\275\257\344\273\266\350\231\232\346\213\237\345\274\200\345\217\221\347\216\257\345\242\203 \347\240\224\345\210\266\346\212\200\346\234\257\346\200\273\347\273\223\346\212\245\345\221\212.docx" "b/doc/\350\275\257\344\273\266\350\231\232\346\213\237\345\274\200\345\217\221\347\216\257\345\242\203 \347\240\224\345\210\266\346\212\200\346\234\257\346\200\273\347\273\223\346\212\245\345\221\212.docx"
index 900c0ef..f1c559e 100644
Binary files "a/doc/\350\275\257\344\273\266\350\231\232\346\213\237\345\274\200\345\217\221\347\216\257\345\242\203 \347\240\224\345\210\266\346\212\200\346\234\257\346\200\273\347\273\223\346\212\245\345\221\212.docx" and "b/doc/\350\275\257\344\273\266\350\231\232\346\213\237\345\274\200\345\217\221\347\216\257\345\242\203 \347\240\224\345\210\266\346\212\200\346\234\257\346\200\273\347\273\223\346\212\245\345\221\212.docx" differ
diff --git "a/doc/\350\275\257\344\273\266\350\231\232\346\213\237\345\274\200\345\217\221\347\216\257\345\242\203 \347\240\224\345\210\266\346\212\200\346\234\257\346\200\273\347\273\223\346\212\245\345\221\212.docx" "b/doc/\350\275\257\344\273\266\350\231\232\346\213\237\345\274\200\345\217\221\347\216\257\345\242\203 \347\240\224\345\210\266\346\212\200\346\234\257\346\200\273\347\273\223\346\212\245\345\221\212.docx"
index f1c559e..8136bf2 100644
Binary files "a/doc/\350\275\257\344\273\266\350\231\232\346\213\237\345\274\200\345\217\221\347\216\257\345\242\203 \347\240\224\345\210\266\346\212\200\346\234\257\346\200\273\347\273\223\346\212\245\345\221\212.docx" and "b/doc/\350\275\257\344\273\266\350\231\232\346\213\237\345\274\200\345\217\221\347\216\257\345\242\203 \347\240\224\345\210\266\346\212\200\346\234\257\346\200\273\347\273\223\346\212\245\345\221\212.docx" differ
diff --git "a/doc/\350\275\257\344\273\266\350\231\232\346\213\237\345\274\200\345\217\221\347\216\257\345\242\203 \347\240\224\345\210\266\346\212\200\346\234\257\346\200\273\347\273\223\346\212\245\345\221\212.docx" "b/doc/\350\275\257\344\273\266\350\231\232\346\213\237\345\274\200\345\217\221\347\216\257\345\242\203 \347\240\224\345\210\266\346\212\200\346\234\257\346\200\273\347\273\223\346\212\245\345\221\212.docx"
index 8136bf2..c573d31 100644
Binary files "a/doc/\350\275\257\344\273\266\350\231\232\346\213\237\345\274\200\345\217\221\347\216\257\345\242\203 \347\240\224\345\210\266\346\212\200\346\234\257\346\200\273\347\273\223\346\212\245\345\221\212.docx" and "b/doc/\350\275\257\344\273\266\350\231\232\346\213\237\345\274\200\345\217\221\347\216\257\345\242\203 \347\240\224\345\210\266\346\212\200\346\234\257\346\200\273\347\273\223\346\212\245\345\221\212.docx" differ
initial commit
diff --git a/simics-workspace/modules/rtc_module/op_429_card.c b/simics-workspace/modules/rtc_module/op_429_card.c
index e69de29..fa2cece 100644
--- a/simics-workspace/modules/rtc_module/op_429_card.c
+++ b/simics-workspace/modules/rtc_module/op_429_card.c
@@ -0,0 +1,167 @@
+#include <a429/a429_board.h>
+#include <a429/a429_rx.h>
+#include <a429/a429_tx.h>
+#include <a429/a429_utils.h>
+
+// NOTE: channel numbers are 1-indexed.
+typedef struct _channel_conf_t {
+    OwUInt8 tx_nr;
+    OwUInt8 rx_nr;
+} channel_conf_t;
+
+#define MAX_CHANNELS 16
+
+channel_conf_t g_channel_conf[MAX_CHANNELS] = {
+    {1, 17},
+    {2, 18},
+    {3, 19},
+    {4, 20},
+    {5, 21},
+    {6, 22},
+    {7, 23},
+    {8, 24},
+    {9, 25},
+    {10, 26},
+    {11, 27},
+    {12, 28},
+    {13, 29},
+    {14, 30},
+    {15, 31},
+    {16, 32}
+};
+
+typedef struct _channel_state_t {
+    OwUInt32 nr;
+    A429Handle tx_channel;
+    A429Handle rx_channel;
+    vector<OwUInt32> tx_fifo;
+    vector<OwUInt32> rx_fifo;
+
+    void (*channel_state_t)(struct _channel_state_t *this, const A429Handle *board, OwUInt32 nr, const channel_conf_t *conf);
+    void (*stop)();
+} channel_state_t;
+
+channel_state_t inited_channel[MAX_CHANNELS] {
+    {0, {0}, {0}, 0, 0, &init_channel_state_t, NULL},
+    {0, {0}, {0}, 0, 0, &init_channel_state_t, NULL},
+    {0, {0}, {0}, 0, 0, &init_channel_state_t, NULL},
+    {0, {0}, {0}, 0, 0, &init_channel_state_t, NULL},
+    {0, {0}, {0}, 0, 0, &init_channel_state_t, NULL},
+    {0, {0}, {0}, 0, 0, &init_channel_state_t, NULL},
+    {0, {0}, {0}, 0, 0, &init_channel_state_t, NULL},
+    {0, {0}, {0}, 0, 0, &init_channel_state_t, NULL},
+    {0, {0}, {0}, 0, 0, &init_channel_state_t, NULL},
+    {0, {0}, {0}, 0, 0, &init_channel_state_t, NULL},
+    {0, {0}, {0}, 0, 0, &init_channel_state_t, NULL},
+    {0, {0}, {0}, 0, 0, &init_channel_state_t, NULL},
+    {0, {0}, {0}, 0, 0, &init_channel_state_t, NULL},
+    {0, {0}, {0}, 0, 0, &init_channel_state_t, NULL},
+    {0, {0}, {0}, 0, 0, &init_channel_state_t, NULL},
+    {0, {0}, {0}, 0, 0, &init_channel_state_t, NULL}
+};
+
+static void configure_tx(A429Handle board, uint8_t channel_num, A429Handle* tx) {
+    A429Return rc = A429_SUCCESS;
+
+    /* create the transmit channel */
+    rc = a429BoardConfigTxChannel(board, channel_num, A429_CHANNEL_SPEED_LOW, tx, 1);
+    if (A429_SUCCESS != rc) {
+        fprintf(stderr, "Failed to configure transmit channel: %s\n", a429UtilsErrorString(rc));
+        exit(1);
+    }
+}
+
+static void configure_rx(A429Handle board, uint8_t channel_num, A429Handle* rx,
+        A429Handle* label) {
+    A429Return rc = A429_SUCCESS;
+
+    /* create the receive channel */
+    rc = a429BoardConfigRxChannel(board, channel_num, A429_CHANNEL_SPEED_LOW, rx);
+    if (A429_SUCCESS != rc) {
+        fprintf(stderr, "Failed to configure receive channel: %s\n", a429UtilsErrorString(rc));
+        exit(1);
+    }
+}
+
+static void init_channel_state_t(struct _channel_state_t *this, const A429Handle *board, OwUInt32 nr, const channel_conf_t *conf) {
+    A429Return rc = A429_SUCCESS;
+
+    this->nr = nr;
+
+    configure_tx(board, conf.tx_nr, &this->tx_channel);
+    rc = a429BoardStartChannel(this->tx_channel, conf.tx_nr); /* notice the second param, I'am not true */
+    if (rc != A429_SUCCESS) {
+        fprintf(stderr, "Failed to start transmit channel %d: %s\n", conf.tx_nr, a429UtilsErrorString(rc));
+        exit(1);
+    }
+
+    configure_rx(board, conf.rx_nr, &this->rx_channel);
+    rc = a429BoardStartChannel(this->rx_channel, conf.rx_nr); /* notice the second param, I'am not true */
+    if (rc != A429_SUCCESS) {
+        fprintf(stderr, "Failed to start receive channel %d: %s\n", conf.rx_nr, a429UtilsErrorString(rc));
+        exit(1);
+    }
+}
+
+static A429Handle init_board(void) {
+    A429Return rc = A429_SUCCESS;
+    A429Handle board = { 0 };
+    A429BoardDetails details = { 0 };
+    A429Handle rx = { 0 };
+    A429Handle tx = { 0 };
+
+#if 1
+    /* enable debug output */
+    a429UtilsSetDebugLevel(A429_DEBUG_ERROR);
+#endif
+
+    /* no serial?  grab the 0th board. */
+    if (0 == aSerialNumber) {
+        rc = a429BoardInitializeByIndex(0, &board);
+    } else {
+        rc = a429BoardInitializeBySerialNumber(aSerialNumber, &board);
+    }
+
+    if (A429_SUCCESS != rc) {
+        fprintf(stderr, "Unable to find a board: %s\n", a429UtilsErrorString(rc));
+        exit(1);
+    }
+
+    /* print a little detail about the board */
+    rc = a429BoardGetBoardDetails(board, &details);
+    if (A429_SUCCESS != rc) {
+        fprintf(stderr, "Failed to retrieve board details: %s\n", a429UtilsErrorString(rc));
+        a429BoardClose(&board);
+        exit(1);
+    }
+
+    printf("Found '%s' (serial #%" PRIu64 ")\n", details.model_string, details.serial_number);
+    return board;
+}
+
+void func(channel_conf_t *input, int input_len) {
+    A429Return rc = A429_SUCCESS;
+    A429Handle board = init_board();
+
+    int i = 0;
+    for (; i < input_len; i++) {
+        /* set the expected channel directions */
+        rc = a429BoardSetChannelDirection(board, input[i].tx_nr, A429_CHANNEL_TX);
+        if (A429_SUCCESS != rc) {
+            fprintf(stderr, "Failed to set tx channel direction: %s\n", a429UtilsErrorString(rc));
+            a429BoardClose(&board);
+            exit(1);
+        }
+
+        rc = a429BoardSetChannelDirection(board, input[i].rx_nr, A429_CHANNEL_RX);
+        if (A429_SUCCESS != rc) {
+            fprintf(stderr, "Failed to set rx channel direction: %s\n", a429UtilsErrorString(rc));
+            a429BoardClose(&board);
+            exit(1);
+        }
+    }
+
+    for (i = 0; i < input_len; i++) {
+        inited_channel[i].(channel_state_t)(&inited_channel[i], &board, i, input[i]);
+    }
+}
diff --git a/simics-workspace/modules/rtc_module/rtc_module.dml b/simics-workspace/modules/rtc_module/rtc_module.dml
old mode 100755
new mode 100644
diff --git a/simics-workspace/modules/rtc_module/Makefile b/simics-workspace/modules/rtc_module/Makefile
index 55204e8..22b1666 100644
--- a/simics-workspace/modules/rtc_module/Makefile
+++ b/simics-workspace/modules/rtc_module/Makefile
@@ -5,11 +5,12 @@
 #

 MODULE_CLASSES = rtc_module
-SRC_FILES = socket.c rdc_load_conf.c
+SRC_FILES = socket.c rdc_load_conf.c op_429_card.c
 DML_FILES = rtc_module.dml
 DMLC_FLAGS = -m -I$(SIMICS_WORKSPACE)/include

-MODULE_LDFLAGS = -lws2_32
+MODULE_CFLAGS = -I$(SIMICS_WORKSPACE)/modules/rtc_module/include
+MODULE_LDFLAGS = -lws2_32 -L$(SIMICS_WORKSPACE)/modules/rtc_module/lib/win -la429

 SIMICS_API := 4.6
 THREAD_SAFE := yes
diff --git a/simics-workspace/modules/rtc_module/op_429_card.c b/simics-workspace/modules/rtc_module/op_429_card.c
index fa2cece..c1166aa 100644
--- a/simics-workspace/modules/rtc_module/op_429_card.c
+++ b/simics-workspace/modules/rtc_module/op_429_card.c
@@ -1,15 +1,4 @@
-#include <a429/a429_board.h>
-#include <a429/a429_rx.h>
-#include <a429/a429_tx.h>
-#include <a429/a429_utils.h>
-
-// NOTE: channel numbers are 1-indexed.
-typedef struct _channel_conf_t {
-    OwUInt8 tx_nr;
-    OwUInt8 rx_nr;
-} channel_conf_t;
-
-#define MAX_CHANNELS 16
+#include <op_429_card.h>

 channel_conf_t g_channel_conf[MAX_CHANNELS] = {
     {1, 17},
@@ -30,34 +19,23 @@ channel_conf_t g_channel_conf[MAX_CHANNELS] = {
     {16, 32}
 };

-typedef struct _channel_state_t {
-    OwUInt32 nr;
-    A429Handle tx_channel;
-    A429Handle rx_channel;
-    vector<OwUInt32> tx_fifo;
-    vector<OwUInt32> rx_fifo;
-
-    void (*channel_state_t)(struct _channel_state_t *this, const A429Handle *board, OwUInt32 nr, const channel_conf_t *conf);
-    void (*stop)();
-} channel_state_t;
-
-channel_state_t inited_channel[MAX_CHANNELS] {
-    {0, {0}, {0}, 0, 0, &init_channel_state_t, NULL},
-    {0, {0}, {0}, 0, 0, &init_channel_state_t, NULL},
-    {0, {0}, {0}, 0, 0, &init_channel_state_t, NULL},
-    {0, {0}, {0}, 0, 0, &init_channel_state_t, NULL},
-    {0, {0}, {0}, 0, 0, &init_channel_state_t, NULL},
-    {0, {0}, {0}, 0, 0, &init_channel_state_t, NULL},
-    {0, {0}, {0}, 0, 0, &init_channel_state_t, NULL},
-    {0, {0}, {0}, 0, 0, &init_channel_state_t, NULL},
-    {0, {0}, {0}, 0, 0, &init_channel_state_t, NULL},
-    {0, {0}, {0}, 0, 0, &init_channel_state_t, NULL},
-    {0, {0}, {0}, 0, 0, &init_channel_state_t, NULL},
-    {0, {0}, {0}, 0, 0, &init_channel_state_t, NULL},
-    {0, {0}, {0}, 0, 0, &init_channel_state_t, NULL},
-    {0, {0}, {0}, 0, 0, &init_channel_state_t, NULL},
-    {0, {0}, {0}, 0, 0, &init_channel_state_t, NULL},
-    {0, {0}, {0}, 0, 0, &init_channel_state_t, NULL}
+channel_state_t inited_channel[MAX_CHANNELS] = {
+    {0, {0}, {0}, NULL, NULL, &construct_channel_state_t, NULL},
+    {0, {0}, {0}, NULL, NULL, &construct_channel_state_t, NULL},
+    {0, {0}, {0}, NULL, NULL, &construct_channel_state_t, NULL},
+    {0, {0}, {0}, NULL, NULL, &construct_channel_state_t, NULL},
+    {0, {0}, {0}, NULL, NULL, &construct_channel_state_t, NULL},
+    {0, {0}, {0}, NULL, NULL, &construct_channel_state_t, NULL},
+    {0, {0}, {0}, NULL, NULL, &construct_channel_state_t, NULL},
+    {0, {0}, {0}, NULL, NULL, &construct_channel_state_t, NULL},
+    {0, {0}, {0}, NULL, NULL, &construct_channel_state_t, NULL},
+    {0, {0}, {0}, NULL, NULL, &construct_channel_state_t, NULL},
+    {0, {0}, {0}, NULL, NULL, &construct_channel_state_t, NULL},
+    {0, {0}, {0}, NULL, NULL, &construct_channel_state_t, NULL},
+    {0, {0}, {0}, NULL, NULL, &construct_channel_state_t, NULL},
+    {0, {0}, {0}, NULL, NULL, &construct_channel_state_t, NULL},
+    {0, {0}, {0}, NULL, NULL, &construct_channel_state_t, NULL},
+    {0, {0}, {0}, NULL, NULL, &construct_channel_state_t, NULL},
 };

 static void configure_tx(A429Handle board, uint8_t channel_num, A429Handle* tx) {
@@ -71,8 +49,7 @@ static void configure_tx(A429Handle board, uint8_t channel_num, A429Handle* tx)
     }
 }

-static void configure_rx(A429Handle board, uint8_t channel_num, A429Handle* rx,
-        A429Handle* label) {
+static void configure_rx(A429Handle board, uint8_t channel_num, A429Handle* rx) {
     A429Return rc = A429_SUCCESS;

     /* create the receive channel */
@@ -83,27 +60,27 @@ static void configure_rx(A429Handle board, uint8_t channel_num, A429Handle* rx,
     }
 }

-static void init_channel_state_t(struct _channel_state_t *this, const A429Handle *board, OwUInt32 nr, const channel_conf_t *conf) {
+static void construct_channel_state_t(struct _channel_state_t *this, const A429Handle *board, OwUInt32 nr, const channel_conf_t* const conf) {
     A429Return rc = A429_SUCCESS;

     this->nr = nr;

-    configure_tx(board, conf.tx_nr, &this->tx_channel);
-    rc = a429BoardStartChannel(this->tx_channel, conf.tx_nr); /* notice the second param, I'am not true */
+    configure_tx(board, conf->tx_nr, &this->tx_channel);
+    rc = a429BoardStartChannel(this->tx_channel, conf->tx_nr); /* notice the second param, I'am not true */
     if (rc != A429_SUCCESS) {
-        fprintf(stderr, "Failed to start transmit channel %d: %s\n", conf.tx_nr, a429UtilsErrorString(rc));
+        fprintf(stderr, "Failed to start transmit channel %d: %s\n", conf->tx_nr, a429UtilsErrorString(rc));
         exit(1);
     }

-    configure_rx(board, conf.rx_nr, &this->rx_channel);
-    rc = a429BoardStartChannel(this->rx_channel, conf.rx_nr); /* notice the second param, I'am not true */
+    configure_rx(board, conf->rx_nr, &this->rx_channel);
+    rc = a429BoardStartChannel(this->rx_channel, conf->rx_nr); /* notice the second param, I'am not true */
     if (rc != A429_SUCCESS) {
-        fprintf(stderr, "Failed to start receive channel %d: %s\n", conf.rx_nr, a429UtilsErrorString(rc));
+        fprintf(stderr, "Failed to start receive channel %d: %s\n", conf->rx_nr, a429UtilsErrorString(rc));
         exit(1);
     }
 }

-static A429Handle init_board(void) {
+static A429Handle init_board(uint64_t aSerialNumber) {
     A429Return rc = A429_SUCCESS;
     A429Handle board = { 0 };
     A429BoardDetails details = { 0 };
@@ -135,33 +112,38 @@ static A429Handle init_board(void) {
         exit(1);
     }

-    printf("Found '%s' (serial #%" PRIu64 ")\n", details.model_string, details.serial_number);
+    fprintf(stdout, "Found '%s' (serial #%" PRIu64 ")\n", details.model_string, details.serial_number);
     return board;
 }

-void func(channel_conf_t *input, int input_len) {
+void init_channel_state(const A429Handle *board, channel_conf_t *chan_conf, int chan_conf_size) {
     A429Return rc = A429_SUCCESS;
-    A429Handle board = init_board();

     int i = 0;
-    for (; i < input_len; i++) {
+    for (; i < chan_conf_size; i++) {
         /* set the expected channel directions */
-        rc = a429BoardSetChannelDirection(board, input[i].tx_nr, A429_CHANNEL_TX);
+        rc = a429BoardSetChannelDirection(*board, chan_conf[i].tx_nr, A429_CHANNEL_TX);
         if (A429_SUCCESS != rc) {
             fprintf(stderr, "Failed to set tx channel direction: %s\n", a429UtilsErrorString(rc));
-            a429BoardClose(&board);
+            a429BoardClose(board);
             exit(1);
         }

-        rc = a429BoardSetChannelDirection(board, input[i].rx_nr, A429_CHANNEL_RX);
+        rc = a429BoardSetChannelDirection(*board, chan_conf[i].rx_nr, A429_CHANNEL_RX);
         if (A429_SUCCESS != rc) {
             fprintf(stderr, "Failed to set rx channel direction: %s\n", a429UtilsErrorString(rc));
-            a429BoardClose(&board);
+            a429BoardClose(board);
             exit(1);
         }
     }

-    for (i = 0; i < input_len; i++) {
-        inited_channel[i].(channel_state_t)(&inited_channel[i], &board, i, input[i]);
+    for (i = 0; i < chan_conf_size; i++) { /* can be merged? */
+        (inited_channel[i].constructor)(&inited_channel[i], board, i, &chan_conf[i]);
     }
 }
+
+void init_429_middleware(void) {
+    uint64_t aSerialNumber = 0; /* How to get? */
+    A429Handle board = init_board(aSerialNumber);
+    init_channel_state(&board, g_channel_conf, MAX_CHANNELS);
+}
diff --git a/simics-workspace/modules/rtc_module/op_429_card.h b/simics-workspace/modules/rtc_module/op_429_card.h
index 86eb3fa..9729889 100644
--- a/simics-workspace/modules/rtc_module/op_429_card.h
+++ b/simics-workspace/modules/rtc_module/op_429_card.h
@@ -1,8 +1,46 @@
 #ifndef OP_429_CARD_H
 #define OP_429_CARD_H

+#include <a429/a429_board.h>
+#include <a429/a429_rx.h>
+#include <a429/a429_tx.h>
+#include <a429/a429_utils.h>

+#include <stdio.h>

+#ifndef PRIu64
+#define PRIu64 "I64u"
+#endif
+
+typedef unsigned char OwUInt8;
+typedef unsigned long OwUInt32;
+
+// NOTE: channel numbers are 1-indexed.
+typedef struct _channel_conf_t {
+    OwUInt8 tx_nr;
+    OwUInt8 rx_nr;
+} channel_conf_t;
+
+#define MAX_CHANNELS 16
+
+typedef struct _channel_state_t {
+    OwUInt32 nr;
+    A429Handle tx_channel;
+    A429Handle rx_channel;
+    OwUInt32 *tx_fifo;
+    OwUInt32 *rx_fifo;
+
+    void (*constructor)(struct _channel_state_t *this, const A429Handle *board, OwUInt32 nr, const channel_conf_t* const conf);
+    void (*stop)();
+} channel_state_t;
+
+
+static void configure_tx(A429Handle board, uint8_t channel_num, A429Handle* tx);
+static void configure_rx(A429Handle board, uint8_t channel_num, A429Handle* rx);
+static void construct_channel_state_t(struct _channel_state_t *this, const A429Handle *board, OwUInt32 nr, const channel_conf_t* const conf);
+static A429Handle init_board(uint64_t aSerialNumber);
+void init_channel_state(const A429Handle *board, channel_conf_t *chan_conf, int chan_conf_size);
+void init_429_middleware(void);

 #endif
diff --git a/simics-workspace/modules/rtc_module/rtc_module.dml b/simics-workspace/modules/rtc_module/rtc_module.dml
index 8bc91cc..c79c965 100644
--- a/simics-workspace/modules/rtc_module/rtc_module.dml
+++ b/simics-workspace/modules/rtc_module/rtc_module.dml
@@ -227,6 +227,8 @@ extern int socket_init(void);
 extern int socket_recv(char *recvbuf, int size);
 extern int socket_send(char *sendbuf, int size);

+extern void init_429_middleware(void);
+
 /*load cfg udp api*/
 extern SEND_UDP_STRUCT_t * getSendUdpCfg();
 extern RECV_UDP_STRUCT_t * getRecvUdpCfg();
@@ -942,4 +944,5 @@ method post_init() {
 	call $load_afdx_config();
     socket_init();
     call $socket_loop_recv();
+    init_429_middleware();
 }
add 429 card driver headers
diff --git a/simics-workspace/modules/rtc_module/op_429_card.c b/simics-workspace/modules/rtc_module/op_429_card.c
index c1166aa..d29e1c6 100644
--- a/simics-workspace/modules/rtc_module/op_429_card.c
+++ b/simics-workspace/modules/rtc_module/op_429_card.c
@@ -38,42 +38,42 @@ channel_state_t inited_channel[MAX_CHANNELS] = {
     {0, {0}, {0}, NULL, NULL, &construct_channel_state_t, NULL},
 };

-static void configure_tx(A429Handle board, uint8_t channel_num, A429Handle* tx) {
+static void configure_tx(const A429Handle* const board, uint8_t channel_num, A429Handle* tx) {
     A429Return rc = A429_SUCCESS;

     /* create the transmit channel */
-    rc = a429BoardConfigTxChannel(board, channel_num, A429_CHANNEL_SPEED_LOW, tx, 1);
+    rc = a429BoardConfigTxChannel(*board, channel_num, A429_CHANNEL_SPEED_LOW, tx, 1);
     if (A429_SUCCESS != rc) {
         fprintf(stderr, "Failed to configure transmit channel: %s\n", a429UtilsErrorString(rc));
         exit(1);
     }
 }

-static void configure_rx(A429Handle board, uint8_t channel_num, A429Handle* rx) {
+static void configure_rx(const A429Handle* const board, uint8_t channel_num, A429Handle* rx) {
     A429Return rc = A429_SUCCESS;

     /* create the receive channel */
-    rc = a429BoardConfigRxChannel(board, channel_num, A429_CHANNEL_SPEED_LOW, rx);
+    rc = a429BoardConfigRxChannel(*board, channel_num, A429_CHANNEL_SPEED_LOW, rx);
     if (A429_SUCCESS != rc) {
         fprintf(stderr, "Failed to configure receive channel: %s\n", a429UtilsErrorString(rc));
         exit(1);
     }
 }

-static void construct_channel_state_t(struct _channel_state_t *this, const A429Handle *board, OwUInt32 nr, const channel_conf_t* const conf) {
+static void construct_channel_state_t(struct _channel_state_t *this, const A429Handle* const board, OwUInt32 nr, const channel_conf_t* const conf) {
     A429Return rc = A429_SUCCESS;

     this->nr = nr;

     configure_tx(board, conf->tx_nr, &this->tx_channel);
-    rc = a429BoardStartChannel(this->tx_channel, conf->tx_nr); /* notice the second param, I'am not true */
+    rc = a429BoardStartChannel(*board, conf->tx_nr); /* notice the second param, I'am not true */
     if (rc != A429_SUCCESS) {
         fprintf(stderr, "Failed to start transmit channel %d: %s\n", conf->tx_nr, a429UtilsErrorString(rc));
         exit(1);
     }

     configure_rx(board, conf->rx_nr, &this->rx_channel);
-    rc = a429BoardStartChannel(this->rx_channel, conf->rx_nr); /* notice the second param, I'am not true */
+    rc = a429BoardStartChannel(*board, conf->rx_nr); /* notice the second param, I'am not true */
     if (rc != A429_SUCCESS) {
         fprintf(stderr, "Failed to start receive channel %d: %s\n", conf->rx_nr, a429UtilsErrorString(rc));
         exit(1);
@@ -84,8 +84,6 @@ static A429Handle init_board(uint64_t aSerialNumber) {
     A429Return rc = A429_SUCCESS;
     A429Handle board = { 0 };
     A429BoardDetails details = { 0 };
-    A429Handle rx = { 0 };
-    A429Handle tx = { 0 };

 #if 1
     /* enable debug output */
@@ -116,7 +114,7 @@ static A429Handle init_board(uint64_t aSerialNumber) {
     return board;
 }

-void init_channel_state(const A429Handle *board, channel_conf_t *chan_conf, int chan_conf_size) {
+static void init_channel_state(const A429Handle *board, const channel_conf_t* const chan_conf, int chan_conf_size) {
     A429Return rc = A429_SUCCESS;

     int i = 0;
@@ -147,3 +145,31 @@ void init_429_middleware(void) {
     A429Handle board = init_board(aSerialNumber);
     init_channel_state(&board, g_channel_conf, MAX_CHANNELS);
 }
+
+static send_to_429_card(const channel_state_t* const channel_state) {
+    uint32_t apWordsQueued = 0;
+    a429TxSendAsynchronousData(channel_state->tx_channel, &channel_state->tx_data, sizeof(channel_state->tx_data), &apWordsQueued);
+}
+
+void send_to_429(void *channel_nr, void *word) {
+    channel_data_t chan_stat;
+    chan_stat.channel_nr = *(OwUInt32*)channel_nr;
+    chan_stat.word = *(OwUInt32*)word;
+    inited_channel[chan_stat.channel_nr - 1].tx_data = chan_stat.word;
+    send_to_429_card(&inited_channel[chan_stat.channel_nr - 1]);
+}
+
+void recv_from_429(void *channel_nr, void *word) {
+    recv_from_429_card(channel_nr, word);
+    channel_data_t chan_stat;
+    *(OwUInt32*)channel_nr = chan_stat.channel_nr;
+    *(OwUInt32*)word = chan_stat.word;
+}
+
+static recv_from_429_card(void *channel_nr, void *word) {
+    uint32_t readword = 0;
+    int i = 0;
+    for (; i < MAX_CHANNELS; i++) {
+        a429RxReadLabelBuffer(inited_channel[i].rx_channel, &inited_channel[i].rx_data, sizeof(inited_channel[i].rx_data), &readword);
+    }
+}
diff --git a/simics-workspace/modules/rtc_module/op_429_card.h b/simics-workspace/modules/rtc_module/op_429_card.h
index 9729889..67adbcf 100644
--- a/simics-workspace/modules/rtc_module/op_429_card.h
+++ b/simics-workspace/modules/rtc_module/op_429_card.h
@@ -27,20 +27,28 @@ typedef struct _channel_state_t {
     OwUInt32 nr;
     A429Handle tx_channel;
     A429Handle rx_channel;
-    OwUInt32 *tx_fifo;
-    OwUInt32 *rx_fifo;
+    OwUInt32 tx_data;
+    OwUInt32 rx_data;

     void (*constructor)(struct _channel_state_t *this, const A429Handle *board, OwUInt32 nr, const channel_conf_t* const conf);
     void (*stop)();
 } channel_state_t;

+typedef struct _channel_data_t {
+    OwUInt32 channel_nr;
+    OwUInt32 word;
+} channel_data_t;

-static void configure_tx(A429Handle board, uint8_t channel_num, A429Handle* tx);
-static void configure_rx(A429Handle board, uint8_t channel_num, A429Handle* rx);
+static void configure_tx(const A429Handle* const board, uint8_t channel_num, A429Handle* tx);
+static void configure_rx(const A429Handle* const board, uint8_t channel_num, A429Handle* rx);
 static void construct_channel_state_t(struct _channel_state_t *this, const A429Handle *board, OwUInt32 nr, const channel_conf_t* const conf);
 static A429Handle init_board(uint64_t aSerialNumber);
-void init_channel_state(const A429Handle *board, channel_conf_t *chan_conf, int chan_conf_size);
+static void init_channel_state(const A429Handle *board, const channel_conf_t* const chan_conf, int chan_conf_size);
 void init_429_middleware(void);

+static send_to_429_card(const channel_state_t* const channel_state);
+void send_to_429(void *channel_nr, void *word);
+void recv_from_429();
+static recv_from_429_card();

 #endif
diff --git a/simics-workspace/modules/rtc_module/op_429_card.c b/simics-workspace/modules/rtc_module/op_429_card.c
index d29e1c6..b402185 100644
--- a/simics-workspace/modules/rtc_module/op_429_card.c
+++ b/simics-workspace/modules/rtc_module/op_429_card.c
@@ -147,16 +147,22 @@ void init_429_middleware(void) {
 }

 static send_to_429_card(const channel_state_t* const channel_state) {
+    A429Return rc = A429_SUCCESS;
     uint32_t apWordsQueued = 0;
-    a429TxSendAsynchronousData(channel_state->tx_channel, &channel_state->tx_data, sizeof(channel_state->tx_data), &apWordsQueued);
+    rc = a429TxSendAsynchronousData(channel_state->tx_channel, &channel_state->tx_data, sizeof(channel_state->tx_data), &apWordsQueued);
+    if (A429_SUCCESS != rc) {
+        fprintf(stderr, "Failed to transmit data: %s\n", a429UtilsErrorString(rc));
+        exit(1);
+    }
 }

 void send_to_429(void *channel_nr, void *word) {
     channel_data_t chan_stat;
-    chan_stat.channel_nr = *(OwUInt32*)channel_nr;
+    chan_stat.channel_nr = *(OwUInt8*)channel_nr;
     chan_stat.word = *(OwUInt32*)word;
     inited_channel[chan_stat.channel_nr - 1].tx_data = chan_stat.word;
     send_to_429_card(&inited_channel[chan_stat.channel_nr - 1]);
+    fprintf(stdout, "Transmit from channel %d, data is %x\n", chan_stat.channel_nr, inited_channel[chan_stat.channel_nr - 1].tx_data);
 }

 void recv_from_429(void *channel_nr, void *word) {
diff --git a/simics-workspace/modules/rtc_module/op_429_card.c b/simics-workspace/modules/rtc_module/op_429_card.c
index b402185..238fbba 100644
--- a/simics-workspace/modules/rtc_module/op_429_card.c
+++ b/simics-workspace/modules/rtc_module/op_429_card.c
@@ -20,22 +20,22 @@ channel_conf_t g_channel_conf[MAX_CHANNELS] = {
 };

 channel_state_t inited_channel[MAX_CHANNELS] = {
-    {0, {0}, {0}, NULL, NULL, &construct_channel_state_t, NULL},
-    {0, {0}, {0}, NULL, NULL, &construct_channel_state_t, NULL},
-    {0, {0}, {0}, NULL, NULL, &construct_channel_state_t, NULL},
-    {0, {0}, {0}, NULL, NULL, &construct_channel_state_t, NULL},
-    {0, {0}, {0}, NULL, NULL, &construct_channel_state_t, NULL},
-    {0, {0}, {0}, NULL, NULL, &construct_channel_state_t, NULL},
-    {0, {0}, {0}, NULL, NULL, &construct_channel_state_t, NULL},
-    {0, {0}, {0}, NULL, NULL, &construct_channel_state_t, NULL},
-    {0, {0}, {0}, NULL, NULL, &construct_channel_state_t, NULL},
-    {0, {0}, {0}, NULL, NULL, &construct_channel_state_t, NULL},
-    {0, {0}, {0}, NULL, NULL, &construct_channel_state_t, NULL},
-    {0, {0}, {0}, NULL, NULL, &construct_channel_state_t, NULL},
-    {0, {0}, {0}, NULL, NULL, &construct_channel_state_t, NULL},
-    {0, {0}, {0}, NULL, NULL, &construct_channel_state_t, NULL},
-    {0, {0}, {0}, NULL, NULL, &construct_channel_state_t, NULL},
-    {0, {0}, {0}, NULL, NULL, &construct_channel_state_t, NULL},
+    {0, {0}, {0}, 0, {0}, &construct_channel_state_t, NULL},
+    {0, {0}, {0}, 0, {0}, &construct_channel_state_t, NULL},
+    {0, {0}, {0}, 0, {0}, &construct_channel_state_t, NULL},
+    {0, {0}, {0}, 0, {0}, &construct_channel_state_t, NULL},
+    {0, {0}, {0}, 0, {0}, &construct_channel_state_t, NULL},
+    {0, {0}, {0}, 0, {0}, &construct_channel_state_t, NULL},
+    {0, {0}, {0}, 0, {0}, &construct_channel_state_t, NULL},
+    {0, {0}, {0}, 0, {0}, &construct_channel_state_t, NULL},
+    {0, {0}, {0}, 0, {0}, &construct_channel_state_t, NULL},
+    {0, {0}, {0}, 0, {0}, &construct_channel_state_t, NULL},
+    {0, {0}, {0}, 0, {0}, &construct_channel_state_t, NULL},
+    {0, {0}, {0}, 0, {0}, &construct_channel_state_t, NULL},
+    {0, {0}, {0}, 0, {0}, &construct_channel_state_t, NULL},
+    {0, {0}, {0}, 0, {0}, &construct_channel_state_t, NULL},
+    {0, {0}, {0}, 0, {0}, &construct_channel_state_t, NULL},
+    {0, {0}, {0}, 0, {0}, &construct_channel_state_t, NULL},
 };

 static void configure_tx(const A429Handle* const board, uint8_t channel_num, A429Handle* tx) {
@@ -165,17 +165,29 @@ void send_to_429(void *channel_nr, void *word) {
     fprintf(stdout, "Transmit from channel %d, data is %x\n", chan_stat.channel_nr, inited_channel[chan_stat.channel_nr - 1].tx_data);
 }

-void recv_from_429(void *channel_nr, void *word) {
-    recv_from_429_card(channel_nr, word);
-    channel_data_t chan_stat;
-    *(OwUInt32*)channel_nr = chan_stat.channel_nr;
-    *(OwUInt32*)word = chan_stat.word;
+void recv_from_429(void *channels) {
+    recv_from_429_card(channels);
 }

-static recv_from_429_card(void *channel_nr, void *word) {
+static recv_from_429_card(void *channels) {
+    A429Return rc = A429_SUCCESS;
     uint32_t readword = 0;
+
     int i = 0;
     for (; i < MAX_CHANNELS; i++) {
-        a429RxReadLabelBuffer(inited_channel[i].rx_channel, &inited_channel[i].rx_data, sizeof(inited_channel[i].rx_data), &readword);
+        rc = a429RxRead(inited_channel[i].rx_channel, &inited_channel[i].rx.rx_data, sizeof(inited_channel[i].rx.rx_data), &readword);
+        if (A429_SUCCESS != rc) {
+            fprintf(stderr, "Failed to recieve data: %s\n", a429UtilsErrorString(rc));
+        } else {
+            if (readword != 0) {
+                inited_channel[i].rx.is_vaild = 1;
+                fprintf(stdout, "Recv from channel %d, data is %x\n", i + 17, inited_channel[i].rx.rx_data);
+            } else {
+                inited_channel[i].rx.is_vaild = 0;
+            }
+        }
+
+        memmove(channels + i * sizeof(Rx_Data), &inited_channel[i].rx, sizeof(Rx_Data));
     }
+
 }
diff --git a/simics-workspace/modules/rtc_module/op_429_card.h b/simics-workspace/modules/rtc_module/op_429_card.h
index 67adbcf..4280f84 100644
--- a/simics-workspace/modules/rtc_module/op_429_card.h
+++ b/simics-workspace/modules/rtc_module/op_429_card.h
@@ -7,6 +7,7 @@
 #include <a429/a429_utils.h>

 #include <stdio.h>
+#include <string.h>

 #ifndef PRIu64
 #define PRIu64 "I64u"
@@ -23,12 +24,17 @@ typedef struct _channel_conf_t {

 #define MAX_CHANNELS 16

+typedef struct _Rx_Data {
+    OwUInt32 rx_data;
+    OwUInt32 is_vaild;
+} Rx_Data;
+
 typedef struct _channel_state_t {
     OwUInt32 nr;
     A429Handle tx_channel;
     A429Handle rx_channel;
     OwUInt32 tx_data;
-    OwUInt32 rx_data;
+    Rx_Data rx;

     void (*constructor)(struct _channel_state_t *this, const A429Handle *board, OwUInt32 nr, const channel_conf_t* const conf);
     void (*stop)();
diff --git a/simics-workspace/modules/rtc_module/op_429_card.c b/simics-workspace/modules/rtc_module/op_429_card.c
index 238fbba..31af73f 100644
--- a/simics-workspace/modules/rtc_module/op_429_card.c
+++ b/simics-workspace/modules/rtc_module/op_429_card.c
@@ -148,8 +148,9 @@ void init_429_middleware(void) {

 static send_to_429_card(const channel_state_t* const channel_state) {
     A429Return rc = A429_SUCCESS;
-    uint32_t apWordsQueued = 0;
-    rc = a429TxSendAsynchronousData(channel_state->tx_channel, &channel_state->tx_data, sizeof(channel_state->tx_data), &apWordsQueued);
+    uint32 transmitword = 1;
+
+    rc = a429TxSendAsynchronousData(channel_state->tx_channel, &channel_state->tx_data, transmitword, &transmitword);
     if (A429_SUCCESS != rc) {
         fprintf(stderr, "Failed to transmit data: %s\n", a429UtilsErrorString(rc));
         exit(1);
diff --git a/simics-workspace/modules/rtc_module/op_429_card.c b/simics-workspace/modules/rtc_module/op_429_card.c
index 31af73f..50882b7 100644
--- a/simics-workspace/modules/rtc_module/op_429_card.c
+++ b/simics-workspace/modules/rtc_module/op_429_card.c
@@ -148,9 +148,9 @@ void init_429_middleware(void) {

 static send_to_429_card(const channel_state_t* const channel_state) {
     A429Return rc = A429_SUCCESS;
-    uint32 transmitword = 1;
+    uint32_t transmitWords = 1;

-    rc = a429TxSendAsynchronousData(channel_state->tx_channel, &channel_state->tx_data, transmitword, &transmitword);
+    rc = a429TxSendAsynchronousData(channel_state->tx_channel, &channel_state->tx_data, transmitWords, &transmitWords);
     if (A429_SUCCESS != rc) {
         fprintf(stderr, "Failed to transmit data: %s\n", a429UtilsErrorString(rc));
         exit(1);
@@ -172,11 +172,11 @@ void recv_from_429(void *channels) {

 static recv_from_429_card(void *channels) {
     A429Return rc = A429_SUCCESS;
-    uint32_t readword = 0;
+    uint32_t receiveWords = 0;

     int i = 0;
     for (; i < MAX_CHANNELS; i++) {
-        rc = a429RxRead(inited_channel[i].rx_channel, &inited_channel[i].rx.rx_data, sizeof(inited_channel[i].rx.rx_data), &readword);
+        rc = a429RxRead(inited_channel[i].rx_channel, &inited_channel[i].rx.rx_data, sizeof(inited_channel[i].rx.rx_data), &receiveWords);
         if (A429_SUCCESS != rc) {
             fprintf(stderr, "Failed to recieve data: %s\n", a429UtilsErrorString(rc));
         } else {
diff --git a/simics-workspace/modules/rtc_module/op_429_card.c b/simics-workspace/modules/rtc_module/op_429_card.c
index 50882b7..c27d94d 100644
--- a/simics-workspace/modules/rtc_module/op_429_card.c
+++ b/simics-workspace/modules/rtc_module/op_429_card.c
@@ -180,7 +180,7 @@ static recv_from_429_card(void *channels) {
         if (A429_SUCCESS != rc) {
             fprintf(stderr, "Failed to recieve data: %s\n", a429UtilsErrorString(rc));
         } else {
-            if (readword != 0) {
+            if (receiveWords != 0) {
                 inited_channel[i].rx.is_vaild = 1;
                 fprintf(stdout, "Recv from channel %d, data is %x\n", i + 17, inited_channel[i].rx.rx_data);
             } else {