EP1535144B1

Synchronisation between pipelines in a data processing apparatus

Abstract

This record has no abstract on file.

EP1535144B1, drawing sheet 1
Sheet 1 of 15

Term

Term ended

Expired 4 June 2023, 3.3 years ago.

  1. Priority
  2. Filed
  3. Granted
  4. Expired
  5. Today

45 claims: 22 independent, 23 dependent

  1. 1
    A data processing apparatus, comprising:a main processor (40) operable to execute a sequence of instructions, the main processor comprising a first pipeline (30) having a first plurality of pipeline stages;a coprocessor (110) operable to execute coprocessor instructions in said sequence of instructions, the coprocessor comprising a second pipeline (130) having a second plurality of pipeline stages, and each coprocessor instruction being arranged to be routed through both the first pipeline and the second pipeline, and characterized by at least one synchronising queue (300, 310, 320, 330, 340, 400, 410) coupling a predetermined pipeline stage in one of the pipelines with a partner pipeline stage in the other of the pipelines, the predetermined pipeline stage being operable to cause a token to be placed in the synchronising queue when processing a coprocessor instruction and the partner pipeline stage being operable to process that coprocessor instruction upon receipt of the token from the synchronising queue, thereby synchronising the first and second pipelines between the predetermined pipeline stage and the partner pipeline stage.
  2. 6
    A data processing apparatus as claimed in any preceding claim, wherein one of the at least one synchronising queues is a cancel queue (310), the predetermined pipeline stage (210) is in the first pipeline and is arranged to cause to be placed in the cancel queue a token identifying whether a coprocessor instruction at that predetermined pipeline stage is to be cancelled, and the partner pipeline stage (225) is in the second pipeline and is operable upon receipt of the token from the cancel queue, and if the token identifies that the coprocessor instruction is to be cancelled, to cause that coprocessor instruction to be cancelled.
  3. 9
    A data processing apparatus as claimed in any preceding claim, wherein one of the at least one synchronising queues is a finish queue (320), the predetermined pipeline stage (290) is in the first pipeline and is arranged to cause to be placed in the finish queue a token identifying permission for a coprocessor instruction at that predetermined pipeline stage to be retired from the second pipeline, and the partner pipeline stage (275) is in the second pipeline and is operable upon receipt of the token from the finish queue, and if the token identifies that the coprocessor instruction is permitted to be retired, to cause that coprocessor instruction to be retired.
  4. 11
    A data processing apparatus as claimed in any preceding claim, wherein one of the at least one synchronising queues is a length queue (330), the predetermined pipeline stage (205) is in the second pipeline and is arranged, for a vectored coprocessor instruction, to cause to be placed in the length queue a token identifying length information for the vectored coprocessor instruction, and the partner pipeline stage (260) is in the first pipeline and is operable upon receipt of the token from the length queue to factor the length information into the further processing of the vectored coprocessor instruction within the first pipeline.
  5. 13
    A data processing apparatus as claimed in any preceding claim, wherein one of the at least one synchronising queues is an accept queue (340), the predetermined pipeline stage (215) is in the second pipeline and is arranged to cause to be placed in the accept queue a token identifying whether a coprocessor instruction in that predetermined pipeline stage is to be accepted for execution by the coprocessor, and the partner pipeline stage (270) is in the first pipeline and is operable upon receipt of the token from the accept queue, and if the token identifies that the coprocessor instruction is not to be accepted, to cause that coprocessor instruction to be rejected by the main processor.
  6. 16
    A data processing apparatus as claimed in any preceding claim, wherein one of the at least one synchronising queues is a store queue (400) used when the coprocessor instruction is a store instruction operable to cause data items to be transferred from the coprocessor to memory accessible by the main processor, the predetermined pipeline stage (215) is in the second pipeline and is arranged, when processing one of said store instructions, to cause to be placed in the store queue a token identifying each data item to be transferred, and the partner pipeline stage (230) is in the first pipeline and is operable upon receipt of each token from the store queue, to cause the corresponding data item to be transferred to the memory.
  7. 18
    A data processing apparatus as claimed in any preceding claim, wherein one of the at least one synchronising queues is a load queue (410) used when the coprocessor instruction is a load instruction operable to cause data items to be transferred from memory accessible by the main processor to the coprocessor, the predetermined pipeline stage (250) is in the first pipeline and is arranged, when processing one of said load instructions, to cause to be placed in the load queue a token identifying each data item to be transferred, and the partner pipeline stage (275) is in the second pipeline and is operable upon receipt of each token from the load queue, to cause the corresponding data item to be transferred to the coprocessor.
  8. 23
    A data processing apparatus as claimed in any preceding claim, wherein each token includes a tag which identifies the coprocessor instruction to which the token relates.
  9. 26
    A data processing apparatus as claimed in any preceding claim, wherein the at least one synchronising queue comprises a First-In-First-Out (FIFO) buffer having a predetermined number of entries for storing tokens.
  10. 27
    A data processing apparatus as claimed in any preceding claim, wherein a plurality of said coprocessors are provided, with each synchronising queue coupling a pipeline stage in the main processor with a pipeline stage in one of the coprocessors.
  11. 28
    A data processing apparatus as claimed in any preceding claim, wherein the data processing apparatus has a synchronous design, such that the tokens are caused to be placed in the queue by the predetermined pipeline stage and are caused to be received from the queue by the partner pipeline stage upon changing edges of a clock cycle.
  12. 29
    A method of synchronisation between pipelines in a data processing apparatus, the data processing apparatus comprising a main processor (40) operable to execute a sequence of instructions and a coprocessor (110) operable to execute coprocessor instructions in said sequence of instructions, the main processor comprising a first pipeline (30) having a first plurality of pipeline stages, and the coprocessor comprising a second pipeline (130) having a second plurality of pipeline stages, and each coprocessor instruction being arranged to be routed through both the first pipeline and the second pipeline, the method being characterized by the steps of:(a) coupling a predetermined pipeline stage in one of the pipelines with a partner pipeline stage in the other of the pipelines via a synchronising queue (300, 310, 320, 330, 340, 400, 410);(b) placing a token in the synchronising queue when the predetermined pipeline stage is processing a coprocessor instruction;(c) upon receipt of the token from the synchronising queue by the partner pipeline stage, processing the coprocessor instruction within the partner pipeline stage;whereby synchronisation of the first and second pipelines between the predetermined pipeline stage and the partner pipeline stage is obtained.
  13. 32
    A method as claimed in any of claims 29 to 31, wherein one of the at least one synchronising queues is a cancel queue (310), the predetermined pipeline stage (210) is in the first pipeline and the partner pipeline stage (225) is in the second pipeline, the method comprising the steps of:at said step (b), placing a token in the cancel queue identifying whether a coprocessor instruction at that predetermined pipeline stage is to be cancelled;and at said step (c), upon receipt of the token from the cancel queue by the partner pipeline stage, and if the token identifies that the coprocessor instruction is to be cancelled, causing that coprocessor instruction to be cancelled.
  14. 33
    A method as claimed in any of claims 29 to 32, wherein one of the at least one synchronising queues is a finish queue (320), the predetermined pipeline stage (290) is in the first pipeline and the partner pipeline stage (275) is in the second pipeline, the method comprising the steps of:at said step (b), placing in the finish queue a token identifying permission for a coprocessor instruction at that predetermined pipeline stage to be retired from the second pipeline;and at said step (c), upon receipt of the token from the finish queue by the partner pipeline stage, and if the token identifies that the coprocessor instruction is permitted to be retired, causing that coprocessor instruction to be retired.
  15. 34
    A method as claimed in any of claims 29 to 33, wherein one of the at least one synchronising queues is a length queue (330), the predetermined pipeline stage (205) is in the second pipeline and the partner pipeline stage (260) is in the first pipeline, and the method comprises the steps of:at said step (b), for a vectored coprocessor instruction, placing in the length queue a token identifying length information for the vectored coprocessor instruction;and at said step (c), upon receipt of the token from the length queue by the partner pipeline stage, factoring the length information into the further processing of the vectored coprocessor instruction within the first pipeline.
  16. 35
    A method as claimed in any of claims 29 to 34, wherein one of the at least one synchronising queues is an accept queue (340), the predetermined pipeline stage (215) is in the second pipeline and the partner pipeline stage (270) is in the first pipeline, the method comprising the steps of:at said step (b), placing in the accept queue a token identifying whether a coprocessor instruction in that predetermined pipeline stage is to be accepted for execution by the coprocessor, and at said step (c), upon receipt of the token from the accept queue by the partner pipeline stage, and if the token identifies that the coprocessor instruction is not to be accepted, causing that coprocessor instruction to be rejected by the main processor.
  17. 36
    A method as claimed in any of claims 29 to 35, wherein one of the at least one synchronising queues is a store queue (400) used when the coprocessor instruction is a store instruction operable to cause data items to be transferred from the coprocessor to memory accessible by the main processor, the predetermined pipeline stage (215) is in the second pipeline and the partner pipeline stage (230) is in the first pipeline, the method comprising the steps of:at said step (b), when processing one of said store instructions, placing in the store queue a token identifying each data item to be transferred;and at said step (c), upon receipt of each token from the store queue by the partner pipeline stage, causing the corresponding data item to be transferred to the memory.
  18. 37
    A method as claimed in any of claims 29 to 36, wherein one of the at least one synchronising queues is a load queue (410) used when the coprocessor instruction is a load instruction operable to cause data items to be transferred from memory accessible by the main processor to the coprocessor, the predetermined pipeline stage (250) is in the first pipeline and the partner pipeline stage (275) is in the second pipeline, the method comprising the steps of:at said step (b), when processing one of said load instructions, placing in the load queue a token identifying each data item to be transferred;and at said step (c), upon receipt of each token from the load queue by the partner pipeline stage, causing the corresponding data item to be transferred to the coprocessor.
  19. 40
    A method as claimed in any of claims 29 to 39, wherein each token includes a tag which identifies the coprocessor instruction to which the token relates.
  20. 43
    A method as claimed in any of claims 29 to 42, wherein the at least one synchronising queue comprises a First-In-First-Out (FIFO) buffer having a predetermined number of entries for storing tokens.
  21. 44
    A method as claimed in any of claims 29 to 43, wherein a plurality of said coprocessors are provided, with each synchronising queue coupling a pipeline stage in the main processor with a pipeline stage in one of the coprocessors.
  22. 45
    A method as claimed in any of claims 29 to 44, wherein the data processing apparatus has a synchronous design, such that the tokens are placed in the queue by the predetermined pipeline stage and are received from the queue by the partner pipeline stage upon changing edges of a clock cycle.
Independent claims22