WO2012088930A1 - 触发操作方法、多核分组调试方法、装置及系统 - Google Patents

触发操作方法、多核分组调试方法、装置及系统 Download PDF

Info

Publication number
WO2012088930A1
WO2012088930A1 PCT/CN2011/079840 CN2011079840W WO2012088930A1 WO 2012088930 A1 WO2012088930 A1 WO 2012088930A1 CN 2011079840 W CN2011079840 W CN 2011079840W WO 2012088930 A1 WO2012088930 A1 WO 2012088930A1
Authority
WO
WIPO (PCT)
Prior art keywords
group
core
trigger
identifier
message
Prior art date
Application number
PCT/CN2011/079840
Other languages
English (en)
French (fr)
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 EP11853041.9A priority Critical patent/EP2562650A4/en
Publication of WO2012088930A1 publication Critical patent/WO2012088930A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to a trigger operation method, a multi-core packet debugging method, apparatus, and system. Background technique
  • Multicore refers to a chip or target board that contains two or more logical devices of executable code, such as a Central Processing Unit (CPU), Digital Signal Processing (DSP). Field Programmable Gate Array (FPGA). That is, the multi-core system environment involves both isomorphic and heterogeneous kernels. Due to the increasing complexity of the system, many multi-core environments have many debugging challenges.
  • CPU Central Processing Unit
  • DSP Digital Signal Processing
  • FPGA Field Programmable Gate Array
  • multi-channel debugging is essentially a collection of multiple single-core debugging, that is, multiple debuggers are used to complete the debugging of the corresponding single core.
  • Embodiments of the present invention provide a trigger operation method, a multi-core packet debugging method, apparatus, and system to enhance flexibility and efficiency of multi-core debugging.
  • an embodiment of the present invention provides a method for triggering operations, the method comprising:
  • an embodiment of the present invention provides a multi-core processor system, where the multi-core processor system includes a main control core and a plurality of operation cores, and the main control core and the plurality of operation cores communicate through an inter-core interconnection bus. , among them,
  • the master control core is configured to transmit, by using the inter-core interconnect bus, a trigger operation operation message or an inter-core communication interruption to the trigger operation operation message, where the trigger operation pair message includes a trigger identifier trigger id and operation domain information. ;
  • the operation core is configured to receive the trigger operation pair message, or obtain the trigger operation pair message according to the received inter-core communication interruption, and trigger the trigger identifier to the trigger identifier in the message and the core identifier stored in the core.
  • the trigger identifier trigger id is matched, and if the matching is successful, the operation action indicated by the trigger operation on the operation domain information in the message is performed.
  • an embodiment of the present invention provides a processor core, where the processor core includes: a storage unit, configured to store one or more trigger identifiers, a trigger id, where the trigger identifier Core group, or the processor core; An acquiring unit, configured to acquire a trigger operation pair message, where the trigger operation pair message includes a trigger flag ig and an operation domain information;
  • a matching unit configured to match a trigger identifier id in the trigger operation pair message with a trigger identifier trigger id stored in the storage unit;
  • a processing unit configured to obtain, in the matching unit, the trigger identifier trigger id in the trigger operation pair message and a trigger identifier trigger id stored in the storage unit, and perform the operation domain information in the trigger operation pair message The indicated action act ion.
  • an embodiment of the present invention provides a multi-core packet debugging method, which is applied to a multi-core processor system including at least two processor cores, where the method includes:
  • the second debug message includes a group identifier group id and operation domain information
  • an embodiment of the present invention provides a debugging system, where the debugging system includes front-end debugging. And a back-end debugging platform, where the back-end debugging platform is deployed with a multi-core processor system, the multi-core processor system includes a master core and a plurality of operating cores, and the master core and the plurality of operating cores pass the core Inter-connected bus communication, wherein
  • the front-end debugger is configured to receive a debug command issued by a user, convert the debug command into a corresponding first debug message, and send the command to the master control core, where the first debug message includes a group identifier group id and an operation domain.
  • the master control core is configured to, after receiving the first debug message, convert to a second debug message that can be identified by the inter-core communication, and send the second debug message or point to the second by using the inter-core interconnect bus. Inter-core communication interruption of debug messages;
  • the operation core is configured to receive the second debug message or obtain the second debug message according to the received inter-core communication interrupt, and set the group identifier group id in the second debug message to the group stored in the core.
  • the group id is matched, and if the matching is successful, the operation act ion indicated by the operation domain information in the second debug message is executed, where the group identifier group id stored in the operation core is used to indicate that the operation core belongs to Nuclear group.
  • the embodiment of the present invention is based on the flexible core group of the processor core, by using the group identifier group id in the obtained second debug message and the group identifier stored in the current processor core (that is, the group identifier group id is used to represent The matching of the core group to which the current processor core belongs is performed. If the group identifier group id in the second debug message matches the group identifier group id stored in the current processor core, the second debug message is executed.
  • the operation act ion indicated by the operation domain information is implemented to enable synchronous debugging of one or more processor cores included in the same core group, thereby enhancing the flexibility and efficiency of multi-core debugging.
  • FIG. 1 is a schematic diagram of the principle of multi-core debugging using multi-channel technology in the prior art
  • FIG. 1 is a schematic diagram of a logical structure of a multi-core processor system according to an embodiment of the present invention
  • FIG. 2a is a multi-core processing according to an embodiment of the present invention
  • FIG. 2b is a schematic structural diagram of another multi-core processor system according to an embodiment of the present invention
  • FIG. 2c is a schematic flowchart diagram of a trigger operation method according to an embodiment of the present invention
  • 3a is a schematic structural diagram of a debugging system according to an embodiment of the present invention.
  • FIG. 3 is a schematic structural diagram of a processor core according to an embodiment of the present invention
  • FIG. 4 is a schematic flowchart of a multi-core packet debugging method according to an embodiment of the present invention
  • FIG. 5b is a schematic diagram of a core group scenario of a multi-core packet debugging method according to an embodiment of the present invention
  • FIG. 5c is a schematic diagram of a hardware group table and a software group table after a core group is created in the core group scenario of FIG. 5b;
  • 6a is a schematic diagram of interaction of a multi-core packet debugging method according to an embodiment of the present invention.
  • FIG. 6b is a schematic diagram of a state of the latest core group of the multi-core processor system of FIG. 6a;
  • FIG. 7a is a schematic diagram of interaction of a multi-core group debugging method according to an embodiment of the present invention.
  • Figure 7b is a schematic diagram of the latest core group of the multi-core processor system of Figure 7a;
  • Figure 8 is a schematic diagram of a monitoring scenario according to an embodiment of the present invention.
  • the technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention.
  • the embodiments are a part of the embodiments of the invention, and not all of the embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
  • the multi-core processor system of the embodiment of the present invention includes: multiple processor cores CoreO, Corel, Core2 ... , CoreX, where CoreO is the master core, Corel, Core2..., CoreX is the operation core, and the multiple processor cores communicate through the inter-core interconnect bus, where:
  • the master core CoreO is configured to transmit, by the inter-core interconnect bus, an Inter-Proces sor Communication (IPC) interrupt that triggers an operation pair message or a message directed to the trigger operation, wherein the trigger operation pair message
  • IPC Inter-Proces sor Communication
  • the triggering identifier trigger id and the operation domain information are included.
  • the master core here may be a processor core that is dynamically specified in the pre-designation or application process and used to trigger the operation to forward the message.
  • CoreO is an example, it should be understood that this includes but is not limited to CoreO.
  • the IPC interrupt points to the trigger operation pair message or the address space of the message storing the trigger operation pair.
  • the IPC interrupt herein includes a pointer to the trigger operation pair message, and after the operation core receives the IPC interrupt, the trigger operation pair message is obtained according to the pointer included in the IPC interrupt.
  • the pointer included in the IPC interrupt points to a corresponding address space of the shared memory of the multi-core processor system, where the trigger operation cancellation of the core core CoreO is stored in the address space.
  • the information is the trigger-action message; or, the pointer contained in the IPC interrupt points to the corresponding address space of the register in the core of the master processor, and the address space stores the trigger operation message of the master core CoreO, that is, the trigger-action Message
  • the operation core Corel, Core2..., CoreX is configured to receive the trigger operation pair message, or obtain the trigger operation pair message according to the received inter-core communication interruption, and trigger the trigger operation on the trigger identifier in the message. Matching with the trigger identifier trigger id stored in the core, if the matching is successful, performing the action act indicated by the triggering operation on the operation domain information in the message.
  • the trigger identifier trigger id in the trigger operation is a group identifier group id, or a core identifier core id; wherein the group identifier group id indicates that the trigger operation needs to be performed in the message a core group of the operation action indicated by the operation domain information; the core identifier core id represents a processor core that needs to perform an operation action indicated by the operation domain information; and the operation domain information in the trigger operation pair message is an operation act
  • the multi-core processor system of the embodiment of the present invention can be applied to scenarios such as performance analysis and monitoring of multi-core programs.
  • scenarios such as performance analysis and monitoring of multi-core programs.
  • monitoring scenario is an example of application to the monitoring scenario:
  • an operation core in the multi-core processor system of the embodiment of the present invention further has a role of a monitoring core.
  • Core4 is further configured to store a group identifier of the core group to be monitored.
  • the group identifier of the core group to which the master core belongs, and the group identifier for the core group to which the core group to be monitored and the core group to which the master core belongs are monitored, and between the master core and the core group to be monitored are monitored.
  • the triggering operation interacts with the message, wherein the group identifier stored in the operation core is used to indicate the core group to which the operation core belongs.
  • the trigger identifier in the message is triggered by the trigger operation.
  • the tr igger id is a group identification group id, and the group identification group id indicates a case where it is necessary to perform a core group of the operation act indicated by the operation domain information in the message.
  • the master-control core and the core group communicate by sending a trigger-operation message pair through the inter-core interconnect bus.
  • the monitoring core adds the groupl core group number and the master core group number to the core hardware group table or the software group table, so that the monitoring core can monitor the trigger-operation message interaction between the master core and the core group groupl, or Accurately get the start and end time of an operation, so as to get the precise timing of the parallel program, which is convenient for the performance analysis of the parallel program.
  • the core core CoreO is specifically configured to be interconnected by the core after receiving the first debug message. Transmitting a converted second debug message or an Inter-Proces sor Communicating (IPC) interrupt to the second debug message, where the second debug message includes a group identifier group id and an operation domain information , the group id represents a core group that needs to perform an operation act ion indicated by the act ion information;
  • IPC Inter-Proces sor Communicating
  • the operation core Corel, Core2..., CoreX is specifically configured to receive the second debug message from the inter-core interconnect bus or obtain the second debug message according to the received IPC interrupt, and identify the group identifier in the second debug message.
  • the group id is matched with the group table stored in the processor core. If the matching is successful, the operation ac t ion indicated by the operation domain information in the second debug message is executed, where the group table stored in the processor core is And including at least one group identifier group id, where the group identifier group id is used to indicate a core group to which the processor core belongs.
  • CoreO is not only the role of the master core that forwards the second debug message, but also belongs to the role of the operation core.
  • the core core CoreO is further used to obtain the group identifier group in the second debug message.
  • the id is matched with the group table stored in the processor core. If the matching is successful, And performing an operation indication indicated by the operation domain information in the second debug message, where the group table stored in the processor core includes at least one group identifier group id, and the group identifier group id is used to represent the present The core group to which the processor core belongs.
  • a core group may be used to perform the work of the master core.
  • a group of cores is used as the master core to balance the traffic of the master core. And you can achieve the effect of mutual backup.
  • the trigger id in the message is matched with the trigger id stored in the current processor core, and if the matching is successful, the trigger operation is performed. Acting on the operation indicated by the operation domain information in the message to enable synchronization of one or more processor cores belonging to a state or attribute, where one or more processor cores belonging to the same state or attribute are used.
  • a trigger id identifies the flexibility and efficiency of multi-core triggering, especially the flexibility and efficiency of multi-core sync triggering.
  • the embodiment of the present invention is based on the flexible core group of the processor core, by using the group identifier group id in the acquired second debug message and the group identifier stored in the current processor core.
  • the group identifier id is used to indicate that the current processor core belongs to the core group. If the group identifier group id in the second debug message matches the group identifier group id stored in the current processor core, And performing an operation action indicated by the operation domain information in the second debug message to implement synchronous debugging of one or more processor cores included in the same core group, thereby enhancing flexibility and efficiency of multi-core debugging, In particular, it enhances the flexibility and efficiency of multi-core packet debugging.
  • FIG. 2a is a schematic structural diagram of a multi-core processor system according to an embodiment of the present invention.
  • a queue port queue port is used to implement an inter-core interconnect bus.
  • FIG. 2a the multi-core of the embodiment of the present invention is shown in FIG.
  • the processor system includes: CoreO, Corel, Core2, Core3, Core4, wherein, 4, CoreO is the core of the core, Corel, Core2, Core3, Core4 are the operation cores, and the plurality of processor cores are connected into a ring.
  • the debug message is transmitted through the queue port.
  • a token in the ring is sequentially transmitted between the cores along the queue port to control the queue port. Only one core can be exclusively occupied at the same time. When the ring core is idle, the token is looped. Go on. The kernel can only send debug messages after obtaining the token.
  • the coreO sends a debug message, receives the debug message, and processes the debug message, and transmits the debug message to the next core core2 through the queue port, and sequentially.
  • the specific process of processing the debug message by receiving the debug message is that after the corel receives the debug message, the debug message is saved in its cache, and the Group ID and the hardware core group table included in the debug message are Matching, if the matching is successful, perform the act of the action included in the debug message; if the match is unsuccessful, continue to match the software core group table, if the match is successful, execute the action operation included in the debug message, and The debug message is taken out of the cache and sent to the next core through the queue port.
  • FIG. 2 is a schematic structural diagram of another multi-core processor system according to an embodiment of the present invention.
  • an inter-core communication bus is implemented by using IPC (Inter-process communication), and the present invention is required to be described.
  • the embodiment can use the IPC to distribute commands to multiple cores at the same time.
  • Each core receives the IPC interrupt and processes it immediately and enters the debugging state to achieve the purpose of multi-core synchronous debugging.
  • the multi-core processor system of the embodiment of the present invention Including: CoreO, Corel, Core2, Core3... CoreX, 4 set CoreO as the core, Corel, Core2, Core3...
  • CoreX Core in which CoreO receives the debug message, CoreO sets the corresponding bit position of all cores of the IPC target register, so all cores will receive an IPC interrupt, and the IPC interrupt contains a pointer to the debug message, and each core receives After the IPC is interrupted, the debug message sent by the coreO is found according to the pointer to the debug message, and the Group ID included in the debug message is matched with the core group table stored by itself. If the match is successful, the debug message is included. Act ion operation, processing results stored in CoreO, Corel, Core2, Core 3 - CoreX shared memory, if the match is not successful, then do nothing, Figure 2b with CoreX example.
  • FIG. 2c is a schematic flowchart of a method for triggering operations according to an embodiment of the present invention. The method may be applied to a processor core in a multi-core processor system as shown in FIG. 2, as shown in FIG. 2c. Including the following steps:
  • S20 acquiring a trigger operation pair message, where the trigger operation pair message includes a trigger identifier t r igger id and operation domain information;
  • the trigger operation pair message sent by the master processor core is received from the inter-core interconnect bus; or, according to the inter-core communication interrupt received from the inter-core interconnect bus, the obtained by the master processor core is obtained. Trigger action on the message.
  • the trigger identifier tr igger id in the trigger operation pair message in the S201 is a group identifier group id, or a core identifier core id; wherein the group identifier group id indicates that the trigger operation needs to be performed on the operation in the message.
  • the core id indicates a processor core that needs to perform an operation action indicated by the operation domain information;
  • the operation domain information in the trigger operation pair is an operation action command, or an address information pointing to an operation action command, where
  • the operation act ion command includes one or more of a create group command, a delete group command, a stop group command, a run group command, a break command set break, a restart command resume, and a step command step.
  • the triggering operation trigger id in the trigger operation is matched with the trigger identifier trigger id stored in the current processor core; if the matching is successful, then step S203;
  • S203 Perform an operation action indicated by the triggering operation on the operation domain information in the message.
  • the triggering operation trigger id in the triggering operation message is matched with the triggering identifier trigger id stored in the current processor core, and if the matching is successful, performing the triggering operation in the message.
  • the action actions indicated by the action domain information including:
  • the method further includes:
  • the method further includes: Determining whether the number of core groups to which the current processor core belongs is greater than a first threshold, and if the number of core groups is greater than the first threshold, performing the triggering identifier tr igger id in the trigger operation pair message and current processing The step of matching the trigger identifier tr igger id stored in the memory of the core.
  • the trigger identifier tr igger id in the trigger operation pair message is a group identifier group id
  • the trigger identifier stored in the current processor core is a group identifier group id
  • the group identifier group id is used. Representing the core group to which the current processor core belongs;
  • the group identifier id in the obtained trigger operation pair message is a global core group identifier
  • the operation domain information is a create group command, where the group command is created.
  • the group operation identifier of the obtained trigger operation pair message is the first core group identifier
  • the operation domain information is a stop group command, or the pointing is stopped. Address information of the group command;
  • the group identifier id in the obtained trigger operation pair message is the first core group identifier, and the operation domain information is a running group command, or is directed to run. Address information of the group command;
  • the group identifier id in the message is the first core group identifier
  • the operation domain information is a delete group command, or the deletion is directed to the deletion.
  • the address information of the group command is the first core group identifier
  • the triggering identifier trigger id in the triggering operation message is a global core group identifier
  • the operation domain information is a group creation command, or an address information that points to the creation group command, where the creation group command includes Create a group ID of the core group and join the core of the member core of the core group to be created Identification
  • the step S203 includes: when the core identifier of the member core that is added to the core group to be created included in the creation group command is the same as the core identifier of the current processor core, according to the creation The group command stores the group identifier of the core group to be created included in the create group command.
  • step S203 includes: obtaining the create group command according to the address information;
  • the core group to be created included in the create group command is executed according to the create group command.
  • the group ID is stored.
  • the trigger identifier tr igger id in the trigger operation pair message is a group identifier group id
  • the trigger identifier stored in the current processor core is a group identifier group id
  • the group identifier group id is used to represent the current processor.
  • step S203 includes:
  • the step S203 includes: obtaining the deletion group command according to the address information;
  • the trigger operation method provided by the embodiment of the present invention matches the tr igger id in the message with the tr igger id stored in the current processor core by using the obtained trigger operation. If the matching succeeds, the operation action indicated by the operation domain information in the message is performed to implement the synchronous triggering of one or more processor cores belonging to a state or attribute, where the same state or attribute belongs.
  • One or more processor cores use the same trigger id identifier to enhance the flexibility and efficiency of multi-core triggering, especially to enhance the flexibility and efficiency of multi-core synchronous triggering.
  • FIG. 3 is a schematic structural diagram of a debugging system according to an embodiment of the present invention.
  • the debugging system of the embodiment of the present invention includes a front end debugger 311 and a back end debugging platform 312, and the back end debugging platform 32 is deployed with a multi-core processor.
  • the multi-core processor system includes a master core (illustrated by coreO in FIG. 3a) and a plurality of operation cores (indicated by Corel, Core2, Core3-CoreX in the figure), the master core and multiple operation cores Communication through the inter-core interconnect bus, where
  • the front-end debugger 311 is configured to receive a debug command issued by a user, convert the debug command into a corresponding first debug message, and send the debug command to the master control core, where the first debug message includes a group identifier group id and Operation i or information, the group identifier group id represents a core group that needs to perform the operation act ion indicated by the act ion information;
  • the master core CoreO is configured to, after receiving the first debug message, convert to a second debug message that can be identified by the inter-core communication, and send the second debug message or point to the first Inter-Proces sor Communicating (IPC) interrupts;
  • IPC Inter-Proces sor Communicating
  • the master core here can be a processor core that is dynamically specified in the pre-specified or debugging process and used for debugging message forwarding.
  • the embodiment of the present invention is exemplified by CoreO, and it should be understood that this includes, but is not limited to, CoreO.
  • the operation core Corel, Core2_, CoreX is configured to receive the second debug message from the inter-core interconnect bus or obtain the second debug message according to the received IPC interrupt, and the second debug message is sent
  • the group identifier group id is matched with the group identifier group id stored in the core, and if the matching is successful, the operation act ion indicated by the operation domain information in the second debug message is executed, where the operation core is
  • the stored group ID group id is used to indicate the core group to which this operation core belongs. It should be noted that one or more group identifiers group id are stored in the operation core.
  • CoreO is not only the role of the master core that forwards debug messages, but also belongs to the role of the master core;
  • the master core CoreO is further configured to match the group identifier group id in the second debug message with the group identifier group id stored in the processor core. If the matching succeeds, the second debug message is executed.
  • the operation ac t ion indicated by the operation domain information in which the group identifier group id stored in the processor core is used to indicate the core group to which the processor core belongs.
  • the operation domain information may be an action command itself, or may be an address information directed to an action command, where the ac t ion command includes a create group command, a stop group command, and a run group command. , one of the break (the command to set a breakpoint), resume or cont inue (the command to restart), s tep (the command to execute one step).
  • the debugging system is based on the flexible core group of the processor core, by using the group identifier group id in the obtained second debugging message and the group identifier stored in the current processor core (the group identifier group The id is used to indicate that the current processor core belongs to the core group, and if the group identifier group id in the second debug message matches the group identifier group id stored in the current processor core, the execution is performed.
  • An operation act ion indicated by the operation domain information in the second debug message so as to enable synchronization of one or more processor cores included in the same core group, thereby enhancing flexibility and efficiency of multi-core debugging, especially for enhancing multi-core The flexibility and efficiency of group debugging.
  • FIG. 3b is a schematic structural diagram of a processor core according to an embodiment of the present invention. As shown in FIG. 3ab, the processor core includes:
  • the storage unit 321 is configured to store one or more trigger identifiers, where the trigger id indicates a core group to which the processor core belongs, or the processor core;
  • the obtaining unit 322 is configured to obtain a trigger operation pair message, where the trigger operation pair message includes a trigger trigger id and operation domain information;
  • the matching unit 323 is configured to match the trigger identifier trigger id in the trigger operation pair message with the trigger identifier trigger id stored in the storage unit.
  • the processing unit 324 is configured to obtain, in the matching unit, that the trigger identifier trigger id in the trigger operation pair message is successfully matched with a trigger identifier trigger id stored in the storage unit, and execute the trigger operation on the operation domain in the message The action action indicated by the message. It should be noted that the processing unit 324 is generally implemented in software, which is equivalent to a software code instruction for reading a special function by a general-purpose processor core.
  • the obtaining unit 322 is specifically configured to receive a trigger operation pair message from the inter-core interconnect bus, or specifically, to receive an inter-core communication interrupt directed to the trigger operation pair message from the inter-core interconnect bus. And obtaining the trigger operation pair message sent by the master processor core according to the inter-core communication interruption.
  • storage unit 321 includes registers and/or memory.
  • the matching unit 323 includes:
  • a hardware matching unit configured to match a trigger identifier trigger id in the trigger operation message with a trigger identifier trigger id stored in the register, if the trigger operation identifies a trigger identifier in the message and the register Trigger identifier trigger id stored in If the matching is successful, the processing unit is triggered to perform the operation action indicated by the operation domain information in the message.
  • the hardware matching unit may be a hardware matcher or a hardware comparator. It should be noted that the register may be integrated inside the hardware matcher or the hardware comparator, or may be hardware independent of the hardware matcher or the hardware comparator.
  • a software matching unit configured to match, in the hardware comparison unit, the trigger identifier trigger id in the trigger operation to the trigger identifier trigger id stored in the memory, if the trigger operation pair message If the trigger identifier trigger id in the memory is successfully matched with a trigger identifier trigger id stored in the memory, the processing unit is triggered to perform the operation acti on indicated by the triggering operation on the operation domain information in the message.
  • the processor core further comprises:
  • a calculation determiner (not shown) for determining whether the number of core groups to which the processor core belongs is greater than a first threshold
  • the software matching unit is specifically configured to: when the hardware comparison unit matches unsuccessfully and the number of the core group is greater than the first threshold, the trigger identifier in the message is stored in the message and stored in the memory The triggering identifier trigger id is matched, if the triggering operation triggers the trigger identifier in the message to match the trigger identifier trigger id stored in the memory, the processing unit is triggered to execute the triggering operation in the message. Operational action indicated by the operation domain information 0
  • the trigger operation method provided by the embodiment of the present invention matches the trigger id of the obtained trigger operation with the trigger id stored in the current processor core, and if the matching is successful, the trigger operation is performed in the message.
  • the operation action indicated by the operation domain information is implemented to synchronously trigger one or more processor cores belonging to a state or attribute, where one or more processor cores belonging to the same state or attribute are identified by the same trigger id
  • the flexibility and efficiency of core triggering especially the flexibility and efficiency of multi-core synchronous triggering.
  • 4 is a schematic flowchart of a method for debugging a multi-core packet according to an embodiment of the present invention. The method may be applied to a processor core in a multi-core processor system as shown in FIG. 2, as shown in FIG. It can include the following steps:
  • S401 Obtain a second debug message, where the second debug message includes a group identifier group id and operation domain information.
  • the second debug message sent by the master processor core is received from the inter-core interconnect bus; or, according to the inter-core communication interrupt received from the inter-core interconnect bus, the obtained by the master processor core is obtained.
  • the second debug message is sent by the master control processor to the second debug message on the inter-core interconnect bus in response to the first debug message sent by the user.
  • the operation domain information in the second debugging message is an operation act ion command, or an address information that points to an operation act ion command, where the act ion command is a create group command, a stop group command, and a run group command. , set the breakpoint command break, restart the command resume, execute one step of the command s tep one or more.
  • step S402 Match the group identifier group id in the second debug message with the group identifier in the group table stored in the current processor core, if the group identifier gr oup id in the second debug message is related to the group If the group identifier group id in the table matches successfully, go to step S401;
  • the second debug message includes multiple group ids, it indicates that the cores with multiple intersections between the multiple core groups indicated by the group id are debugged.
  • the operation act ion indicated by the operation domain information in the second debug message is executed, where the group table stored in the current processor core includes at least one group identifier group id, and the group identifier group id is used to represent The core group to which the current processor core belongs.
  • the group table includes a hardware group table and a software group table, where the hardware group table is stored in a hardware register of the current processor core, and the software group table is stored in the current In the memory of the processor core;
  • the matching the group identifier group id in the second debug message with the group identifier in the group table stored in the current processor core, if the group identifier group id in the second debug message and the group table If the group identifier gr oup id is successfully matched, performing the operation ac t ion indicated by the operation domain information in the second debug message includes:
  • the group identifier group id in the second debugging message is matched with the group identifier in the software group table, and if the matching is successful, the operation domain information in the second debugging message is executed. Indicated operation ac t ion.
  • the group identifier id in the second debug message is a global core group identifier
  • the operation domain information is a create group command.
  • the group command, step S403 includes:
  • the core group to be created included in the create group command is executed according to the create group command.
  • step S403 includes: Obtaining the create group command according to the address information;
  • the core group to be created included in the create group command is executed according to the create group command.
  • the group ID is stored. It should be noted that there is a special register in each processor core for storing the core identifier of the processor core, such as the Core ID.
  • step S403 includes: storing from the current processor core according to the delete group command.
  • the at least one group identifier group id deletes the group identifier group id in the trigger operation pair message;
  • the step S403 includes: obtaining the deletion group command according to the address information;
  • the group identifier group id in the trigger operation pair message from at least one group identifier group id stored in the current processor core. It is also possible to perform operations on a particular core; if only one specific core needs to be operated, that particular core constitutes a core group.
  • the multi-core packet debugging method provided by the embodiment of the present invention is based on the flexible core group of the processor core, by using the group identifier group id in the obtained second debug message and the group identifier stored in the current processor core (the group)
  • the group id is used to indicate that the current processor core belongs to the core group to be matched. If the group identifier group id in the second debug message matches the group identifier group id stored in the current processor core, the execution is performed.
  • An operation ac t ion indicated by the operation domain information in the second debug message to implement synchronous debugging of one or more processor cores included in the same core group, thereby enhancing flexibility and efficiency of multi-core debugging, in particular Is the flexibility to enhance multi-core packet debugging And efficiency.
  • the embodiment of the present invention implements cross-core debugging between multiple cores of different architectures, and is not limited to homogeneous and heterogeneous kernels, thereby implementing coordinated debugging of the entire system.
  • the method of the embodiment of the present invention is described in detail below in conjunction with practical applications:
  • FIG. 5a is a schematic diagram of interaction of a multi-core group debugging method according to an embodiment of the present invention.
  • This embodiment mainly introduces: dynamically creates a core group composed of multiple cores at runtime (ie, sets a group to which a processor core belongs, each The core can be set to belong to multiple groups.
  • the example of the core group scenario is shown in Figure 5b.
  • the figure shows the core group of a multi-core system with 14 cores (including 2 CPUs and 12 DSPs), where:
  • CPUO CPU1
  • core groups 1 All CPUS (CPUO, CPU1) are divided into core groups 1;
  • Core Group 4 DSP5, DSP6, DSP7; Core Group 3 and Core Group 4 are both subsets of Core Group 2; Core Group 5: DSP8, DSP9, DSP10;
  • Core group 7 DSP2, DSP5, DSP8, DSP11; intersection of core group 7 and core group 3 is DSP2; core group 8: CPU1, DSP3, DSP4, which is a heterogeneous core composed of one CPU core and two DSP cores group.
  • the method is applied to the debugging system environment as shown in FIG. 3a, and specifically includes the following steps:
  • the user sends a command to create a core group 1;
  • the debugger HDB After the debugger HDB receives the command to create the core group 1, it sends a core group 1 RSP to the master core. Packet (RSP, remote serial protocol, protocol used by HDB remote debugging); in this embodiment, the master core is coreO;
  • the trigger operation pair message includes: Trigger id: all, Action: "add group group-1 0, 1" (For the format, please refer to: add group groupid coreid [, coreid [,.. ]] ), Trigger id is all, which means that the trigger operation pair message is sent to all cores;
  • Trigger id all represents the global core group identifier, which means that, by default, each core in the system belongs to the global core group.
  • the Trigger id is set to Oxf f f f f f f f f f, that is, the al 1 core group.
  • Each core receives the trigger operation pair message, where the Trigger id is Oxffffffff, and each core defaults to succeed, directly performs an action operation, and p directly executes Act ion: "add group group-1 0, 1";
  • the Trigger id is Oxffffffffff, and each core defaults to succeed, directly performs an action operation, and p directly executes Act ion: "add group group-1 0, 1";
  • CoreO Core 1 enhances the core group 1 to its own trigger id table;
  • the content of the Action operation may be on the inter-core interconnect bus, included in the trigger operation to pass the message, or may only pass the trigger operation pair message containing the address information pointing to the action operation, for the latter implementation, receiving The core of the trigger operation pair message obtains the content of the Act ion operation through the address information.
  • group-1 in the embodiment of the present invention should only include CoreO.
  • the group_1 in the embodiment of the present invention includes CoreO and Corel, and the core group can be used to perform the work of the master core.
  • the equilibrium master Control the traffic of the core. And you can achieve the effect of mutual backup.
  • the master control core After receiving the reply of all the cores in the core group, the master control core sends a virtual group 1 successful RSP packet to the HDB.
  • HDB shows the creation of a nuclear group 1 successful message to the user.
  • the user sends a command to create a core group 2;
  • the debugger HDB sends a core group 2 RSP packet to the master core after receiving the command to create the core group 2; in this embodiment, the master core is coreO;
  • the trigger operation pair message includes: Trigger id: all, Action: "add group group-2 2, 3- 13", Trigger id is all, which means sending the trigger operation pair message to all cores;
  • the Trigger id is set to Oxf f f f f f f f f f, that is, the al 1 core group.
  • Each core receives the trigger operation pair message, where the Trigger id is Oxfffffffff, and the default matching of each core is successful, and each core directly performs an action operation, that is, directly executes Ac ti on: "add group group-2 2, 3. ..13";
  • Core2, 3-13 increase the core group 2 to its own trigger id table
  • the master control core After receiving the reply of all the cores in the core group, the master control core sends a virtual group 1 successful RSP packet to the HDB.
  • HDB shows the message that the creation of the core group 2 is successful to the user.
  • the user sends a command to create a core group 3;
  • the debugger HDB After the debugger HDB receives the command to create the core group 3, it sends a core group 3 RSP to the master core.
  • Package in this embodiment, the master core is coreO;
  • the trigger operation pair message includes: Trigger id: all, Action: "add group group-3 2, 3 4", Trigger id is all, which means that the trigger operation pair message is sent to all cores; specifically, the Trigger id is set to Oxf fffffff, that is, the al 1 core group.
  • Each core receives the trigger operation pair message, where the Trigger id is Oxfffffffff, and the default matching of each core is successful, and each core directly performs an action operation, that is, directly executes Ac ti on: "add group group-3 2, 3, 4,,;
  • Core2, 3, 4 adds the core group 3 to its own trigger id table
  • Core2, 3, 4 points, 'J responds to the master core trigger id: group-1, action: "coreid add group-3 ok” , where coreid is divided into other core2, core3, core4;
  • the master control core After receiving the reply of all the cores in the core group, the master control core sends a virtual group 3 successful RSP packet to the HDB.
  • HDB shows the creation of a nuclear group 3 successful message to the user.
  • the user sends a command to create a core group 4;
  • the debugger HDB sends a core group 4 RSP packet to the master core after receiving the command to create the core group 4; in this embodiment, the master core is coreO;
  • the trigger operation pair message includes: Trigger id: all, Action: "add group group-4 5, 6 , 7", Trigger id is all, which means that the trigger operation pair message is sent to all cores; specifically, the Trigger id is set to Oxf fffffff, that is, the al 1 core group.
  • Each core receives the trigger operation pair message, where the Trigger id is Oxffffffff, and the default matching of each core is successful, and each core directly performs act ion operation.
  • Core5, 6, 7 adds the core group 4 to its own trigger id table
  • the master control core After receiving the reply of all the cores in the core group, the master control core sends a successful core group RSP packet to the HDB.
  • HDB shows the creation of a nuclear group 4 successful message to the user
  • the user sends a command to create a core group 5;
  • the debugger HDB sends a core group 5 RSP packet to the master core after receiving the command to create the core group 5; in this embodiment, the master core is coreO;
  • the trigger operation pair message includes: Trigger id: all, Action: "add group group-58, 9, 10", Trigger id is all, which means that the trigger operation pair message is sent to all cores; specifically, the Trigger id is set to Oxf fffffff, that is, the al 1 core group.
  • Each core receives the trigger operation pair message, where the Trigger id is Oxffffffff, and the default matching of each core is successful, and each core directly performs an act operation, that is, directly executing the action: “add” Group group-5 8, 9, 10";
  • the Core8, 9, 10 booster core group 5 is in its own trigger id table
  • the master control core After receiving the reply of all the cores in the core group, the master control core sends a successful RSP packet to the HDB to create a core group;
  • HDB displays a message for creating a success of the core group 5 to the user; 5561.
  • the user sends a command to create a core group 6;
  • the debugger HDB receives the create core group 6 command, and sends a core group 6 RSP packet to the master core; in this embodiment, the master core is coreO;
  • the trigger operation pair message includes: Trigger id: all, Action: "add group group-6 11, 12 , 13", Trigger id is all, which means sending the trigger operation pair message to all cores;
  • the Trigger id is set to Oxf f f f f f f f f f, that is, the al 1 core group.
  • Each core receives the trigger operation pair message, where the Trigger id is Oxfffffffff, and the default matching of each core is successful, and each core directly performs an act operation, that is, directly executing the action: "add Group group-6 11, 12, 13";
  • the Corell, 12, 13 booster core group 6 is in its own trigger id table
  • the master control core After receiving the reply of all the cores in the core group, the master control core sends a 6-node RSP packet to the HDB to create a core group;
  • HDB shows the creation of a nuclear group 6 successful message to the user
  • the user sends a command to create a core group 7;
  • the debugger HDB sends a core group 7 RSP packet to the master core after receiving the command to create the core group 7; in this embodiment, the master core is coreO;
  • the trigger operation pair message includes: Trigger id: all, Action: "add group group-7 2, 5 , 8, 11", Trigger id is all, which means sending the trigger operation to all cores Interest rate
  • the Trigger id is set to Oxf f f f f f f f f f, that is, the al 1 core group.
  • the core receives the trigger operation pair message, where the Trigger id is Oxffffffff, and the default matching of each core is successful, and each core directly performs an act operation, that is, directly executing the action: "add Group group-7 2, 5,8, 11";
  • the Core 2, 5, 8, 11 booster core group 7 is in its own trigger id table
  • the master control core After receiving the reply of all the cores in the core group, the master control core sends a successful core group 7 RSP packet to the HDB.
  • HDB shows that the creation of the core group 7 success message to the user
  • the user sends a command to create a core group 8;
  • the debugger HDB receives the create core group 8 command, and sends a core group 8 RSP packet to the master core; in this embodiment, the master core is coreO;
  • the trigger operation pair message includes: Trigger id: all, Action: "add group group-8 1, 3 4", Trigger id is all, which means that the trigger operation pair message is sent to all cores; specifically, the Trigger id is set to Oxf fffffff, that is, the al 1 core group.
  • the core receives the trigger operation pair message, where the Trigger id is Oxffffffff, and the default matching of each core is successful, and each core directly performs an act of an action, that is, directly executing the action: "add Group group-8 1, 3,4";
  • Corel, 3, 4 increases the core group 8 into its own trigger id table; S585, Corel, 3, 4 points, 'J replies to the master core with the trigger id: group-1, action: "coreid add group-8 ok" , where the coreid is ll for Corel, core3, core4;
  • the master control core After receiving the reply of all the cores in the core group, the master control core sends an active RSP packet to the HDB.
  • HDB shows the creation of a nuclear group 8 successful message to the user.
  • each core itself stores a corresponding trigger id table, which is used to store the group to which the core belongs.
  • each core has two tables, namely, a hardware group. a hardware group table and a software group table, wherein the hardware group table is stored in a hardware register of the current processor core, and the software group table is stored in the current processor core
  • the core group information is preferentially stored in the hardware group table
  • the hardware group table has a limited storage capacity, and generally can store four core group information, and is stored in the software group table when the hardware group table is full, thereby realizing the multi-core core group
  • FIG. 5c a schematic diagram of the hardware group table and the software group table after the core group is created in the core group scenario of FIG. 5b, it should be noted that, for the tube representation, the 14 core types are not distinguished here. .
  • FIG. 6 is a schematic diagram of interaction of a multi-core group debugging method according to an embodiment of the present invention.
  • This embodiment mainly introduces: dynamically deletes a core group Group7 composed of cores 2, 5, 8, 11 during operation, and the method is applied to In the debugging system environment shown in FIG. 3a, the following may specifically include the following steps:
  • the user sends a delete core group 7 command
  • the debugger HDB After receiving the command to delete the core group 7, the debugger HDB sends a delete core group 7 RSP packet (RSP, remote serial protocol, protocol used by HDB remote debugging) to the master core.
  • RSP delete core group 7 RSP packet
  • the master core is coreO; 5613.
  • the master core After receiving the delete core group 7 RSP packet, the master core sends a corresponding trigger operation pair message on the inter-core interconnect bus, where the trigger operation pair message includes: Trigger id: group-7, Action:
  • Trigger id is group-7, and the trigger operation pair message is sent to the core group 7;
  • the content of the Action operation may be on the inter-core interconnect bus, included in the trigger operation to pass the message, or may only pass the trigger operation pair message containing the address information pointing to the action operation, for the latter implementation, receiving The trigger operation on the core of the message uses the address information to obtain the content of the Action operation.
  • the implementation of the former is adopted, that is, the content of the Action operation is directly included in the trigger operation and transmitted in the message.
  • each core in the multi-core processor system (represented by coreX in this embodiment) matches the Trigger id in the message with the trigger id table stored in the core. If the Trigger id in the message is successfully matched with a Trigger id in the trigger id table, the trigger operation is performed on the action indicated by the Action field in the message; otherwise, no operation is performed;
  • each core (core 2, 5, 8, 11 ) of the core group 7 matches the received trigger operation pair Trigger id: group-7 in the message with the trigger id table stored in the core,
  • each core itself stores a corresponding trigger id table, where the trigger id table is used to store the group to which the core belongs.
  • each core has two tables, that is, hardware. Hardware Group Table and Software Group Table; See Figure 5c, which shows the hardware group tables and software for cores 2, 5, 8, 11 in the core group Grou P 7. Group table.
  • the embodiment grou P _l embodiment of the present invention include only CoreO.
  • the group_1 in the embodiment of the present invention includes CoreO and Corel, and the core group can be used to perform the work of the master core.
  • the core group can be used to perform the work of the master core.
  • a group of cores is used as the master core to balance the traffic of the master core. And you can achieve the effect of mutual backup.
  • the master control core After receiving the reply of all the cores in the core group, the master control core sends a delete core group 7 successful RSP packet to the HDB;
  • HDB shows the message of deleting the core group 7 success to the user.
  • the figure shows the latest core group of a multi-core processor system with 14 cores (including 2 CPUs and 12 DSPs) after deleting core group 7, specifically showing the deletion of core group 7 , the latest hardware group table and software group table for each of the 14 cores.
  • FIG. 7 is a schematic diagram of interaction of a multi-core group debugging method according to an embodiment of the present invention.
  • This embodiment mainly introduces: dynamically changing a member core in the core group Group3 during operation, specifically, modifying the core 2 in the core group Group3
  • the core 5 is taken as an example for explanation.
  • the method is applied to the debugging system environment as shown in FIG. 3a, and specifically includes the following steps:
  • the user sends a delete core group 3 command
  • the debugger HDB After receiving the command to delete the core group 3, the debugger HDB sends the delete core group 3 RSP to the master core.
  • Package RSP, Remote Serial Protocol, protocol used for HDB remote debugging.
  • the master core is coreO;
  • the master core After receiving the delete core group 3 RSP packet, the master core sends a corresponding trigger operation pair message on the inter-core interconnect bus, where the trigger operation pair message includes: Trigger id: group-3, Action:
  • Trigger id is group-3, and the trigger operation pair message is sent to the core group 3;
  • the content of the Action operation may be on the inter-core interconnect bus, included in the trigger operation to pass the message, or may only pass the trigger operation pair message containing the address information pointing to the action operation, for the latter implementation, receiving The trigger operation on the core of the message uses the address information to obtain the content of the Action operation.
  • the implementation of the former is adopted, that is, the content of the Action operation is directly included in the trigger operation and transmitted in the message.
  • each core in the multi-core processor system (represented by coreX in this embodiment) matches the Trigger id in the message with the trigger id table stored in the core. If the Trigger id matches the Trigger id in the trigger id table, the trigger operation is performed on the ac ti on operation indicated by the Ac ti on field in the message; otherwise, no operation is performed;
  • each core (core 2, 3, 4) of the core group 3 will receive the trigger operation on the Trigger id: group_3 in the message and the four igger id tables in the core.
  • the Trigger id: group-3 and the trigger id table ⁇ ; group 3 is successful, and the triggering operation performs the de 1 ete operation indicated by the Ac ti on field in the message;
  • each core itself stores a corresponding trigger id table, where the trigger id table is used to store the group to which the core belongs.
  • each core has two Table, i.e., a hardware group table (Hardware Group Table) and a software group table (Software Group Table); see FIG. 6b, which also show nuclear groups Grou P core 2, the hardware set of tables and Software Group 33, 4 table.
  • the embodiment grou P _l embodiment of the present invention include only CoreO.
  • the group_1 in the embodiment of the present invention includes CoreO and Corel, and the core group can be used to perform the work of the master core.
  • the core group can be used to perform the work of the master core.
  • a group of cores is used as the master core to balance the traffic of the master core. And you can achieve the effect of mutual backup.
  • the master control core After receiving the reply of all the cores in the core group, the master control core sends the deleted core group 3 successful RSP packet to the HDB;
  • the HDB displays the message of deleting the core group 3 to the user.
  • the user sends a command to create a core group 3;
  • the debugger HDB After receiving the command to create the core group 3, the debugger HDB sends a core group 3 RSP packet (RSP, remote serial protocol, protocol used by HDB remote debugging) to the master core.
  • RSP core group 3 RSP packet
  • the master core is coreO;
  • the trigger operation pair message includes: Trigger id: all, Action: "add group group-3 3, 4 , 5", Trigger id is all, which means that the trigger operation pair message is sent to all cores; specifically, the Trigger id is set to Oxf fffffff, that is, the al 1 core group.
  • the core receives the trigger operation pair message, where the Trigger id is Oxffffffff, and each core directly performs an act of an act ion, that is, directly executing the action: "add group group-3 3,4,5,,;
  • Core3, 4, 5 adds the core group 3 to its own trigger id table
  • the master control core After receiving the reply of all the cores in the core group, the master control core sends a virtual group 3 successful RSP packet to the HDB.
  • HDB shows the creation of a nuclear group 3 successful message to the user.
  • the figure shows the latest core group of a multi-core processor system with 14 cores (including 2 CPUs and 12 DSPs) after modifying core group 3, specifically showing the modification of core group 3
  • the latest hardware group table and software group table for each of the 14 cores is shown in Figure 7b.
  • the master core After receiving the stop core group 1RSP, the master core sends a Trigger: group-1, act ion: "stop," on the inter-core interconnect bus.
  • Each core in Group_l receives the trigger-action message, trigger id t ⁇ Pass or stop, and then execute the stop operation. Core2, 3, 4 modify the core state to stop, and will reply to the master core with the stop address.
  • the master core confirms Stop the core group 1 successfully. Send the core group to the HDB to stop the PC and stop the core group successfully RSP packets.
  • the HDB displays the information such as the stop address and line number of each core.
  • the user runs the core group scenario: The user sends a command to run the core group 1 to the HDB, and the HDB sends the running core group 1 command RSP packet to the master control core.
  • the master core receives the command to run the core group 1, and sends a Trigger: group-1, act ion: "cont inue," to the inter-core interconnect bus.
  • Each core in the group_l receives the trigger-act ion message, trigger id
  • the t ⁇ is passed or the cont inue operation is performed.
  • Core2, 3, and 4 modify the kernel state to rum iig.
  • the trigger id in the message is matched with the trigger id stored in the current processor core, and if the matching is successful, the trigger operation is performed on the message.
  • the operation act ion indicated by the operation domain information, so as to enable one or more processor cores belonging to a state or attribute to be triggered synchronously, where one or more processor cores belonging to the same state or attribute use the same tr Igger id identification, which enhances the flexibility and efficiency of multi-core triggering, especially the flexibility and efficiency of multi-core synchronous triggering.
  • the embodiment of the present invention is based on the flexible grouping of the processor core, by using the group identifier group id in the acquired second debugging message and the group identifier stored in the current processor core (the The group identifier id is used to indicate that the current processor core belongs to the core group. If the group identifier group id in the second debug message matches the group identifier group id stored in the current processor core, Performing an operation action indicated by the operation domain information in the second debug message to implement synchronous debugging of one or more processor cores included in the same core group, thereby enhancing flexibility and efficiency of multi-core debugging, in particular It is the flexibility and efficiency to enhance multi-core packet debugging.
  • the embodiment of the present invention implements cross-core debugging between multiple cores of different architectures, and is not limited to homogeneous and heterogeneous kernels, thereby implementing coordinated debugging of the entire system.
  • the embodiments of the present invention have an efficient debugging function implementation capability. Due to hardware support, breakpoint operations on a set of cores can be done in several cyc le to tens of eye 1 e. The method of inter-core interrupts must be between the master core and the debug core. Multiple communications, at least hundreds of cyc le or more. Since each core is interrupted, it is necessary to go to the master core to check what to do.
  • Embodiments of the present invention support flexible packet implementation.
  • any number of logical groupings can be supported.
  • the user can determine the required logical grouping according to the characteristics of the program being debugged.
  • the hardware tab le can't fit. There will be a software table to expand later.
  • the embodiment of the invention has good scalability, and is embodied in: the hardware group table and related components occupy small resources and are easy to implement in the core system.
  • the processor core needs to define a maximum number of core groups that exceed the maximum number of hardware registers, it can be extended by software.
  • the core group identifier group ID can be managed by using a manner similar to IP address allocation, and the matching unit can support the matching or comparison of the subnet mask mode, in the multi-core scale (more than 1000 cores). When you use a subnet-like approach to managing many cores.
  • the storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), or a Random Acces s Memory (RAM).

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Description

说 明 书
触发操作方法、 多核分組调试方法、 装置及系统 技术领域 本发明涉及通信技术领域, 具体涉及一种触发操作方法、 多核分组调试 方法、 装置及系统。 背景技术
"多核" 是指一个芯片或目标板, 其中包含了两个及以上的可执行代码 的逻辑设备, 如, 中央处理器 (CPU, Central Processing Unit )、 数字信号 处理器(DSP, Digital Signal Processing ),现场可编程门阵列( FPGA, Field Programmable Gate Array )。 即多核系统环境下涉及同构和异构内核,由于系 统复杂度不断增加, 多核环境下面对许多调试挑战。
目前业界普通采用多路(Muxing)技术进行多核调试, 如图 1 所示, 在 单一调试接口中采用独立调试器, 通过 OCD (On Chip Debugging, 片上调试) 和所有核通信, 每个调试器连接到 0CD 来调试相应的单核, 多个调试器之间 没有通信, 所谓的多核调试实质上是多个单核调试的集合, 即采用多个调试 器来分别完成相应单核的调试。
发明人在实现本发明过程中, 发现应用现有多路技术进行多核调试过程 时, 灵活性和效率较低, 而且无法同步调试多个内核 (例如, 如果要启动或 停止多个内核, 开发人员只能逐个顺序进行)。 发明内容 本发明实施例在于提供一种触发操作方法、 多核分组调试方法、 装置及 系统, 以增强多核调试的灵活性和效率。
一方面,本发明实施例提供一种触发操作方法,该方法包括:
获取触发操作对消息, 所述触发操作对消息包括触发标识 trigger id和 操作域信息;
将所述触发操作对消息中的触发标识 trigger id与当前处理器核中存储 的触发标识 trigger id进行匹配, 如果匹配成功, 则执行所述触发操作对消 息中的操作域信息所指示的操作 action。
另一方面,本发明实施例提供一种多核处理器系统, 所述多核处理器系统 包括主控核和多个操作核, 所述主控核和多个操作核之间通过核间互联总线 通信, 其中,
所述主控核用于通过所述核间互联总线传输触发操作对消息或指向所述 触发操作对消息的核间通信中断, 其中, 所述触发操作对消息包括触发标识 trigger id和操作域信息;
所述操作核用于接收所述触发操作对消息, 或根据收到的核间通信中断 获取所述触发操作对消息, 将所述触发操作对消息中的触发标识 trigger id 与本核中存储的触发标识 trigger id进行匹配, 如果匹配成功, 则执行所述 触发操作对消息中的操作域信息所指示的操作 act ion。
另一方面,本发明实施例提供一种处理器核, 所述处理器核包括: 存储单元, 用于存储一个或多个触发标识 trigger id, 其中所述触发标 识 trigger id表示该处理器核所属的核组, 或者该处理器核; 获取单元, 用于获取触发操作对消息, 所述触发操作对消息包括触发标 trigger id和操作域信息;
匹配单元, 用于将所述触发操作对消息中的触发标识 trigger id与所述 存储单元中存储的触发标识 trigger id进行匹配;
处理单元, 用于在所述匹配单元得到所述触发操作对消息中的触发标识 trigger id与所述存储单元存储的一触发标识 trigger id匹配成功, 执行所 述触发操作对消息中的操作域信息所指示的操作 act ion。
可见, 本发明实施例中, 通过将获取的触发操作对消息中的 trigger id 与当前处理器核中存储的 trigger id进行匹配, 如果匹配成功, 则执行所述 触发操作对消息中操作域信息所指示的操作 action, 以实现能同步触发属于 一种状态或属性的一个或多个处理器核, 这里属于同一种状态或属性的一个 或多个处理器核用同一个 trigger id标识, 从而增强多核触发的灵活性和效 率, 尤其是增强多核同步触发的灵活性和效率。
另一方面,本发明实施例提供一种多核分组调试方法, 应用于包括至少两 个处理器核的多核处理器系统, 该方法包括:
获取第二调试消息, 所述第二调试消息包括组标识 group id和操作域信 息;
将所述第二调试消息中的组标识 group id与当前处理器核中存储的组表 中的组标识进行匹配, 如果所述第二调试消息中的组标识 g r oup i d与所述组 表中的组标识 group id匹配成功, 则执行所述第二调试消息中的操作域信息 所指示的操作 action, 其中所述当前处理器核中存储的组表包括至少一个组 标识 group id,所述组标识 group id用于表示所述当前处理器核所属的核组。
另一方面,本发明实施例提供一种调试系统, 所述调试系统包括前端调试 器和后端调试平台, 所述后端调试平台部署有多核处理器系统, 所述多核处 理器系统包括主控核和多个操作核, 所述主控核和多个操作核之间通过核间 互联总线通信, 其中,
所述前端调试器用于接收用户下发的调试命令, 将所述调试命令转化成 对应的第一调试消息并向所述主控核发送, 所述第一调试消息包括组标识 group id和操作域信息;
所述主控核用于在收到该第一调试消息后, 转换成核间通信能识别的第 二调试消息, 通过所述核间互联总线发送所述第二调试消息或者指向所述第 二调试消息的核间通信中断;
所述操作核用于接收所述第二调试消息或者根据收到的核间通信中断获 取所述第二调试消息, 将所述第二调试消息中的组标识 group id与本核中存 储的组标识 group id进行匹配, 如果匹配成功, 则执行所述第二调试消息中 的操作域信息所指示的操作 act ion,其中,所述操作核中存储的组标识 group id用于表示本操作核所属的核组。
可见, 本发明实施例基于处理器核的灵活核组, 通过将获取的第二调试 消息中的组标识 group id 与当前处理器核中存储的组标识 (即所述组标识 group id用于表示所述当前处理器核所属的核组)进行匹配, 如果所述第二 调试消息中的组标识 group id与当前处理器核中存储的组标识 group id 匹 配成功, 则执行所述第二调试消息中的操作域信息所指示的操作 act ion, 以 实现能同步调试包含在同一核组中的一个或多个处理器核, 从而增强多核调 试的灵活性和效率。 附图说明 为了更清楚地说明本发明实施例或现有技术中的技术方案, 下面将对实 施例或现有技术描述中所需要使用的附图作筒单地介绍, 显而易见地, 下面 描述中的附图仅仅是本发明的一些实施例, 对于本领域普通技术人员来讲, 在不付出创造性劳动性的前提下, 还可以根据这些附图获得其它的附图。
图 1为现有技术中的采用多路技术进行多核调试的原理示意图; 图 1为本发明实施例的一种多核处理器系统的逻辑结构示意图; 图 2a为本发明实施例的一种多核处理器系统的结构示意图;
图 2 b为本发明实施例的另一种多核处理器系统的结构示意图; 图 2c为本发明实施例提供一种触发操作方法的流程示意图;
图 3a为本发明实施例提供的调试系统的一种结构示意图;
图 3b为本发明实施例提供的一种处理器核的一种结构示意图; 图 4为本发明实施例提供一种多核分组调试方法的流程示意图; 图 5a为本发明实施例一种多核分组调试方法的交互示意图;
图 5b为本发明实施例一种多核分组调试方法的核组场景示例示意图; 图 5 c为图 5b的核组场景下, 创建核组后的硬件组表和软件组表的示意 图;
图 6a为本发明实施例一种多核分组调试方法的交互示意图;
图 6b为图 6a涉及的多核处理器系统的最新核组情况的示意图; 图 7a为本发明实施例一种多核分组调试方法的交互示意图;
图 7b为图 7a涉及的多核处理器系统的最新核组情况的示意图; 图 8为本发明实施例涉及的一种监控场景示意图。 具体实施方式 为使本发明实施例的目的、 技术方案和优点更加清楚, 下面将结合本发 明实施例中的附图, 对本发明实施例中的技术方案进行清楚、 完整地描述, 显然, 所描述的实施例是本发明一部分实施例, 而不是全部的实施例。 基于 本发明中的实施例, 本领域普通技术人员在没有作出创造性劳动前提下所获 得的所有其他实施例, 都属于本发明保护的范围。
请参阅图 2 , 为本发明实施例的一种多核处理器系统的逻辑结构示意图, 如图 2所示, 本发明实施例的多核处理器系统, 包括: 多个处理器核 CoreO , Corel , Core2... , CoreX, 其中, CoreO为主控核, Corel , Core2…, CoreX为 操作核, 所述多个处理器核之间通过核间互联总线通信, 其中:
主控核 CoreO 用于通过所述核间互联总线传输触发操作对消息或指向所 述触发操作对消息的核间通信 ( Inter- Proces sor Communicat ion , IPC ) 中 断, 其中, 所述触发操作对消息包括触发标识 t r igger id和操作域信息; 需要说明的是, 这里的主控核可以是预先指定或应用过程中动态指定的、 用于触发操作对消息转发的处理器核, 本发明实施例以 CoreO 来示例, 应当 理解的是, 这里包括但不限于 CoreO。
需要说明的是, 这里的 IPC 中断指向触发操作对消息或者指向存储该触 发操作对消息的地址空间。
在一种实现方式下, 这里的 IPC 中断包含指向所述触发操作对消息的指 针, 操作核收到 IPC中断后, 根据 IPC中断中包含的指针获得所述触发操作 对消息。 具体的, IPC中断中包含的指针, 指向所述多核处理器系统的共享内 存的对应地址空间, 该地址空间中存储有主控核 CoreO传递的触发操作对消 息即 trigger-action消息; 或者, IPC中断中包含的指针, 指向主控处理器 核内的寄存器的对应地址空间, 该地址空间中存储有主控核 CoreO传递的触 发操作对消息即 trigger-action消息;
操作核 Corel, Core2...,CoreX用于接收所述触发操作对消息, 或根据收 到的核间通信中断获取所述触发操作对消息, 将所述触发操作对消息中的触 发标识 trigger id与本核中存储的触发标识 trigger id进行匹配, 如果匹 配成功, 则执行所述触发操作对消息中的操作域信息所指示的操作 act ion。
本发明实施例系统中, 所述触发操作对消息中的触发标识 trigger id为 组标识 group id, 或者核标识 core id; 其中, 所述组标识 group id表示需 要执行所述触发操作对消息中的操作域信息所指示的操作 action的核组; 所 述核标识 core id表示需要执行所述操作域信息所指示的操作 action的处理 器核; 所述触发操作对消息中的操作域信息为操作 act ion命令, 或者为指向 操作 action命令的地址信息, 其中, 所述操作 action命令包括创建组命令、 删除组命令、 停止组命令、 运行组命令、 设置断点的命令 break、 重新开始的 命令 resume或 continue, 执行一步的命令 step中的一种或多种。
本发明实施例的多核处理器系统, 可以应用于多核程序的性能分析和监 控等场景。 这里以应用于监控场景举例来说明:
较优的, 本发明实施例的多核处理器系统中的某个操作核(以图 8 中的 Core4示意)还具有监控核的角色, 相应的, Core4进一步用于存储待监控核 组的组标识和主控核所属的核组的组标识, 以及用于根据所述待监控核组的 组标识和主控核所属的核组的组标识, 监听所述主控核与待监控核组之间的 触发操作对消息交互, 其中, 本操作核中存储的组标识用于表示本操作核所 属的核组。 需要说明的是, 这里是以所述触发操作对消息中的触发标识 t r igger id为组标识 group id , 所述组标识 group id表示需要执行所述触 发操作对消息中的操作域信息所指示的操作 act ion 的核组的情况来进行说 明。
如图 8 所示, 在多核场景下, 主控核与核组之间通过核间互联总线上发 送触发-操作消息对来通信。监控核将本核硬件组表或软件组表中增加 groupl 核组号、 主控核核组号, 这样监控核就可以监听主控核与核组 groupl之间的 触发-操作消息交互, 也可以精确地得到某个操作的开始和结束时间, 从而得 到并行程序的精确时序, 方便并行程序的性能分析。
以及, 当本发明实施例的多核处理器系统应用于不同架构的多种内核之 间的跨多核调试时, 主控核 CoreO 具体用于在收到第一调试消息后, 通过所 述核间互联总线传输转换后的第二调试消息或指向所述第二调试消息的核间 通信 ( Inter-Proces sor Communicat ion , IPC ) 中断, 其中, 所述第二调试 消息包括组标识 group id 和操作域信息, 该 group id 表示需要执行所述 act ion信息所指示的操作 act ion的核组;
操作核 Corel , Core2... , CoreX 具体用于从核间互联总线上接收该第二 调试消息或根据收到的 IPC 中断获得该第二调试消息, 将所述第二调试消息 中的组标识 group id与本处理器核中存储的组表进行匹配, 如果匹配成功, 则执行所述第二调试消息中的操作域信息所指示的操作 ac t ion, 其中本处理 器核中存储的组表, 包括至少一个组标识 group id , 所述组标识 group id用 于表示本处理器核所属的核组。
在实际应用中, CoreO不仅是转发第二调试消息的主控核的角色, 其也属 于操作核的角色; 相应的, 主控核 CoreO 进一步用于将获得的第二调试消息 中的组标识 group id与本处理器核中存储的组表进行匹配, 如果匹配成功, 则执行所述第二调试消息中的操作域信息所指示的操作 ac t ion, 其中本处理 器核中存储的组表, 包括至少一个组标识 group id , 所述组标识 group id用 于表示本处理器核所属的核组。
需要说明的是, 本发明实施例中, 可以使用核组来担当主控核的工作。 在众核系统中, 通过一组核来作为主控核, 均衡主控核的通信量。 而且可以 达到互为备份的效果。
可见, 本发明实施例提供的多核处理器系统, 通过将获取的触发操作对 消息中的 t r igger id与当前处理器核中存储的 t r igger id进行匹配, 如果 匹配成功, 则执行所述触发操作对消息中操作域信息所指示的操作 act ion, 以实现能同步触发属于一种状态或属性的一个或多个处理器核, 这里属于同 一种状态或属性的一个或多个处理器核用同一个 t r i gger id标识, 从而增强 多核触发的灵活性和效率, 尤其是增强多核同步触发的灵活性和效率。
进一步的, 当应用于调试场景下时, 本发明实施例基于处理器核的灵活 核组, 通过将获取的第二调试消息中的组标识 group id与当前处理器核中存 储的组标识(所述组标识 group id用于表示所述当前处理器核所属的核组 ) 进行匹配, 如果所述第二调试消息中的组标识 group id与当前处理器核中存 储的组标识 group id匹配成功, 则执行所述第二调试消息中的操作域信息所 指示的操作 act ion, 以实现能同步调试包含在同一核组中的一个或多个处理 器核, 从而增强多核调试的灵活性和效率, 尤其是增强多核分组调试的灵活 性和效率。
进一步, 本发明实施例实现不同架构的多种内核之间的跨多核调试, 且 不限于同构和异构内核, 进而实现整个系统的协同调试。 请参阅图 2a, 为本发明实施例的一种多核处理器系统的结构示意图, 本 实施例中, 使用队列端口 queue port来实现核间互联总线, 如图 2a所示, 本发明实施例的多核处理器系统,包括: CoreO, Corel, Core2, Core3, Core4, 其中, 4叚定 CoreO为主控核, Corel, Core2, Core3, Core4为操作核, 所述 多个处理器核连接成一个环, 通过 queue port传送调试消息, 环中有一个令 牌沿着 queue port在各个核间依次传递, 用来控制 queue port在同一时刻 只有一个核能够独占, 当环上核都空闲时, 令牌绕环行进。 核只有取得令牌 后才能发送调试消息。
本发明实施例中, coreO发送调试消息, 收到该调试消息的 corel处理该 调试消息, 并将该调试消息通过 queue port传输给下一个核 core2, 依次进 行。 收到该调试消息的 corel处理该调试消息的具体过程是, corel收到该调 试消息后, 将该调试消息保存在其高速緩存中, 并将该调试消息中包含的 Group ID与硬件核组表进行匹配, 如果匹配成功, 则执行该调试消息中包含 的 act ion操作; 如果匹配不成功, 继续与软件核组表进行匹配, 如果匹配成 功, 则执行该调试消息中包含的 action操作, 并从高速緩存中取出调试消息 通过 queue port发送给下一核。 请参阅图 2b, 为本发明实施例的另一种多核处理器系统的结构示意图, 本实施例中, 使用 IPC ( Inter-process communicat ion )来实现核间互联总 线, 需要说明的是, 本发明实施例使用 IPC 可以同时向多个核分发命令, 各 个核收到 IPC 中断后立即处理并进入调试状态, 达到多核同步调试的目的, 如图 2b所示,本发明实施例的多核处理器系统,包括: CoreO, Corel, Core2, Core3... CoreX, 4叚定 CoreO为主控核, Corel, Core2, Core3... CoreX为操 作核, 其中, CoreO在收到调试消息后, CoreO将 IPC目标寄存器所有核相应 的比特位置位, 这样所有核都会收到 IPC中断, 该 IPC中断包含指向该调试 消息的指针, 各核收到 IPC 中断后, 根据指向该调试消息的指针找到 coreO 发送的调试消息, 并将该调试消息中包含的 Group ID与自身存储的核组表进 行匹配, 如果匹配成功, 则执行该调试消息中包含的 act ion操作, 处理结果 存入 CoreO , Corel , Core2 , Core 3— CoreX的共享内存, 如果匹配不成功, 则不做任何操作, 图 2b中以 CoreX示例。
需要说明的是, 在一种实现方式下, 如果调试消息小, IPC操作符寄存器 中可以直接存储调试消息内容本身, 通过指针找到 IPC操作符寄存器中的调 试消息;如果调试消息大, IPC操作符寄存器中可以存储指向调试消息的指针, 该指针指向共享内存中的调试消息。 请参阅图 2c , 为本发明实施例提供一种触发操作方法的流程示意图, 该 方法可以应用于如图 2所示的多核处理器系统中的处理器核, 如图 2c所示, 该方法可以包括如下步骤:
S20 获取触发操作对消息, 所述触发操作对消息包括触发标识 t r igger id和操作域信息;
具体的, 从核间互联总线上接收主控处理器核发送的所述触发操作对消 息; 或者, 根据从核间互联总线上接收的核间通信中断, 获得主控处理器核 发送的所述触发操作对消息。
具体的, S201中所述触发操作对消息中的触发标识 t r igger id为组标识 group id , 或者核标识 core id; 其中, 所述组标识 group id表示需要执行 所述触发操作对消息中的操作域信息所指示的操作 act ion的核组; 所述核标 识 core id表示需要执行所述操作域信息所指示的操作 action的处理器核; 所述触发操作对消息中的操作域信息为操作 action 命令, 或者为指向操作 action命令的地址信息, 其中, 所述操作 act ion命令包括创建组命令、 删除 组命令、 停止组命令、 运行组命令、 设置断点的命令 break、 重新开始的命令 resume, 执行一步的命令 step中的一种或多种。
5202、 将所述触发操作对消息中的触发标识 trigger id与当前处理器核 中存储的触发标识 trigger id进行匹配; 如果匹配成功, 则转步骤 S203;
5203、 执行所述触发操作对消息中的操作域信息所指示的操作 action。 在一种实现方式下,所述将所述触发操作对消息中的触发标识 trigger id 与当前处理器核中存储的触发标识 trigger id进行匹配, 如果匹配成功, 则 执行所述触发操作对消息中的操作域信息所指示的操作 action, 包括:
将所述触发操作对消息中的触发标识 trigger id与当前处理器核的硬件 寄存器中存储的触发标识 trigger id进行匹配, 如果所述触发操作对消息中 的触发标识 trigger id 与所述硬件寄存器中存储的一触发标识 trigger id 匹配成功,则执行所述触发操作对消息中的操作域信息所指示的操作 action。
如果匹配不成功, 所述方法进一步包括:
将所述触发操作对消息中的触发标识 trigger id与当前处理器核的存储 器中存储的触发标识 trigger id进行匹配, 如果所述触发操作对消息中的触 发标识 trigger id与所述存储器中存储的一触发标识 trigger id匹配成功, 则执行所述触发操作对消息中的操作域信息所指示的操作 action。
以及, 所述将所述触发操作对消息中的触发标识 trigger id与当前处理 器核的存储器中存储的触发标识 trigger id进行匹配的步骤之前, 进一步包 括: 判断当前处理器核所属的核组数是否大于第一阈值, 若所述核组数大于 所述第一阈值, 则执行所述将所述触发操作对消息中的触发标识 t r igger id 与当前处理器核的存储器中存储的触发标识 t r igger id进行匹配的步骤。
在一种实现方式下, 所述触发操作对消息中的触发标识 t r igger i d为组 标识 group id, 所述当前处理器核中存储的触发标识为组标识 group id , 所 述组标识 group id用于表示所述当前处理器核所属的核组;
如果动态创建包括至少一个成员核的第一核组, 则所述获取的触发操作 对消息中的组标识 group id为全局核组标识,所述操作域信息为创建组命令, 所述创建组命令包含待创建的第一核组的组标识和加入该创建组的成员核的 核标识, 或者为指向所述创建组命令的地址信息;
如果动态停止所述第一核组内的成员核, 则所述获取的触发操作对消息 中的组标识 group id为第一核组标识, 所述操作域信息为停止组命令, 或者 为指向停止组命令的地址信息;
如果动态运行所述第一核组内的成员核, 则所述获取的触发操作对消息 中的组标识 group id为第一核组标识, 所述操作域信息为运行组命令, 或者 为指向运行组命令的地址信息;
如果动态删除所述第一核组内的成员核, 则所述获取的触发操作对消息 中的组标识 group id为第一核组标识, 所述操作域信息为删除组命令, 或者 为指向删除组命令的地址信息。
下面以动态创建核组来举例介绍下:
所述触发操作对消息中的触发标识 t r igger id为全局核组标识, 所述操 作域信息为创建组命令, 或者为指向所述创建组命令的地址信息, 其中, 所 述创建组命令包含待创建核组的组标识和加入所述待创建核组的成员核的核 标识;
如果所述操作域信息为创建组命令, 步骤 S203包括: 当所述创建组命令 中包含的加入待创建核组的成员核的核标识与当前处理器核的核标识相同 时, 根据所述创建组命令将所述创建组命令中包含的待创建核组的组标识进 行存储;
如果所述操作域信息为指向所述创建组命令的地址信息,步骤 S203包括: 根据所述地址信息, 获得所述创建组命令;
当所述创建组命令中包含的加入待创建核组的成员核的核标识与当前处 理器核的核标识相同时, 根据所述创建组命令将所述创建组命令中包含的待 创建核组的组标识进行存储。
下面以动态删除核组来举例介绍下:
所述触发操作对消息中的触发标识 t r igger id为组标识 group id, 所述 当前处理器核中存储的触发标识为组标识 group id , 所述组标识 group id用 于表示所述当前处理器核所属的核组;
如果所述操作域信息为删除组命令, 步骤 S203包括:
根据所述删除组命令, 从当前处理器核存储的至少一个组标识 group id 中删除所述触发操作对消息中的组标识 group id;
如果所述操作域信息为指向所述删除组命令的地址信息,步骤 S203包括: 根据所述地址信息, 获得所述删除组命令;
根据所述删除组命令, 从当前处理器核存储的至少一个组标识 group id 中删除所述触发操作对消息中的组标识 group id。
可见, 本发明实施例提供的触发操作方法, 通过将获取的触发操作对消 息中的 t r igger id与当前处理器核中存储的 t r igger id进行匹配, 如果匹 配成功, 则执行所述触发操作对消息中操作域信息所指示的操作 act ion, 以 实现能同步触发属于一种状态或属性的一个或多个处理器核, 这里属于同一 种状态或属性的一个或多个处理器核用同一个 t r igger id标识, 从而增强多 核触发的灵活性和效率, 尤其是增强多核同步触发的灵活性和效率。 下面以本发明实施例应用于调试场景来详细介绍技术方案:
请参阅图 3a , 为本发明实施例提供的调试系统的一种结构示意图, 本发 明实施例调试系统包括前端调试器 311和后端调试平台 312 ,所述后端调试平 台 32部署有多核处理器系统, 所述多核处理器系统包括主控核 (图 3a中以 coreO示意)和多个操作核 (图中以 Corel , Core2 , Core3— CoreX示意), 所述主控核和多个操作核之间通过核间互联总线通信, 其中,
所述前端调试器 311 用于接收用户下发的调试命令, 将所述调试命令转 化成对应的第一调试消息并向所述主控核发送, 所述第一调试消息包括组标 识 group id和操作 i或信息, 该组标识 group id表示需要执行所述 act ion信 息所指示的操作 act ion的核组;
所述主控核 CoreO , 用于在收到该第一调试消息后, 转换成核间通信能识 别的第二调试消息, 通过所述核间互联总线发送该第二调试消息或者指向所 述第二调试消息的核间通信 ( Inter- Proces sor Communicat ion, IPC ) 中断; 需要说明的是, 这里的主控核可以是预先指定或调试过程中动态指定的、 用于调试消息转发的处理器核, 本发明实施例以 CoreO 来示例, 应当理解的 是, 这里包括但不限于 CoreO。
所述操作核 Corel , Core2—, CoreX , 用于从核间互联总线上接收该第二 调试消息或根据收到的 IPC 中断获得该第二调试消息, 将所述第二调试消息 中的组标识 group id与本核中存储的组标识 group id进行匹配, 如果匹配 成功, 则执行所述第二调试消息中的操作域信息所指示的操作 act ion, 其中, 所述操作核中存储的组标识 group id用于表示本操作核所属的核组。 需要说 明的是, 所述操作核中存储有一个或多个组标识 group id。
在实际应用中, CoreO不仅是转发调试消息的主控核的角色, 其也属于主 控核的角色;
相应的,主控核 CoreO进一步用于将所述第二调试消息中的组标识 group id与本处理器核中存储的组标识 group id进行匹配, 如果匹配成功, 则执行 所述第二调试消息中的操作域信息所指示的操作 ac t ion, 其中本处理器核中 存储的组标识 group id用于表示本处理器核所属的核组。
需要说明的是, 本发明实施例中, 操作域信息可以是 act ion命令本身, 也可以是指向 act ion命令的地址信息, 其中, ac t ion命令包括创建组命令、 停止组命令、运行组命令、 break (设置断点的命令)、 resume或 cont inue (重 新开始的命令), s tep (执行一步的命令) 中的一种或多种。
可见, 本发明实施例提供的调试系统, 基于处理器核的灵活核组, 通过 将获取的第二调试消息中的组标识 group id与当前处理器核中存储的组标识 (所述组标识 group id用于表示所述当前处理器核所属的核组 )进行匹配, 如果所述第二调试消息中的组标识 group id与当前处理器核中存储的组标识 group id 匹配成功, 则执行所述第二调试消息中的操作域信息所指示的操作 act ion, 以实现能同步调试包含在同一核组中的一个或多个处理器核, 从而 增强多核调试的灵活性和效率, 尤其是增强多核分组调试的灵活性和效率。
进一步, 本发明实施例实现不同架构的多种内核之间的跨多核调试, 且 不限于同构和异构内核, 进而实现整个系统的协同调试。 请参阅图 3b, 为本发明实施例提供的一种处理器核的一种结构示意图, 如图 3ab所示, 所述处理器核包括:
存储单元 321, 用于存储一个或多个触发标识 trigger id, 其中所述触 发标识 trigger id表示该处理器核所属的核组, 或者该处理器核;
获取单元 322, 用于获取触发操作对消息, 所述触发操作对消息包括触发 trigger id和操作域信息;
匹配单元 323, 用于将所述触发操作对消息中的触发标识 trigger id与 所述存储单元中存储的触发标识 trigger id进行匹配;
处理单元 324,用于在所述匹配单元得到所述触发操作对消息中的触发标 识 trigger id与所述存储单元存储的一触发标识 trigger id 匹配成功, 执 行所述触发操作对消息中的操作域信息所指示的操作 action。需要说明的是, 处理单元 324 —般是软件实现, 相当于通用处理器核读取特殊功能的软件代 码指令来实现的。
在一种实现方式下, 获取单元 322 具体用于从核间互联总线上接收触发 操作对消息; 或者, 具体用于从核间互联总线上接收指向所述触发操作对消 息的核间通信中断, 根据所述核间通信中断, 获得主控处理器核发送的所述 触发操作对消息。
在一种实现方式下, 存储单元 321包括寄存器和 /或存储器,
相应的, 匹配单元 323包括:
硬件匹配单元, 用于将所述触发操作对消息中的触发标识 trigger id与 所述寄存器中存储的触发标识 trigger id进行匹配, 如果所述触发操作对消 息中的触发标识 trigger id 与所述寄存器中存储的一触发标识 trigger id 匹配成功, 则触发所述处理单元执行所述触发操作对消息中的操作域信息所 指示的操作 action; 这里的硬件匹配单元具体可以是硬件匹配器或者硬件比 较器。 需要说明的是, 寄存器可以是集成在硬件匹配器或者硬件比较器内部, 也可以是独立于硬件匹配器或者硬件比较器的硬件。
软件匹配单元, 用于在所述硬件比较单元匹配不成功, 将所述触发操作 对消息中的触发标识 trigger id与所述存储器中存储的触发标识 trigger id 进行匹配, 如果所述触发操作对消息中的触发标识 trigger id与所述存储器 中存储的一触发标识 trigger id匹配成功, 则触发所述处理单元执行所述触 发操作对消息中的操作域信息所指示的操作 a c t i on。
较优的, 所述处理器核进一步包括:
计算判断器(图中未示出), 用于判断该处理器核所属的核组数是否大于 第一阈值;
相应的, 软件匹配单元具体用于在所述硬件比较单元匹配不成功且所述 核组数大于所述第一阈值, 将所述触发操作对消息中的触发标识 trigger id 与所述存储器中存储的触发标识 trigger id进行匹配, 如果所述触发操作对 消息中的触发标识 trigger id与所述存储器中存储的一触发标识 trigger id 匹配成功, 则触发所述处理单元执行所述触发操作对消息中的操作域信息所 指示的操作 action0
可见, 本发明实施例提供的触发操作方法, 通过将获取的触发操作对消 息中的 trigger id与当前处理器核中存储的 trigger id进行匹配, 如果匹 配成功, 则执行所述触发操作对消息中操作域信息所指示的操作 action, 以 实现能同步触发属于一种状态或属性的一个或多个处理器核, 这里属于同一 种状态或属性的一个或多个处理器核用同一个 trigger id标识, 从而增强多 核触发的灵活性和效率, 尤其是增强多核同步触发的灵活性和效率。 请参阅图 4 , 为本发明实施例提供一种多核分组调试方法的流程示意图, 该方法可以应用于如图 2所示的多核处理器系统中的处理器核, 如图 4所示, 该方法可以包括如下步骤:
5401、 获取第二调试消息, 所述第二调试消息包括组标识 group id和操 作域信息;
具体的, 从核间互联总线上接收主控处理器核发送的所述第二调试消息; 或者, 根据从核间互联总线上接收的核间通信中断, 获得主控处理器核发送 的所述第二调试消息; 其中, 所述主控处理器核响应于用户下发的第一调试 消息, 在核间互联总线上发送转换后的所述第二调试消息。
具体的, 所述第二调试消息中的操作域信息为操作 act ion命令, 或者为 指向操作 act ion命令的地址信息, 其中, 所述 act ion命令为创建组命令、 停止组命令、 运行组命令、 设置断点的命令 break、 重新开始的命令 resume , 执行一步的命令 s tep中的一种或多种。
5402、 将所述第二调试消息中的组标识 group id与当前处理器核中存储 的组表中的组标识进行匹配, 如果所述第二调试消息中的组标识 g r oup i d与 所述组表中的组标识 group id匹配成功, 则转步骤 S401 ;
需要说明的是, 在一种实现方式下, 如果第二调试消息中如果包含多个 group id , 则表示调试多个 group id表示的多个核组之间存在交集的核。
5403、 执行所述第二调试消息中的操作域信息所指示的操作 act ion, 其 中所述当前处理器核中存储的组表包括至少一个组标识 group id , 所述组标 识 group id用于表示所述当前处理器核所属的核组。 在一种实现方式下, 所述组表包括硬件组表和软件组表, 其中, 所述硬 件组表存储于所述当前处理器核的硬件寄存器中, 所述软件组表存储于所述 当前处理器核的存储器中;
所述将所述第二调试消息中的组标识 group id与当前处理器核中存储的 组表中的组标识进行匹配, 如果所述第二调试消息中的组标识 group id与所 述组表中的组标识 g r oup i d匹配成功, 则执行所述第二调试消息中的操作域 信息所指示的操作 ac t ion, 包括:
将所述第二调试消息中的组标识 group id与所述硬件组表中的组标识进 行匹配, 如果所述第二调试消息中的组标识 group id与所述硬件组表中的组 标识 group id匹配成功, 则执行所述第二调试消息中的操作域信息所指示的 操作 act ion;
如果匹配不成功, 则将所述第二调试消息中的组标识 group id与所述软 件组表中的组标识进行匹配, 如果匹配成功, 则执行所述第二调试消息中的 操作域信息所指示的操作 ac t ion。
在一种具体实现下, 如果动态创建包括至少一个成员核的核组, 相应的, 所述第二调试消息中的组标识 group id为全局核组标识, 所述操作域信 息为创建组命令, 或者为指向所述创建组命令的地址信息, 其中, 所述创建 组命令包含待创建核组的组标识和加入所述待创建核组的成员核的核标识; 如果所述操作域信息为创建组命令, 步骤 S403包括:
当所述创建组命令中包含的加入待创建核组的成员核的核标识与当前处 理器核的核标识相同时, 根据所述创建组命令将所述创建组命令中包含的待 创建核组的组标识进行存储;
如果所述操作域信息为指向所述创建组命令的地址信息,步骤 S403包括: 根据所述地址信息, 获得所述创建组命令;
当所述创建组命令中包含的加入待创建核组的成员核的核标识与当前处 理器核的核标识相同时, 根据所述创建组命令将所述创建组命令中包含的待 创建核组的组标识进行存储。 需要说明的是, 每个处理器核中有一个专门的 寄存器用于存储本处理器核的核标识, 如 Core ID。
在一种具体实现下, 如果动态删除包括至少一个成员核的核组, 相应的, 如果所述操作域信息为删除组命令, 步骤 S403包括: 根据所述删除组命 令, 从当前处理器核存储的至少一个组标识 group id中删除所述触发操作对 消息中的组标识 group id;
如果所述操作域信息为指向所述删除组命令的地址信息,步骤 S403包括: 根据所述地址信息, 获得所述删除组命令;
根据所述删除组命令, 从当前处理器核存储的至少一个组标识 group id 中删除所述触发操作对消息中的组标识 group id。 也可以对某一个特定核执行操作; 如果仅需要对某一个特定核执行操作, 则 该特定核构成一个核组。
可见, 本发明实施例提供的多核分组调试方法, 基于处理器核的灵活核 组, 通过将获取的第二调试消息中的组标识 group id与当前处理器核中存储 的组标识 (所述组标识 group id用于表示所述当前处理器核所属的核组)进 行匹配, 如果所述第二调试消息中的组标识 group id与当前处理器核中存储 的组标识 group id匹配成功, 则执行所述第二调试消息中的操作域信息所指 示的操作 ac t ion, 以实现能同步调试包含在同一核组中的一个或多个处理器 核, 从而增强多核调试的灵活性和效率, 尤其是增强多核分组调试的灵活性 和效率。
进一步, 本发明实施例实现不同架构的多种内核之间的跨多核调试, 且 不限于同构和异构内核, 进而实现整个系统的协同调试。 下面结合实际应用来详细介绍下本发明实施例的方法:
1 )创建核组
请参阅图 5a, 为本发明实施例多核分组调试方法的交互示意图, 本实施 例主要介绍: 在运行时, 动态创建由多个核组成的核组 (即设置处理器核所 属的组, 每个核可设置成属于多个组), 核组场景示例如图 5b所示, 图中显 示了一个具有 14个核(包括 2个 CPU和 12个 DSP) 的多核系统的核组情况, 其中:
所有 CPUS (CPUO, CPUl )分为核组 1;
所有 DSPS (DSP2-13)分为核组 2;
核组 3: DSP2, DSP3, DSP4;
核组 4: DSP5, DSP6, DSP7; 核组 3和核组 4都是核组 2的子集; 核组 5: DSP8, DSP9, DSP10;
核组 6: DSP11, DSP12, DSP13;
核组 7: DSP2, DSP5, DSP8, DSP11; 核组 7与核组 3的交集为 DSP2; 核组 8: CPUl, DSP3, DSP4, 其是 1个 CPU核和 2个 DSP核组成的异构核 组。
该方法应用于如图 3a所示的调试系统环境下, 具体可以包括如下步骤:
5511、 用户发送创建核组 1命令;
5512、 调试器 HDB收到创建核组 1命令后, 给主控核发送创建核组 1 RSP 包(RSP, 远程串行协议, HDB远程调试使用的协议);本实施例中, 主控核为 coreO;
5513、 主控核收到创建核组 RSP 包后, 在核间互联总线上发送触发操作 对消息, 该触发操作对消息包含: Trigger id: all, Action: "add group group-1 0, 1" (格式请参考: add group groupid coreid [, coreid [,.. ]] ), Trigger id为 all, 代表向所有核发送该触发操作对消息;
需要说明的是, Trigger id: all表示全局核组标识, 即可以理解为, 缺 省情况下, 系统中的每个核都属于全局核组。
具体的, Trigger id置为 Oxf f f f f f f f,即 al 1核组。
5514、 各核收到该触发操作对消息, 其中 Trigger id为 Oxffffffff, 各 核缺省匹酉己 成功, 直接执行 action操作, p直接执行 Act ion: "add group group-1 0, 1"; 本实施例中, CoreO、 Core 1增力口核组 1到自身的 trigger id 表中;
需要说明的是, Action操作的内容可以在核间互联总线上, 包含在触发 操作对消息中传递, 也可以只传递包含指向 action操作的地址信息的触发操 作对消息, 对于后者的实现, 接收到触发操作对消息的核通过该地址信息来 获取 Act ion操作的内容。
5515、 CoreO. 1向主控核回复 trigger id: group-1, act ion: "coreid add group-1 ok" , 这里的 coreid为 CoreO、 Corel;
一般情况下, 为了仅向 CoreO回复, 本发明实施例中的 group-1应仅包 括 CoreO。
较优的, 本发明实施例中的 group_l 中包括 CoreO、 Corel, 可以使用核 组来担当主控核的工作。 在众核系统中, 通过一组核来作为主控核, 均衡主 控核的通信量。 而且可以达到互为备份的效果。
5516、 主控核收到该核组中所有核的回复后, 向 HDB发送创建核组 1成 功 RSP包;
5517、 HDB显示创建核组 1成功的消息给用户。
5521、 用户发送创建核组 2命令;
5522、 调试器 HDB收到创建核组 2命令后, 给主控核发送创建核组 2 RSP 包;本实施例中, 主控核为 coreO;
5523、 主控核收到创建核组 RSP 包后, 在核间互联总线上发送触发操作 对消息, 该触发操作对消息包含: Trigger id: all, Action: "add group group-2 2, 3— 13", Trigger id 为 all, 代表向所有核发送该触发操作对消 息;
具体的, Trigger id置为 Oxf f f f f f f f,即 al 1核组。
5524、 各核收到该触发操作对消息, 其中 Trigger id为 Oxffffffff, 各 核缺省匹配都成功, 各核直接执行 action操作, 即直接执行 Ac t i on: "add group group-2 2, 3...13";
本实施例中, Core2, 3— 13增加核组 2到自身的 trigger id表中;
S525、 Core2, 3...13 分另' J向主控核回复 trigger id: group-1, action: "coreid add group-2 ok", 这里的 coreid分另 ll为 Core2, core3... , corel 3;
5526、 主控核收到该核组中所有核的回复后, 向 HDB发送创建核组 1成 功 RSP包;
5527、 HDB显示创建核组 2成功的消息给用户。
5531、 用户发送创建核组 3命令;
5532、 调试器 HDB收到创建核组 3命令后, 给主控核发送创建核组 3 RSP 包;本实施例中, 主控核为 coreO;
5533、 主控核收到创建核组 3 RSP 包后, 在核间互联总线上发送触发操 作对消息, 该触发操作对消息包含: Trigger id: all, Action: "add group group-3 2, 3, 4", Trigger id为 all, 代表向所有核发送该触发操作对消息; 具体的, Trigger id置为 Oxf f f f f f f f,即 al 1核组。
5534、 各核收到该触发操作对消息, 其中 Trigger id为 Oxffffffff, 各 核缺省匹配都成功, 各核直接执行 action操作, 即直接执行 Ac t i on: "add group group-3 2, 3,4,,;
本实施例中, Core2, 3, 4增加核组 3到自身的 trigger id表中;
S535、 Core2, 3, 4 分另' J向主控核回复 trigger id: group-1, action: "coreid add group-3 ok" , 这里的 coreid分另 ll为 Core2, core3, core4;
5536、 主控核收到该核组中所有核的回复后, 向 HDB发送创建核组 3成 功 RSP包;
5537、 HDB显示创建核组 3成功的消息给用户。
5541、 用户发送创建核组 4命令;
5542、 调试器 HDB收到创建核组 4命令后, 给主控核发送创建核组 4 RSP 包;本实施例中, 主控核为 coreO;
5543、 主控核收到创建核组 4 RSP 包后, 在核间互联总线上发送触发操 作对消息, 该触发操作对消息包含: Trigger id: all, Action: "add group group-4 5, 6, 7", Trigger id为 all, 代表向所有核发送该触发操作对消息; 具体的, Trigger id置为 Oxf f f f f f f f,即 al 1核组。
5544、 各核(本实施例中以 coreX表示)收到该触发操作对消息, 其中 Trigger id为 Oxffffffff, 各核缺省匹配都成功, 各核直接执行 act ion操 作, 即直接执行 Action: "add group group-4 5, 6,7";
本实施例中, Core5, 6, 7增加核组 4到自身的 trigger id表中;
S545、 Core5, 6, 7 分另' J向主控核回复 trigger id: group-1, action: "coreid add group-4 ok" , 这里的 coreid分另 ll为 Core5, core6, core7;
5546、 主控核收到该核组中所有核的回复后, 向 HDB发送创建核组 4成 功 RSP包;
5547、 HDB显示创建核组 4成功的消息给用户;
5551、 用户发送创建核组 5命令;
5552、 调试器 HDB收到创建核组 5命令后, 给主控核发送创建核组 5 RSP 包;本实施例中, 主控核为 coreO;
5553、 主控核收到创建核组 5 RSP 包后, 在核间互联总线上发送触发操 作对消息, 该触发操作对消息包含: Trigger id: all, Action: "add group group-58, 9, 10", Trigger id为 all, 代表向所有核发送该触发操作对消息; 具体的, Trigger id置为 Oxf f f f f f f f,即 al 1核组。
5554、 各核(本实施例中以 coreX表示)收到该触发操作对消息, 其中 Trigger id为 Oxffffffff, 各核缺省匹配都成功, 各核直接执行 act ion操 作, 即直接执行 Action: "add group group-5 8, 9, 10";
本实施例中, Core8, 9, 10增力口核组 5到自身的 trigger id表中;
S555、 Core8, 9, 10 分另' J向主控核回复 trigger id: group-1, action: "coreid add group-5 ok" , 这里的 coreid分另 ll为 Core8, core9, corelO;
5556、 主控核收到该核组中所有核的回复后, 向 HDB发送创建核组 5成 功 RSP包;
5557、 HDB显示创建核组 5成功的消息给用户; 5561、 用户发送创建核组 6命令;
5562、 调试器 HDB收到创建核组 6命令后, 给主控核发送创建核组 6 RSP 包;本实施例中, 主控核为 coreO;
5563、 主控核收到创建核组 6 RSP 包后, 在核间互联总线上发送触发操 作对消息, 该触发操作对消息包含: Trigger id: all, Action: "add group group-6 11, 12, 13", Trigger id为 all, 代表向所有核发送该触发操作对消 息;
具体的, Trigger id置为 Oxf f f f f f f f,即 al 1核组。
5564、 各核(本实施例中以 coreX表示)收到该触发操作对消息, 其中 Trigger id为 Oxffffffff, 各核缺省匹配都成功, 各核直接执行 act ion操 作, 即直接执行 Action: "add group group-6 11, 12, 13";
本实施例中, Corell, 12, 13增力口核组 6到自身的 trigger id表中;
5565、 Corell, 12, 13 分另' J向主控核回复 trigger id: group-1, action: "coreid add group-6 ok", 这里的 coreid分另 ll为 Corel 1, corel2 , corel 3;
5566、 主控核收到该核组中所有核的回复后, 向 HDB发送创建核组 6成 功 RSP包;
5567、 HDB显示创建核组 6成功的消息给用户;
5571、 用户发送创建核组 7命令;
5572、 调试器 HDB收到创建核组 7命令后, 给主控核发送创建核组 7 RSP 包;本实施例中, 主控核为 coreO;
5573、 主控核收到创建核组 7 RSP 包后, 在核间互联总线上发送触发操 作对消息, 该触发操作对消息包含: Trigger id: all, Action: "add group group-7 2, 5, 8, 11", Trigger id为 all, 代表向所有核发送该触发操作对消 息;
具体的, Trigger id置为 Oxf f f f f f f f,即 al 1核组。
5574、 各核(本实施例中以 coreX表示)收到该触发操作对消息, 其中 Trigger id为 Oxffffffff, 各核缺省匹配都成功, 各核直接执行 act ion操 作, 即直接执行 Action: "add group group-7 2, 5,8, 11";
本实施例中, Core2, 5, 8, 11增力口核组 7到自身的 trigger id表中;
5575、 Core2, 5, 8, 11 分另' J向主控核回复 trigger id: group-1, action: "coreid add group-7 ok" , 这里的 coreid 分另 ll为 Core2, core5, core8, corell;
5576、 主控核收到该核组中所有核的回复后, 向 HDB发送创建核组 7成 功 RSP包;
5577、 HDB显示创建核组 7成功的消息给用户;
5581、 用户发送创建核组 8命令;
5582、 调试器 HDB收到创建核组 8命令后, 给主控核发送创建核组 8 RSP 包;本实施例中, 主控核为 coreO;
5583、 主控核收到创建核组 8 RSP 包后, 在核间互联总线上发送触发操 作对消息, 该触发操作对消息包含: Trigger id: all, Action: "add group group-8 1, 3, 4", Trigger id为 all, 代表向所有核发送该触发操作对消息; 具体的, Trigger id置为 Oxf f f f f f f f,即 al 1核组。
5584、 各核(本实施例中以 coreX表示)收到该触发操作对消息, 其中 Trigger id为 Oxffffffff, 各核缺省匹配都成功, 各核直接执行 act ion操 作, 即直接执行 Action: "add group group-8 1, 3,4";
本实施例中, Corel, 3, 4增加核组 8到自身的 trigger id表中; S585、 Corel, 3, 4 分另' J向主控核回复 trigger id: group-1, action: "coreid add group-8 ok" , 这里的 coreid分另 ll为 Corel, core3, core4;
5586、 主控核收到该核组中所有核的回复后, 向 HDB发送创建核组 8成 功 RSP包;
5587、 HDB显示创建核组 8成功的消息给用户。
经过如上交互流程后, 每个核自身都存储有对应的 trigger id 表, 该 trigger id表用于存储该核所属的组, 在一种实现方式下, 每个核具有两个 表,即硬件组表( Hardware Group Table )和软件组表( Software Group Table ), 其中, 所述硬件组表存储于所述当前处理器核的硬件寄存器中, 所述软件组 表存储于所述当前处理器核的存储器中, 核组信息优先存储在硬件组表, 硬 件组表存储量有限, 一般能存储四个核组信息, 当硬件组表满后再存储在软 件组表中, 从而实现对多核核组、 如图 5c所示, 为图 5b的核组场景下, 创 建核组后的硬件组表和软件组表的示意图, 需要说明的是, 为了筒化表示, 这里对 14个核的类型不予区分。
2)删除核组
请参阅图 6a, 为本发明实施例多核分组调试方法的交互示意图, 本实施 例主要介绍: 在运行时, 动态删除由核 2, 5, 8, 11组成的核组 Group7, 该方法应用于如图 3a所示的调试系统环境下, 具体可以包括如下步骤:
5611、 用户发送删除核组 7命令;
5612、调试器 HDB收到该删除核组 7命令后,给主控核发送删除核组 7 RSP 包(RSP, 远程串行协议, HDB远程调试使用的协议)。 本实施例中, 主控核为 coreO; 5613、 主控核收到该删除核组 7 RSP 包后, 在核间互联总线上发送对应 的触发操作对消息, 该触发操作对消息包含: Trigger id: group-7, Action:
"delete"。
需要说明的是, Trigger id为 group-7, 代表向核组 7发送该触发操作 对消息;
需要说明的是, Action操作的内容可以在核间互联总线上, 包含在触发 操作对消息中传递, 也可以只传递包含指向 action操作的地址信息的触发操 作对消息, 对于后者的实现, 接收到该触发操作对消息的核通过该地址信息 来获取 Action操作的内容。 本实施例中, 采用前者的实现, 即 Action操作 的内容直接包含在触发操作对消息中传递。
5614、 多核处理器系统中的各核 (本实施例中以 coreX表示)收到该触 发操作对消息后, 将该触发操作对消息中的 Trigger id 与本核中存储的 trigger id表进行匹酉己, ^口果消息、中的 Trigger id与该 trigger id表中的 一 Trigger id匹配成功,则执行该触发操作对消息中 Action域表示的 action 操作; 反之, 不做任何操作;
本实施例中, 核组 7的各核(核 2, 5, 8, 11 )将收到的触发操作对消息 中的 Trigger id: group-7 与本核中存储的 trigger id 表进行匹配, 则该 Trigger id: group-7
Figure imgf000032_0001
trigger id表中 ό "group 7" 匹酉己成功, 贝 'J执 行该触发操作对消息中 Ac t i on域表示的 de 1 e t e操作;
在一种实现方式下, 每个核自身都存储有对应的 trigger id 表, 该 trigger id表用于存储该核所属的组, 在一种实现方式下, 每个核具有两个 表,即硬件组表( Hardware Group Table )和软件组表( Software Group Table ); 请参阅图 5c, 其中展示有核组 GrouP7中的核 2, 5, 8, 11的硬件组表和软件 组表。
5615、 核 2, 5, 8, 11分另' J向主控核回复 trigger id: group_l, action: "coreid delete group-7 ok", 这里的 coreid分另 ll为 Core2, core5, core8, corell;
一般情况下, 为了仅向主控核 CoreO 回复, 本发明实施例中的 grouP_l 应仅包括 CoreO。
较优的, 本发明实施例中的 group_l 中包括 CoreO、 Corel, 可以使用核 组来担当主控核的工作。 在众核系统中, 通过一组核来作为主控核, 均衡主 控核的通信量。 而且可以达到互为备份的效果。
5616、 主控核收到该核组中所有核的回复后, 向 HDB发送删除核组 7成 功 RSP包;
5617、 HDB显示删除核组 7成功的消息给用户。
如图 6b所示, 图中显示了删除核组 7后, 具有 14个核(包括 2个 CPU 和 12个 DSP) 的多核处理器系统的最新核组情况, 具体的显示了删除核组 7 后, 14个核中每个核的最新硬件组表和软件组表。
3 )动态修改组内各成员核;
请参阅图 7a, 为本发明实施例多核分组调试方法的交互示意图, 本实施 例主要介绍: 在运行时, 动态修改核组 Group3内成员核, 具体的, 以修改核 组 Group3中的核 2为核 5为例进行说明。 该方法应用于如图 3a所示的调试 系统环境下, 具体可以包括如下步骤:
5711、 用户发送删除核组 3命令;
5712、调试器 HDB收到该删除核组 3命令后,给主控核发送删除核组 3 RSP 包(RSP, 远程串行协议, HDB远程调试使用的协议)。 本实施例中, 主控核为 coreO;
5713、 主控核收到该删除核组 3 RSP 包后, 在核间互联总线上发送对应 的触发操作对消息, 该触发操作对消息包含: Trigger id: group-3, Action:
"delete"。
需要说明的是, Trigger id为 group-3, 代表向核组 3发送该触发操作 对消息;
需要说明的是, Action操作的内容可以在核间互联总线上, 包含在触发 操作对消息中传递, 也可以只传递包含指向 action操作的地址信息的触发操 作对消息, 对于后者的实现, 接收到该触发操作对消息的核通过该地址信息 来获取 Action操作的内容。 本实施例中, 采用前者的实现, 即 Action操作 的内容直接包含在触发操作对消息中传递。
5714、 多核处理器系统中的各核 (本实施例中以 coreX表示)收到该触 发操作对消息后, 将该触发操作对消息中的 Trigger id 与本核中存储的 trigger id表进行匹酉己,^口果该 Trigger id与该 trigger id表中的一 Trigger i d匹配成功, 则执行该触发操作对消息中 Ac t i on域表示的 ac t i on操作; 反 之, 不做任何操作;
本实施例中, 核组 3的各核(核 2, 3, 4)将收到的触发操作对消息中的 Trigger id: group_3与本核中存 4诸 tr igger id表进行匹酉己, 贝该 Trigger id: group-3与该 trigger id表中^; group 3匹酉己成功, 贝执行该触发操作对 消息中 Ac t i on域表示的 de 1 e t e操作;
在一种实现方式下, 每个核自身都存储有对应的 trigger id 表, 该 trigger id表用于存储该核所属的组, 在一种实现方式下, 每个核具有两个 表,即硬件组表( Hardware Group Table )和软件组表( Software Group Table ); 请参阅图 6b, 其中也展示有核组 GrouP3中的核 2, 3, 4的硬件组表和软件组 表。
5715、核 2, 3, 4分另 ll向主控核回复 tr igger id: group_l, act ion: "coreid delete group-3 ok" , 这里的 coreid分另 ll为 Core2, core3, core4;
一般情况下, 为了仅向主控核 CoreO 回复, 本发明实施例中的 grouP_l 应仅包括 CoreO。
较优的, 本发明实施例中的 group_l 中包括 CoreO、 Corel, 可以使用核 组来担当主控核的工作。 在众核系统中, 通过一组核来作为主控核, 均衡主 控核的通信量。 而且可以达到互为备份的效果。
5716、 主控核收到该核组中所有核的回复后, 向 HDB发送删除核组 3成 功 RSP包;
5717、 HDB显示删除核组 3成功的消息给用户。
5721、 用户发送创建核组 3命令;
5722、 调试器 HDB收到创建核组 3命令后, 给主控核发送创建核组 3 RSP 包(RSP, 远程串行协议, HDB远程调试使用的协议);本实施例中, 主控核为 coreO;
5723、 主控核收到创建核组 3 RSP 包后, 在核间互联总线上发送触发操 作对消息, 该触发操作对消息包含: Trigger id: all, Action: "add group group-3 3, 4, 5", Trigger id为 all, 代表向所有核发送该触发操作对消息; 具体的, Trigger id置为 Oxf f f f f f f f,即 al 1核组。
5724、 各核(本实施例中以 coreX表示)收到该触发操作对消息, 其中 Trigger id为 Oxffffffff, 各核直接执行 act ion操作, 即直接执行 Action: "add group group-3 3,4,5,,;
本实施例中, Core3, 4, 5增加核组 3到自身的 trigger id表中;
S725、 Core3, 4, 5 分另' J向主控核回复 trigger id: group-1, action: "coreid add group-3 ok" , 这里的 core id分另 ll为 core 3, core4, Core5;
5726、 主控核收到该核组中所有核的回复后, 向 HDB发送创建核组 3成 功 RSP包;
5727、 HDB显示创建核组 3成功的消息给用户。
如图 7b所示, 图中显示了修改核组 3后, 具有 14个核(包括 2个 CPU 和 12个 DSP) 的多核处理器系统的最新核组情况, 具体的显示了修改核组 3 后的, 14个核中每个核的最新硬件组表和软件组表。
用户停止核组场景: 用户发送停止核组 1的命令给 HDB, HDB发送停止核 组 1命令 RSP包给主控核。 主控核收到停止核组 1RSP后, 在核间互联总线上 发送 Trigger: group-1, act ion: " stop,, 。 Group_l 中的各核收到该 trigger— action消息、, trigger id t匕较或匹酉己通过, 而后执行 stop操作。 Core2、 3、 4修改核状态为 stop, 并会向主控核回复停止的地址, 主控核收 到该核组中所有核的回复后, 确认停止核组 1成功。 向 HDB发送核组各核停 止 PC和停止核组成功 RSP包, HDB显示给用户各核停止地址、 行号等信息。
用户运行核组场景: 用户发送运行核组 1的命令给 HDB, HDB发送运行核 组 1命令 RSP包给主控核。 主控核收到运行核组 1命令, 向核间互联总线上 发送 Trigger: group-1, act ion: " cont inue,,。 Group_l 中的各核收到该 trigger-act ion消息、, trigger id t匕较或匹酉己通过, 而后执行 cont inue操 作。 Core2、 3、 4修改核状态为 rum iig。
以上示例, 将核组 1 改为某一单核对应的核组号, 即可对单核执行上述 调试命令。
综上所述, 本发明实施例中, 通过将获取的触发操作对消息中的 t r igger id与当前处理器核中存储的 t r igger id进行匹配, 如果匹配成功, 则执行所 述触发操作对消息中操作域信息所指示的操作 act ion, 以实现能同步触发属 于一种状态或属性的一个或多个处理器核, 这里属于同一种状态或属性的一 个或多个处理器核用同一个 t r igger id标识, 从而增强多核触发的灵活性和 效率, 尤其是增强多核同步触发的灵活性和效率。
进一步的, 当应用于调试场景下时, 本发明实施例基于处理器核的灵活 分组, 通过将获取的第二调试消息中的组标识 group id与当前处理器核中存 储的组标识(所述组标识 group id用于表示所述当前处理器核所属的核组 ) 进行匹配, 如果所述第二调试消息中的组标识 group id与当前处理器核中存 储的组标识 group id匹配成功, 则执行所述第二调试消息中的操作域信息所 指示的操作 act ion, 以实现能同步调试包含在同一核组中的一个或多个处理 器核, 从而增强多核调试的灵活性和效率, 尤其是增强多核分组调试的灵活 性和效率。
进一步, 本发明实施例实现不同架构的多种内核之间的跨多核调试, 且 不限于同构和异构内核, 进而实现整个系统的协同调试。
本发明实施例具有高效的调试功能实现能力。 由于有硬件的支持, 对一 组核的断点操作可以在数个 cyc le至数十个 eye 1 e内完成.而采用核间中断的 方法则在主控核和被调试核之间要有多次通讯,至少是数百个 cyc le以上。 由 于每个核被中断以后, 要去主控核查询到底要做什么操作。
本发明实施例支持灵活的分组实现。 理论上可以支持任意多个逻辑分组 . 用户可以根据被调试程序的特征来决定所需的逻辑分组.硬件 tab le中放不下 以后有软件 table来扩展。
本发明实施例可扩展性好, 体现在: 硬件组表及相关的组件占用的资源 很小,易在众核系统中得到实现。 当处理器核需要定义的核组数超过硬件寄存 器的最大数量时, 可以通过软件方式扩展。
需要说明的是, 本发明实施例可以使用类似于 IP地址分配的方式来管理 核组标识 group ID, 匹配单元可以支持子网掩码方式的匹配或比较, 在众核 规模(超过 1000个核) 时, 可以类似划分子网的方法来管理众核。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流 程, 是可以通过计算机程序来指令相关的硬件来完成, 所述的程序可存储于 一计算机可读取存储介质中, 该程序在执行时, 可包括如上述各方法的实施 例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体( Read-Only Memory, ROM )或随机存储记忆体 ( Random Acces s Memory, RAM )等。
以上举较佳实施例, 对本发明的目的、 技术方案和优点进行了进一步详 细说明, 所应理解的是, 以上所述仅为本发明的较佳实施例而已, 并不用以 限制本发明, 凡在本发明的精神和原则之内, 所作的任何修改、 等同替换、 改进等, 均应包含在本发明的保护范围之内。

