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

VIP Switch module

My current project is attempting to use several switch modules to change the path of a video pipeline at run time. I have been able to get the modules themselves to run so long as I"m not switching them around but now that I am trying to switch them I have noticed some odd behavior. 

 

The VIP user guide says to either write to the control register or use the output_switch feature. We are using the control register because data is not being supplied to all input ports of the switches at all times and so it seems that it should fail to sync the streams before switching. 

 

What I have implemented for testing is to read the status bits, turn off the switches by an IORD() macro to the MM control port and then read the status until it clears.  

 

What I have observed is that sometimes the switches are not stopping at all and I loop indefinitely 

 

USB_SWITCH_1_OFF; USB_SWITCH_2_OFF; USB_MIXER_SWITCH_OFF; DelayMsec(50); DebugPrintf("Waiting for usb mixer switch to return status = 0\n\r"); while(IORD(VID_USB_MIXER_SWITCH_BASE,1)==0x1){ counter++; USB_MIXER_SWITCH_OFF; DelayMsec(10); } DebugPrintf("counter = %i\n\r",counter);I have tried this with and without the short delays and there doesn't appear to be any difference in performance. When I try and read the various control port registers (go, status, output switch, Dout 0 source, ..etc) I am always getting the same data back so are the Dout source registers write only? There is no discussion of this in the user guide that I have found.
0 Kudos
2 Replies
Altera_Forum
Honored Contributor I
61 Views

>We are using the control register because data is not being supplied to all input ports of the >switches at all times and so it seems that it should fail to sync the streams before switching. 

I cannot guarantee this will work but this is probably worth a try. AFAIK, it is possible to sync at any time between the end of an image packet and the beginning of the next packet. An inactive input should not prevent anything.
Altera_Forum
Honored Contributor I
61 Views

After working on this issue some more we think that the issue is that we have the mixer output being fed back into the switch. This appears to prevent the switch from turning off possibly due to a race condition. We are going to modify the pipeline arrangement and try again.

Reply