FPGA, SoC, And CPLD Boards And Kits
FPGA Evaluation and Development Kits
5930 Discussions

Help me! UDP payload inserter problem,urgent!

Altera_Forum
Honored Contributor II
1,038 Views

I've added a UDP payload inserter and padding from the famous project- Offload example. 

I can send a short message through SDRAM->mux with packets from SGDMA component (TS Multiplexer) input4> TSE MAC. So there are no probelm with the TSE. I want to send udp payload through : 

prbs generator-> udp payload inserter -> padding -> mux with packets from SGDMA component (TS Multiplexer) -> TSE MAC. But there are no anything on the port. 

the code to start the stream is as follows : 

int main() 

{  

int i; 

UDP_INS_STATS *insert_stat; 

UDP_INS_STATS *getinsert_stat;  

 

insert_stat->mac_dst_hi = lwip_htonl(0x001AA02A);  

insert_stat->mac_dst_lo = lwip_htons(0xACF0);  

insert_stat->mac_src_hi = lwip_htonl(0x00112233);  

insert_stat->mac_src_lo = lwip_htons(0x4455);  

insert_stat->ip_src = lwip_htonl(0xC0A80064); 

insert_stat->ip_dst = lwip_htonl(0xC0A80065); 

insert_stat->udp_src = lwip_htons(0x07D0);//port: 

insert_stat->udp_dst = lwip_htons(0x07D0);  

 

start_packet_generator(GENERATOR_0_BASE, 1472, 0x33557799) 

printf("start_packet_generator\n"); 

start_udp_payload_inserter(UDP_INSERTER_0_BASE, &insert_stat 

printf("start udp payload inserter %d times \n",i); 

 

usleep(10000); 

 

return 0; 

 

Can anybody tell me the way to solve the probelms.Thank you a lot, give my best wishes to you.what 's problem,
0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
310 Views

I have solve the problems. I have changed the mulplexer of Ethernet,the orignal code is OK. But now I meet another problems. The Avolon st is 32-bit, but my source data is bytes, the payload count may be 491 or other number which can't be divided by 4. Does anybody have a good ideas to deal with the problems. Pading zero can't solve the problems!!!I think so. Give my best wishes to you

0 Kudos
Reply