Claims

权 利 要 求 书
1.一种触发操作方法, 其特征在于, 应用于包括至少两个处理器核的多 核处理器系统, 该方法包括:
获取触发操作对消息, 所述触发操作对消息包括触发标识 trigger id和 操作域信息;
将所述触发操作对消息中的触发标识 trigger id与当前处理器核中存储 的触发标识 trigger id进行匹配, 如果匹配成功, 则执行所述触发操作对消 息中的操作域信息所指示的操作 action。
2.如权利要求 1 所述的方法, 其特征在于, 所述将所述触发操作对消息 中的触发标识 trigger id与当前处理器核中存储的触发标识 trigger id进 行匹配, 如果匹配成功, 则执行所述触发操作对消息中的操作域信息所指示 的操作 action, 包括:
将所述触发操作对消息中的触发标识 trigger id与当前处理器核的硬件 寄存器中存储的触发标识 trigger id进行匹配, 如果所述触发操作对消息中 的触发标识 trigger id 与所述硬件寄存器中存储的一触发标识 trigger id 匹配成功,则执行所述触发操作对消息中的操作域信息所指示的操作 action。
3.如权利要求 2 所述的方法, 其特征在于, 如果匹配不成功, 所述方法 进一步包括:
将所述触发操作对消息中的触发标识 trigger id与当前处理器核的存储 器中存储的触发标识 trigger id进行匹配, 如果所述触发操作对消息中的触 发标识 trigger id与所述存储器中存储的一触发标识 trigger id匹配成功, 则执行所述触发操作对消息中的操作域信息所指示的操作 action。
4.如权利要求 3所述的方法, 其特征在于, 所述将所述触发操作对消息 中的触发标识 trigger id 与当前处理器核的存储器中存储的触发标识 trigger id进行匹配的步骤之前, 进一步包括:
判断当前处理器核所属的核组数是否大于第一阈值, 若所述核组数大于 所述第一阈值, 则执行所述将所述触发操作对消息中的触发标识 trigger id 与当前处理器核的存储器中存储的触发标识 trigger id进行匹配的步骤。
5.如权利要求 1至 4任一项所述的方法, 其特征在于, 所述获取触发操 作对消息, 包括:
从核间互联总线上接收主控处理器核发送的所述触发操作对消息; 或者, 根据从核间互联总线上接收的核间通信中断, 获得主控处理器核发送的 所述触发操作对消息。
6.如权利要求 1至 4任一项所述的方法, 其特征在于, 所述触发操作对 消息中的触发标识 trigger id为组标识 group id, 或者核标识 core id; 其 中, 所述组标识 group id表示需要执行所述触发操作对消息中的操作域信息 所指示的操作 action的核组; 所述核标识 core id表示需要执行所述操作域 信息所指示的操作 action的处理器核; 所述触发操作对消息中的操作域信息 为操作 action命令, 或者为指向操作 action命令的地址信息, 其中, 所述 操作 act ion命令包括创建组命令、 删除组命令、 停止组命令、 运行组命令、 设置断点的命令 break、 重新开始的命令 resume, 执行一步的命令 step中的 一种或多种。
7.如权利要求 1至 4任一项所述的方法, 其特征在于, 所述触发操作对 消息中的触发标识 trigger id为全局核组标识, 所述操作域信息为创建组命 令, 或者为指向所述创建组命令的地址信息, 其中, 所述创建组命令包含待 创建核组的组标识和加入所述待创建核组的成员核的核标识;
如果所述操作域信息为创建组命令, 所述执行所述触发操作对消息中的 操作域信息所指示的操作 ac t ion的步骤, 包括:
当所述创建组命令中包含的加入待创建核组的成员核的核标识与当前处 理器核的核标识相同时, 根据所述创建组命令将所述创建组命令中包含的待 创建核组的组标识进行存储;
如果所述操作域信息为指向所述创建组命令的地址信息, 所述执行所述 触发操作对消息中的操作域信息所指示的操作 act ion的步骤, 包括:
根据所述地址信息, 获得所述创建组命令;
当所述创建组命令中包含的加入待创建核组的成员核的核标识与当前处 理器核的核标识相同时, 根据所述创建组命令将所述创建组命令中包含的待 创建核组的组标识进行存储。
8.如权利要求 1至 4任一项所述的方法, 其特征在于, 所述触发操作对 消息中的触发标识 t r igger id为组标识 group id , 所述当前处理器核中存储 的触发标识为组标识 group id, 所述组标识 group id用于表示所述当前处理 器核所属的核组;
如果所述操作域信息为删除组命令, 所述执行所述触发操作对消息中的 操作域信息所指示的操作 ac t ion的步骤, 包括:
根据所述删除组命令, 从当前处理器核存储的至少一个组标识 group id 中删除所述触发操作对消息中的组标识 group id;
如果所述操作域信息为指向所述删除组命令的地址信息, 所述执行所述 触发操作对消息中的操作域信息所指示的操作 act ion的步骤, 包括:
根据所述地址信息, 获得所述删除组命令; 根据所述删除组命令, 从当前处理器核存储的至少一个组标识 group id 中删除所述触发操作对消息中的组标识 group id。
9.一种多核处理器系统, 其特征在于, 所述多核处理器系统包括主控核 和多个操作核, 所述主控核和多个操作核之间通过核间互联总线通信, 其中, 所述主控核用于通过所述核间互联总线传输触发操作对消息或指向所述 触发操作对消息的核间通信中断, 其中, 所述触发操作对消息包括触发标识 t r igger id和操作域信息;
所述操作核用于接收所述触发操作对消息, 或根据收到的核间通信中断 获取所述触发操作对消息, 将所述触发操作对消息中的触发标识 t r igger id 与本核中存储的触发标识 t r igger id进行匹配, 如果匹配成功, 则执行所述 触发操作对消息中的操作域信息所指示的操作 act ion。
10.如权利要求 9所述的系统, 其特征在于, 所述触发操作对消息中的触 发标识 t r igger id为组标识 group id , 所述组标识 group id表示需要执行 所述触发操作对消息中的操作域信息所指示的操作 act ion的核组;
所述操作核进一步用于存储待监控核组的组标识和主控核所属的核组的 组标识, 以及用于根据所述待监控核组的组标识和主控核所属的核组的组标 识, 监听所述主控核与待监控核组之间的触发操作对消息交互, 其中, 本操 作核中存储的组标识用于表示本操作核所属的核组。
11.一种处理器核, 其特征在于, 所述处理器核包括:
存储单元, 用于存储一个或多个触发标识 t r igger id, 其中所述触发标 识 t r igger id表示该处理器核所属的核组, 或者该处理器核;
获取单元, 用于获取触发操作对消息, 所述触发操作对消息包括触发标 t r igger id和操作域信息; 匹配单元, 用于将所述触发操作对消息中的触发标识 trigger id与所述 存储单元中存储的触发标识 trigger id进行匹配;
处理单元, 用于在所述匹配单元得到所述触发操作对消息中的触发标识 trigger id与所述存储单元存储的一触发标识 trigger id匹配成功, 执行所 述触发操作对消息中的操作域信息所指示的操作 act ion。
12.如权利要求 11 所述的处理器核, 其特征在于, 所述获取单元具体用 于从核间互联总线上接收触发操作对消息; 或者, 具体用于从核间互联总线 上接收指向所述触发操作对消息的核间通信中断, 根据所述核间通信中断, 获得主控处理器核发送的所述触发操作对消息。
13.如权利要求 11或 12所述的处理器核, 其特征在于, 所述存储单元包 括寄存器和 /或存储器,
所述比较单元包括:
硬件比较单元, 用于将所述触发操作对消息中的触发标识 trigger id与 所述寄存器中存储的触发标识 trigger id进行匹配 /比较, 如果所述触发操 作对消息中的触发标识 trigger id 与所述寄存器中存储的一触发标识 trigger id 匹配成功, 则触发所述处理单元执行所述触发操作对消息中的操 作域信息所指示的操作 action;
软件比较单元, 用于在所述硬件比较单元匹配不成功, 将所述触发操作 对消息中的触发标识 trigger id与所述存储器中存储的触发标识 trigger id 进行匹配, 如果所述触发操作对消息中的触发标识 trigger id与所述存储器 中存储的一触发标识 trigger id匹配成功, 则触发所述处理单元执行所述触 发操作对消息中的操作域信息所指示的操作 a c t i on。
14.如权利要求 13 所述的处理器核, 其特征在于, 所述处理器核进一步 包括:
计算判断器, 用于判断该处理器核所属的核组数是否大于第一阈值; 软件比较单元具体用于在所述硬件比较单元匹配不成功且所述核组数大 于所述第一阈值, 将所述触发操作对消息中的触发标识 t r igger id与所述存 储器中存储的触发标识 t r igger id进行匹配, 如果所述触发操作对消息中的 触发标识 t r igger id与所述存储器中存储的一触发标识 t r igger id 匹配成 功, 则触发所述处理单元执行所述触发操作对消息中的操作域信息所指示的 操作 act ion。
15.—种多核分组调试方法, 其特征在于, 应用于包括至少两个处理器核 的多核处理器系统, 该方法包括:
获取第二调试消息, 所述第二调试消息包括组标识 group id和操作域信 息;
将所述第二调试消息中的组标识 group id与当前处理器核中存储的组表 中的组标识进行匹配, 如果所述第二调试消息中的组标识 g r oup i d与所述组 表中的组标识 group id匹配成功, 则执行所述第二调试消息中的操作域信息 所指示的操作 act ion, 其中所述当前处理器核中存储的组表包括至少一个组 标识 group id,所述组标识 group id用于表示所述当前处理器核所属的核组。
16.如权利要求 15 所述的方法, 其特征在于, 所述组表包括硬件组表和 软件组表, 其中, 所述硬件组表存储于所述当前处理器核的硬件寄存器中, 所述软件组表存储于所述当前处理器核的存储器中;
所述将所述第二调试消息中的组标识 group id与当前处理器核中存储的 组表中的组标识进行匹配, 如果所述第二调试消息中的组标识 group id与所 述组表中的组标识 g r oup i d匹配成功, 则执行所述第二调试消息中的操作域 信息所指示的操作 ac t ion, 包括:
将所述第二调试消息中的组标识 group id与所述硬件组表中的组标识进 行匹配, 如果所述第二调试消息中的组标识 group id与所述硬件组表中的组 标识 group id匹配成功, 则执行所述第二调试消息中的操作域信息所指示的 操作 act ion;
如果匹配不成功, 则将所述第二调试消息中的组标识 group id与所述软 件组表中的组标识进行匹配, 如果匹配成功, 则执行所述第二调试消息中的 操作域信息所指示的操作 ac t ion。
17.如权利要求 15或 16所述的方法, 其特征在于, 所述获取第二调试消 息, 包括:
从核间互联总线上接收主控处理器核发送的所述第二调试消息; 或者, 根据从核间互联总线上接收的核间通信中断, 获得主控处理器核发送的 所述第二调试消息;
其中, 所述主控处理器核响应于用户下发的第一调试消息, 在核间互联 总线上发送转换后的所述第二调试消息。
18.如权利要求 15或 16所述的方法, 其特征在于, 所述第二调试消息中 的操作域信息为操作 act ion命令, 或者为指向操作 act ion命令的地址信息, 其中, 所述 act ion命令为创建组命令、 停止组命令、 运行组命令、 设置断点 的命令 break、 重新开始的命令 resume , 执行一步的命令 s tep中的一种或多 种。
19.如权利要求 15或 16所述的方法, 其特征在于,
所述第二调试消息中的组标识 group id为全局核组标识, 所述操作域信 息为创建组命令, 或者为指向所述创建组命令的地址信息, 其中, 所述创建 组命令包含待创建核组的组标识和加入所述待创建核组的成员核的核标识; 如果所述操作域信息为创建组命令, 所述执行所述第二调试消息中的操 作域信息所指示的操作 act ion的步骤, 包括:
当所述创建组命令中包含的加入待创建核组的成员核的核标识与当前处 理器核的核标识相同时, 根据所述创建组命令将所述创建组命令中包含的待 创建核组的组标识进行存储;
如果所述操作域信息为指向所述创建组命令的地址信息, 所述执行所述 第二调试消息中的操作域信息所指示的操作 act ion的步骤, 包括:
根据所述地址信息, 获得所述创建组命令;
当所述创建组命令中包含的加入待创建核组的成员核的核标识与当前处 理器核的核标识相同时, 根据所述创建组命令将所述创建组命令中包含的待 创建核组的组标识进行存储。
20.如权利要求 15或 16所述的方法, 其特征在于,
如果所述操作域信息为删除组命令, 所述执行所述第二调试消息中的操 作域信息所指示的操作 act ion的步骤, 包括:
根据所述删除组命令, 从当前处理器核存储的至少一个组标识 group id 中删除所述触发操作对消息中的组标识 group id;
如果所述操作域信息为指向所述删除组命令的地址信息, 所述执行所述 第二调试消息中的操作域信息所指示的操作 act ion的步骤, 包括:
根据所述地址信息, 获得所述删除组命令;
根据所述删除组命令, 从当前处理器核存储的至少一个组标识 group id 中删除所述触发操作对消息中的组标识 group id。
21.—种调试系统, 其特征在于, 所述调试系统包括前端调试器和后端调 试平台, 所述后端调试平台部署有多核处理器系统, 所述多核处理器系统包 括主控核和多个操作核, 所述主控核和多个操作核之间通过核间互联总线通 信, 其中,
所述前端调试器用于接收用户下发的调试命令, 将所述调试命令转化成 对应的第一调试消息并向所述主控核发送, 所述第一调试消息包括组标识 group id和操作域信息;
所述主控核用于在收到该第一调试消息后, 转换成核间通信能识别的第 二调试消息, 通过所述核间互联总线发送所述第二调试消息或者指向所述第 二调试消息的核间通信中断;
所述操作核用于接收所述第二调试消息或者根据收到的核间通信中断获 取所述第二调试消息, 将所述第二调试消息中的组标识 group id与本核中存 储的组标识 group id进行匹配, 如果匹配成功, 则执行所述第二调试消息中 的操作域信息所指示的操作 act ion,其中,所述操作核中存储的组标识 group id用于表示本操作核所属的核组。
22.如权利要求 21 所述的系统, 其特征在于, 所述主控核进一步用于将 所述第二调试消息中的组标识 group id与本处理器核中存储的组标识 group id进行匹配, 如果匹配成功, 则执行所述第二调试消息中的操作域信息所指 示的操作 act ion, 其中本处理器核中存储的组标识 group id用于表示本处理 器核所属的核组。
PCT/CN2011/079840 2010-12-31 2011-09-19 触发操作方法、多核分组调试方法、装置及系统 WO2012088930A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
EP11853041.9A EP2562650A4 (en) 2010-12-31 2011-09-19 TRIGGERING AN ACTUATION METHOD AND METHOD, DEVICE AND SYSTEM FOR DEVELOPING A MULTI-C UR GROUP

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201010618249.0A CN102073565B (zh) 2010-12-31 2010-12-31 触发操作方法、多核分组调试方法、装置及系统
CN201010618249.0 2010-12-31

