Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
CS 220 / ARM / ARM1176JZ-S Technical Reference Mmanual.pdf
Источник:
Скачиваний:
44
Добавлен:
16.04.2015
Размер:
4.47 Mб
Скачать

Coprocessor Interface

11.6Operations

This section describes the various operations that can be performed and events that can take place.

11.6.1Normal operation

In normal operation the core passes all instructions across to the coprocessor, and then increments the tag if the instruction was a coprocessor instruction. The coprocessor decodes the instruction and throws it away if it is not a coprocessor instruction or if it contains the wrong coprocessor number.

Each coprocessor instruction then passes down the pipeline, sending a token down the length queue as it moves into the issue stage. The instruction then moves into the Ex1 stage, sending a token down the accept queue, and remains there until it has received a token from the cancel queue.

If the cancel token does not request that the instruction is cancelled, and is not a Store instruction, it moves on to the Ex2 stage. The instruction then moves down the pipeline until it reaches the Ex6 stage. At this point, it waits to receive a token from the finish queue, that enables it to retire, unless it is either:

a store instruction, where it requires no token from the finish queue

a load instruction, where it must wait until load data are available.

Store instruction are removed from the pipeline as soon as they leave the Ex1 stage.

11.6.2Cancel operations

When the coprocessor instruction reaches the Ex1 stage it looks for a token in the cancel queue. If the token indicates that the instruction is to be cancelled, it is removed from the pipeline and does not pass to Ex2. Any tail instruction in the I stage is also removed.

11.6.3Bounce operations

The coprocessor can reject an instruction by bouncing it when it reaches the issue stage. This can happen to an instruction that has been accepted as a valid coprocessor instruction by the decoder, but that is found to be unexecutable by the issue stage, perhaps because it refers to a non-existent register or operation.

When the bounced instruction leaves the issue stage to move into Ex1, the token sent down the accept queue has its bounce bit set. This causes the instruction to be removed from the core pipeline.

When the instruction moves into Ex1 it has its dead bit set, turning it into a phantom. This enables the instruction to remain in the pipeline to match tokens in the cancel queue.

The core posts a token for the bounced instruction before the coprocessor can bounce it, so the phantom is required to pick up the token for the bounced instruction. The instruction is otherwise inert, and has no other effect. The core might already have decided to cancel the instruction being bounced. In this case, the cancel token causes the phantom to be removed from the pipeline. If the core does not cancel the phantom it continues to the bottom of the pipeline.

11.6.4Flush operations

A flush can be triggered by the core in any stage from issue to WBls inclusive. When this happens a broadcast signal is received by the coprocessor, passing it the tag associated with the instruction triggering the flush.

ARM DDI 0333H

Copyright © 2004-2009 ARM Limited. All rights reserved.

11-19

ID012410

Non-Confidential, Unrestricted Access

 

Coprocessor Interface

Because the tag is changed by the core after each new coprocessor instruction, the tag matches the first coprocessor instruction following the instruction causing the flush. The coprocessor must then find the first instruction that has a matching tag, working from the bottom of the pipeline upwards, and remove all instructions from that point upwards.

Unlike tokens passing down a queue, a flush signal has a fixed delay so that the timing relationship between a flush in the core and a flush in the coprocessor is known precisely. Most of the token queues also require flushing and this can also be done using the tags attached to each instruction. If a match has been found before the stage at the receiving end of a token queue is passed, then the token queue is cleared.

Otherwise, it must be properly flushed by matching the tags in the queue. This operation must be performed on all the queues except the finish queue, that is updated in the normal way. Therefore, the coprocessor must flush the instruction and cancel queues. The flushing operation can be carried out by the coprocessor as soon as the flush signal is received. The flushing operation is simplified because the instruction and cancel queues cannot be performing any other operation. This means that flushing is not required to be combined with queue updates for these queues.

There is a single cycle following a flush where nothing happens that affects the flushed queues, and this provides a good opportunity to carry out the queue flushing operation.

The following signals provide the flush broadcast signal from the core:

ACPFLUSH

This signal is asserted when a flush is to be performed.

ACPFLUSHT[3:0]

This is the tag associated with the first instruction to be flushed.

11.6.5Retirement operations

When an instruction reaches the bottom of the coprocessor pipeline it is retired. How it retires depends on the kind of instruction it is and if it is iterated, as Table 11-5 lists.

 

 

Table 11-5 Retirement conditions

 

 

 

Instruction

Typ

Retirement conditions

e

 

 

 

 

 

CDP

-

Must find a token in the finish queue.

 

 

 

MRC

Store

No conditions. Immediate retirement on leaving Ex1.

 

 

 

MCR

Load

All load instructions must find data in the load data pipeline from the core.

 

 

 

MRRC

Store

No conditions. Immediate retirement on leaving Ex1.

 

 

 

MCRR

Load

All load instructions must find data in the load data pipeline from the core.

 

 

 

STC

Store

No conditions. Immediate retirement on leaving Ex1.

 

 

 

LDC

Load

Must find data in the load data pipeline from the core.

 

 

 

Table 11-5 lists the conditions for each coprocessor instruction:

all store instructions retire unconditionally on leaving Ex1 because no token is required in the finish queue

CDP instructions require a token in the finish queue

ARM DDI 0333H

Copyright © 2004-2009 ARM Limited. All rights reserved.

11-20

ID012410

Non-Confidential, Unrestricted Access

 

Coprocessor Interface

all load instructions must pick up data from the load pipeline

phantom load instructions retire unconditionally.

ARM DDI 0333H

Copyright © 2004-2009 ARM Limited. All rights reserved.

11-21

ID012410

Non-Confidential, Unrestricted Access

 

Соседние файлы в папке ARM