WO2022120722A1 - Resource scheduling apparatus, digital signal processor and movable platform - Google Patents

Resource scheduling apparatus, digital signal processor and movable platform Download PDF

Info

Publication number
WO2022120722A1
WO2022120722A1 PCT/CN2020/135284 CN2020135284W WO2022120722A1 WO 2022120722 A1 WO2022120722 A1 WO 2022120722A1 CN 2020135284 W CN2020135284 W CN 2020135284W WO 2022120722 A1 WO2022120722 A1 WO 2022120722A1
Authority
WO
WIPO (PCT)
Prior art keywords
unit
read
target
write request
addressing
Prior art date
Application number
PCT/CN2020/135284
Other languages
French (fr)
Chinese (zh)
Inventor
韩志
张英
吴穹蔗
Original Assignee
深圳市大疆创新科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳市大疆创新科技有限公司 filed Critical 深圳市大疆创新科技有限公司
Priority to PCT/CN2020/135284 priority Critical patent/WO2022120722A1/en
Publication of WO2022120722A1 publication Critical patent/WO2022120722A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems

Definitions

  • the present invention relates to the technical field of data processing, and in particular, to a resource scheduling device, a digital signal processor and a movable platform.
  • a digital signal processor Digital Signal Processing, DSP
  • DSP Digital Signal Processing
  • the DSP includes multiple vector calculation units, multiple addressing units and vector memory.
  • the vector memory needs to be read and written to store the data to be stored in the specified storage location of the vector memory, or to read the data to be used in the calculation process from the specified storage location of the vector memory.
  • the vector calculation unit needs to find the specified storage location of the vector memory through the target addressing unit.
  • Embodiments of the present invention provide a resource scheduling device, a digital signal processor, and a movable platform, which are used to automatically assign an addressing unit to a failure vector calculation unit, thereby reducing operation difficulty and improving operation efficiency.
  • an embodiment of the present invention provides a resource scheduling apparatus, and the method includes:
  • a target read/write request receiving unit configured to receive the target read/write request sent by the target vector computing unit
  • a scheduling unit configured to determine the addressing unit corresponding to the target vector computing unit according to the addressing unit information corresponding to the target read/write request
  • a target read/write request sending unit configured to send the target read/write request to an addressing unit corresponding to the target vector calculation unit.
  • the resource scheduling apparatus further includes:
  • a configuration information sending unit configured to send configuration information corresponding to the target read/write request to a target configuration information receiving unit corresponding to the target vector calculation unit.
  • the scheduling unit is used for:
  • the addressing unit information corresponding to the target read/write request determine the number of first addressing units that need to be used to execute the target read/write request;
  • the second addressing units If the number of the second addressing units is greater than or equal to the number of the first addressing units, determining the first addressing for executing the target read/write request in the second addressing unit unit, so as to perform read and write operations of the vector memory through the first addressing unit and the configuration information.
  • the target read/write request includes a read interface and/or a write interface indicating that the target vector computing unit needs to be used
  • the read interface corresponds to a third addressing unit
  • the write interface corresponds to a fourth addressing unit.
  • the target read/write request includes indication information of preset digits corresponding to all read interfaces and/or all write interfaces of the target vector computing unit;
  • the indication information When the highest 1-bit data of the indication information is 1, the indication information is used to instruct to enable the corresponding read interface or write interface; when the highest 1 of the indication information is 0, the indication information is used for Indicates that the corresponding read interface or write interface is not enabled.
  • the scheduling unit is used for:
  • the number of first addressing units to be used for executing the target read/write request is determined according to the read interface and/or write interface to be used indicated in the target read/write request.
  • the scheduling unit includes a plurality of indication registers, and the indication register is connected to a read interface and/or a write interface of a vector calculation unit of the plurality of vector calculation units and one of the plurality of addressing units.
  • the addressing unit is associated, and when the first value is stored in any indication register, the any indication register indicates that the addressing unit associated with the any indication register is assigned to the address unit associated with the any indication register read interface and/or write interface.
  • the scheduling unit is used for:
  • the first value is stored in the target indication register.
  • the resource scheduling apparatus further includes:
  • a virtual addressing unit used for allocating the virtual addressing unit to the The read interface and/or write interface to be used as indicated in the target read and write request.
  • the target read/write request also carries a target vector computing unit identifier and a target configuration information receiving unit identifier;
  • the scheduling unit includes a plurality of indication registers, the indication register and one of the plurality of configuration information receiving units.
  • the configuration information receiving unit is associated with one addressing unit in the plurality of addressing units, and when the second value is stored in any indication register, the any indication register indicates the address associated with the any indication register.
  • the configuration information receiving unit is assigned to the addressing unit associated with any of the indication registers.
  • the scheduling unit is used for:
  • the target configuration information receiving unit identifier to be used indicated in the target read/write request determine the target configuration information receiving unit among the plurality of configuration information receiving units;
  • the second value is stored in the target indication register.
  • the resource scheduling apparatus further includes:
  • a read-write request receiving unit used for receiving read-write requests sent by multiple vector computing units respectively;
  • an arbitration unit configured to determine the target vector calculation unit among the plurality of vector calculation units according to the respective priorities of the vector calculation units, and the respective priorities of the vector calculation units are different; The target read and write request sent by the target vector calculation unit.
  • the arbitration unit is configured to:
  • the target vector calculation unit with the highest priority is determined among the plurality of vector calculation units.
  • the arbitration unit is further configured to:
  • a vector calculation unit to be adjusted whose priority is lower than the target vector calculation unit is determined in the plurality of vector calculation units, and the to-be-adjusted vector calculation unit is determined in the plurality of vector calculation units. Adjust the priority of the vector calculation unit to increase the preset level;
  • the priority corresponding to the target vector calculation unit is adjusted to the lowest value.
  • the resource scheduling apparatus further includes:
  • a timestamp unit configured to record the reception time of receiving the read/write request sent by any vector calculation unit when the read/write request receiving unit receives the read/write request sent by any vector calculation unit;
  • the arbitration unit is used to determine the candidate read/write request with the earliest corresponding reception time among the multiple read/write requests when the read/write request response period arrives; if the number of the candidate read/write requests is 1, then The candidate read/write request is determined as the target read/write request; if the number of the candidate read/write requests is greater than 1, the target vector computation unit with the highest priority is determined in the vector computation unit that sends the candidate read/write request, Determine the target read/write request sent by the target vector calculation unit.
  • an embodiment of the present invention provides a digital signal processor, where the digital signal processor includes a target vector calculation unit, a plurality of addressing units, a vector memory, and the resource scheduling apparatus provided in the first aspect of the embodiment of the present invention, in:
  • the target vector calculation unit configured to send a target read and write request to the resource scheduling device
  • the resource scheduling device is configured to select an addressing unit corresponding to the target vector computing unit from the multiple addressing units according to the target read/write request;
  • the addressing unit corresponding to the target vector calculation unit is configured to perform read/write operations on the vector memory according to the target read/write request.
  • the target vector calculation unit includes a vector arithmetic logic operation unit, a floating point operation unit, an accelerator unit or a peripheral interface.
  • an embodiment of the present invention provides a movable platform, which includes the digital signal processor provided in the second aspect of the embodiment of the present invention.
  • the resource scheduling device can automatically allocate available addressing to the target vector computing unit according to the addressing unit information corresponding to the target reading and writing request in the case of receiving the target reading and writing request sent by the target vector computing unit. unit, so that the target vector calculation unit can read and write operations to the vector memory through the allocated addressing unit to complete the calculation task.
  • it is no longer necessary to manually assign addressing units to the target vector calculation unit, and these processes can be completed automatically, thereby reducing the operation difficulty of technicians and improving the operation efficiency.
  • FIG. 1 is a schematic structural diagram of a digital signal processor according to an embodiment of the present invention.
  • FIG. 2 is a schematic structural diagram of a resource scheduling apparatus according to an embodiment of the present invention.
  • FIG. 3 is a schematic diagram of a read-write request provided by an embodiment of the present invention.
  • FIG. 4 is a schematic structural diagram of a scheduling unit according to an embodiment of the present invention.
  • FIG. 5 is a schematic diagram of a read interface bridge provided by an embodiment of the present invention.
  • FIG. 6 is a schematic diagram of a write interface bridge according to an embodiment of the present invention.
  • FIG. 7 is a schematic diagram of an indication register for connecting a vector computing unit and an addressing unit according to an embodiment of the present invention
  • FIG. 8 is a schematic diagram of an indication register for connecting a configuration information receiving unit and an addressing unit according to an embodiment of the present invention
  • FIG. 9 is a schematic structural diagram of another digital signal processor provided by an embodiment of the present invention.
  • FIG. 10 is a schematic structural diagram of another resource scheduling apparatus provided by an embodiment of the present invention.
  • FIG. 11 is a schematic flowchart of a flow sequence of a resource scheduling method according to an embodiment of the present invention.
  • FIG. 12 is a schematic structural diagram of another resource scheduling apparatus provided by an embodiment of the present invention.
  • FIG. 13 is a schematic diagram of determining the sequential processing order of read and write requests in a fixed priority mode according to an embodiment of the present invention
  • FIG. 14 is a schematic diagram of determining the sequential processing order of read and write requests in a polling mode provided by an embodiment of the present invention.
  • 15 is a schematic diagram of determining the sequential processing order of read and write requests in a time priority mode according to an embodiment of the present invention
  • FIG. 16 is a schematic structural diagram of a movable platform according to an embodiment of the present invention.
  • the words “if”, “if” as used herein may be interpreted as “at” or “when” or “in response to determining” or “in response to detecting”.
  • the phrases “if determined” or “if detected (the stated condition or event)” can be interpreted as “when determined” or “in response to determining” or “when detected (the stated condition or event),” depending on the context )” or “in response to detection (a stated condition or event)”.
  • FIG. 1 is a digital signal processor provided by an embodiment of the present invention.
  • the digital signal processor 10 may include a target vector calculation unit 11, a plurality of addressing units 12, a vector memory 13, and an implementation of the present invention.
  • the resource scheduling device 14 provided by the example. in:
  • the target vector calculation unit 11 is configured to send a target read/write request to the resource scheduling apparatus 14 .
  • the resource scheduling device 14 is configured to select the addressing unit 12 corresponding to the target vector computing unit 11 from the multiple addressing units 12 according to the target read/write request.
  • the addressing unit 12 corresponding to the target vector calculation unit 11 is configured to perform read and write operations on the vector memory 13 according to the target read and write request.
  • the digital signal processor 10 may also include a scalar processor (Reduced Instruction Set Computing, RISC).
  • the scalar processor may send instructions to any of a plurality of vector computing units included in the digital signal processor 10 . After the any vector computing unit receives the instruction, in order to execute the instruction to realize the required function of the instruction, it is often necessary to perform read and write operations on the data in the vector memory 13, so that any vector computing unit can parse the instruction into a read and write request. , the read and write operations to the vector memory 13 are completed based on the read and write requests.
  • the target vector calculation unit 11 in this embodiment of the present invention may be any vector calculation unit with read and write requirements among the multiple vector calculation units included in the digital signal processor 10 .
  • the above-mentioned target vector calculation unit 11 may include a vector arithmetic logic operation unit, a floating point operation unit (VFPU), an accelerator unit or a peripheral interface (MCL).
  • the vector arithmetic logic unit may be a vector arithmetic logic unit (Vector Arithmetic Logic Unit, VALU) or a VEU.
  • VALU Vector Arithmetic Logic Unit
  • the accelerator unit can be Multi Media Extensions (MMX) or ACC.
  • the target vector calculation unit 11 may generate a target read/write request based on the instruction sent by the scalar processor, and then send the target read/write request to the resource scheduling apparatus 14 .
  • the resource scheduling device 14 can select the addressing unit 12 corresponding to the target vector calculation unit 11 from the multiple addressing units 12 (AGU) according to the target read and write request and assign it to the target vector calculation unit 11, so that the target vector calculation unit 11 can pass through the target vector calculation unit 11.
  • the assigned addressing unit 12 performs read and write operations on the vector memory 13 .
  • FIG. 2 is a schematic structural diagram of a resource scheduling device 14 provided by an embodiment of the present invention. As shown in FIG. 2 , the device includes a target read/write request receiving unit 21, a scheduling unit 22, and a target read/write request sending unit 23. in:
  • the target read/write request receiving unit 21 is configured to receive the target read/write request sent by the target vector calculation unit 11 .
  • the scheduling unit 22 is configured to determine the addressing unit 12 corresponding to the target vector calculation unit 11 according to the addressing unit 12 information corresponding to the target read/write request.
  • the target read/write request sending unit 23 is configured to send the target read/write request to the addressing unit 12 corresponding to the target vector calculation unit 11 .
  • the target read/write request unit in the resource scheduling device 14 can receive the target read/write request sent by the target vector calculation unit 11, and the target read/write request carries a target vector calculation unit 11 for indicating the target read/write request.
  • the addressing unit 12 information of the number of addressing units 12 to be used, the scheduling unit 22 can determine the addressing unit 12 that can be used by the target vector calculation unit 11 among the multiple addressing units 12 according to the addressing unit 12 information carried in the target read and write request Addressing unit 12.
  • the target read/write request sending unit 23 may send the target read/write request to the addressing unit 12 corresponding to the target vector calculation unit 11, so that the target vector calculation unit 11 can
  • the vector memory 13 is read and written through the addressing unit 12 corresponding to the target vector calculation unit 11 .
  • the resource scheduling apparatus 14 may further include: a configuration information sending unit 24 configured to send configuration information corresponding to the target read/write request to the target configuration information receiving unit 25 corresponding to the target vector calculation unit 11 .
  • the resource scheduling apparatus 14 may further include multiple configuration information receiving units 25 (config), and the target configuration information receiving unit 25 may be selected from the multiple configuration information receiving units 25 and assigned to the target vector calculating unit 11 . If the vector memory 13 needs to be read and written correctly, in addition to the relevant information carried in the target read and write requests, configuration information corresponding to the target read and write requests is also required to jointly control and complete the read and write operations to the vector memory 13 . Therefore, after the scalar processor sends the configuration information corresponding to the target read/write request, the configuration information corresponding to the target read/write request may be stored in the target configuration information receiving unit 25 through the configuration information sending unit 24 .
  • config configuration information receiving units 25
  • the above-mentioned scheduling unit 22 can be used to determine the number of first addressing units that need to be used to execute the target read/write request according to the addressing unit 12 information corresponding to the target read/write request; among the multiple addressing units 12 Determine the second addressing unit whose working state is idle; if the number of the second addressing units is greater than or equal to the number of the first addressing units, determine the first addressing unit for executing the target read/write request in the second addressing unit
  • the addressing unit is used to perform read and write operations of the vector memory 13 through the first addressing unit and configuration information.
  • each addressing unit 12 can be recorded.
  • Any addressing unit 12 is marked as busy.
  • any addressing unit 12 is not assigned to any vector computing unit, or any addressing unit 12 is assigned to any vector computing unit and any vector computing unit has used up any addressing unit 12 , any addressing unit 12 is marked as free. Based on this, a second addressing unit whose working state is idle may be determined among the plurality of addressing units 12 .
  • the number of first addressing units to be used to execute the target read/write request can be determined according to the addressing unit 12 information corresponding to the target read/write request, if the number of the second addressing units is greater than or equal to the number of the first addressing units number, the first addressing unit for executing the target read/write request may be determined in the second addressing unit.
  • the resource scheduling device 14 may also include a virtual addressing unit (Virtual AGU). If the number of the second addressing units is smaller than the number of the first addressing units, the virtual addressing unit may be temporarily determined as the addressing unit 12 for executing the target read/write request.
  • Virtual AGU Virtual AGU
  • the following will introduce the process of determining the number of first addressing units to be used for executing the target read/write request according to the target read/write request.
  • the target vector calculation unit 11 may include multiple read interfaces and multiple write interfaces, and can configure whether to use these interfaces, and then add the configuration information to the target read/write request.
  • the target read/write request may include a read interface and/or a write interface indicating that the target vector calculation unit 11 needs to be used, and each read interface uses one addressing unit 12 and each write interface uses one addressing unit 12 . It can be understood that, if an interface in the target vector calculation unit 11 is used in the configuration, a corresponding addressing unit 12 needs to be allocated to serve the interface in the process of using the interface.
  • the scheduling unit 22 may be configured to: determine the number of first addressing units to be used to execute the target read/write request according to the read interface and/or write interface to be used indicated in the target read/write request.
  • the target read/write request may include indication information of preset bits corresponding to all read interfaces and/or all write interfaces of the target vector computing unit 11 respectively.
  • the indication information is used to indicate to enable the corresponding read interface or write interface; when the highest 1 of the indication information is the data is 0, the indication information is used to indicate that the corresponding read interface is not enabled or write interface.
  • Bits 0-3 in the target read and write request are time stamps, which are used to indicate the receiving time when the target read and write request is received.
  • Bits 4-7 in the target read/write request are the master id, and a corresponding identifier can be assigned to each vector computing unit in advance, and the identifier of the target vector unit that sends the target read/write request is recorded in the master id.
  • Bits 8-12 and 13-17 in the target read and write request are write ID0 and write ID1 in turn.
  • the upper 1 bit in write ID0 and write ID1 indicates whether the corresponding write interface is enabled, for example, when the upper 1 bit data is 1 , indicating that the corresponding write interface is enabled. When the highest 1 is the data of 0, it indicates that the corresponding write interface is not enabled.
  • the lower 4 bits in write ID0 and write ID1 indicate the identity of the target configuration information receiving unit 25 that needs to be used.
  • Bits 18-22, 23-27, and 28-32 in the target read and write request are read ID0, read ID1, and read ID2 in turn.
  • the high 1 in read ID0, read ID1 and read ID2 indicates whether the corresponding read interface is enabled. For example, when the high 1-bit data is 1, it indicates that the corresponding read interface is enabled, and when the highest 1 is the data 0, it indicates that the corresponding read interface is not enabled. Enable the corresponding read interface.
  • the lower 4 bits in read ID0, read ID1 and read ID2 indicate the identification of the target configuration information receiving unit 25 that needs to be used.
  • the maximum number of read interfaces supported at the same time is 3, and the maximum number of write interfaces is 2.
  • the structure of the target read/write request is not limited to the example in FIG. 3, and the structure of the target read/write request can be changed according to actual needs to meet the actual needs.
  • the number of first addressing units to be used to execute the target read/write request may be determined based on the target read/write request.
  • FIG. 4 it is a schematic structural diagram of a scheduling unit 22 provided by an embodiment of the present invention.
  • each unit is arranged around the resource pool.
  • the agu allocation unit can complete the actual allocation process through the read interface bridge and the write interface bridge.
  • the read interface bridge is used to connect the read interface and the search interface of the vector calculation unit.
  • the read interface of the addressing unit 12, correspondingly, the write interface bridge is used to connect the write interface of the vector calculation unit and the write interface of the addressing unit 12.
  • the target read and write request needs to use two read interfaces and one write interface
  • the two read interfaces are read1 and read2, and the one write interface is write0.
  • the second square in a column of squares corresponding to read2 on the left side of Figure 5 is filled, and the second square in a column of squares corresponding to agu1 on the right side of Figure 5 is filled, indicating that read2 is connected to RB1 of the read interface bridge, And agu1 is also connected to the RB1 of the read interface bridge, and the connection to the same RB is represented as an assignment relationship, that is, agu1 is assigned to the read2.
  • the first square in a column of squares corresponding to read1 on the left side of Figure 5 is filled, and the first square in the medical square corresponding to agu0 on the right side of Figure 5 is filled, indicating that read1 is connected to RB0 of the read interface bridge, And agu0 is also connected to RB0 of the read interface bridge, that is to say, agu0 is assigned to the read1.
  • the allocation process of the write interface is similar to the allocation process of the read interface. For the allocation process of the write interface, reference may be made to the process of the read interface in conjunction with FIG. 6 , which will not be repeated here.
  • the free agu in the process of allocating the read interface, can be searched in the order of agu0 to agu5.
  • the free agu in the process of allocating the write interface, can be searched in the order of agu5 to agu0, which can ensure that the same agu will not be assigned to the read interface and the write interface at the same time.
  • the agu allocation unit completes the allocation of the agu, it will adjust the working state of the agu currently allocated in the resource pool to the occupied state, until the vector computing unit occupying the agu updates the working state of the agu to idle after the use of the agu until.
  • the indication register is associated with a read interface and/or a write interface of a vector computation unit in a plurality of vector computation units and an addressing unit 12 in a plurality of addressing units 12, when any indication register in the When storing the first value, any indication register indicates that the addressing unit 12 associated with any indication register is assigned to the read interface and/or the write interface associated with any indication register.
  • FIG. 7 it is a schematic diagram of the structure of the indicating register.
  • m0-m5 represents the vector computing unit 0-5
  • r0-r2 represents the read interface 0-2 of a certain vector computing unit
  • w0-w1 represents the writing interface 0-1 of a certain vector computing unit.
  • the horizontal line in the first row is represented as m0r0, which means the read interface 0 of the vector computing unit
  • the vertical line in the first column represents agu0. If If the first value is stored in the register represented by their intersection, it means that the agu0 is allocated to the read interface 0 of the vector calculation unit 0 .
  • the first numerical value may be 1, for example.
  • the first address corresponding to the read interface and/or the write interface indicated in the target read-write request and/or the write interface can be determined in the second addressing unit according to the allocation result.
  • Addressing unit determine a target indication register that is simultaneously associated with the read interface and/or write interface indicated in the target read and write request and the corresponding first addressing unit; in the target indication register The first value is stored.
  • the actually allocated agu can be connected to the read interface or the write interface of a certain vector computing unit.
  • the resource scheduling apparatus 14 may further include: a virtual addressing unit, configured to allocate a corresponding first read interface and/or a write interface indicated in the target read/write request to be used. Before addressing the unit, the virtual addressing unit is allocated to the read interface and/or the write interface to be used indicated in the target read and write request.
  • the resource scheduling device 14 can immediately connect the read interface and the write interface of the vector computing unit that sends the read/write request to the virtual addressing unit, until the vector computing unit that sends the read/write request is the virtual addressing unit.
  • the actual addressing unit 12 is allocated by the read interface or the write interface, the actually allocated addressing unit 12 is then connected to the read interface or the write interface of the vector computing unit that sends the read and write request.
  • the scheduling unit 22 can allocate the target configuration information receiving unit 25 (config) in addition to the addressing unit 12 .
  • the target read and write request also carries the target vector calculation unit 11 identification and the target configuration information receiving unit 25 identification;
  • the scheduling unit 22 includes a plurality of indication registers, and a configuration information in the indication register and a plurality of configuration information receiving units 25 is included.
  • the receiving unit 25 is associated with one addressing unit 12 in the plurality of addressing units 12. When any indication register stores the second value, any indication register indicates the configuration information receiving unit 25 associated with any indication register. is assigned to the addressing unit 12 associated with any of the indication registers.
  • config0-9 and agu0-5 which is similar to the way of assigning addressing unit 12. Taking config0 represented by the horizontal line in the first row and agu0 represented by the vertical line in the first column as an example, if they are If the second value is stored in the register represented by the intersection, it means that the config0 is assigned to the agu0.
  • the second numerical value may be 1, for example.
  • the number of configs in practical applications can be set according to actual requirements.
  • the number of configs can be set to be consistent with the number of vector memories 13 .
  • the reading and writing operations can be completed in combination with the configuration information corresponding to the target read and write requests stored in the allocated config.
  • the target configuration information receiving unit 25 after completing the allocation of the target configuration information receiving unit 25, it can be determined in multiple configuration information receiving units 25 according to the target configuration information receiving unit 25 identifier that needs to be used indicated in the target read and write request based on the allocation result.
  • the target configuration information receiving unit 25 determining a target indicating register simultaneously associated with the first addressing unit and the target configuration information receiving unit 25 among the plurality of indicating registers; storing the second value in the target indicating register.
  • the digital signal processor 10 may include a scalar processor 901, various vector computing units, a bus 902, a resource scheduling device 14, a configuration information receiving unit 25 (config0-i), and addressing units 0-n , a virtual addressing unit 908 , and a plurality of vector memories 903 .
  • the various vector computing units may include a vector arithmetic logic operation unit 904 , a floating point operation unit 905 , an accelerator unit 906 , and a peripheral interface 907 . It should be noted that data transmission can be performed between the units through connecting lines with arrows.
  • the resource scheduling apparatus 14 may include a timestamp register 101, a plurality of FIFO registers 102 with a depth of 2 (represented as 2 depth fifo in the figure), an arbitration unit 103, and a FIFO with a depth of 1
  • a first-out register 104 (represented as 1 depth fifo in the figure)
  • a scheduling unit 22 a configuration information receiving unit 25 (config0-9)
  • a connecting unit 105 a connecting unit 105.
  • the scheduling unit 22 may include an addressing unit working state management module 221 , a decoding module 222 , an allocation decision module 223 , an addressing unit allocation module 224 , a connection state module 225 , a timer 226 , and a virtual addressing unit 227 .
  • a bus 106 and addressing units (eg, addressing units 0 to 5) may also be provided outside the resource scheduling device 14 .
  • the time stamp register 101 is used to time stamp each received read and write request.
  • Each FIFO register 102 with a depth of 2 corresponds to a vector computing unit, and is used for buffering read and write requests sent by the corresponding vector computing unit. Therefore, the number of deployments of FIFO registers 102 with a depth of 2 is greater than or equal to the number of vector computation units.
  • the current vector calculation unit will send read and write requests at the same time, you can configure a FIFO register for the current vector calculation unit. If the current vector calculation unit may send read and write requests in time-sharing, you can The number of write requests configures the FIFO register.
  • the order of processing these read and write requests can be decided by the arbitration unit 103, and the read and write requests processed first are output to the FIFO register 104 with a depth of 1 for processing. cache.
  • the arbitration mode and the priority of each vector calculation unit can be configured, and then the order of processing different read and write requests is decided according to the arbitration mode and the priority of the vector calculation unit. Specifically, the method for determining the sequential processing order of read and write requests will be described in detail later in this article.
  • connection unit 105 can complete the interconnection between the vector calculation unit and the addressing unit, and the interconnection between the configuration information receiving unit 25 and the addressing unit according to the connection state output by the scheduling unit 22 .
  • the scalar processor can configure the vector computing unit and the resource scheduling device, and then the vector computing unit sends read and write requests to the resource scheduling device according to the configuration, and then after the resource scheduling device receives the read and write requests, it can immediately
  • the vector computing unit is connected to the virtual addressing unit, and at the same time, the resource scheduling device can perform arbitration, decoding, decision-making, allocation, etc. on read and write requests, during which the vector computing unit is in a waiting state.
  • the vector computing unit is connected to the allocated addressing unit, and the vector computing unit can complete read and write operations through the connected addressing unit.
  • a read and write task end flag can be sent to the resource scheduling device to inform the resource scheduling device that the read and write operations are over, and the resource scheduling device can release the occupied addressing unit, so that the search The address unit re-enters the resource pool, and then processes the next new read and write request.
  • the resource scheduling apparatus 14 may further include: a read/write request receiving unit 121 configured to receive the data sent by multiple vector computing units respectively.
  • the arbitration unit 122 is used to determine the target vector calculation unit 11 in the plurality of vector calculation units according to the respective priorities of the vector calculation units, and the priorities corresponding to the vector calculation units are different; determine The target read and write request sent by the target vector calculation unit 11 .
  • the target read/write request is the read/write request processed first after arbitration.
  • a total of three different arbitration modes are provided.
  • the mechanism of the arbitration mode can also be set according to actual needs, which is not implemented in the present invention. limited.
  • the arbitration unit 122 may be configured to: when the read/write request response period arrives, determine the target vector calculation unit 11 with the highest priority among the multiple vector calculation units.
  • master represents the vector computing unit, assuming that there are 6 masters, including master0-5, the priority from high to low is expressed as from level 5 to level 0, and the priority of master0-5 is 5, 4, 3. , 2, 1, 0.
  • Figure 13 shows the situation in which different masters send read and write requests at 5 times. It is assumed that the one column of squares corresponding to any time is filled with the master identifier for the master that currently has read and write requests, and the one that does not fill in the master identifier is currently unregistered. The master that sends read and write requests.
  • the arbitration unit 122 can be used to: when the read/write request response cycle arrives, determine the target vector computation unit 11 with the highest priority among the multiple vector computation units; when the next read/write request of the read/write request response cycle arrives When the response period arrives, a vector calculation unit to be adjusted whose priority is lower than the target vector calculation unit 11 is determined among the plurality of vector calculation units, and the priority of the vector calculation unit to be adjusted is raised to a preset level; the target vector calculation unit 11 corresponds to The priority is adjusted to the lowest value.
  • the above-mentioned preset level may be level 1.
  • master represents the vector computing unit, assuming that there are 6 masters, including master0-5, the priority from high to low is expressed as from level 5 to level 0, and the priority of master0-5 is 5, 4, 3. , 2, 1, 0.
  • Figure 14 shows the situation in which different masters send read and write requests at 5 times. It is assumed that the one column of squares corresponding to any time is filled with the master identifier for the master that currently has read and write requests, and the one that does not fill in the master identifier is currently unregistered. The master that sends read and write requests.
  • master0 has the highest priority and is responded first.
  • the priority of master0 is adjusted to the lowest 0, and the priority of masters lower than the priority of master0 before adjustment is increased by 1, so master1 is adjusted to 5, master2 is adjusted to 4, master3 is adjusted to 3, master4 is adjusted to 2, and master5 is adjusted to 1.
  • master1 is adjusted to 5
  • master2 is adjusted to 4
  • master3 is adjusted to 3
  • master4 is adjusted to 2
  • master5 is adjusted to 1.
  • the read and write requests of masters 3 and 5 in the adjusted master need to be responded, and master 3 has the highest priority, so master 3 is responded.
  • master0 and 1 send new read and write requests, and because master3 has already responded, the priority of master3 is adjusted to 0, and the priority of master1 and 2, which is higher than that of master3 before adjustment, remains unchanged.
  • master0 is adjusted to 1
  • master4 is adjusted to 3
  • master5 is adjusted to 2.
  • master1 has the highest priority, so master1 is responded.
  • master5 is responded, and at time 4, master0 is responded.
  • the resource scheduling apparatus 14 may further include: a time stamp unit, configured to record the read/write request sent by any vector calculation unit when the read/write request receiving unit 121 receives the read/write request sent by any vector calculation unit.
  • the reception time of the write request; the arbitration unit 122 is used to determine the candidate read/write request with the earliest reception time among multiple read/write requests when the read/write request response period arrives, and assign the candidate read/write request with the earliest reception time
  • the priority is set to the highest priority. If the number of candidate read/write requests is 1, the candidate read/write request will be determined as the target read/write request; if the number of candidate read/write requests is greater than 1, the one with the highest priority will be determined in the vector computing unit that sends the candidate read/write request.
  • the target vector calculation unit 11 determines the target read/write request sent by the target vector calculation unit 11 .
  • master represents the vector computing unit, assuming that there are 6 masters, including master0-5, the priority from high to low is expressed as from level 5 to level 0, and the priority of master0-5 is 5, 4, 3. , 2, 1, 0.
  • Figure 15 shows the situation in which different masters send read and write requests at 5 times. It is assumed that the one column of squares corresponding to any time is filled with the master identifier for the master that currently has read and write requests, and the one that does not fill in the master identifier is currently unregistered. The master that sends read and write requests.
  • master0, 3, and 5 all send read and write requests. Since the read and write requests are received at the same time, master0 has the highest priority according to the priority, so master0 is responded first. At time 1, the read and write requests of masters 3 and 5 need to be responded. Since the read and write requests of masters 3 and 5 have the same reception time, master 3 is responded according to the priority. At time 2, master0 and 1 sent new read and write requests, and now there are read and write requests from masters 0, 1, and 5 that need to be responded to. Since master5's read and write requests are received earlier than masters 0 and 1, master5 is responded. At time 3, the read and write requests of master0 and 1 need to be responded. Since the read and write requests of master0 and 1 are received at the same time, master0 is responded according to the priority. At time 4, master1 is responded.
  • the priority of the vector calculation unit is used, and the priority of the vector calculation unit can be configured.
  • the resource scheduling device can automatically allocate available addressing to the target vector computing unit according to the addressing unit information corresponding to the target reading and writing request in the case of receiving the target reading and writing request sent by the target vector computing unit. unit, so that the target vector calculation unit can read and write operations to the vector memory through the allocated addressing unit to complete the calculation task.
  • it is no longer necessary to manually assign addressing units to the target vector calculation unit, and these processes can be completed automatically, thereby reducing the operation difficulty of technicians and improving the operation efficiency.
  • the movable platform 160 may include the digital signal processor 10 in the embodiment shown in FIG. 1 .

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Complex Calculations (AREA)

Abstract

Embodiments of the present invention provide a resource scheduling apparatus, a digital signal processor, and a movable platform. The apparatus comprises: a target read-write request receiving unit, configured to receive a target read-write request sent by a target vector calculating unit; a scheduling unit, configured to determine, according to addressing unit information corresponding to the target read-write request, an addressing unit corresponding to the target vector calculating unit; and a target read-write request sending unit, configured to send the target read-write request to the addressing unit corresponding to the target vector calculating unit. By using the present invention, in the case that the target read-write request sent by the target vector calculating unit is received, an available addressing unit can be automatically allocated to the target vector calculating unit according to the addressing unit information corresponding to the target read-write request, such that the operation difficulty of a technician can be reduced, and the operation efficiency can be improved.

Description

资源调度装置、数字信号处理器和可移动平台Resource scheduling device, digital signal processor and movable platform 技术领域technical field
本发明涉及数据处理技术领域,尤其涉及一种资源调度装置、数字信号处理器和可移动平台。The present invention relates to the technical field of data processing, and in particular, to a resource scheduling device, a digital signal processor and a movable platform.
背景技术Background technique
相关技术中,可以使用数字信号处理器(Digital Signal Processing,DSP)对数字信号进行处理。DSP内部包括多个矢量计算单元、多个寻址单元以及矢量存储器。在矢量计算单元进行计算的过程中需要对矢量存储器进行读写操作,以将需要存储的数据存储在矢量存储器指定存储位置,或者从矢量存储器指定存储位置读取计算过程中需要使用的数据。矢量计算单元需要通过目标寻址单元找到矢量存储器的指定存储位置。In the related art, a digital signal processor (Digital Signal Processing, DSP) can be used to process the digital signal. The DSP includes multiple vector calculation units, multiple addressing units and vector memory. During the calculation process of the vector computing unit, the vector memory needs to be read and written to store the data to be stored in the specified storage location of the vector memory, or to read the data to be used in the calculation process from the specified storage location of the vector memory. The vector calculation unit needs to find the specified storage location of the vector memory through the target addressing unit.
在实际应用中,编程人员需要非常清楚矢量计算单元通过寻址单元对矢量存储器进行读写操作的底层技术,才能在需要对矢量存储器进行读写操作时,手动通过编写代码的方式实现为矢量计算单元在多个寻址单元中分配目标寻址单元的过程,这样才能顺利让矢量计算单元通过目标寻址单元完成对矢量存储器的读写操作。In practical applications, programmers need to be very clear about the underlying technology that the vector computing unit reads and writes the vector memory through the addressing unit, so that when the vector memory needs to be read and written, they can manually write codes to implement vector computing. The process in which the unit allocates the target addressing unit among multiple addressing units, so that the vector computing unit can successfully complete the read and write operations to the vector memory through the target addressing unit.
由于相关技术中编程人员需要凭借编程知识采取手动方式实现矢量计算单元分配目标寻址单元的过程,会导致操作难度增加且操作效率降低。Since the programmer in the related art needs to use the programming knowledge to manually implement the process of allocating the target addressing unit by the vector calculation unit, the operation difficulty is increased and the operation efficiency is reduced.
发明内容SUMMARY OF THE INVENTION
本发明实施例提供一种资源调度装置、数字信号处理器和可移动平台,用以自动失效矢量计算单元分配寻址单元的过程,降低操作难度以及提高操作效率。Embodiments of the present invention provide a resource scheduling device, a digital signal processor, and a movable platform, which are used to automatically assign an addressing unit to a failure vector calculation unit, thereby reducing operation difficulty and improving operation efficiency.
第一方面,本发明实施例提供一种资源调度装置,该方法包括:In a first aspect, an embodiment of the present invention provides a resource scheduling apparatus, and the method includes:
目标读写请求接收单元,用于接收目标矢量计算单元发送的目标读写请求;a target read/write request receiving unit, configured to receive the target read/write request sent by the target vector computing unit;
调度单元,用于根据所述目标读写请求对应的寻址单元信息,确定所述目标矢量计算单元对应的寻址单元;以及a scheduling unit, configured to determine the addressing unit corresponding to the target vector computing unit according to the addressing unit information corresponding to the target read/write request; and
目标读写请求发送单元,用于将所述目标读写请求发送至所述目标矢量计算单元对应的寻址单元。A target read/write request sending unit, configured to send the target read/write request to an addressing unit corresponding to the target vector calculation unit.
可选地,所述资源调度装置还包括:Optionally, the resource scheduling apparatus further includes:
配置信息发送单元,用于将所述目标读写请求对应的配置信息发送至所述目标矢量计算单元对应的目标配置信息接收单元。A configuration information sending unit, configured to send configuration information corresponding to the target read/write request to a target configuration information receiving unit corresponding to the target vector calculation unit.
可选地,所述调度单元,用于:Optionally, the scheduling unit is used for:
根据所述目标读写请求对应的寻址单元信息,确定执行所述目标读写请求需要使用的第一寻址单元的数量;According to the addressing unit information corresponding to the target read/write request, determine the number of first addressing units that need to be used to execute the target read/write request;
在多个寻址单元中确定工作状态为空闲的第二寻址单元;determining a second addressing unit whose working state is idle among the plurality of addressing units;
若所述第二寻址单元的数量大于或者等于所述第一寻址单元的数量,则在所述第二寻址单元中确定用于执行所述目标读写请求的所述第一寻址单元,以通过所述第一寻址单元以及所述配置信息进行矢量存储器的读写操作。If the number of the second addressing units is greater than or equal to the number of the first addressing units, determining the first addressing for executing the target read/write request in the second addressing unit unit, so as to perform read and write operations of the vector memory through the first addressing unit and the configuration information.
可选地,所述目标读写请求包括指示需要使用所述目标矢量计算单元的读接口及/或写接口,Optionally, the target read/write request includes a read interface and/or a write interface indicating that the target vector computing unit needs to be used,
其中,所述读接口对应第三寻址单元,以及所述写接口对应第四寻址单元。The read interface corresponds to a third addressing unit, and the write interface corresponds to a fourth addressing unit.
可选地,所述目标读写请求包括所述目标矢量计算单元的所有读接口及/或所有写接口分别对应的预设位数的指示信息;Optionally, the target read/write request includes indication information of preset digits corresponding to all read interfaces and/or all write interfaces of the target vector computing unit;
当所述指示信息的最高1位数据为1时,所述指示信息用于指示启用对应的读接口或写接口;当所述指示信息的最高1为数据为0时,所述指示信息用于指示不启用对应的读接口或写接口。When the highest 1-bit data of the indication information is 1, the indication information is used to instruct to enable the corresponding read interface or write interface; when the highest 1 of the indication information is 0, the indication information is used for Indicates that the corresponding read interface or write interface is not enabled.
可选地,所述调度单元,用于:Optionally, the scheduling unit is used for:
根据所述目标读写请求中指示的需要使用的读接口及/或写接口,确定执行所述目标读写请求需要使用的第一寻址单元的数量。The number of first addressing units to be used for executing the target read/write request is determined according to the read interface and/or write interface to be used indicated in the target read/write request.
可选地,所述调度单元包括多个指示寄存器,所述指示寄存器与多个矢量 计算单元中的一个矢量计算单元的一个读接口及/或写接口和所述多个寻址单元中的一个寻址单元相关联,当任一指示寄存器中存储第一数值时,所述任一指示寄存器指示与所述任一指示寄存器相关联的寻址单元被分配给与所述任一指示寄存器相关联的读接口及/或写接口。Optionally, the scheduling unit includes a plurality of indication registers, and the indication register is connected to a read interface and/or a write interface of a vector calculation unit of the plurality of vector calculation units and one of the plurality of addressing units. The addressing unit is associated, and when the first value is stored in any indication register, the any indication register indicates that the addressing unit associated with the any indication register is assigned to the address unit associated with the any indication register read interface and/or write interface.
可选地,所述调度单元,用于:Optionally, the scheduling unit is used for:
在所述第二寻址单元中确定与所述目标读写请求中指示的需要使用的读接口及/或写接口各自对应的第一寻址单元;determining, in the second addressing unit, a first addressing unit corresponding to the read interface and/or the write interface indicated in the target read/write request to be used;
在所述多个指示寄存器中确定与所述目标读写请求中指示的需要使用的读接口及/或写接口和对应的第一寻址单元同时相关联的目标指示寄存器;determining, among the plurality of indication registers, a target indication register that is simultaneously associated with the read interface and/or write interface indicated in the target read/write request and/or the write interface and the corresponding first addressing unit;
在所述目标指示寄存器中存储所述第一数值。The first value is stored in the target indication register.
可选地,所述资源调度装置还包括:Optionally, the resource scheduling apparatus further includes:
虚拟寻址单元,用于在为所述目标读写请求中指示的需要使用的读接口及/或写接口分配各自对应的第一寻址单元之前,将所述虚拟寻址单元分配给所述目标读写请求中指示的需要使用的读接口及/或写接口。a virtual addressing unit, used for allocating the virtual addressing unit to the The read interface and/or write interface to be used as indicated in the target read and write request.
可选地,所述目标读写请求还携带有目标矢量计算单元标识以及目标配置信息接收单元标识;所述调度单元包括多个指示寄存器,所述指示寄存器与多个配置信息接收单元中的一个配置信息接收单元和所述多个寻址单元中的一个寻址单元相关联,当任一指示寄存器中存储第二数值时,所述任一指示寄存器指示与所述任一指示寄存器相关联的配置信息接收单元被分配给与所述任一指示寄存器相关联的寻址单元。Optionally, the target read/write request also carries a target vector computing unit identifier and a target configuration information receiving unit identifier; the scheduling unit includes a plurality of indication registers, the indication register and one of the plurality of configuration information receiving units. The configuration information receiving unit is associated with one addressing unit in the plurality of addressing units, and when the second value is stored in any indication register, the any indication register indicates the address associated with the any indication register. The configuration information receiving unit is assigned to the addressing unit associated with any of the indication registers.
可选地,所述调度单元,用于:Optionally, the scheduling unit is used for:
根据所述目标读写请求中指示的需要使用的目标配置信息接收单元标识,在所述多个配置信息接收单元中确定所述目标配置信息接收单元;According to the target configuration information receiving unit identifier to be used indicated in the target read/write request, determine the target configuration information receiving unit among the plurality of configuration information receiving units;
在所述多个指示寄存器中确定与所述第一寻址单元和所述目标配置信息接收单元同时相关联的目标指示寄存器;determining, among the plurality of indication registers, a target indication register associated with the first addressing unit and the target configuration information receiving unit at the same time;
在所述目标指示寄存器中存储所述第二数值。The second value is stored in the target indication register.
可选地,所述资源调度装置还包括:Optionally, the resource scheduling apparatus further includes:
读写请求接收单元,用于接收多个矢量计算单元分别发送的读写请求;a read-write request receiving unit, used for receiving read-write requests sent by multiple vector computing units respectively;
仲裁单元,用于根据各矢量计算单元分别对应的优先级,在所述多个矢量计算单元中确定所述目标矢量计算单元,所述各矢量计算单元分别对应的优先级各不相同;确定所述目标矢量计算单元发送的所述目标读写请求。an arbitration unit, configured to determine the target vector calculation unit among the plurality of vector calculation units according to the respective priorities of the vector calculation units, and the respective priorities of the vector calculation units are different; The target read and write request sent by the target vector calculation unit.
可选地,所述仲裁单元,用于:Optionally, the arbitration unit is configured to:
当读写请求响应周期到达时,在所述多个矢量计算单元中确定优先级最高的目标矢量计算单元。When the read/write request response period arrives, the target vector calculation unit with the highest priority is determined among the plurality of vector calculation units.
可选地,所述仲裁单元,还用于:Optionally, the arbitration unit is further configured to:
当所述读写请求响应周期的下一读写请求响应周期到达时,在所述多个矢量计算单元中确定优先级低于所述目标矢量计算单元的待调整矢量计算单元,将所述待调整矢量计算单元的优先级上调预设级别;When the next read/write request response cycle of the read/write request response cycle arrives, a vector calculation unit to be adjusted whose priority is lower than the target vector calculation unit is determined in the plurality of vector calculation units, and the to-be-adjusted vector calculation unit is determined in the plurality of vector calculation units. Adjust the priority of the vector calculation unit to increase the preset level;
将所述目标矢量计算单元对应的优先级调整为最低值。The priority corresponding to the target vector calculation unit is adjusted to the lowest value.
可选地,所述资源调度装置还包括:Optionally, the resource scheduling apparatus further includes:
时间戳单元,用于当所述读写请求接收单元接收到任一矢量计算单元发送的读写请求时,记录接收到所述任一矢量计算单元发送的读写请求的接收时间;a timestamp unit, configured to record the reception time of receiving the read/write request sent by any vector calculation unit when the read/write request receiving unit receives the read/write request sent by any vector calculation unit;
所述仲裁单元,用于当读写请求响应周期到达时,在多个读写请求中确定对应的接收时间最早的候选读写请求;若所述候选读写请求的数量为1,则将所述候选读写请求确定为所述目标读写请求;若所述候选读写请求的数量大于1,则在发送所述候选读写请求的矢量计算单元中确定优先级最高的目标矢量计算单元,确定所述目标矢量计算单元发送的所述目标读写请求。The arbitration unit is used to determine the candidate read/write request with the earliest corresponding reception time among the multiple read/write requests when the read/write request response period arrives; if the number of the candidate read/write requests is 1, then The candidate read/write request is determined as the target read/write request; if the number of the candidate read/write requests is greater than 1, the target vector computation unit with the highest priority is determined in the vector computation unit that sends the candidate read/write request, Determine the target read/write request sent by the target vector calculation unit.
第二方面,本发明实施例提供一种数字信号处理器,所述数字信号处理器包括目标矢量计算单元、多个寻址单元、矢量存储器以及本发明实施例第一方面提供的资源调度装置,其中:In a second aspect, an embodiment of the present invention provides a digital signal processor, where the digital signal processor includes a target vector calculation unit, a plurality of addressing units, a vector memory, and the resource scheduling apparatus provided in the first aspect of the embodiment of the present invention, in:
所述目标矢量计算单元,用于向所述资源调度装置发送目标读写请求;the target vector calculation unit, configured to send a target read and write request to the resource scheduling device;
所述资源调度装置,用于根据所述目标读写请求,从所述多个寻址单元中选取所述目标矢量计算单元对应的寻址单元;The resource scheduling device is configured to select an addressing unit corresponding to the target vector computing unit from the multiple addressing units according to the target read/write request;
所述目标矢量计算单元对应的寻址单元,用于根据所述目标读写请求,对 所述矢量存储器进行读写操作。The addressing unit corresponding to the target vector calculation unit is configured to perform read/write operations on the vector memory according to the target read/write request.
可选地,所述目标矢量计算单元包括矢量算数逻辑运算单元、浮点运算单元、加速器单元或者外围接口。Optionally, the target vector calculation unit includes a vector arithmetic logic operation unit, a floating point operation unit, an accelerator unit or a peripheral interface.
第三方面,本发明实施例提供一种可移动平台,其中包括本发明实施例第二方面提供的数字信号处理器。In a third aspect, an embodiment of the present invention provides a movable platform, which includes the digital signal processor provided in the second aspect of the embodiment of the present invention.
采用本发明,通过资源调度装置,在接收到目标矢量计算单元发送的目标读写请求的情况下,可以自动根据目标读写请求对应的寻址单元信息,为目标矢量计算单元分配可用的寻址单元,这样目标矢量计算单元就可以通过分配到的寻址单元对矢量存储器进行读写操作,以完成计算任务。采用本发明,无需再通过人工手动的方式为目标矢量计算单元分配寻址单元,这些过程都可以自动完成,进而可以降低技术人员的操作难度以及提高操作效率。By adopting the present invention, the resource scheduling device can automatically allocate available addressing to the target vector computing unit according to the addressing unit information corresponding to the target reading and writing request in the case of receiving the target reading and writing request sent by the target vector computing unit. unit, so that the target vector calculation unit can read and write operations to the vector memory through the allocated addressing unit to complete the calculation task. By adopting the present invention, it is no longer necessary to manually assign addressing units to the target vector calculation unit, and these processes can be completed automatically, thereby reducing the operation difficulty of technicians and improving the operation efficiency.
附图说明Description of drawings
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the technical solutions in the embodiments of the present invention more clearly, the following briefly introduces the accompanying drawings used in the description of the embodiments. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained from these drawings without creative effort.
图1为本发明实施例提供的一种数字信号处理器的结构示意图;1 is a schematic structural diagram of a digital signal processor according to an embodiment of the present invention;
图2为本发明实施例提供的一种资源调度装置的结构示意图;FIG. 2 is a schematic structural diagram of a resource scheduling apparatus according to an embodiment of the present invention;
图3为本发明实施例提供的一种读写请求示意图;3 is a schematic diagram of a read-write request provided by an embodiment of the present invention;
图4为本发明实施例提供的一种调度单元的结构示意图;FIG. 4 is a schematic structural diagram of a scheduling unit according to an embodiment of the present invention;
图5为本发明实施例提供的一种读接口桥的示意图;5 is a schematic diagram of a read interface bridge provided by an embodiment of the present invention;
图6为本发明实施例提供的一种写接口桥的示意图;6 is a schematic diagram of a write interface bridge according to an embodiment of the present invention;
图7为本发明实施例提供的一种用于连接矢量计算单元和寻址单元的指示寄存器的示意图;7 is a schematic diagram of an indication register for connecting a vector computing unit and an addressing unit according to an embodiment of the present invention;
图8为本发明实施例提供的一种用于连接配置信息接收单元和寻址单元的指示寄存器的示意图;8 is a schematic diagram of an indication register for connecting a configuration information receiving unit and an addressing unit according to an embodiment of the present invention;
图9为本发明实施例提供的另一种数字信号处理器的结构示意图;9 is a schematic structural diagram of another digital signal processor provided by an embodiment of the present invention;
图10为本发明实施例提供的另一种资源调度装置的结构示意图;FIG. 10 is a schematic structural diagram of another resource scheduling apparatus provided by an embodiment of the present invention;
图11为本发明实施例提供的一种资源调度方法的流程时序示意图;FIG. 11 is a schematic flowchart of a flow sequence of a resource scheduling method according to an embodiment of the present invention;
图12为本发明实施例提供的另一种资源调度装置的结构示意图;FIG. 12 is a schematic structural diagram of another resource scheduling apparatus provided by an embodiment of the present invention;
图13为本发明实施例提供的一种固定优先级模式下确定读写请求的先后处理顺序的示意图;13 is a schematic diagram of determining the sequential processing order of read and write requests in a fixed priority mode according to an embodiment of the present invention;
图14为本发明实施例提供的一种轮询模式下确定读写请求的先后处理顺序的示意图;14 is a schematic diagram of determining the sequential processing order of read and write requests in a polling mode provided by an embodiment of the present invention;
图15为本发明实施例提供的一种时间优先模式下确定读写请求的先后处理顺序的示意图;15 is a schematic diagram of determining the sequential processing order of read and write requests in a time priority mode according to an embodiment of the present invention;
图16为本发明实施例提供的一种可移动平台的结构示意图。FIG. 16 is a schematic structural diagram of a movable platform according to an embodiment of the present invention.
具体实施方式Detailed ways
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purposes, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments These are some embodiments of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
在本发明实施例中使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本发明。在本发明实施例和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义,“多种”一般包含至少两种。The terms used in the embodiments of the present invention are only for the purpose of describing specific embodiments, and are not intended to limit the present invention. The singular forms "a," "the," and "the" as used in the embodiments of the present invention and the appended claims are intended to include the plural forms as well, unless the context clearly dictates otherwise, "a plurality" Generally at least two are included.
取决于语境,如在此所使用的词语“如果”、“若”可以被解释成为“在……时”或“当……时”或“响应于确定”或“响应于检测”。类似地,取决于语境,短语“如果确定”或“如果检测(陈述的条件或事件)”可以被解释成为“当确定时”或“响应于确定”或“当检测(陈述的条件或事件)时”或“响应于检测(陈述的条件或事件)”。Depending on the context, the words "if", "if" as used herein may be interpreted as "at" or "when" or "in response to determining" or "in response to detecting". Similarly, the phrases "if determined" or "if detected (the stated condition or event)" can be interpreted as "when determined" or "in response to determining" or "when detected (the stated condition or event)," depending on the context )" or "in response to detection (a stated condition or event)".
另外,下述各方法实施例中的步骤时序仅为一种举例,而非严格限定。In addition, the sequence of steps in the following method embodiments is only an example, and is not strictly limited.
图1为本发明实施例提供的一种数字信号处理器,如图1所示,该数字信号处理器10可以包括目标矢量计算单元11、多个寻址单元12、矢量存储器13以及本发明实施例提供的资源调度装置14。其中:FIG. 1 is a digital signal processor provided by an embodiment of the present invention. As shown in FIG. 1, the digital signal processor 10 may include a target vector calculation unit 11, a plurality of addressing units 12, a vector memory 13, and an implementation of the present invention. The resource scheduling device 14 provided by the example. in:
目标矢量计算单元11,用于向资源调度装置14发送目标读写请求。The target vector calculation unit 11 is configured to send a target read/write request to the resource scheduling apparatus 14 .
资源调度装置14,用于根据目标读写请求,从多个寻址单元12中选取目标矢量计算单元11对应的寻址单元12。The resource scheduling device 14 is configured to select the addressing unit 12 corresponding to the target vector computing unit 11 from the multiple addressing units 12 according to the target read/write request.
目标矢量计算单元11对应的寻址单元12,用于根据目标读写请求,对矢量存储器13进行读写操作。The addressing unit 12 corresponding to the target vector calculation unit 11 is configured to perform read and write operations on the vector memory 13 according to the target read and write request.
实际应用中,数字信号处理器10(Digital Signal Process,DSP)还可以包括标量处理器(Reduced Instruction Set Computing,RISC)。标量处理器可以向数字信号处理器10包括的多个矢量计算单元中的任一矢量计算单元发送指令。该任一矢量计算单元接收到指令之后,为了执行指令实现指令的要求的功能,往往需要对矢量存储器13中的数据进行读写操作,这样该任一矢量计算单元可以将指令解析为读写请求,基于读写请求完成对矢量存储器13的读写操作。本发明实施例中的目标矢量计算单元11可以是数字信号处理器10包括的多个矢量计算单元中的任一具有读写需求的矢量计算单元。In practical applications, the digital signal processor 10 (Digital Signal Process, DSP) may also include a scalar processor (Reduced Instruction Set Computing, RISC). The scalar processor may send instructions to any of a plurality of vector computing units included in the digital signal processor 10 . After the any vector computing unit receives the instruction, in order to execute the instruction to realize the required function of the instruction, it is often necessary to perform read and write operations on the data in the vector memory 13, so that any vector computing unit can parse the instruction into a read and write request. , the read and write operations to the vector memory 13 are completed based on the read and write requests. The target vector calculation unit 11 in this embodiment of the present invention may be any vector calculation unit with read and write requirements among the multiple vector calculation units included in the digital signal processor 10 .
可选地,上述目标矢量计算单元11可以包括矢量算数逻辑运算单元、浮点运算单元(VFPU)、加速器单元或者外围接口(MCL)。其中,矢量算数逻辑运算单元可以是向量算术逻辑单元(Vector Arithmetic Logic Unit,VALU)或者VEU。加速器单元可以是多媒体扩展(Multi Media Extensions,MMX)或者ACC。Optionally, the above-mentioned target vector calculation unit 11 may include a vector arithmetic logic operation unit, a floating point operation unit (VFPU), an accelerator unit or a peripheral interface (MCL). The vector arithmetic logic unit may be a vector arithmetic logic unit (Vector Arithmetic Logic Unit, VALU) or a VEU. The accelerator unit can be Multi Media Extensions (MMX) or ACC.
目标矢量计算单元11可以基于标量处理器发送的指令,生成目标读写请求,然后将目标读写请求发送到资源调度装置14。资源调度装置14可以根据目标读写请求,从多个寻址单元12(AGU)中选取目标矢量计算单元11对应的寻址单元12分配给目标矢量计算单元11,这样目标矢量计算单元11可以通过分配到的寻址单元12对矢量存储器13进行读写操作。The target vector calculation unit 11 may generate a target read/write request based on the instruction sent by the scalar processor, and then send the target read/write request to the resource scheduling apparatus 14 . The resource scheduling device 14 can select the addressing unit 12 corresponding to the target vector calculation unit 11 from the multiple addressing units 12 (AGU) according to the target read and write request and assign it to the target vector calculation unit 11, so that the target vector calculation unit 11 can pass through the target vector calculation unit 11. The assigned addressing unit 12 performs read and write operations on the vector memory 13 .
图2为本发明实施例提供的一种资源调度装置14的结构示意图,如图2所 示,该装置包括目标读写请求接收单元21、调度单元22以及目标读写请求发送单元23。其中:FIG. 2 is a schematic structural diagram of a resource scheduling device 14 provided by an embodiment of the present invention. As shown in FIG. 2 , the device includes a target read/write request receiving unit 21, a scheduling unit 22, and a target read/write request sending unit 23. in:
目标读写请求接收单元21,用于接收目标矢量计算单元11发送的目标读写请求。The target read/write request receiving unit 21 is configured to receive the target read/write request sent by the target vector calculation unit 11 .
调度单元22,用于根据目标读写请求对应的寻址单元12信息,确定目标矢量计算单元11对应的寻址单元12。The scheduling unit 22 is configured to determine the addressing unit 12 corresponding to the target vector calculation unit 11 according to the addressing unit 12 information corresponding to the target read/write request.
目标读写请求发送单元23,用于将目标读写请求发送至目标矢量计算单元11对应的寻址单元12。The target read/write request sending unit 23 is configured to send the target read/write request to the addressing unit 12 corresponding to the target vector calculation unit 11 .
实际应用中,资源调度装置14(Slave Resource Scheduler,SRS)中的目标读写请求单元可以接收目标矢量计算单元11发送的目标读写请求,目标读写请求中携带有用于指示目标矢量计算单元11需要使用的寻址单元12数量的寻址单元12信息,调度单元22可以根据目标读写请求中携带的寻址单元12信息,在多个寻址单元12中确定目标矢量计算单元11可以使用的寻址单元12。在确定目标矢量计算单元11对应的寻址单元12之后,目标读写请求发送单元23可以将目标读写请求发送至目标矢量计算单元11对应的寻址单元12,这样目标矢量计算单元11就可以通过目标矢量计算单元11对应的寻址单元12对矢量存储器13进行读写操作了。In practical application, the target read/write request unit in the resource scheduling device 14 (Slave Resource Scheduler, SRS) can receive the target read/write request sent by the target vector calculation unit 11, and the target read/write request carries a target vector calculation unit 11 for indicating the target read/write request. The addressing unit 12 information of the number of addressing units 12 to be used, the scheduling unit 22 can determine the addressing unit 12 that can be used by the target vector calculation unit 11 among the multiple addressing units 12 according to the addressing unit 12 information carried in the target read and write request Addressing unit 12. After determining the addressing unit 12 corresponding to the target vector calculation unit 11, the target read/write request sending unit 23 may send the target read/write request to the addressing unit 12 corresponding to the target vector calculation unit 11, so that the target vector calculation unit 11 can The vector memory 13 is read and written through the addressing unit 12 corresponding to the target vector calculation unit 11 .
可选地,资源调度装置14还可以包括:配置信息发送单元24,用于将目标读写请求对应的配置信息发送至目标矢量计算单元11对应的目标配置信息接收单元25。Optionally, the resource scheduling apparatus 14 may further include: a configuration information sending unit 24 configured to send configuration information corresponding to the target read/write request to the target configuration information receiving unit 25 corresponding to the target vector calculation unit 11 .
需要说明的是,资源调度装置14还可以包括多个配置信息接收单元25(config),可以从多个配置信息接收单元25中选取目标配置信息接收单元25分配给目标矢量计算单元11。如果需要对矢量存储器13正确的进行读写操作,除了需要目标读写请求中携带的相关信息之外,还需要目标读写请求对应的配置信息共同控制完成对矢量存储器13的读写操作。因此,在标量处理器发送目标读写请求对应的配置信息之后,可以通过配置信息发送单元24将目标读写请求对应的配置信息存储到目标配置信息接收单元25中。It should be noted that the resource scheduling apparatus 14 may further include multiple configuration information receiving units 25 (config), and the target configuration information receiving unit 25 may be selected from the multiple configuration information receiving units 25 and assigned to the target vector calculating unit 11 . If the vector memory 13 needs to be read and written correctly, in addition to the relevant information carried in the target read and write requests, configuration information corresponding to the target read and write requests is also required to jointly control and complete the read and write operations to the vector memory 13 . Therefore, after the scalar processor sends the configuration information corresponding to the target read/write request, the configuration information corresponding to the target read/write request may be stored in the target configuration information receiving unit 25 through the configuration information sending unit 24 .
可选地,上述调度单元22,可以用于根据目标读写请求对应的寻址单元12信息,确定执行目标读写请求需要使用的第一寻址单元的数量;在多个寻址单元12中确定工作状态为空闲的第二寻址单元;若第二寻址单元的数量大于或者等于第一寻址单元的数量,则在第二寻址单元中确定用于执行目标读写请求的第一寻址单元,以通过第一寻址单元以及配置信息进行矢量存储器13的读写操作。Optionally, the above-mentioned scheduling unit 22 can be used to determine the number of first addressing units that need to be used to execute the target read/write request according to the addressing unit 12 information corresponding to the target read/write request; among the multiple addressing units 12 Determine the second addressing unit whose working state is idle; if the number of the second addressing units is greater than or equal to the number of the first addressing units, determine the first addressing unit for executing the target read/write request in the second addressing unit The addressing unit is used to perform read and write operations of the vector memory 13 through the first addressing unit and configuration information.
实际应用中,可以记录每个寻址单元12的工作状态,当任一寻址单元12被分配给任一矢量计算单元且该任一矢量计算单元未使用完毕该任一寻址单元12时,该任一寻址单元12被标记为忙碌。当任一寻址单元12未被分配给任一矢量计算单元,或者任一寻址单元12被分配给任一矢量计算单元且该任一矢量计算单元已使用完毕该任一寻址单元12时,该任一寻址单元12被标记为空闲。基于此,可以在多个寻址单元12中确定工作状态为空闲的第二寻址单元。In practical applications, the working state of each addressing unit 12 can be recorded. When any addressing unit 12 is assigned to any vector computing unit and the any vector computing unit has not finished using the any addressing unit 12, Any addressing unit 12 is marked as busy. When any addressing unit 12 is not assigned to any vector computing unit, or any addressing unit 12 is assigned to any vector computing unit and any vector computing unit has used up any addressing unit 12 , any addressing unit 12 is marked as free. Based on this, a second addressing unit whose working state is idle may be determined among the plurality of addressing units 12 .
另外,可以根据目标读写请求对应的寻址单元12信息确定出执行目标读写请求需要使用的第一寻址单元的数量,如果第二寻址单元的数量大于或者等于第一寻址单元的数量,则可以在第二寻址单元中确定用于执行目标读写请求的第一寻址单元。In addition, the number of first addressing units to be used to execute the target read/write request can be determined according to the addressing unit 12 information corresponding to the target read/write request, if the number of the second addressing units is greater than or equal to the number of the first addressing units number, the first addressing unit for executing the target read/write request may be determined in the second addressing unit.
资源调度装置14还可以包括虚拟寻址单元(Virtual AGU)。如果第二寻址单元的数量小于第一寻址单元的数量,则可以暂时将虚拟寻址单元确定为用于执行目标读写请求的寻址单元12。The resource scheduling device 14 may also include a virtual addressing unit (Virtual AGU). If the number of the second addressing units is smaller than the number of the first addressing units, the virtual addressing unit may be temporarily determined as the addressing unit 12 for executing the target read/write request.
下面将介绍根据目标读写请求确定执行目标读写请求需要使用的第一寻址单元的数量的过程。The following will introduce the process of determining the number of first addressing units to be used for executing the target read/write request according to the target read/write request.
目标矢量计算单元11可以包括多个读接口和多个写接口,可以配置是否使用这些接口,然后将配置信息添加在目标读写请求中。可选地,目标读写请求可以包括指示需要使用目标矢量计算单元11的读接口及/或写接口,每个读接口使用一个寻址单元12,每个写接口使用一个寻址单元12。可以理解的是,如果配置使用了目标矢量计算单元11中的一个接口,那么在使用该接口的过程中需要分配一个对应的寻址单元12服务于该接口。The target vector calculation unit 11 may include multiple read interfaces and multiple write interfaces, and can configure whether to use these interfaces, and then add the configuration information to the target read/write request. Optionally, the target read/write request may include a read interface and/or a write interface indicating that the target vector calculation unit 11 needs to be used, and each read interface uses one addressing unit 12 and each write interface uses one addressing unit 12 . It can be understood that, if an interface in the target vector calculation unit 11 is used in the configuration, a corresponding addressing unit 12 needs to be allocated to serve the interface in the process of using the interface.
基于此,调度单元22,可以用于:根据目标读写请求中指示的需要使用的读接口及/或写接口,确定执行目标读写请求需要使用的第一寻址单元的数量。Based on this, the scheduling unit 22 may be configured to: determine the number of first addressing units to be used to execute the target read/write request according to the read interface and/or write interface to be used indicated in the target read/write request.
可选地,目标读写请求可以包括目标矢量计算单元11的所有读接口及/或所有写接口分别对应的预设位数的指示信息。当指示信息的最高1位数据为1时,指示信息用于指示启用对应的读接口或写接口;当指示信息的最高1为数据为0时,指示信息用于指示不启用对应的读接口或写接口。Optionally, the target read/write request may include indication information of preset bits corresponding to all read interfaces and/or all write interfaces of the target vector computing unit 11 respectively. When the highest 1-bit data of the indication information is 1, the indication information is used to indicate to enable the corresponding read interface or write interface; when the highest 1 of the indication information is the data is 0, the indication information is used to indicate that the corresponding read interface is not enabled or write interface.
如图3所示,是目标读写请求的结构示意图,该目标读写请求中的0-3位为时间戳(time stamp),用于指示接收到目标读写请求的接收时间。目标读写请求中的4-7位为master id,可以预先为每个矢量计算单元分配一个对应的标识,在master id中记录发送目标读写请求的目标矢量单元的标识。As shown in Figure 3, it is a schematic diagram of the structure of the target read and write request. Bits 0-3 in the target read and write request are time stamps, which are used to indicate the receiving time when the target read and write request is received. Bits 4-7 in the target read/write request are the master id, and a corresponding identifier can be assigned to each vector computing unit in advance, and the identifier of the target vector unit that sends the target read/write request is recorded in the master id.
目标读写请求中的8-12、13-17位依次为write ID0和write ID1,write ID0和write ID1中的高1位表示对应的写接口是否被启用,例如当高1位数据为1时,指示启用对应的写接口,当最高1为数据为0时,指示不启用对应的写接口。write ID0和write ID1中的低4位指示需要使用的目标配置信息接收单元25的标识。Bits 8-12 and 13-17 in the target read and write request are write ID0 and write ID1 in turn. The upper 1 bit in write ID0 and write ID1 indicates whether the corresponding write interface is enabled, for example, when the upper 1 bit data is 1 , indicating that the corresponding write interface is enabled. When the highest 1 is the data of 0, it indicates that the corresponding write interface is not enabled. The lower 4 bits in write ID0 and write ID1 indicate the identity of the target configuration information receiving unit 25 that needs to be used.
目标读写请求中的18-22、23-27、28-32位依次为read ID0、read ID1和read ID2。read ID0、read ID1和read ID2中的高1为表示对应的读接口是否被启用,例如当高1位数据为1时,指示启用对应的读接口,当最高1为数据为0时,指示不启用对应的读接口。read ID0、read ID1和read ID2中的低4位指示需要使用的目标配置信息接收单元25的标识。Bits 18-22, 23-27, and 28-32 in the target read and write request are read ID0, read ID1, and read ID2 in turn. The high 1 in read ID0, read ID1 and read ID2 indicates whether the corresponding read interface is enabled. For example, when the high 1-bit data is 1, it indicates that the corresponding read interface is enabled, and when the highest 1 is the data 0, it indicates that the corresponding read interface is not enabled. Enable the corresponding read interface. The lower 4 bits in read ID0, read ID1 and read ID2 indicate the identification of the target configuration information receiving unit 25 that needs to be used.
在图3的例子中,假设同时支持的读接口的最大数量为3个,写接口的最大数量为2个。当然,目标读写请求的结构不仅限于图3的示例,可以根据实际需求更改目标读写请求的结构,以满足实际需求。In the example of FIG. 3 , it is assumed that the maximum number of read interfaces supported at the same time is 3, and the maximum number of write interfaces is 2. Of course, the structure of the target read/write request is not limited to the example in FIG. 3, and the structure of the target read/write request can be changed according to actual needs to meet the actual needs.
基于上述介绍的内容可知,可以基于目标读写请求,确定执行目标读写请求需要使用的第一寻址单元的数量。Based on the above description, it can be known that the number of first addressing units to be used to execute the target read/write request may be determined based on the target read/write request.
如图4所示,是本发明实施例提供的一种调度单元22的结构示意图。对于调度单元22来说,各单元围绕着资源池进行设置。在分配寻址单元12的过程 中,如图5和图6所示,agu分配单元可以通过读接口桥和写接口桥完成实际分配过程,读接口桥用于连接矢量计算单元的读接口和寻址单元12的读接口,相应地,写接口桥用于连接矢量计算单元的写接口和寻址单元12的写接口。As shown in FIG. 4 , it is a schematic structural diagram of a scheduling unit 22 provided by an embodiment of the present invention. For the scheduling unit 22, each unit is arranged around the resource pool. In the process of allocating the addressing unit 12, as shown in Figures 5 and 6, the agu allocation unit can complete the actual allocation process through the read interface bridge and the write interface bridge. The read interface bridge is used to connect the read interface and the search interface of the vector calculation unit. The read interface of the addressing unit 12, correspondingly, the write interface bridge is used to connect the write interface of the vector calculation unit and the write interface of the addressing unit 12.
举例来说,假设目标读写请求需要使用两个读接口以及一个写接口,该两个读接口为read1和read2,该一个写接口为write0。图5左侧read2对应的一列方格中第二个方格被填满,图5右侧agu1对应的一列方格中第二个方格被填满,表示read2连接到读接口桥的RB1,且agu1也连接到读接口桥的RB1,连接到相同RB的表示为分配关系,也就是说agu1分配给了该read2。图5左侧read1对应的一列方格中第一个方格被填满,图5右侧agu0对应的医疗方格中第一个方格被填满,表示read1连接到读接口桥的RB0,且agu0也连接到读接口桥的RB0,也就是说agu0分配给了该read1。写接口的分配过程与读接口的分配过程类似,写接口的分配过程可以结合图6参见读接口的过程,在此不再赘述。For example, it is assumed that the target read and write request needs to use two read interfaces and one write interface, the two read interfaces are read1 and read2, and the one write interface is write0. The second square in a column of squares corresponding to read2 on the left side of Figure 5 is filled, and the second square in a column of squares corresponding to agu1 on the right side of Figure 5 is filled, indicating that read2 is connected to RB1 of the read interface bridge, And agu1 is also connected to the RB1 of the read interface bridge, and the connection to the same RB is represented as an assignment relationship, that is, agu1 is assigned to the read2. The first square in a column of squares corresponding to read1 on the left side of Figure 5 is filled, and the first square in the medical square corresponding to agu0 on the right side of Figure 5 is filled, indicating that read1 is connected to RB0 of the read interface bridge, And agu0 is also connected to RB0 of the read interface bridge, that is to say, agu0 is assigned to the read1. The allocation process of the write interface is similar to the allocation process of the read interface. For the allocation process of the write interface, reference may be made to the process of the read interface in conjunction with FIG. 6 , which will not be repeated here.
需要说明的是,在分配读接口的过程中,可以按照agu0到agu5的顺序来查找空闲的agu。而在分配写接口的过程中,可以按照agu5到agu0的顺序来查找空闲的agu,这样可以保证同一个agu不会同时被分配给读接口和写接口。当agu分配单元完成agu的分配时,会将资源池中当前已经分配出去的agu的工作状态调整为占用状态,直到占用agu的矢量计算单元在使用agu结束后将该agu的工作状态更新为空闲为止。It should be noted that, in the process of allocating the read interface, the free agu can be searched in the order of agu0 to agu5. In the process of allocating the write interface, the free agu can be searched in the order of agu5 to agu0, which can ensure that the same agu will not be assigned to the read interface and the write interface at the same time. When the agu allocation unit completes the allocation of the agu, it will adjust the working state of the agu currently allocated in the resource pool to the occupied state, until the vector computing unit occupying the agu updates the working state of the agu to idle after the use of the agu until.
在agu分配单元完成agu的分配之后,可以将分配结果写入连接状态中的指示寄存器中。可选地,指示寄存器与多个矢量计算单元中的一个矢量计算单元的一个读接口及/或写接口和多个寻址单元12中的一个寻址单元12相关联,当任一指示寄存器中存储第一数值时,任一指示寄存器指示与任一指示寄存器相关联的寻址单元12被分配给与任一指示寄存器相关联的读接口及/或写接口。After the agu allocation unit completes the allocation of the agu, the allocation result can be written into the indication register in the connection state. Optionally, the indication register is associated with a read interface and/or a write interface of a vector computation unit in a plurality of vector computation units and an addressing unit 12 in a plurality of addressing units 12, when any indication register in the When storing the first value, any indication register indicates that the addressing unit 12 associated with any indication register is assigned to the read interface and/or the write interface associated with any indication register.
如图7所示,是指示寄存器的结构示意图。在图7中,包括多行横向线和多列纵向线,横向线和纵向线之间交叉的地方表示为一个黑点,该黑点即为一个寄存器。m0-m5表示矢量计算单元0-5,r0-r2表示某矢量计算单元的读接口 0-2,w0-w1表示某矢量计算单元的写接口0-1。以图7中第一行横向线和第一列纵向线的交点为例,第一行横向线表示为m0r0,也就是指矢量计算单元0的读接口0,第一列纵向线表示agu0,如果它们交点所代表的寄存器中如果存储了第一数值,那么就表示该agu0被分配给了该矢量计算单元0的读接口0。其中,第一数值例如可以是1。As shown in Figure 7, it is a schematic diagram of the structure of the indicating register. In FIG. 7 , there are multiple rows of horizontal lines and multiple columns of vertical lines, and the intersection between the horizontal lines and the vertical lines is represented by a black dot, and the black dot is a register. m0-m5 represents the vector computing unit 0-5, r0-r2 represents the read interface 0-2 of a certain vector computing unit, and w0-w1 represents the writing interface 0-1 of a certain vector computing unit. Taking the intersection of the horizontal line in the first row and the vertical line in the first column as an example, the horizontal line in the first row is represented as m0r0, which means the read interface 0 of the vector computing unit 0, and the vertical line in the first column represents agu0. If If the first value is stored in the register represented by their intersection, it means that the agu0 is allocated to the read interface 0 of the vector calculation unit 0 . The first numerical value may be 1, for example.
可选地,在agu分配单元完成agu的分配之后,可以根据分配结果,在第二寻址单元中确定与目标读写请求中指示的需要使用的读接口及/或写接口各自对应的第一寻址单元;在多个指示寄存器中确定与目标读写请求中指示的需要使用的读接口及/或写接口和对应的第一寻址单元同时相关联的目标指示寄存器;在目标指示寄存器中存储第一数值。Optionally, after the agu allocation unit completes the allocation of the agu, the first address corresponding to the read interface and/or the write interface indicated in the target read-write request and/or the write interface can be determined in the second addressing unit according to the allocation result. Addressing unit; determine a target indication register that is simultaneously associated with the read interface and/or write interface indicated in the target read and write request and the corresponding first addressing unit; in the target indication register The first value is stored.
通过上述操作,可以将实际分配的agu连接到某矢量计算单元的读接口或写接口上。Through the above operations, the actually allocated agu can be connected to the read interface or the write interface of a certain vector computing unit.
可选地,本发明实施例提供的资源调度装置14还可以包括:虚拟寻址单元,用于在为目标读写请求中指示的需要使用的读接口及/或写接口分配各自对应的第一寻址单元之前,将虚拟寻址单元分配给目标读写请求中指示的需要使用的读接口及/或写接口。Optionally, the resource scheduling apparatus 14 provided in this embodiment of the present invention may further include: a virtual addressing unit, configured to allocate a corresponding first read interface and/or a write interface indicated in the target read/write request to be used. Before addressing the unit, the virtual addressing unit is allocated to the read interface and/or the write interface to be used indicated in the target read and write request.
实际应用中,当资源调度装置14接收到读写请求之后,可以立即将发送读写请求的矢量计算单元的读接口以及写接口连接到虚拟寻址单元,直到为发送读写请求的矢量计算单元的读接口或者写接口分配实际的寻址单元12时,再将实际分配的寻址单元12连接到发送读写请求的矢量计算单元的读接口或者写接口。In practical applications, after the resource scheduling device 14 receives the read/write request, it can immediately connect the read interface and the write interface of the vector computing unit that sends the read/write request to the virtual addressing unit, until the vector computing unit that sends the read/write request is the virtual addressing unit. When the actual addressing unit 12 is allocated by the read interface or the write interface, the actually allocated addressing unit 12 is then connected to the read interface or the write interface of the vector computing unit that sends the read and write request.
调度单元22除了可以分配寻址单元12之外,还可以分配目标配置信息接收单元25(config)。可选地,目标读写请求还携带有目标矢量计算单元11标识以及目标配置信息接收单元25标识;调度单元22包括多个指示寄存器,指示寄存器与多个配置信息接收单元25中的一个配置信息接收单元25和多个寻址单元12中的一个寻址单元12相关联,当任一指示寄存器中存储第二数值时,任一指示寄存器指示与任一指示寄存器相关联的配置信息接收单元25被分配给 与任一指示寄存器相关联的寻址单元12。The scheduling unit 22 can allocate the target configuration information receiving unit 25 (config) in addition to the addressing unit 12 . Optionally, the target read and write request also carries the target vector calculation unit 11 identification and the target configuration information receiving unit 25 identification; the scheduling unit 22 includes a plurality of indication registers, and a configuration information in the indication register and a plurality of configuration information receiving units 25 is included. The receiving unit 25 is associated with one addressing unit 12 in the plurality of addressing units 12. When any indication register stores the second value, any indication register indicates the configuration information receiving unit 25 associated with any indication register. is assigned to the addressing unit 12 associated with any of the indication registers.
如图8所示,假设有config0-9,有agu0-5,与分配寻址单元12的方式类似,以第一行横向线表示的config0和第一列纵向线表示的agu0为例,如果它们交点所代表的寄存器中如果存储了第二数值,那么就表示该config0被分配给了该agu0。其中,第二数值例如可以是1。As shown in Figure 8, it is assumed that there are config0-9 and agu0-5, which is similar to the way of assigning addressing unit 12. Taking config0 represented by the horizontal line in the first row and agu0 represented by the vertical line in the first column as an example, if they are If the second value is stored in the register represented by the intersection, it means that the config0 is assigned to the agu0. The second numerical value may be 1, for example.
需要说明的是,实际应用中config的数量可以根据实际需求进行设置,在一种可选的实现方式中,可以将config的数量设置为与矢量存储器13的数量一致。当某个config分配给某个agu时,在该agu对矢量存储器13进行读写操作的过程中,可以结合分配的config中存储的目标读写请求对应的配置信息完成读写操作。It should be noted that the number of configs in practical applications can be set according to actual requirements. In an optional implementation manner, the number of configs can be set to be consistent with the number of vector memories 13 . When a certain config is allocated to a certain agu, in the process of reading and writing the vector memory 13 by the agu, the reading and writing operations can be completed in combination with the configuration information corresponding to the target read and write requests stored in the allocated config.
可选地,在完成目标配置信息接收单元25的分配之后,可以基于分配结果,根据目标读写请求中指示的需要使用的目标配置信息接收单元25标识,在多个配置信息接收单元25中确定目标配置信息接收单元25;在多个指示寄存器中确定与第一寻址单元和目标配置信息接收单元25同时相关联的目标指示寄存器;在目标指示寄存器中存储第二数值。Optionally, after completing the allocation of the target configuration information receiving unit 25, it can be determined in multiple configuration information receiving units 25 according to the target configuration information receiving unit 25 identifier that needs to be used indicated in the target read and write request based on the allocation result. The target configuration information receiving unit 25; determining a target indicating register simultaneously associated with the first addressing unit and the target configuration information receiving unit 25 among the plurality of indicating registers; storing the second value in the target indicating register.
综合上述内容,下面提供一种本发明实施例中所述的数字信号处理器10的可能实现的结构。如图9所示,该数字信号处理器10可以包括标量处理器901、多种矢量计算单元、总线902、资源调度装置14、配置信息接收单元25(config0-i)、寻址单元0-n、虚拟寻址单元908、多个矢量存储器903。其中,多种矢量计算单元可以包括矢量算数逻辑运算单元904、浮点运算单元905、加速器单元906、外围接口907。需要说明的是,各单元之间可以通过带有箭头的连接线进行数据传输。Based on the above content, a possible implementation structure of the digital signal processor 10 described in the embodiment of the present invention is provided below. As shown in FIG. 9, the digital signal processor 10 may include a scalar processor 901, various vector computing units, a bus 902, a resource scheduling device 14, a configuration information receiving unit 25 (config0-i), and addressing units 0-n , a virtual addressing unit 908 , and a plurality of vector memories 903 . The various vector computing units may include a vector arithmetic logic operation unit 904 , a floating point operation unit 905 , an accelerator unit 906 , and a peripheral interface 907 . It should be noted that data transmission can be performed between the units through connecting lines with arrows.
下面提供一种上述资源调度装置14的可能实现结构。如图10所示,该资源调度装置14可以包括时间戳寄存器101、多个深度为2的先入先出寄存器102(图中表示为2 depth fifo)、仲裁单元103、1个深度为1的先入先出寄存器104(图中表示为1 depth fifo)、调度单元22、配置信息接收单元25(config0-9)、连接单元105。其中,调度单元22可以包括寻址单元工作状态管理模块221、 解码模块222、分配决策模块223、寻址单元分配模块224、连接状态模块225、计时器226、虚拟寻址单元227。资源调度装置14外部还可以设置有总线106、寻址单元(例如,寻址单元0~5)。A possible implementation structure of the above resource scheduling apparatus 14 is provided below. As shown in FIG. 10 , the resource scheduling apparatus 14 may include a timestamp register 101, a plurality of FIFO registers 102 with a depth of 2 (represented as 2 depth fifo in the figure), an arbitration unit 103, and a FIFO with a depth of 1 A first-out register 104 (represented as 1 depth fifo in the figure), a scheduling unit 22, a configuration information receiving unit 25 (config0-9), and a connecting unit 105. The scheduling unit 22 may include an addressing unit working state management module 221 , a decoding module 222 , an allocation decision module 223 , an addressing unit allocation module 224 , a connection state module 225 , a timer 226 , and a virtual addressing unit 227 . A bus 106 and addressing units (eg, addressing units 0 to 5) may also be provided outside the resource scheduling device 14 .
在上述结构中,时间戳寄存器101用于为每个接收到的读写请求打上时间戳。In the above structure, the time stamp register 101 is used to time stamp each received read and write request.
每个深度为2的先入先出寄存器102对应一个矢量计算单元,用于缓存对应的矢量计算单元发送的读写请求。因此,深度为2的先入先出寄存器102的部署数量大于或者等于矢量计算单元的数量。另外,如果当前矢量计算单元会同时发送读写请求,可以为该当前矢量计算单元配置1个先入先出寄存器,如果当前矢量计算单元可能分时发送读写请求,可以根据可能分时发送的读写请求的数量配置先入先出寄存器。Each FIFO register 102 with a depth of 2 corresponds to a vector computing unit, and is used for buffering read and write requests sent by the corresponding vector computing unit. Therefore, the number of deployments of FIFO registers 102 with a depth of 2 is greater than or equal to the number of vector computation units. In addition, if the current vector calculation unit will send read and write requests at the same time, you can configure a FIFO register for the current vector calculation unit. If the current vector calculation unit may send read and write requests in time-sharing, you can The number of write requests configures the FIFO register.
由于不同矢量计算单元可能在短时间内发送多个读写请求,可以通过仲裁单元103决策处理这些读写请求的先后顺序,先处理的读写请求输出到深度为1的先入先出寄存器104进行缓存。需要说明的是,可以配置仲裁模式以及每个矢量计算单元的优先级,然后根据仲裁模式以及矢量计算单元的优先级来决策处理不同读写请求的先后顺序。具体本文后面会详细介绍确定读写请求的先后处理顺序的方式。Since different vector computing units may send multiple read and write requests in a short period of time, the order of processing these read and write requests can be decided by the arbitration unit 103, and the read and write requests processed first are output to the FIFO register 104 with a depth of 1 for processing. cache. It should be noted that the arbitration mode and the priority of each vector calculation unit can be configured, and then the order of processing different read and write requests is decided according to the arbitration mode and the priority of the vector calculation unit. Specifically, the method for determining the sequential processing order of read and write requests will be described in detail later in this article.
连接单元105可以根据调度单元22输出的连接状态来完成矢量计算单元和寻址单元的互联,以及完成配置信息接收单元25和寻址单元的互联。The connection unit 105 can complete the interconnection between the vector calculation unit and the addressing unit, and the interconnection between the configuration information receiving unit 25 and the addressing unit according to the connection state output by the scheduling unit 22 .
另外,图10中其他单元已经在前文详细讲解过,在此暂不赘述。In addition, the other units in FIG. 10 have been explained in detail above, and will not be repeated here.
下面介绍标量处理器、矢量计算单元、资源调度装置以及寻址单元之间的工作时序关系。如图11所示,首先标量处理器可以配置矢量计算单元和资源调度装置,然后矢量计算单元根据配置向资源调度装置发送读写请求,接着在资源调度装置接收到读写请求之后,可以立即将矢量计算单元连接到虚拟寻址单元上,同时资源调度装置可以对读写请求进行仲裁、译码、决策、分配等处理,在此期间矢量计算单元处于等待状态。在分配结束之后,矢量计算单元连接到分配的寻址单元上,矢量计算单元可以通过连接的寻址单元完成读写操作。最 后,在矢量计算单元完成读写操作之后,可以向资源调度装置发送读写任务结束标志,以告知资源调度装置读写操作结束,资源调度装置可以将占用的寻址单元进行释放,让该寻址单元重新进入资源池,然后对下一条新的读写请求进行处理。The working sequence relationship among the scalar processor, the vector computing unit, the resource scheduling device and the addressing unit is described below. As shown in Figure 11, first, the scalar processor can configure the vector computing unit and the resource scheduling device, and then the vector computing unit sends read and write requests to the resource scheduling device according to the configuration, and then after the resource scheduling device receives the read and write requests, it can immediately The vector computing unit is connected to the virtual addressing unit, and at the same time, the resource scheduling device can perform arbitration, decoding, decision-making, allocation, etc. on read and write requests, during which the vector computing unit is in a waiting state. After the allocation is completed, the vector computing unit is connected to the allocated addressing unit, and the vector computing unit can complete read and write operations through the connected addressing unit. Finally, after the vector computing unit completes the read and write operations, a read and write task end flag can be sent to the resource scheduling device to inform the resource scheduling device that the read and write operations are over, and the resource scheduling device can release the occupied addressing unit, so that the search The address unit re-enters the resource pool, and then processes the next new read and write request.
下面将介绍确定读写请求的先后处理顺序的方式。The method of determining the sequential processing order of read and write requests will be described below.
可选地,如图12所示,本发明实施例提供的资源调度装置14在图2所示结构的基础上还可以包括:读写请求接收单元121,用于接收多个矢量计算单元分别发送的读写请求;仲裁单元122,用于根据各矢量计算单元分别对应的优先级,在多个矢量计算单元中确定目标矢量计算单元11,各矢量计算单元分别对应的优先级各不相同;确定目标矢量计算单元11发送的目标读写请求。Optionally, as shown in FIG. 12 , on the basis of the structure shown in FIG. 2 , the resource scheduling apparatus 14 provided by the embodiment of the present invention may further include: a read/write request receiving unit 121 configured to receive the data sent by multiple vector computing units respectively. The arbitration unit 122 is used to determine the target vector calculation unit 11 in the plurality of vector calculation units according to the respective priorities of the vector calculation units, and the priorities corresponding to the vector calculation units are different; determine The target read and write request sent by the target vector calculation unit 11 .
可以理解的是,目标读写请求为仲裁后的先处理的读写请求。It can be understood that the target read/write request is the read/write request processed first after arbitration.
在本发明实施例中,共提供三种不同仲裁模式下的实施方式,当然除本发明实施例提供的三种仲裁模式之外,还可以根据实际需求设置仲裁模式的机制,对此本发明不作限定。In the embodiment of the present invention, a total of three different arbitration modes are provided. Of course, in addition to the three arbitration modes provided by the embodiment of the present invention, the mechanism of the arbitration mode can also be set according to actual needs, which is not implemented in the present invention. limited.
(1)固定优先级模式(1) Fixed priority mode
可选地,仲裁单元122可以用于:当读写请求响应周期到达时,在多个矢量计算单元中确定优先级最高的目标矢量计算单元11。Optionally, the arbitration unit 122 may be configured to: when the read/write request response period arrives, determine the target vector calculation unit 11 with the highest priority among the multiple vector calculation units.
为了便于理解,下面将结合图13说明固定优先级模式下确定读写请求的先后处理顺序的方式。在图13中,master表示矢量计算单元,假设有6个master,包括master0-5,优先级从高到低表示为从5级到0级,master0-5的优先级依次为5、4、3、2、1、0。图13中展示了5个时刻下不同master发送读写请求的情况,假设任一时刻对应的一列方格中填写了master标识的为当前存在读写请求的master,没有填写master标识的为当前未发送读写请求的master。For ease of understanding, a method for determining the sequential processing order of read and write requests in the fixed priority mode will be described below with reference to FIG. 13 . In Figure 13, master represents the vector computing unit, assuming that there are 6 masters, including master0-5, the priority from high to low is expressed as from level 5 to level 0, and the priority of master0-5 is 5, 4, 3. , 2, 1, 0. Figure 13 shows the situation in which different masters send read and write requests at 5 times. It is assumed that the one column of squares corresponding to any time is filled with the master identifier for the master that currently has read and write requests, and the one that does not fill in the master identifier is currently unregistered. The master that sends read and write requests.
由图13可见,在0时刻,master0、3、5都发送了读写请求,每次可以处理一个读写请求,因此,按照优先级master0发送的请求最先被响应,在1时刻,还剩下master3、5的读写请求需要响应,按照优先级master3发送的请求在该时刻被响应。假设在2时刻,master0、1又发送了读写请求,现在有master0、 1、5的读写请求需要响应,按照优先级master0发送的请求在该时刻被响应。以此类推,在3时刻,master1发送的请求被响应,在4时刻,master5发送的请求被响应。As can be seen from Figure 13, at time 0, master0, 3, and 5 all sent read and write requests, and each read and write request can be processed. Therefore, the request sent by master0 according to the priority is the first to be responded, and at time 1, there are remaining The read and write requests of the next master 3 and 5 need to be responded, and the request sent by the priority master 3 is responded at this moment. Suppose that at time 2, master0 and 1 send read and write requests again, and now there are read and write requests from masters 0, 1, and 5 that need to be responded to. The request sent by master0 according to the priority is responded at this time. By analogy, at time 3, the request sent by master1 is responded, and at time 4, the request sent by master5 is responded.
(2)轮询模式(2) Polling mode
可选地,仲裁单元122可以用于:当读写请求响应周期到达时,在多个矢量计算单元中确定优先级最高的目标矢量计算单元11;当读写请求响应周期的下一读写请求响应周期到达时,在多个矢量计算单元中确定优先级低于目标矢量计算单元11的待调整矢量计算单元,将待调整矢量计算单元的优先级上调预设级别;将目标矢量计算单元11对应的优先级调整为最低值。Optionally, the arbitration unit 122 can be used to: when the read/write request response cycle arrives, determine the target vector computation unit 11 with the highest priority among the multiple vector computation units; when the next read/write request of the read/write request response cycle arrives When the response period arrives, a vector calculation unit to be adjusted whose priority is lower than the target vector calculation unit 11 is determined among the plurality of vector calculation units, and the priority of the vector calculation unit to be adjusted is raised to a preset level; the target vector calculation unit 11 corresponds to The priority is adjusted to the lowest value.
上述预设级别可以是1级。The above-mentioned preset level may be level 1.
为了便于理解,下面将结合图14说明轮询模式下确定读写请求的先后处理顺序的方式。在图14中,master表示矢量计算单元,假设有6个master,包括master0-5,优先级从高到低表示为从5级到0级,master0-5的优先级依次为5、4、3、2、1、0。图14中展示了5个时刻下不同master发送读写请求的情况,假设任一时刻对应的一列方格中填写了master标识的为当前存在读写请求的master,没有填写master标识的为当前未发送读写请求的master。For ease of understanding, the following describes the manner of determining the sequential processing order of read and write requests in the polling mode with reference to FIG. 14 . In Figure 14, master represents the vector computing unit, assuming that there are 6 masters, including master0-5, the priority from high to low is expressed as from level 5 to level 0, and the priority of master0-5 is 5, 4, 3. , 2, 1, 0. Figure 14 shows the situation in which different masters send read and write requests at 5 times. It is assumed that the one column of squares corresponding to any time is filled with the master identifier for the master that currently has read and write requests, and the one that does not fill in the master identifier is currently unregistered. The master that sends read and write requests.
在0时刻,master0的优先级最高,先被响应。在1时刻,由于master0已被响应,因此,master0的优先级被调整为最低0,比调整前master0的优先级低的master的优先级都上调1,因此master1调整为5,master2调整为4、master3调整为3,master4调整为2,master5调整为1。在1时刻,调整后的master中master3、5的读写请求需要响应,且master3的优先级最高,因此master3被响应。在2时刻,master0、1发送了新的读写请求,同时由于master3已被响应,因此,master3的优先级被调整为0,比调整前master3的优先级高的master1、2的优先级保持不变,比调整前master3的优先级低的master0、4、5的优先级都上调1,因此,master0调整为1、master4调整为3、master5调整为2。在2时刻,调整后的master中master0、1、5的读写请求需要响应,且master1的优先级最高,因此master1被响应。以此类推,在3时刻,master5 被响应,在4时刻,master0被响应。At time 0, master0 has the highest priority and is responded first. At time 1, because master0 has been responded, the priority of master0 is adjusted to the lowest 0, and the priority of masters lower than the priority of master0 before adjustment is increased by 1, so master1 is adjusted to 5, master2 is adjusted to 4, master3 is adjusted to 3, master4 is adjusted to 2, and master5 is adjusted to 1. At time 1, the read and write requests of masters 3 and 5 in the adjusted master need to be responded, and master 3 has the highest priority, so master 3 is responded. At time 2, master0 and 1 send new read and write requests, and because master3 has already responded, the priority of master3 is adjusted to 0, and the priority of master1 and 2, which is higher than that of master3 before adjustment, remains unchanged. The priorities of master0, 4, and 5, which are lower than the priority of master3 before adjustment, are all increased by 1. Therefore, master0 is adjusted to 1, master4 is adjusted to 3, and master5 is adjusted to 2. At time 2, the read and write requests of masters 0, 1, and 5 in the adjusted master need to be responded, and master1 has the highest priority, so master1 is responded. And so on, at time 3, master5 is responded, and at time 4, master0 is responded.
(3)时间优先模式(3) Time priority mode
可选地,资源调度装置14还可以包括:时间戳单元,用于当读写请求接收单元121接收到任一矢量计算单元发送的读写请求时,记录接收到任一矢量计算单元发送的读写请求的接收时间;仲裁单元122,用于当读写请求响应周期到达时,在多个读写请求中确定对应的接收时间最早的候选读写请求,并将接收时间最早的候选读写请求的优先级设置为最高优先级。若候选读写请求的数量为1,则将候选读写请求确定为目标读写请求;若候选读写请求的数量大于1,则在发送候选读写请求的矢量计算单元中确定优先级最高的目标矢量计算单元11,确定目标矢量计算单元11发送的目标读写请求。Optionally, the resource scheduling apparatus 14 may further include: a time stamp unit, configured to record the read/write request sent by any vector calculation unit when the read/write request receiving unit 121 receives the read/write request sent by any vector calculation unit. The reception time of the write request; the arbitration unit 122 is used to determine the candidate read/write request with the earliest reception time among multiple read/write requests when the read/write request response period arrives, and assign the candidate read/write request with the earliest reception time The priority is set to the highest priority. If the number of candidate read/write requests is 1, the candidate read/write request will be determined as the target read/write request; if the number of candidate read/write requests is greater than 1, the one with the highest priority will be determined in the vector computing unit that sends the candidate read/write request. The target vector calculation unit 11 determines the target read/write request sent by the target vector calculation unit 11 .
为了便于理解,下面将结合图15说明轮询模式下确定读写请求的先后处理顺序的方式。在图15中,master表示矢量计算单元,假设有6个master,包括master0-5,优先级从高到低表示为从5级到0级,master0-5的优先级依次为5、4、3、2、1、0。图15中展示了5个时刻下不同master发送读写请求的情况,假设任一时刻对应的一列方格中填写了master标识的为当前存在读写请求的master,没有填写master标识的为当前未发送读写请求的master。For ease of understanding, the following describes the manner of determining the sequential processing order of read and write requests in the polling mode with reference to FIG. 15 . In Figure 15, master represents the vector computing unit, assuming that there are 6 masters, including master0-5, the priority from high to low is expressed as from level 5 to level 0, and the priority of master0-5 is 5, 4, 3. , 2, 1, 0. Figure 15 shows the situation in which different masters send read and write requests at 5 times. It is assumed that the one column of squares corresponding to any time is filled with the master identifier for the master that currently has read and write requests, and the one that does not fill in the master identifier is currently unregistered. The master that sends read and write requests.
在0时刻,master0、3、5都发送了读写请求,由于读写请求的接收时间相同,按照优先级master0的优先级最高,因此master0最先被响应。在1时刻,master3、5的读写请求需要响应,由于master3、5的读写请求的接收时间相同,按照优先级master3被响应。在2时刻,master0、1发送了新的读写请求,现在有master0、1、5的读写请求需要响应,由于master5的读写请求的接收时间早于master0、1,因此master5被响应。在3时刻,master0、1的读写请求需要响应,由于master0、1的读写请求的接收时间相同,按照优先级master0被响应。在4时刻,master1被响应。At time 0, master0, 3, and 5 all send read and write requests. Since the read and write requests are received at the same time, master0 has the highest priority according to the priority, so master0 is responded first. At time 1, the read and write requests of masters 3 and 5 need to be responded. Since the read and write requests of masters 3 and 5 have the same reception time, master 3 is responded according to the priority. At time 2, master0 and 1 sent new read and write requests, and now there are read and write requests from masters 0, 1, and 5 that need to be responded to. Since master5's read and write requests are received earlier than masters 0 and 1, master5 is responded. At time 3, the read and write requests of master0 and 1 need to be responded. Since the read and write requests of master0 and 1 are received at the same time, master0 is responded according to the priority. At time 4, master1 is responded.
需要说明的是,在上述三种仲裁模式中,都使用到了矢量计算单元的优先级,矢量计算单元的优先级可以进行配置。It should be noted that, in the above three arbitration modes, the priority of the vector calculation unit is used, and the priority of the vector calculation unit can be configured.
采用本发明,通过资源调度装置,在接收到目标矢量计算单元发送的目标 读写请求的情况下,可以自动根据目标读写请求对应的寻址单元信息,为目标矢量计算单元分配可用的寻址单元,这样目标矢量计算单元就可以通过分配到的寻址单元对矢量存储器进行读写操作,以完成计算任务。采用本发明,无需再通过人工手动的方式为目标矢量计算单元分配寻址单元,这些过程都可以自动完成,进而可以降低技术人员的操作难度以及提高操作效率。By adopting the present invention, the resource scheduling device can automatically allocate available addressing to the target vector computing unit according to the addressing unit information corresponding to the target reading and writing request in the case of receiving the target reading and writing request sent by the target vector computing unit. unit, so that the target vector calculation unit can read and write operations to the vector memory through the allocated addressing unit to complete the calculation task. By adopting the present invention, it is no longer necessary to manually assign addressing units to the target vector calculation unit, and these processes can be completed automatically, thereby reducing the operation difficulty of technicians and improving the operation efficiency.
本发明又一示例性实施例提供了一种可移动平台,如图16所示,该可移动平台160可以包括图1所示实施例中的数字信号处理器10。Yet another exemplary embodiment of the present invention provides a movable platform, as shown in FIG. 16 , the movable platform 160 may include the digital signal processor 10 in the embodiment shown in FIG. 1 .
以上各个实施例中的技术方案、技术特征在不相冲突的情况下均可以单独,或者进行组合,只要未超出本领域技术人员的认知范围,均属于本发明保护范围内的等同实施例。The technical solutions and technical features in each of the above embodiments can be used alone or in combination without conflict. As long as they do not exceed the cognitive scope of those skilled in the art, they all belong to equivalent embodiments within the protection scope of the present invention.
以上所述仅为本发明的实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。The above descriptions are only the embodiments of the present invention, and are not intended to limit the scope of the present invention. Any equivalent structure or equivalent process transformation made by using the contents of the description and drawings of the present invention, or directly or indirectly applied to other related technologies Fields are similarly included in the scope of patent protection of the present invention.
最后应说明的是:以上各实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述各实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的范围。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, but not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: The technical solutions described in the foregoing embodiments can still be modified, or some or all of the technical features thereof can be equivalently replaced; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the technical solutions of the embodiments of the present invention. scope.

