Commit 87e16c93 authored by Dimitris Lampridis's avatar Dimitris Lampridis

sw: reverse sender/receiver cpus in rmq_udp test used in wrtd-system testbench

parent ff70a363
...@@ -5,7 +5,7 @@ vsim -quiet -L unisim work.main -suppress 8683,8684,8822 ...@@ -5,7 +5,7 @@ vsim -quiet -L unisim work.main -suppress 8683,8684,8822
set StdArithNoWarnings 1 set StdArithNoWarnings 1
set NumericStdNoWarnings 1 set NumericStdNoWarnings 1
run 500us run 800us
exit exit
*.elf
*.bin
*.o
*.d
build/
.config
.config.old
...@@ -41,7 +41,7 @@ int main(void) ...@@ -41,7 +41,7 @@ int main(void)
struct trtl_ep_address bind_addr; struct trtl_ep_address bind_addr;
pp_printf("TEST for: RMQ UDP %s\n", cpu == 0 ? "recv" : "send"); pp_printf("TEST for: RMQ UDP %s\n", cpu == 1 ? "recv" : "send");
while ((lr_readl(MT_CPU_LR_REG_WR_STAT) & MT_WR_LINK_READY) != MT_WR_LINK_READY) while ((lr_readl(MT_CPU_LR_REG_WR_STAT) & MT_WR_LINK_READY) != MT_WR_LINK_READY)
; ;
...@@ -73,7 +73,9 @@ int main(void) ...@@ -73,7 +73,9 @@ int main(void)
// RX filter: we want only UDP packets with matching desination port & IP address. // RX filter: we want only UDP packets with matching desination port & IP address.
bind_addr.filter = TRTL_EP_FILTER_UDP | TRTL_EP_FILTER_DST_PORT | TRTL_EP_FILTER_DST_IP; bind_addr.filter = TRTL_EP_FILTER_UDP | TRTL_EP_FILTER_DST_PORT | TRTL_EP_FILTER_DST_IP;
if (cpu == 0) bind_addr.filter |= TRTL_EP_FILTER_ENABLE;
if (cpu == 1)
{ {
// configure incoming channel // configure incoming channel
mq_bind(TRTL_RMQ, rmq, 0, &bind_addr); mq_bind(TRTL_RMQ, rmq, 0, &bind_addr);
...@@ -84,10 +86,13 @@ int main(void) ...@@ -84,10 +86,13 @@ int main(void)
mq_bind(TRTL_RMQ, rmq, 1, &bind_addr); mq_bind(TRTL_RMQ, rmq, 1, &bind_addr);
} }
if (cpu == 0) if (cpu == 1) {
handle_rx(rmq); while (1)
else handle_rx(rmq);
}
else {
send_pkt(rmq); send_pkt(rmq);
}
while (1) while (1)
; ;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment