User guide

Table Of Contents
23–2 Chapter 23: Switch MegaCore Function
Functional Description
Video and Image Processing Suite January 2013 Altera Corporation
User Guide
Figure 23–1 shows the system configuration used to achieve this.
The Control Synchronizer MegaCore function ensures that the switch of the video
streams is performed at a safe place in the streams. Performing the switch when the
Alpha Blending Mixer MegaCore function is outputting the start of an image packet,
ensures that the video streams entering the Switch MegaCore function are all on the
same frame. They can then be switched on the next image end-of-packet without
causing a deadlock situation between the Switch and Alpha Blending Mixer.
The following sequence shows an example for layer switching:
1. Switch MegaCore function—Write to the
DoutN Output Control
registers setting
up the outputs. For example:
a. Write 1 to address 3
b. Write 2 to address 4
2. Switch MegaCore function—Enable the function by writing 1 to address 0
3. Switch MegaCore function—Write to the
DoutN Output Control
registers to
switch the outputs. For example:
a. Write 2 to address 3
b. Write 1 to address 4
4. Control Synchronizer MegaCore function—Set up the Control Synchronizer to
write a 1 to the Switch MegaCore function’s
Output Switch
register on the next
start of an image packet.
Stall Behavior and Error Recovery
The Switch MegaCore function only stalls its inputs when performing an output
switch. Before switching its outputs it synchronize all its inputs and during this
synchronization the inputs may be stalled.
1 For more information about the stall behavior and error recovery, refer to “Stall
Behavior and Error Recovery” on page 1–3.
Figure 23–1. Example of a layer Switching System
Background Layer
Layer 1
Layer 2
Video Stream 1
Video Stream 2
Switch
MegaCore
Function
Alpha
Blending
Mixer
MegaCore
Function
Control
Synchronizer
MegaCore
Function
Avalon-MM
Master
Avalon-MM
Slave Control