Claims (18)

  1. 一种资源调度装置,其特征在于,包括:A resource scheduling device, comprising:
    目标读写请求接收单元,用于接收目标矢量计算单元发送的目标读写请求;a target read/write request receiving unit, configured to receive the target read/write request sent by the target vector computing unit;
    调度单元,用于根据所述目标读写请求对应的寻址单元信息,确定所述目标矢量计算单元对应的寻址单元;以及a scheduling unit, configured to determine the addressing unit corresponding to the target vector computing unit according to the addressing unit information corresponding to the target read/write request; and
    目标读写请求发送单元,用于将所述目标读写请求发送至所述目标矢量计算单元对应的寻址单元。A target read/write request sending unit, configured to send the target read/write request to an addressing unit corresponding to the target vector calculation unit.
  2. 根据权利要求1所述的资源调度装置,其特征在于,所述资源调度装置还包括:The resource scheduling apparatus according to claim 1, wherein the resource scheduling apparatus further comprises:
    配置信息发送单元,用于将所述目标读写请求对应的配置信息发送至所述目标矢量计算单元对应的目标配置信息接收单元。A configuration information sending unit, configured to send configuration information corresponding to the target read/write request to a target configuration information receiving unit corresponding to the target vector calculation unit.
  3. 根据权利要求2所述的资源调度装置,其特征在于,所述调度单元,用于:The resource scheduling apparatus according to claim 2, wherein the scheduling unit is configured to:
    根据所述目标读写请求对应的寻址单元信息,确定执行所述目标读写请求需要使用的第一寻址单元的数量;According to the addressing unit information corresponding to the target read/write request, determine the number of first addressing units that need to be used to execute the target read/write request;
    在多个寻址单元中确定工作状态为空闲的第二寻址单元;determining a second addressing unit whose working state is idle among the plurality of addressing units;
    若所述第二寻址单元的数量大于或者等于所述第一寻址单元的数量,则在所述第二寻址单元中确定用于执行所述目标读写请求的所述第一寻址单元,以通过所述第一寻址单元以及所述配置信息进行矢量存储器的读写操作。If the number of the second addressing units is greater than or equal to the number of the first addressing units, determining the first addressing for executing the target read/write request in the second addressing unit unit, so as to perform read and write operations of the vector memory through the first addressing unit and the configuration information.
  4. 根据权利要求2所述的资源调度装置,其特征在于,所述目标读写请求包括指示需要使用所述目标矢量计算单元的读接口及/或写接口,The resource scheduling apparatus according to claim 2, wherein the target read/write request includes a read interface and/or a write interface indicating that the target vector computing unit needs to be used,
    其中,所述读接口对应第三寻址单元,以及所述写接口对应第四寻址单元。The read interface corresponds to a third addressing unit, and the write interface corresponds to a fourth addressing unit.
  5. 根据权利要求4所述的资源调度装置,其特征在于,所述目标读写请求包括所述目标矢量计算单元的所有读接口及/或所有写接口分别对应的预设位数的指示信息;The resource scheduling apparatus according to claim 4, wherein the target read/write request includes indication information of preset number of bits corresponding to all read interfaces and/or all write interfaces of the target vector computing unit;
    当所述指示信息的最高1位数据为1时,所述指示信息用于指示启用对应 的读接口或写接口;当所述指示信息的最高1为数据为0时,所述指示信息用于指示不启用对应的读接口或写接口。When the highest 1-bit data of the indication information is 1, the indication information is used to instruct to enable the corresponding read interface or write interface; when the highest 1 of the indication information is 0, the indication information is used for Indicates that the corresponding read interface or write interface is not enabled.
  6. 根据权利要求4所述的资源调度装置,其特征在于,所述调度单元,用于:The resource scheduling apparatus according to claim 4, wherein the scheduling unit is configured to:
    根据所述目标读写请求中指示的需要使用的读接口及/或写接口,确定执行所述目标读写请求需要使用的第一寻址单元的数量。The number of first addressing units to be used for executing the target read/write request is determined according to the read interface and/or write interface to be used indicated in the target read/write request.
  7. 根据权利要求4所述的资源调度装置,其特征在于,所述调度单元包括多个指示寄存器,所述指示寄存器与多个矢量计算单元中的一个矢量计算单元的一个读接口及/或写接口和所述多个寻址单元中的一个寻址单元相关联,当任一指示寄存器中存储第一数值时,所述任一指示寄存器指示与所述任一指示寄存器相关联的寻址单元被分配给与所述任一指示寄存器相关联的读接口及/或写接口。The resource scheduling apparatus according to claim 4, wherein the scheduling unit comprises a plurality of indication registers, and the indication registers are connected to a read interface and/or a write interface of a vector calculation unit among the plurality of vector calculation units Associated with one addressing unit in the plurality of addressing units, when the first value is stored in any indication register, the any indication register indicates that the addressing unit associated with the any indication register is to be Assigned to the read interface and/or write interface associated with any of the indication registers.
  8. 根据权利要求7所述的资源调度装置,其特征在于,所述调度单元,用于:The resource scheduling apparatus according to claim 7, wherein the scheduling unit is configured to:
    在所述第二寻址单元中确定与所述目标读写请求中指示的需要使用的读接口及/或写接口各自对应的第一寻址单元;determining, in the second addressing unit, a first addressing unit corresponding to the read interface and/or the write interface indicated in the target read/write request to be used;
    在所述多个指示寄存器中确定与所述目标读写请求中指示的需要使用的读接口及/或写接口和对应的第一寻址单元同时相关联的目标指示寄存器;determining, among the plurality of indication registers, a target indication register that is simultaneously associated with the read interface and/or write interface indicated in the target read/write request and/or the write interface and the corresponding first addressing unit;
    在所述目标指示寄存器中存储所述第一数值。The first value is stored in the target indication register.
  9. 根据权利要求7所述的资源调度装置,其特征在于,所述资源调度装置还包括:The resource scheduling apparatus according to claim 7, wherein the resource scheduling apparatus further comprises:
    虚拟寻址单元,用于在为所述目标读写请求中指示的需要使用的读接口及/或写接口分配各自对应的第一寻址单元之前,将所述虚拟寻址单元分配给所述目标读写请求中指示的需要使用的读接口及/或写接口。a virtual addressing unit, used for allocating the virtual addressing unit to the The read interface and/or write interface to be used as indicated in the target read and write request.
  10. 根据权利要求4所述的资源调度装置,其特征在于,所述目标读写请求还携带有目标矢量计算单元标识以及目标配置信息接收单元标识;所述调度单元包括多个指示寄存器,所述指示寄存器与多个配置信息接收单元中的一个 配置信息接收单元和所述多个寻址单元中的一个寻址单元相关联,当任一指示寄存器中存储第二数值时,所述任一指示寄存器指示与所述任一指示寄存器相关联的配置信息接收单元被分配给与所述任一指示寄存器相关联的寻址单元。The resource scheduling apparatus according to claim 4, wherein the target read/write request further carries a target vector calculation unit identifier and a target configuration information receiving unit identifier; the scheduling unit includes a plurality of indication registers, the indication The register is associated with one configuration information receiving unit in the plurality of configuration information receiving units and one addressing unit in the plurality of addressing units, and when the second value is stored in any indication register, the any indication register Indicates that the configuration information receiving unit associated with the any of the indication registers is assigned to the addressing unit associated with the any of the indication registers.
  11. 根据权利要求10所述的资源调度装置,其特征在于,所述调度单元,用于:The resource scheduling apparatus according to claim 10, wherein the scheduling unit is configured to:
    根据所述目标读写请求中指示的需要使用的目标配置信息接收单元标识,在所述多个配置信息接收单元中确定所述目标配置信息接收单元;According to the target configuration information receiving unit identifier to be used indicated in the target read/write request, determine the target configuration information receiving unit among the plurality of configuration information receiving units;
    在所述多个指示寄存器中确定与所述第一寻址单元和所述目标配置信息接收单元同时相关联的目标指示寄存器;determining, among the plurality of indication registers, a target indication register associated with the first addressing unit and the target configuration information receiving unit at the same time;
    在所述目标指示寄存器中存储所述第二数值。The second value is stored in the target indication register.
  12. 根据权利要求1所述的资源调度装置,其特征在于,所述资源调度装置还包括:The resource scheduling apparatus according to claim 1, wherein the resource scheduling apparatus further comprises:
    读写请求接收单元,用于接收多个矢量计算单元分别发送的读写请求;a read-write request receiving unit, used for receiving read-write requests sent by multiple vector computing units respectively;
    仲裁单元,用于根据各矢量计算单元分别对应的优先级,在所述多个矢量计算单元中确定所述目标矢量计算单元,所述各矢量计算单元分别对应的优先级各不相同;确定所述目标矢量计算单元发送的所述目标读写请求。an arbitration unit, configured to determine the target vector calculation unit among the plurality of vector calculation units according to the respective priorities of the vector calculation units, and the respective priorities of the vector calculation units are different; The target read and write request sent by the target vector calculation unit.
  13. 根据权利要求12所述的资源调度装置,其特征在于,所述仲裁单元,用于:The resource scheduling apparatus according to claim 12, wherein the arbitration unit is configured to:
    当读写请求响应周期到达时,在所述多个矢量计算单元中确定优先级最高的目标矢量计算单元。When the read/write request response period arrives, the target vector calculation unit with the highest priority is determined among the plurality of vector calculation units.
  14. 根据权利要求13所述的资源调度装置,其特征在于,所述仲裁单元,还用于:The resource scheduling apparatus according to claim 13, wherein the arbitration unit is further configured to:
    当所述读写请求响应周期的下一读写请求响应周期到达时,在所述多个矢量计算单元中确定优先级低于所述目标矢量计算单元的待调整矢量计算单元,将所述待调整矢量计算单元的优先级上调预设级别;When the next read/write request response cycle of the read/write request response cycle arrives, a vector calculation unit to be adjusted whose priority is lower than the target vector calculation unit is determined in the plurality of vector calculation units, and the to-be-adjusted vector calculation unit is determined in the plurality of vector calculation units. Adjust the priority of the vector calculation unit to increase the preset level;
    将所述目标矢量计算单元对应的优先级调整为最低值。The priority corresponding to the target vector calculation unit is adjusted to the lowest value.
  15. 根据权利要求12所述的资源调度装置,其特征在于,所述资源调度装 置还包括:The resource scheduling device according to claim 12, wherein the resource scheduling device further comprises:
    时间戳单元,用于当所述读写请求接收单元接收到任一矢量计算单元发送的读写请求时,记录接收到所述任一矢量计算单元发送的读写请求的接收时间;a timestamp unit, configured to record the reception time of receiving the read/write request sent by any vector calculation unit when the read/write request receiving unit receives the read/write request sent by any vector calculation unit;
    所述仲裁单元,用于当读写请求响应周期到达时,在多个读写请求中确定对应的接收时间最早的候选读写请求;若所述候选读写请求的数量为1,则将所述候选读写请求确定为所述目标读写请求;若所述候选读写请求的数量大于1,则在发送所述候选读写请求的矢量计算单元中确定优先级最高的目标矢量计算单元,确定所述目标矢量计算单元发送的所述目标读写请求。The arbitration unit is used to determine the candidate read/write request with the earliest corresponding reception time among the multiple read/write requests when the read/write request response period arrives; if the number of the candidate read/write requests is 1, then The candidate read/write request is determined as the target read/write request; if the number of the candidate read/write requests is greater than 1, the target vector computation unit with the highest priority is determined in the vector computation unit that sends the candidate read/write request, Determine the target read/write request sent by the target vector calculation unit.
  16. 一种数字信号处理器,其特征在于,所述数字信号处理器包括目标矢量计算单元、多个寻址单元、矢量存储器以及权利要求1-15中任一项所述的资源调度装置,其中:A digital signal processor, characterized in that the digital signal processor comprises a target vector calculation unit, a plurality of addressing units, a vector memory, and the resource scheduling device according to any one of claims 1-15, wherein:
    所述目标矢量计算单元,用于向所述资源调度装置发送目标读写请求;the target vector calculation unit, configured to send a target read and write request to the resource scheduling device;
    所述资源调度装置,用于根据所述目标读写请求,从所述多个寻址单元中选取所述目标矢量计算单元对应的寻址单元;The resource scheduling device is configured to select an addressing unit corresponding to the target vector computing unit from the multiple addressing units according to the target read/write request;
    所述目标矢量计算单元对应的寻址单元,用于根据所述目标读写请求,对所述矢量存储器进行读写操作。The addressing unit corresponding to the target vector calculation unit is configured to perform read/write operations on the vector memory according to the target read/write request.
  17. 根据权利要求16所述的数字信号处理器,其特征在于,所述目标矢量计算单元包括矢量算数逻辑运算单元、浮点运算单元、加速器单元或者外围接口。The digital signal processor according to claim 16, wherein the target vector calculation unit comprises a vector arithmetic logic operation unit, a floating point operation unit, an accelerator unit or a peripheral interface.
  18. 一种可移动平台,其特征在于,所述可移动平台包括权利要求16-17中任一项所述的数字信号处理器。A movable platform, characterized in that, the movable platform comprises the digital signal processor of any one of claims 16-17.
