FPGA Intellectual Property
PCI Express*, Networking and Connectivity, Memory Interfaces, DSP IP, and Video IP
6356 Discussions

Videostream packets

Altera_Forum
Honored Contributor II
1,058 Views

Hi there, 

 

I have a simple question for you all (I think:)) 

 

At this point I have a simple HDL design for Cyclone III Video Kit. Getting a PAL input on the clocked video input -> some clipping, scaling, color space conversion and triple buffering -> clocked video output on a dvi-port. 

 

Now I want to 'chop' this stream into packets and send a raw-RGB stream over ethernet using a SGDMA and TSE component. And I wonder if there is a core in SOPC to do this? Or do I have to code this myself, and please give me some simple directions how to do this since HDL/VHDL coding is very new to me. 

 

Thanks in advance!
0 Kudos
5 Replies
Altera_Forum
Honored Contributor II
295 Views

I've made a simple VHDL doing this, but I wonder if its necessary to include the vsync and hsync of the videostream?

0 Kudos
Altera_Forum
Honored Contributor II
295 Views

It's been a while and I made some progress. 

 

1. The code for chopping the videostream into packets works when I'm simulating it in ModelSim and the videopackets are small enough to fit in a UDP packet. 

2. I've added a UDP payload inserter and padding from this project: http://www.nioswiki.com/exampledesigns/nios2udpoffloadexample 

3. Written SW code to initialize and start up the UDP payload inserter. 

 

Now here is the problem ... the TSE component won't send out any packets made in HW. The simple socket example works fine in my design (which is sending packets in SW).  

 

Any suggestion of what can be wrong? 

 

Here's the flow through the different components: 

 

packet chopper -> udp payload inserter -> padding -> mux with packets from SGDMA component (TS Multiplexer) -> TSE MAC. 

 

Can the TSE MAC discard packets instead of sending them out?
0 Kudos
Altera_Forum
Honored Contributor II
295 Views

I have the same problem with bewerian, can anybody post SW code to initialize and start up the UDP payload inserter. Maybe there are some mistakes for me to start up the UDP payload inserter. 

My host IP is 192.168.0.100. My code is posted 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);  

 

 

if(start_packet_generator(GENERATOR_0_BASE, 1472, 0x33557799)==0x00)  

printf("start_packet_generator\n"); 

if(start_udp_payload_inserter(UDP_INSERTER_0_BASE, &insert_stat)==0x00)  

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

get_udp_payload_inserter_stats(UDP_INSERTER_0_BASE, &getinsert_stat); 

}  

 

}
0 Kudos
Altera_Forum
Honored Contributor II
295 Views

I've added a UDP payload inserter and padding from this project:offload example. 

I want send udp payload through : 

prbs generator-> udp payload inserter -> padding -> mux with packets from SGDMA component (TS Multiplexer) -> TSE MAC. I can send a short message through SDRAM->mux with packets from SGDMA component (TS Multiplexer) input4> TSE MAC. what 's problem. 

Can anybody tell me the way to solve the probelms.Thank you a lot, give my best wishes to you.
0 Kudos
Altera_Forum
Honored Contributor II
295 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. Give my best wishes to you

0 Kudos
Reply