| |||
| Home > Coprocessor Interface > Token queue management > Queue flushing | |||
When the coprocessor pipeline is flushed, in response to a command from the core, some of the queues might also have to be flushed. There are two possible ways of flushing the queue:
the entire queue is cleared
the queue is flushed from a selected buffer, along with all data in the queue newer than the data in the selected buffer.
The method used depends on the point at which flushing begins in the coprocessor pipeline. See Flush operations for more details.
A flush command has associated with it a tag value that indicates where the queue flushing starts. This is matched with the tag carried by every instruction.
If the queue is to be flushed from a selected buffer, the buffer is chosen by looking for a matching tag. When this is found, the flag associated with that buffer is cleared, and every flag newer than the selected one is also cleared. Figure 11.6 shows queue flushing.
Each buffer in the queue has a tag comparator associated with it. The flush tag is presented to each comparator, to be compared with the tag belonging to each valid instruction held in the queue. The flush tag is compared with each tag in the queue. If the flush tag is the same as, or older than, any tag then that queue entry has its Full flag cleared. This indicates that it is empty. A less-than-or-equal-to comparison is used to identify tags that are to be flushed. If a tag in the pipeline later than the queue matches, the Flush all signal is asserted to clear the entire queue.