This block either passes through the input stream (assumed to be zeros or ones) when its internal state is acq=1, or it outputs a stream of zeros with periodic ones (with given period) when its internal state is acq=0.
More...
This block either passes through the input stream (assumed to be zeros or ones) when its internal state is acq=1, or it outputs a stream of zeros with periodic ones (with given period) when its internal state is acq=0.
The purpose of this block is to be used right after the timing/frequency acquisition block. The timing/frequency acquisition block outputs a stream of 0s and 1s, with 1s indicating the begining of a cdma frame.
When the system is in acquisition mode (acq=1), the flag_gen block just passes through its input stream, which comes from the timing/frequency acquisition block.
When the system is in tracking mode (acq=0), the timing/frequency acquisition block is not supposed to produce any meaningful output flags. In this case, the flag_gen block produces periodical flags (with given period equal to the frame length) starting from the last flag produced by the timing/frequency acquisition block, in order to provide timing information for the remaining of the system.
For example, when period is 4 the input and output streams will look like:
acq:------>111111000000000...
input:---->010100000000000...
output:-->010100010001000...
where the first 1 in the input and output is for example due to a false acquisition.