PCT/CN2020/135284 2020-12-10 2020-12-10 Resource scheduling apparatus, digital signal processor and movable platform WO2022120722A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/135284 WO2022120722A1 (en) 2020-12-10 2020-12-10 Resource scheduling apparatus, digital signal processor and movable platform

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/135284 WO2022120722A1 (en) 2020-12-10 2020-12-10 Resource scheduling apparatus, digital signal processor and movable platform

Publications (1)

Publication Number Publication Date
WO2022120722A1 true WO2022120722A1 (en) 2022-06-16

Family

ID=81973005

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/135284 WO2022120722A1 (en) 2020-12-10 2020-12-10 Resource scheduling apparatus, digital signal processor and movable platform

Country Status (1)

Country Link
WO (1) WO2022120722A1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014172475A1 (en) * 2013-04-18 2014-10-23 Alibaba Group Holding Limited Method and device for scheduling virtual disk input and output ports
CN104699631A (en) * 2015-03-26 2015-06-10 中国人民解放军国防科学技术大学 Storage device and fetching method for multilayered cooperation and sharing in GPDSP (General-Purpose Digital Signal Processor)
CN108647007A (en) * 2018-04-28 2018-10-12 天津芯海创科技有限公司 Arithmetic system and chip

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014172475A1 (en) * 2013-04-18 2014-10-23 Alibaba Group Holding Limited Method and device for scheduling virtual disk input and output ports
CN104699631A (en) * 2015-03-26 2015-06-10 中国人民解放军国防科学技术大学 Storage device and fetching method for multilayered cooperation and sharing in GPDSP (General-Purpose Digital Signal Processor)
CN108647007A (en) * 2018-04-28 2018-10-12 天津芯海创科技有限公司 Arithmetic system and chip

