User guide
Table Of Contents
- Contents
- 1. About This MegaCore Function Suite
- Release Information
- Device Family Support
- Features
- Design Example
- Performance and Resource Utilization
- 2D FIR Filter
- 2D Median Filter
- Alpha Blending Mixer
- Avalon-ST Video Monitor
- Chroma Resampler
- Clipper
- Clocked Video Input
- Clocked Video Output
- Color Plane Sequencer
- Color Space Converter
- Control Synchronizer
- Deinterlacer
- Deinterlacer II
- Frame Buffer
- Gamma Corrector
- Interlacer
- Scaler
- Scaler II
- Switch
- Test Pattern Generator
- Trace System
- 2. Getting Started with Altera IP Cores
- 3. Interfaces
- Interface Types
- Avalon-ST Video Protocol
- Avalon-MM Slave Interfaces
- Avalon-MM Master Interfaces
- Buffering of Non-Image Data Packets in Memory
- 4. 2D FIR Filter MegaCore Function
- 5. 2D Median Filter MegaCore Function
- 6. Alpha Blending MegaCore Function
- 7. Avalon-ST Video Monitor MegaCore Function
- 8. Chroma Resampler MegaCore Function
- 9. Clipper MegaCore Function
- 10. Clocked Video Input MegaCore Function
- 11. Clocked Video Output MegaCore Function
- 12. Color Plane Sequencer MegaCore Function
- 13. Color Space Converter MegaCore Function
- 14. Control Synchronizer MegaCore Function
- 15. Deinterlacer MegaCore Function
- Core Overview
- Functional Description
- Parameter Settings
- Signals
- Control Register Maps
- 16. Deinterlacer II MegaCore Function
- 17. Frame Reader MegaCore Function
- 18. Frame Buffer MegaCore Function
- 19. Gamma Corrector MegaCore Function
- 20. Interlacer MegaCore Function
- 21. Scaler MegaCore Function
- 22. Scaler II MegaCore Function
- 23. Switch MegaCore Function
- 24. Test Pattern Generator MegaCore Function
- 25. Trace System MegaCore Function
- A. Avalon-ST Video Verification IP Suite
- B. Choosing the Correct Deinterlacer
- Additional Information

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