Publications (1)

Publication Number Publication Date
WO2012088930A1 true WO2012088930A1 (zh) 2012-07-05

Family

ID=44032111

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2011/079840 WO2012088930A1 (zh) 2010-12-31 2011-09-19 触发操作方法、多核分组调试方法、装置及系统

Country Status (3)

Country Link
EP (1) EP2562650A4 (zh)
CN (1) CN102073565B (zh)
WO (1) WO2012088930A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113203940A (zh) * 2021-04-29 2021-08-03 桂林电子科技大学 3D NoC测试规划中的并行测试方法
CN116340188A (zh) * 2023-05-26 2023-06-27 深流微智能科技(深圳)有限公司 Gpu芯片渲染任务的调试方法及系统

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102073565B (zh) * 2010-12-31 2014-02-19 华为技术有限公司 触发操作方法、多核分组调试方法、装置及系统
CN102981956B (zh) * 2012-11-30 2016-01-27 华为技术有限公司 overlay符号表建立和查找的方法、装置及程序调制系统
US9208008B2 (en) 2013-07-24 2015-12-08 Qualcomm Incorporated Method and apparatus for multi-chip reduced pin cross triggering to enhance debug experience
CN104750603B (zh) * 2013-12-30 2018-12-11 辰芯科技有限公司 一种多核dsp软件仿真器及其物理层软件测试方法
CN105354136B (zh) 2015-09-25 2018-06-15 华为技术有限公司 一种调试方法、多核处理器和调试设备
CN105224454B (zh) 2015-09-25 2018-06-05 华为技术有限公司 一种调试方法、多核处理器和调试设备
WO2017193287A1 (zh) * 2016-05-10 2017-11-16 华为技术有限公司 多核处理器的调试方法、装置和系统
CN108415842B (zh) * 2018-03-21 2021-01-29 杭州中天微系统有限公司 多核处理器
CN109167692B (zh) * 2018-09-29 2021-11-02 阳光电源股份有限公司 一种设备配套的验证方法、装置、设备和系统
CN109634826B (zh) * 2018-12-12 2022-06-07 深圳忆联信息系统有限公司 控制器极限性能分析方法、装置、计算机设备及存储介质
CN111381147B (zh) * 2018-12-29 2022-03-01 北京灵汐科技有限公司 一种众核芯片的测试方法、装置及测试设备
CN109726135B (zh) * 2019-01-25 2022-06-14 嘉楠明芯(北京)科技有限公司 一种多核调试方法、装置及计算机可读存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1904873A (zh) * 2005-07-28 2007-01-31 大唐移动通信设备有限公司 嵌入式实时操作系统中多核处理器的核间通信方法及装置
CN101169731A (zh) * 2007-12-05 2008-04-30 华为技术有限公司 多路多核服务器及其cpu的虚拟化处理方法
CN101266561A (zh) * 2008-04-29 2008-09-17 中兴通讯股份有限公司 一种在多核多线程处理器中的核间消息通信方法
CN101315648A (zh) * 2008-07-22 2008-12-03 中国科学院计算技术研究所 一种满足systemC语法的多核处理器的事件处理单元组
CN102073565A (zh) * 2010-12-31 2011-05-25 华为技术有限公司 触发操作方法、多核分组调试方法、装置及系统

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5193187A (en) * 1989-12-29 1993-03-09 Supercomputer Systems Limited Partnership Fast interrupt mechanism for interrupting processors in parallel in a multiprocessor system wherein processors are assigned process ID numbers
US6950963B1 (en) * 2000-05-30 2005-09-27 Agere Systems Inc. Control method and apparatus for testing of multiple processor integrated circuits and other digital systems
US6988232B2 (en) * 2001-07-05 2006-01-17 Intellitech Corporation Method and apparatus for optimized parallel testing and access of electronic circuits
DE102005037223A1 (de) * 2004-10-25 2007-02-15 Robert Bosch Gmbh Verfahren und Vorrichtung zur Umschaltung bei einem Rechnersystem mit wenigstens zwei Ausführungseinheiten
DE102005037234A1 (de) * 2005-08-08 2007-02-15 Robert Bosch Gmbh Vorrichtung und Verfahren zur Speicherung von Daten und/oder Befehlen in einem Rechnersystem mit wenigstens zwei Ausführungseinheiten und wenigstens einem ersten Speicher oder Speicherbereich für Daten und/oder Befehle

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1904873A (zh) * 2005-07-28 2007-01-31 大唐移动通信设备有限公司 嵌入式实时操作系统中多核处理器的核间通信方法及装置
CN101169731A (zh) * 2007-12-05 2008-04-30 华为技术有限公司 多路多核服务器及其cpu的虚拟化处理方法
CN101266561A (zh) * 2008-04-29 2008-09-17 中兴通讯股份有限公司 一种在多核多线程处理器中的核间消息通信方法
CN101315648A (zh) * 2008-07-22 2008-12-03 中国科学院计算技术研究所 一种满足systemC语法的多核处理器的事件处理单元组
CN102073565A (zh) * 2010-12-31 2011-05-25 华为技术有限公司 触发操作方法、多核分组调试方法、装置及系统

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113203940A (zh) * 2021-04-29 2021-08-03 桂林电子科技大学 3D NoC测试规划中的并行测试方法
CN113203940B (zh) * 2021-04-29 2023-06-20 桂林电子科技大学 3D NoC测试规划中的并行测试方法
CN116340188A (zh) * 2023-05-26 2023-06-27 深流微智能科技(深圳)有限公司 Gpu芯片渲染任务的调试方法及系统
CN116340188B (zh) * 2023-05-26 2023-08-04 深流微智能科技(深圳)有限公司 Gpu芯片渲染任务的调试方法及系统