Similar Documents

Publication Publication Date Title
CN1026733C (en) Multi-media signal processor computer system
US8392635B2 (en) Selectively enabling a host transfer interrupt
EP3614253A1 (en) Data processing method and storage system
US8310880B2 (en) Virtual channel support in a nonvolatile memory controller
US6868087B1 (en) Request queue manager in transfer controller with hub and ports
CN113468084B (en) Multimode DMA data transmission system
JP2511590B2 (en) Channel connection device
US10241946B2 (en) Multi-channel DMA system with command queue structure supporting three DMA modes
WO2016127552A1 (en) Direct memory access (dma) controller and data transmission method
JPS61109164A (en) Bus control
US7836221B2 (en) Direct memory access system and method
US10776042B2 (en) Methods for garbage collection and apparatuses using the same
CN110716691B (en) Scheduling method and device, flash memory device and system
US7673076B2 (en) Concurrent read response acknowledge enhanced direct memory access unit
CN100547572C (en) Dynamically set up the method and system of direct memory access path
CN111290983A (en) USB transmission equipment and transmission method
WO2022120722A1 (en) Resource scheduling apparatus, digital signal processor and movable platform
US20130042043A1 (en) Method and Apparatus for Dynamic Channel Access and Loading in Multichannel DMA
JPH04237354A (en) Device information interface
CN115878517A (en) Memory device, operation method of memory device, and electronic device
US10002099B2 (en) Arbitrated access to resources among multiple devices
CN112532531A (en) Message scheduling method and device
CN111124987B (en) PCIE-based data transmission control system and method
EP3945407A1 (en) Systems and methods for processing copy commands
US11194514B2 (en) Just in time data placement in NAND flash

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20964660

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20964660

Country of ref document: EP

Kind code of ref document: A1