SPRUIE9D May 2017 – May 2024 DRA74P , DRA75P , DRA76P , DRA77P
Figure 9-182 shows the flow diagram executed by the hardware sequencer.
Figure 9-182 Hardware Sequencing ExampleThe external initiator configures the different SIMCOP modules and DMA channels. When this is complete, it enables the hardware sequencer. This resets the internal state of the hardware sequencer (pending events and context switch counter).
It starts by running sequence step SIMCOP_HWSEQ_CTRL[12:11] STEP:
The hardware sequencer then waits for completion of events from the selected SIMCOP modules and SIMCOP DMA channels.
The hardware sequencer also ensures that all SIMCOP memory accesses requested by the accelerators and DMA channels enabled for the synchronization step have completed. This condition prevents data corruption due to early switching.
Steps can be chained to define the sequence to execute. Steps are started until the step counter reaches the limit defined by software. When the last step has completed, a DONE_IRQ event is triggered.
The SIMCOP can execute one hardware sequence at the time. However, software can be used to execute multiple independent sequences in parallel (that is, two unrelated macroblock pipelines) using the override feature.
The hardware sequencer has no specific support for macroblock pipeline filling (pipe-up) or flushing (pipe-down). It needs some software intervention.
The hardware sequencer supports sequences composed of up to four steps. Longer sequences require software intervention.
Figure 9-182 illustrates the hardware sequencer operation.
Figure 9-183 Hardware Sequencer Operation ExampleThe example involves utilization of two SIMCOP modules (or DMA channels) that are synchronized using the hardware sequencer. A total of five sequencing steps are executed (SIMCOP_HWSEQ_CTRL[31:6] HW_SEQ_STEP_COUNTER=5). The sequence is 2 steps long and starts with Step 1. Those two steps are configured using the SIMCOP_HWSEQ_STEP_*_i registers(where i = 0 and 1).
The SIMCOP modules processing is started using START pulses (green). When the SIMCOP modules are done, they return a DONE pulse (red). Software can choose which accelerators to run for a given step using the SIMCOP_HWSEQ_STEP_CTRL_i[7:0] *_SYNC registers. They do not need to finish at the same time because the hardware sequencer waits for reception of all DONE pulses of used accelerators before moving to the next step.
The hardware sequencer also triggers a series of interrupts that can be used by software. It is possible, for example, for software to change the configuration of inactive sequencing steps. This can be particularly useful to run longer sequences than what is supported by hardware.
For example, software can setup a 4-step long looping sequence: Step 0 → 1 → 2 → 3 → 0 → 1 → .... When the STEP1_IRQ event is triggered, software can load the configuration to be used next time Step 0 becomes active in the SIMCOP_HWSEQ_STEP_*_i registers.