Also Published As

Publication number Publication date
CN102073565B (zh) 2014-02-19
EP2562650A1 (en) 2013-02-27
CN102073565A (zh) 2011-05-25
EP2562650A4 (en) 2013-06-26

Similar Documents

Publication Publication Date Title
WO2012088930A1 (zh) 触发操作方法、多核分组调试方法、装置及系统
US8478834B2 (en) Low latency, high bandwidth data communications between compute nodes in a parallel computer
US8893150B2 (en) Runtime optimization of an application executing on a parallel computer
US8018951B2 (en) Pacing a data transfer operation between compute nodes on a parallel computer
WO2017050287A1 (zh) 一种调试方法、多核处理器和调试设备
US9009312B2 (en) Controlling access to a resource in a distributed computing system with a distributed access request queue
WO2019095655A1 (zh) 一种数据交互方法和计算设备
US7818623B2 (en) Kernel debugging in a cluster computing system
US9336071B2 (en) Administering incomplete data communications messages in a parallel computer
WO2011016595A1 (ko) 원격 디버깅을 위한 웹 기반 소프트웨어 디버깅 장치 및 그 방법
CN108156181B (zh) 一种基于协程异步io的漏洞探测方法及其漏洞扫描系统
US20100268852A1 (en) Replenishing Data Descriptors in a DMA Injection FIFO Buffer
US9348661B2 (en) Assigning a unique identifier to a communicator
WO2017107576A1 (zh) 一种生成处理器故障记录的方法及装置
US8959172B2 (en) Self-pacing direct memory access data transfer operations for compute nodes in a parallel computer
US20090046585A1 (en) Determining Communications Latency for Transmissions Between Nodes in a Data Communications Network
WO2024012003A1 (zh) 数据处理方法、装置、设备、存储介质和程序产品
WO2010006529A1 (zh) 数据卡的操作模式切换及其控制方法、装置及数据卡
US7890597B2 (en) Direct memory access transfer completion notification
US10229033B2 (en) System, method and apparatus for debugging of reactive applications
WO2013037300A1 (zh) 并行模拟多个处理器的方法及系统、调度器
WO2012167536A1 (zh) 多线程协同仿真方法及系统
US9146771B2 (en) Responding to a timeout of a message in a parallel computer
KR20110083243A (ko) 태스크 이동 시스템 및 그 방법
US20150193261A1 (en) Administering Message Acknowledgements In A Parallel Computer

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: 11853041

Country of ref document: EP

Kind code of ref document: A1

REEP Request for entry into the european phase

Ref document number: 2011853041

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 2011853041

Country of ref document: EP

NENP Non-entry into the national phase

Ref country code: DE