Test method, microprocessor architecture and computing device
By introducing multiple processor cores into the application processor and utilizing input and output processors, efficient and accurate testing of multiple peripheral controllers in the microprocessor architecture is solved, and the test efficiency and indistinguishability in the prior art are solved. IOP and peripheral controller problems realize parallel testing and mixed stress testing of multiple peripheral controllers.
Patent Information
- Application Number
- CN202411110506.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-13
- Publication Date
- 2024-11-26
Smart Images

Figure CN119025353A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a testing method, a microprocessor architecture and a computing device. Background Art
[0002] The Input Output Processor (IOP) is a dedicated processor set in the microprocessor architecture to assist the Application Processor (AP) in interacting with peripherals. The IOP core is included in the IOP, and each peripheral controller in the microprocessor architecture interacts with the corresponding peripherals under the control of the IOP core.
[0003] When testing the above-mentioned microprocessor architecture, it is necessary to test the peripheral controllers to ensure that the functions and performance of each peripheral controller meet the requirements. Summary of the invention
[0004] In response to the above technical problems, the present application proposes a testing method, a microprocessor architecture and a computing device, which can accurately test the peripheral controllers in the microprocessor architecture and improve the testing efficiency of the peripheral controllers in the microprocessor architecture.
[0005] In a first aspect, the present application provides a testing method, which is applied to a microprocessor architecture, wherein the microprocessor architecture includes an application processor, an input / output processor, and a plurality of peripheral controllers, wherein the application processor includes a plurality of processor cores, and the method includes:
[0006] When the startup program is completed, the first processor core in the application processor starts at least one other processor core and allocates test tasks to the first processor core and the at least one other processor core respectively; wherein one test task is used to test one peripheral controller;
[0007] The first processor core and the at least one other processor core respectively execute respective test tasks to complete the test of multiple peripheral controllers.
[0008] In some implementations, the first processor core starts at least one other processor core and assigns test tasks to the first processor core and the at least one other processor core respectively, including:
[0009] The first processor core starts at least one other processor core based on the acquired test instruction and allocates test tasks to the first processor core and the at least one other processor core respectively;
[0010] The test instruction includes information about a processor core that needs to execute a test task and information about a test task that the processor core that needs to execute the test task needs to execute.
[0011] In some implementations, the first processor core starts at least one other processor core based on the acquired test instruction and allocates test tasks to the first processor core and the at least one other processor core respectively, including:
[0012] The first processor core starts at least one other processor core based on the acquired first test instruction; wherein the first test instruction includes information of the processor core that needs to execute the test task;
[0013] The first processor core allocates test tasks to the first processor core and the at least one other processor core respectively based on the acquired second test instruction; wherein the second test instruction includes test task information that each processor core that needs to execute the test task needs to execute.
[0014] In some implementations, the first processor core starts at least one other processor core based on the acquired first test instruction, including:
[0015] The first processor core powers on at least one other processor core by calling a power management interface based on the acquired first test instruction;
[0016] The at least one other processor core performs an initialization operation after being powered on, and enters a sleep state after the initialization operation is completed.
[0017] In some implementations, the first processor core assigns test tasks to the first processor core and the at least one other processor core respectively based on the acquired second test instruction, including:
[0018] The first processor core generates a plurality of data groups based on the second test instruction and stores the data groups in the memory, wherein any of the data groups includes an identifier of a processor core that needs to execute a test task and information about the test task that the processor core needs to execute.
[0019] In some implementations, the first processor core and the at least one other processor core respectively perform respective test tasks to complete the test of the plurality of peripheral controllers, including:
[0020] The first processor core controls the first processor core and the at least one other processor core to synchronously start executing respective test tasks, so as to complete the test of multiple peripheral controllers.
[0021] In some implementations, the first processor core controls the first processor core and the at least one other processor core to synchronously start executing respective test tasks to complete the test of the plurality of peripheral controllers, including:
[0022] The first processor core wakes up the at least one other processing core so that the at least one other processing core acquires the respective test tasks;
[0023] The first processor core sends a test start instruction to the at least one other processor core, so that the first processor core and the at least one other processor core synchronously start to execute their respective test tasks, so as to complete the test of multiple peripheral controllers.
[0024] In some implementations, the method further includes:
[0025] When the at least one other processor core completes the test task, the at least one other processor core sends the test record data to the first processor core;
[0026] The first processor core determines performance test results for multiple peripheral controllers based on the test record data.
[0027] A second aspect of the present application proposes a microprocessor architecture, including an application processor, an input / output processor, and a plurality of peripheral controllers, wherein the application processor includes a plurality of processor cores, and the application processor is configured to execute the above-mentioned test method.
[0028] A third aspect of the present application provides a computing device, comprising the above-mentioned microprocessor architecture.
[0029] The test method proposed in this application performs an IOP test when the application processor runs a startup program. Since the startup program is relatively simple and does not have a complex driver framework and task scheduling, when a problem is found during the test, it can be accurately identified as a problem with the IOP, thereby improving the convenience and accuracy of the IOP test.
[0030] On the other hand, the test method proposed in the present application uses the first processor core in the application processor to schedule other processor cores to perform different test tasks respectively, so that multiple processor cores can respectively perform tests on different peripheral controllers, thereby achieving the purpose of testing multiple peripheral controllers at the same time and improving test efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0032] Figure 1 A schematic diagram of the structure of a microprocessor architecture provided in an embodiment of the present application.
[0033] Figure 2 A flow chart of a testing method provided in an embodiment of the present application.
[0034] Figure 3 A schematic diagram of the process of multiple processor cores executing peripheral controller testing tasks provided in an embodiment of the present application.
[0035] Figure 4 A schematic diagram of the structure of another microprocessor architecture provided in an embodiment of the present application. DETAILED DESCRIPTION
[0036] The embodiment of the present application proposes an innovative microprocessor architecture, and based on the microprocessor architecture, proposes an innovative testing scheme for peripheral controllers in the microprocessor architecture, which can achieve more efficient and accurate functional and performance testing of multiple peripheral controllers in the microprocessor architecture.
[0037] The embodiment of the present application first proposes a microprocessor architecture, which is specifically a heterogeneous multi-core microprocessor architecture.
[0038] See also Figure 1 As shown, the microprocessor architecture includes:
[0039] An application processor 100 , an input / output processor 110 and at least one peripheral controller 120 , wherein the application processor 100 is communicatively connected to the input / output processor 110 via an on-chip network 130 , and the input / output processor 110 is connected to the at least one peripheral controller 120 , respectively.
[0040] The on-chip network 130 is a communication network between various components within the entire microprocessor architecture, and is used to provide communication links between various components within the microprocessor architecture. Various types of buses, bus interfaces, etc. can be integrated in the on-chip network 130 to meet the communication requirements between the input and output processor 110 and the application processor 100 based on any type of bus.
[0041] The application processor 100 includes one or more processor cores, such as one or more Figure 1The processor core 101 shown in the figure is the operation and control center of the entire microprocessor architecture, which is used to execute instructions and operations. At the same time, as the main processor core of the entire microprocessor architecture, the processor core 101 is also used to start and control other processor cores in the microprocessor architecture, such as the second processor core. For example, before the second processor core 111 in the input-output processor 110 is started, the processor core 101 of the application processor 100 copies the firmware program stored in the memory to the memory 113 of the input-output processor 110, so that the second processor core 111 in the input-output processor 110 can load the firmware program from the memory 113 to start running.
[0042] The at least one peripheral controller 120 mentioned above may include any external device connected to the microprocessor architecture or a controller corresponding to an external device interface, such as a UART (Universal Asynchronous Receiver / Transmitter) controller, an I2C (Inter-Integrated Circuit) controller, an SPI (Serial Peripheral Interface) controller, an SD (Secure Digital) controller, a GMAC controller (Gigabit Media Access Controller), and the like.
[0043] In the embodiment of the present application, the above-mentioned peripheral controller 120 may include a controller of a low-speed peripheral. In this embodiment, the low-speed peripheral controller 120 is connected to the application processor 100 through the input-output processor 110, and the input-output processor 110 performs communication interaction with the low-speed peripheral, thereby avoiding the application processor 100 directly communicating with the low-speed peripheral and affecting the performance of the application processor 100.
[0044] In other embodiments, the high-speed peripheral controller in the microprocessor architecture can be directly connected to the application processor 100 through a separate path, so that the application processor 100 can directly communicate and interact with the high-speed peripheral controller, thereby ensuring the smooth execution of the high-speed peripheral interaction service.
[0045] In addition, in some embodiments, the application processor 100 may directly interact with some low-speed peripheral controllers when the input / output processor 110 is operating at full capacity.
[0046] In some embodiments, it is possible to flexibly select which peripheral controllers are connected to the application processor 100 through the input / output processor 110, or flexibly select which peripheral controllers are directly connected to the application processor 100. Alternatively, for a certain peripheral controller, the peripheral controller may interact directly with the application processor 100 in some cases, or the interaction between the peripheral controller and the application processor 100 may be realized through the input / output processor 110 in some cases.
[0047] The input / output processor 110 is a hardware structure specially provided in the microprocessor architecture in the embodiment of the present application for executing data communication operations between the application processor 100 and each peripheral controller 120 .
[0048] The input-output processor 110 includes a second processor core 111 and at least one memory 113. The at least one memory 111 is provided with a shared storage space corresponding to each peripheral controller. Inside the input-output processor 110, various components such as the second processor core 111 and at least one memory 113 are connected via a network interconnection module 112, and various components inside the input-output processor 110 are respectively connected to at least one peripheral controller 120 via the network interconnection module 112.
[0049] In addition, the driver programs of the peripheral controllers 120 are installed in the input / output processor 110, so that the input / output processor 110 can control the peripheral controllers 120 by running the driver programs of the peripheral controllers 120.
[0050] The above-mentioned second processor core 111 is a slave core of the heterogeneous multi-core microprocessor architecture, specifically a RISC-V (Reduced Instruction Set Computer-Five, the fifth generation reduced instruction set computer) core, that is, a processor core of the RISC-V instruction architecture, which mainly completes instruction access to modules with low real-time requirements such as low-speed peripherals.
[0051] The memory 113 in the input / output processor 110 may be a memory such as DDR, SRAM, or a combination of these memories. In the memory 113, a corresponding shared storage space is allocated to each peripheral controller 120.
[0052] The network interconnection module 112 is connected to the on-chip network 130, so that the network interconnection module 112 is connected to the application processor 100. At the same time, the network interconnection module 112 is also connected to at least one peripheral controller 120 and other parts inside the input and output processor 100, such as Figure 2 As shown in , the network interconnection module 112 is connected to the memory 113 and the second processor core 111 respectively.
[0053] The network interconnection module 112 serves as a communication route inside the input / output processor 110 , and is used to provide a communication link for the application processor 100 , the at least one peripheral controller 120 , and various parts inside the input / output processor 110 .
[0054] Various types of buses, bus interfaces, etc. can be integrated in the network interconnection module 112 to meet the communication requirements based on any type of bus between various parts within the input / output processor 110, and at the same time meet the communication requirements based on any type of bus between the input / output processor 110 and components such as the application processor 100 and the peripheral controller 120.
[0055] Different from the conventional heterogeneous multi-core microprocessor architecture, the microprocessor architecture proposed in the embodiment of the present application integrates the second processor core 111 and the memory 113 together through the network interconnection module 112 to form an input-output processor, and the input-output processor 110 is connected to the peripheral controller 120. Based on the above structural optimization, the input-output processor 110 is constructed in the microprocessor architecture as an intermediate medium between the application processor 100 and each peripheral controller 120. The application processor 100 only needs to be connected to the input-output processor 110, and the input-output processor 110 is connected to each peripheral controller respectively, so that the application processor 100 does not need to establish a communication link with each peripheral controller separately.
[0056] At the same time, based on the above-mentioned setting of the input and output processor 110, in the interaction scenario between the first processor 100 and the peripheral controller, the input and output processor 110 can replace the first processor 100 to perform at least part of the interaction operations with the peripheral controller, thereby saving the processing resources of the first processor 100.
[0057] like Figure 1 As shown, at least one peripheral controller 120 in the microprocessor architecture proposed in the embodiment of the present application is arranged outside the input-output processor 110, and at this time, each peripheral controller 120 is connected to the input-output processor 110 through the peripheral controller interface of the input-output processor 110. The above peripheral controller setting method can more conveniently delete or add peripheral controllers connected to the input-output processor 110, so that the peripheral controller can be flexibly adjusted to communicate and interact directly with the application processor 100, or to communicate and interact with the application processor 100 through the input-output processor 110.
[0058] In other embodiments, one or more of the at least one peripheral controller 120 in the above-mentioned microprocessor architecture may be arranged inside the input-output processor 110, and the peripheral controller arranged inside the input-output processor 110 may be connected to other parts of the input-output processor 110 through the communication link inside the input-output processor 110. The above-mentioned peripheral controller arrangement method can, on the one hand, improve the security of the peripheral controller, that is, the application processor 100 must interact with the peripheral controller through the input-output processor 110, and the application processor 100 cannot interact with the peripheral controller directly, so that the security of the peripheral controller can be ensured by the input-output processor 110, for example, the input-output processor 110 performs security verification and security control on the interaction process between the application processor 100 and the peripheral controller; on the other hand, arranging the peripheral controller inside the input-output processor 110 can facilitate the modification, adjustment, optimization and other operations of the peripheral controller inside the input-output processor, so that the manufacturer of the input-output processor completely privatizes the peripheral controller without describing any information of the peripheral controller to the outside.
[0059] Before the above-mentioned microprocessor architecture is produced, it is necessary to test the peripheral controllers in the microprocessor architecture, such as functional testing, performance testing, mixed stress testing, etc.
[0060] The existing test solution is to run the operating system on the application processor 100 and perform multi-task testing after entering the operating system, that is, to execute test tasks for each peripheral controller in the operating system. However, the driver framework and task scheduling in the operating system are relatively complex, and when a problem is found, it is difficult to determine whether it is a problem with the operating system driver or a problem with the peripheral controller driver on the input / output processor side.
[0061] In order to test the peripheral controller more accurately, a startup program (such as uboot) can be used to test the peripheral controller during the debugging phase, that is, when the application processor 100 runs the startup program, the test task of the peripheral controller is executed. Since the startup program is relatively simple, the problem of the peripheral controller driver on the input and output processor side can be easily discovered.
[0062] However, since the boot program only runs on the main core of the application processor 100, the application processor 100 can only test multiple peripheral controllers one by one by running the boot program, and its test efficiency is low, and it is impossible to implement mixed stress testing of multiple peripheral controllers running concurrently.
[0063] In response to the above technical solution, an embodiment of the present application proposes a new testing method based on the above microprocessor architecture. This method can test multiple peripheral controllers in the above microprocessor architecture more efficiently and accurately, and can realize mixed stress testing of multiple peripheral controllers.
[0064] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0065] The test method proposed in the embodiment of the present application is applied to the application processor in the above-mentioned microprocessor architecture, and the application processor includes multiple processor cores. According to the different division of labor of each processor core, the multiple processor cores can be divided into a master core and a slave core. The test method proposed in the embodiment of the present application is led by the master core in the application processor, and the multiple processor cores implement the test of multiple peripheral controllers by calling the input and output processor IOP.
[0066] See also Figure 2 As shown, the testing method proposed in the embodiment of the present application includes:
[0067] S101: A first processor core in an application processor runs a startup program.
[0068] Specifically, the first processor core mentioned above is a main core in a multi-core application processor.
[0069] When the application processor is powered on, the first processor core starts running first. At this time, the first processor core starts to run the startup program (such as uboot) to complete the necessary processor architecture initialization, such as exception vector table initialization, MMU (Memory Management Unit), stack initialization, and complete the initialization of basic modules, such as serial port initialization, PCIE (Peripheral Component Interconnect Express) initialization, DDR (Double Data Rate Synchronous Dynamic Random Access Memory) initialization.
[0070] S102: When the startup program is completed, the first processor core starts at least one other processor core based on the acquired first test instruction.
[0071] Specifically, after the startup program is finished running, the first processor core does not boot the operating system first, but enters the startup program command line. At this time, the tester can enter a test instruction in the startup program command line.
[0072] If the first processor core does not receive any test instruction input by the tester after entering the startup program command line for a certain period of time, the first processor core starts to guide the operating system to start.
[0073] If the first processor core receives a first test instruction input by a tester and including information of a processor core that needs to execute a test task, the first processor core starts at least one other processor core indicated by the first test instruction based on the obtained first test instruction.
[0074] The first test instruction includes instruction information and instruction parameters, wherein the instruction information is used to instruct the first processor core to start other processor cores, such as "start AP slave core"; the instruction parameters mainly include information of other processor cores to be started, such as ID information of other processor cores to be started. The other processor cores to be started are processor cores that need to perform test tasks on the peripheral controller.
[0075] The first test instruction may include information about one other processor core that needs to execute the test task, or may include information about multiple other processor cores that need to execute the test task.
[0076] When testing multiple peripheral controllers, multiple application processor cores are required to respectively perform the test on one peripheral controller, and multiple other processor cores need to be started. In this case, the tester can write the first test instruction including the information of one other processor core that needs to perform the test task in the startup program command line multiple times, and each time the first processor core receives a first test instruction, it completes the startup of one other processor core that needs to perform the test task until a sufficient number of processor cores are started; or, the tester can also write the first test instruction including the information of multiple other processor cores that need to perform the test task in the startup program command line, and the first processor core starts multiple other processor cores by executing the first test instruction.
[0077] After the other processor cores are started under the control of the first processor core, they can enter a dormant state, waiting to be subsequently awakened by the first processor core and execute a test task for the peripheral controller.
[0078] In some embodiments, after obtaining the first test instruction, the first processor core powers on at least one other processor core that needs to be started by calling the power management interface of the microprocessor architecture. Alternatively, the first processor core powers on other processor cores by calling the system control processor.
[0079] S103, the at least one other processor core performs initialization operations after powering on, for example, initializing the exception vector table, stack, mmu, etc., and after completing the initialization operations, enters the main function and enters the sleep state in the main function.
[0080] S104: The first processor core allocates test tasks to the first processor core and the at least one other processor core respectively based on the acquired second test instruction.
[0081] Specifically, after completing the startup of other processor cores, the first processor core returns to the startup program command line, at which time the tester can continue to input the second test instruction including the test task information that each processor core that needs to execute the test task needs to execute in the startup program command line. Correspondingly, after the first processor core obtains the above second test instruction, the test tasks are respectively allocated to the first processor core and the at least one other processor core that is started.
[0082] The above-mentioned second test instruction also includes instruction information and instruction parameters, wherein the instruction information is used to instruct the first processor core to assign test tasks to each processor core, for example, the instruction information may be "assign test tasks to processor cores"; the instruction parameters mainly include information about each processor core that needs to execute test tasks (such as the ID information of the processor core), and information about the test tasks that each processor core needs to execute (such as the test task name). Based on the instruction parameters, the test tasks that each processor core that needs to execute test tasks must execute can be clearly identified.
[0083] After acquiring the second test instruction, the first processor core allocates test tasks to each started processor core according to the second test instruction.
[0084] For example, the first processor core sends the test task information to be executed to each started processor core according to the second test instruction.
[0085] Alternatively, the first processor core, based on the information in the acquired second test instruction, forms a data group with the processor core ID and the information of the test task that the processor core needs to execute, and stores it in the memory. Through the above processing, a corresponding data group is generated for each started processor core, and these data groups are stored in the memory. Each processor core accesses the memory and reads the data group corresponding to its own ID, thereby obtaining the test task information that it needs to execute from the data group.
[0086] Through the above processing, when the startup program is completed, the first processor core starts at least one other processor core based on the acquired test instruction and allocates test tasks to the first processor core and the at least one other processor core respectively. In other words, the first processor core allocates the test tasks for multiple peripheral controllers to multiple different processor cores.
[0087] Among them, the above-mentioned test tasks for peripheral controllers are test tasks that have been pre-configured in the application processor or the microprocessor architecture. The test methods, test processes, etc. for the test tasks of each peripheral controller are known or can be directly obtained for each processor core. Therefore, the embodiment of the present application only needs to assign test tasks to each processor core, that is, to clarify the information of the test tasks that each processor core needs to perform, without assigning specific task content to the processor core. When executing the test task, each processor core can determine the specific test content through the information of the test task, or query and obtain the specific test content based on the information of the test task.
[0088] S105. The first processor core and the at least one other processor core respectively execute respective test tasks to complete the test of multiple peripheral controllers.
[0089] Specifically, after the first processor core allocates test tasks to the first processor core and at least one other processing core started by the first processor core, the first processor core and the at least one other processing core started by the first processor core respectively execute their own test tasks.
[0090] Since one test task is used to test one peripheral controller, each processor core executes one test task respectively, that is, each processor core executes the test on one peripheral controller respectively.
[0091] Since the peripheral controller is connected to the application processor via the input-output processor, in the above-mentioned test process, each processor core implements the test of the peripheral controller by interacting with the input-output processor.
[0092] Taking the write performance test of the SPI controller by the processor core as an example, the processor core and the input and output processor implement the test of the SPI controller through the following A1-A processing:
[0093] A1. The processor core starts running the SPI write performance test task and records the start time.
[0094] A2. The processor core runs the SPI write performance test task, writes the SPI write command, related parameters and data to be sent to the shared memory, and triggers an interrupt to notify the input and output processor that there is a command to be processed.
[0095] A3. The input / output processor receives an interrupt and wakes up the SPI peripheral task. The peripheral task reads the command in the shared memory and starts executing.
[0096] A4. The input / output processor sends the data to be sent in the shared memory through the SPI interface. After all the data are sent, a write command completion signal is returned to the processor core.
[0097] A5. After receiving the command completion signal, the SPI write performance test task of the processor core continues to send the next write data instruction to the input and output processor.
[0098] Repeat A2-A5 until the SPI write performance test task of the processor core completes sending all the data that needs to be sent (the processor core sends a write command to the input and output processor once, and can write 256B of data. If the write data volume set for the write performance test is 8M, then the processor core needs to send 8MB / 256B=32768 write commands to the input and output processor, that is, steps A2-A5 are repeated 32768 times), and record the completion time at this time. Finally, the processor core can obtain the SPI write rate by calculating the data volume ÷ (completion time-start time).
[0099] During the above-mentioned SPI controller test process, other processor cores can respectively execute tests on other peripheral controllers, such as testing the UART controller, i2c controller, etc., so as to achieve the purpose of testing multiple peripheral controllers at the same time and improve the test efficiency.
[0100] Figure 3 The schematic diagram shows that multiple processor cores core0-coren in the application processor AP interact with the input and output processor IOP to perform test tasks on each peripheral controller. Figure 3 It can be seen that since the multiple processor cores in the application processor execute the test on the multiple peripheral controllers, the parallel test on the multiple peripheral controllers is realized, thereby improving the test efficiency.
[0101] In other embodiments, when the multiple processor cores execute test tasks respectively, the first processor core controls the first processor core and the at least one other processor core to synchronously start executing their respective test tasks to complete the test of the multiple peripheral controllers.
[0102] For example, after the first processor core assigns test tasks to each processor core that has completed startup, it sends a test startup instruction to each processor core synchronously, so that each processor core starts to execute the test task synchronously, that is, each processor core starts to test multiple peripheral controllers at the same time. At this time, multiple peripheral controllers start working at the same time, which can realize mixed stress testing of peripheral controllers in the microprocessor architecture, thereby solving the problem that mixed stress testing of peripheral controllers in the microprocessor architecture cannot be realized due to the main core of the application processor core running the startup program.
[0103] In some other embodiments, it is disclosed that after a first processor core starts at least one other processor core, the other processor cores started by the first processor core enter a dormant state.
[0104] When the first processor core assigns test tasks to each started processor core and stores the data groups generated when assigning test tasks into the memory, the first processor core wakes up the dormant processor cores. At this time, each processor core finds the data group that matches itself from the memory and obtains the information of the test tasks to be executed from the data group.
[0105] After each processor core obtains its own test task, it enters a loop waiting state.
[0106] Finally, the first processor core sends a test start instruction to other processor cores, so that each processor core starts to execute its own test task synchronously, so as to complete the synchronous test of multiple peripheral controllers.
[0107] S106: When the execution of the test task is completed, the at least one other processor core sends the test record data to the first processor core.
[0108] Specifically, when executing the test task, each processor core other than the first processor core sends the obtained test record data to the first processor core.
[0109] S107: The first processor core determines performance test results for multiple peripheral controllers based on the test record data.
[0110] Specifically, after receiving the test record data sent by other processor cores, the first processor core aggregates the test record data of all peripheral controllers to obtain performance test results of multiple peripheral controllers.
[0111] For example, in a scenario where multiple peripheral controllers are tested synchronously, the performance of each peripheral controller in a mixed stress test can be analyzed by aggregating the test record data of each peripheral controller.
[0112] From the above introduction, it can be seen that the test method proposed in the embodiment of the present application performs an IOP test when the application processor finishes running the startup program. Since the startup program is relatively simple and does not have a complex driver framework and task scheduling, when a problem is found during the test, it can be accurately identified as a problem with the IOP, thereby improving the convenience and accuracy of the IOP test.
[0113] On the other hand, the test method proposed in the present application uses the first processor core in the application processor to schedule other processor cores to perform different test tasks respectively, so that multiple processor cores can respectively perform tests on different peripheral controllers, thereby achieving the purpose of testing multiple peripheral controllers at the same time and improving test efficiency.
[0114] In addition, the testing method proposed in the embodiment of the present application can also be controlled by the first processor core to control multiple processor cores to synchronously execute tests on multiple peripheral controllers, thereby achieving mixed stress testing of multiple peripheral controllers, solving the problem that a single processor core cannot achieve mixed stress testing when testing peripheral controllers through a startup program.
[0115] Another embodiment of the present application also proposes another microprocessor architecture, see Figure 4 As shown, the microprocessor architecture includes an application processor AP, an input-output processor IOP, and multiple peripheral controllers, and the application processor includes multiple processor cores.
[0116] The multiple processor cores core0 to coren in the application processor may be processor cores with exactly the same performance and parameters, or may be processor cores with different performance and / or parameters. The multiple processor cores may be divided into different clusters, such as Figure 4 In the 8-core application processor shown, core0, core1, core2, and core3 are divided into one cluster (cluster0), and processor cores core4, core5, core6, and core7 are divided into another cluster (cluster1). Different clusters can be used to execute different multi-core computing tasks. For example, the four processor cores in cluster0 can be used together to execute task 1, while the four processor cores in cluster1 can be used together to execute task 2.
[0117] like Figure 4As shown in the figure, the plurality of peripheral controllers may include controllers of interfaces or peripherals such as SPI, I2C, UART, I2S (Inter-IC Sound, integrated circuit built-in audio bus), MMC (Multi-Media Card, multimedia card), GMAC, etc. In actual situations, the peripheral controllers included in the microprocessor architecture are not limited to Figure 4 The peripheral controller shown in FIG. 4 may be part or all of the peripheral controllers shown in FIG. 4 , or may be a peripheral controller with Figure 4 The peripheral controllers shown are different from the controllers that can also be included in Figure 4 In the case of the peripheral controller shown, other peripheral controllers are also included.
[0118] Multiple peripheral controllers can be Figure 4 As shown, it is set inside the input and output processor IOP, or it can also refer to Figure 1 In the above-mentioned method, a plurality of peripheral controllers are arranged outside the input-output processor IOP.
[0119] The peripheral controller is connected to the hardware peripherals through a standard bus, thereby achieving access to and control of the hardware peripherals.
[0120] The application processor AP communicates with the input output processor IOP through a hardware channel (such as inter-core communication), and shared content is set for the application processor AP and the input output processor IOP in the microprocessor architecture, so that the two can achieve data interaction and communication through the shared memory.
[0121] In addition, if Figure 4 As shown, a SCP (System Control Processor) system control processor is also provided in the microprocessor architecture. The system control processor serves as the clock reset control center of the entire microprocessor architecture, mainly providing working clocks and clock frequency adjustment for each module of the microprocessor architecture, and controlling the reset and power on and off of each module, such as being responsible for powering on and off the processor core in the application processor AP. The processor core in the application processor AP can also power on or off other processor cores by calling SCP.
[0122] For the structures and functions of the application processor AP, input / output processor IOP and peripheral controller in the above microprocessor architecture, please refer to Figure 1 The corresponding introduction in the microprocessor architecture shown will not be repeated here.
[0123] The application processor in the above-mentioned microprocessor architecture is configured to execute the test method described in any of the above-mentioned embodiments, thereby enabling efficient and accurate testing of multiple peripheral controllers in the microprocessor architecture, and enabling mixed stress testing of multiple peripheral controllers.
[0124] The microprocessor architecture provided in this embodiment belongs to the same application concept as the test method provided in the above embodiment of this application, and can execute the test method provided in any of the above embodiments of this application, and has the corresponding functional modules and beneficial effects of executing the test method. For the technical details not fully described in this embodiment, please refer to the specific processing content of the test method provided in the above embodiment of this application, and will not be repeated here.
[0125] Another embodiment of the present application further provides a computing device, which includes the above-mentioned microprocessor architecture. Exemplarily, the computing device can be a computer, a laptop, a smart terminal, a smart wearable device, a server, and the like.
[0126] For the aforementioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the order of the actions described, because according to the present application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0127] It should be noted that each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the embodiments can be referred to each other. For the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0128] The steps in the methods of each embodiment of the present application can be adjusted in order, combined and deleted according to actual needs, and the technical features recorded in each embodiment can be replaced or combined.
[0129] The modules and sub-modules in the devices and terminals of the various embodiments of the present application can be combined, divided and deleted according to actual needs.
[0130] In the several embodiments provided in the present application, it should be understood that the disclosed terminals, devices and methods can be implemented in other ways. For example, the terminal embodiments described above are only schematic, for example, the division of modules or submodules is only a logical function division, and there may be other division methods in actual implementation, for example, multiple submodules or modules can be combined or integrated into another module, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or modules, which can be electrical, mechanical or other forms.
[0131] The modules or submodules described as separate components may or may not be physically separated, and the components of the modules or submodules may or may not be physical modules or submodules, that is, they may be located in one place, or they may be distributed on multiple network modules or submodules. Some or all of the modules or submodules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0132] In addition, each functional module or submodule in each embodiment of the present application may be integrated into one processing module, or each module or submodule may exist physically separately, or two or more modules or submodules may be integrated into one module. The above-mentioned integrated modules or submodules may be implemented in the form of hardware or in the form of software functional modules or submodules.
[0133] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0134] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly by hardware, software units executed by a processor, or a combination of the two. The software units may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0135] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0136] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A testing method, characterized in that: Applied to a microprocessor architecture, the microprocessor architecture includes an application processor, an input / output processor, and a plurality of peripheral controllers, the application processor includes a plurality of processor cores, and the method includes: When the startup program is completed, the first processor core in the application processor starts at least one other processor core and allocates test tasks to the first processor core and the at least one other processor core respectively; wherein one test task is used to test one peripheral controller; The first processor core and the at least one other processor core respectively execute respective test tasks to complete the test of multiple peripheral controllers.
2. The method according to claim 1, characterized in that: The first processor core starts at least one other processor core and allocates test tasks to the first processor core and the at least one other processor core respectively, including: The first processor core starts at least one other processor core based on the acquired test instruction and allocates test tasks to the first processor core and the at least one other processor core respectively; The test instruction includes information about a processor core that needs to execute a test task and information about a test task that the processor core that needs to execute the test task needs to execute.
3. The method according to claim 2, characterized in that The first processor core starts at least one other processor core based on the acquired test instruction and allocates test tasks to the first processor core and the at least one other processor core respectively, including: The first processor core starts at least one other processor core based on the acquired first test instruction; wherein the first test instruction includes information of the processor core that needs to execute the test task; The first processor core allocates test tasks to the first processor core and the at least one other processor core respectively based on the acquired second test instruction; wherein the second test instruction includes test task information that each processor core that needs to execute the test task needs to execute.
4. The method according to claim 3, characterized in that The first processor core starts at least one other processor core based on the acquired first test instruction, including: The first processor core powers on at least one other processor core by calling a power management interface based on the acquired first test instruction; The at least one other processor core performs an initialization operation after being powered on, and enters a sleep state after the initialization operation is completed.
5. The method according to claim 3, characterized in that: The first processor core assigns test tasks to the first processor core and the at least one other processor core respectively based on the acquired second test instruction, including: The first processor core generates a plurality of data groups based on the second test instruction and stores the data groups in the memory, wherein any of the data groups includes an identifier of a processor core that needs to execute a test task and information about the test task that the processor core needs to execute.
6. The method according to any one of claims 1 to 5, characterized in that The first processor core and the at least one other processor core respectively perform respective test tasks to complete the test of the plurality of peripheral controllers, including: The first processor core controls the first processor core and the at least one other processor core to synchronously start executing respective test tasks, so as to complete the test of multiple peripheral controllers.
7. The method according to claim 6, characterized in that The first processor core controls the first processor core and the at least one other processor core to synchronously start executing respective test tasks to complete the test of multiple peripheral controllers, including: The first processor core wakes up the at least one other processing core so that the at least one other processing core acquires the respective test tasks; The first processor core sends a test start instruction to the at least one other processor core, so that the first processor core and the at least one other processor core synchronously start to execute their respective test tasks, so as to complete the test of multiple peripheral controllers.
8. The method according to any one of claims 1 to 5, characterized in that The method further comprises: When the at least one other processor core completes the test task, the at least one other processor core sends the test record data to the first processor core; The first processor core determines performance test results for multiple peripheral controllers based on the test record data.
9. A microprocessor architecture, characterized in that: The invention comprises an application processor, an input-output processor and a plurality of peripheral controllers, wherein the application processor comprises a plurality of processor cores, and the application processor is configured to execute the test method as claimed in any one of claims 1 to 8.
10. A computing device, characterized in that Comprising the microprocessor architecture as claimed in claim 9.
