Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Altera_Forum
Honored Contributor I
718 Views

force SGDMA receive side shutdown using TSE MAC

Hello All, 

 

When using the SGDMA stream-to-memory configuration of the TSE MAC receive side, the network interface driver software typically sets the buffer length to zero in the SGDMA's DMA descriptor indicating that a complete frame should be copied into the SGDMA's target buffer. However, this can make a clean orchestrated shutdown of the SGDMA receive side very hard if no packets are currently being received; in this configuration the SGDMA will not listen to any request to stop unless it receives a frame after the run bit is cleared. We of course prefer to avoid the SGDMA being armed and ready to destroy the data structures of the new system when there is a soft reboot! We would also prefer for it to be possible to shutdown the TSE MAC network interface and then start it up again without requiring an OS reboot. 

 

So, my question is as follows; are there any register bits in the TSE MAC that software can poke which will force an empty receive frame, and or a receive frame with error bits set, to be forwarded to the SGDMA receive side? I considered using the local-loopback in the TSE MAC for this purpose, but would like to avoid depending on its local-loopback mode because this functionality will not be present in the small MAC configuration of the TSE block. We could also provide some specialized hardware for this purpose, but we are trying to keep the driver software generic, and therefore not dependent on specific hardware configurations, so we also are hoping to avoid that approach. 

 

Any guidance on this issue from the gurus at large is gratefully appreciated! 

 

Thanks, 

 

Jeff
0 Kudos
2 Replies
Altera_Forum
Honored Contributor I
25 Views

Hi, 

 

How about adding ST-mux between TSE and SGDMA. The mux can handle packets (swithces input only on packet boundaries), and the other input can be a simple self-made ST-source capable of generating dummy packets. 

 

-Topi
Altera_Forum
Honored Contributor I
25 Views

 

--- Quote Start ---  

Hi, 

 

How about adding ST-mux between TSE and SGDMA. The mux can handle packets (swithces input only on packet boundaries), and the other input can be a simple self-made ST-source capable of generating dummy packets. 

 

-Topi 

--- Quote End ---  

 

 

Yes, this type of solution would definately work. The tricky part is coming up with a solution that does not make the software dependent on particular configurations of the hardware; we want the RTEMS OS TSE MAC / SGDMA driver to work across the widest range of almost any hardware that might be using the TSE MAC/SGDMA.  

 

Considering this further, we are of course making a driver that works only with the very limited set of {TSE MAC, SGDMA} hardware so perhaps if we make an IP that combines {SGDMA, TSE, proper receive side shutdown logic} and require its use with the driver then we will not be constraining the user community too much. 

 

Another option would be to make the part of the software that injects the receive side shutdown packet a hardware specific software snap-in. 

 

Jeff
Reply