Processor architecture and method based on dynamic overwrite instruction stream
Through a processor architecture based on dynamically overwriting instruction streams, the real-time monitoring and dynamic modification requirements of quantum computing dedicated processors are solved, and a processor architecture with high response speed and control accuracy is achieved, which is suitable for complex quantum information processing scenarios.
Patent Information
- Application Number
- CN202511302989.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-12
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2045-09-12
AI Technical Summary
Existing technologies cannot meet the high-performance requirements of quantum computing dedicated processors for real-time monitoring and dynamic modification of instruction execution. Especially in the face of complex quantum information processing scenarios, existing methods have problems such as redundant instructions occupying resources, lack of flexibility and high latency.
It adopts a processor architecture based on dynamic overwriting of instruction streams, including a processor core, an instruction storage module, a state detection module, a dynamic instruction modification module, and a dynamic scheduling coordination module. It obtains the current instruction stream address in real time, generates a target update instruction stream based on the quantum computing input signal, and overwrites the instruction segments that have not yet been executed through the hardware dynamic modification module when the processor core is running.
It achieves high response speed and control accuracy of the processor architecture, has the flexibility of traditional software self-repair code and the high performance of FPGA hardware partial reconfiguration, is suitable for control systems with strong environmental dynamics, and enhances the ability to handle abnormal conditions and unexpected events.
Smart Images

Figure CN120803536A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of quantum computing, in particular, to a processor architecture and method based on dynamic overwrite instruction stream. BACKGROUND
[0002] Quantum computing puts forward high performance requirements on classical electronic control time precision, response timeliness, dynamic instruction scheduling, etc. In particular, in the scenarios of quantum error correction and adaptive feedforward control according to changes in the external environment, the processor needs to directly schedule quantum circuits for execution within the coherence time scale of the quantum bits, and flexibly and efficiently adjust the main program instruction stream according to the real-time changes in the error correction decoding results and the environmental parameters, so as to meet the needs of real-time feedback control and dynamic instruction stream adjustment.
[0003] In view of the two core requirements of quantum computing on the special-purpose processor, one is real-time monitoring and scheduling of instruction execution. The external system needs to have the tracking ability of the processor execution progress, accurately know the current program counter (PC) position, and pause or start the processor instruction execution at a specific instruction position, so as to prevent the execution of outdated instruction sequences.
[0004] The other is to dynamically modify the future instruction stream during the execution of quantum computing. The quantum error correction decoder and the environmental parameter change feedforward module dynamically generate a new instruction stream and load it into the special-purpose processor instruction memory, which covers or inserts the part of the program that has not been executed, so as to realize the dynamic reconstruction of the instruction stream.
[0005] In order to meet the above two core requirements, there are two types of technologies in the prior art. The first type is multi-path program design based on jump logic. All possible instruction paths are written into the instruction memory in advance, and different paths are executed by selecting jump instructions during running. However, in the complex quantum information processing scenario, the processor may face highly dynamic and unpredictable state changes, and the number of possible states increases exponentially with the number of quantum bits, making it difficult to enumerate all possible control paths in advance. This method not only brings a large number of redundant instructions to occupy limited instruction storage resources, but also lacks the ability to generate new instructions flexibly at runtime, making it difficult to achieve truly dynamic instruction stream modification.
[0006] The second type is the partial reconfiguration function based on FPGA. During the running of the processor, the logic of a certain region of the FPGA is reconfigured, so that the processor can dynamically switch the function hardware IP or instruction extension logic for different stages or tasks. In the microarchitecture of the processor, a new instruction implementation module is loaded through partial reconfiguration at runtime. This module acts as the execution path of the customized instruction when the processor is executed, achieving the purpose of extending or modifying the instruction set architecture (ISA).
[0007] However, the method can only reconfigure part or all of the functional IP in the FPGA, and cannot modify the instruction stream in the specific IP. The instruction stream in the reconfigured IP is also predefined and not dynamically generated as the experiment progresses, which is not suitable for real-time insertion, modification or deletion of instructions at the instruction level. At the same time, the reconfiguration process takes a long time and is not suitable for real-time control systems that are sensitive to time. In addition, the method lacks the ability to generate instructions at runtime, and existing hardware reconfiguration mechanisms rely on predefined configuration files and cannot dynamically generate new control logic or instruction streams based on real-time data or feedback generated by the experiment.
[0008] The two types of methods described above do not fully meet the two core requirements of the quantum computing dedicated processor.
[0009] The part of the background art is only the technology known to the discloser, and does not necessarily represent the prior art in the field. SUMMARY
[0010] The present application aims to provide a processor architecture and method based on dynamic overwrite instruction stream to solve the problem that the two core requirements of the quantum computing dedicated processor are not fully met in the prior art.
[0011] According to an aspect of the present application, the present application provides a processor architecture based on dynamic overwrite instruction stream, which is used for quantum computing. The processor architecture can include a processor core, an instruction storage module, a state detection module, a dynamic instruction modification module, and a dynamic scheduling and coordination module. The instruction storage module stores the entire instruction stream of the processor core, and includes a first port and a second port. The first port is used to load the main program instruction stream of the processor core. The state detection module obtains the current address of the current instruction stream of the processor core in real time. The dynamic instruction modification module determines the target updated instruction stream of the processor core according to the received quantum computing input signal. The dynamic scheduling and coordination module determines whether the current address is less than the starting address of the target updated instruction stream. The dynamic instruction modification module writes the target updated instruction stream into the target address interval of the instruction storage module through the second port in the case that the dynamic scheduling and coordination module determines that the current address is less than the starting address of the target updated instruction stream, so that the processor core executes the target updated instruction stream.
[0012] According to some embodiments of the present application, the state detection module obtains the count value of the program counter of the current instruction stream, and the state detection module determines the current address according to the count value of the program counter.
[0013] According to some embodiments of the present application, the quantum computing input signal at least includes: target task data, program count value, and count value of the program counter of the current instruction stream.
[0014] According to some embodiments of the present application, the dynamic scheduling coordination module determines whether a difference between the target write address of the target update instruction stream and the current address satisfies a preset difference condition; the dynamic instruction modification module directly writes the target update instruction stream to the target address interval through the second port to enable the processor core to execute the target update instruction stream, in a case where the dynamic scheduling coordination module determines that the difference satisfies the preset difference condition; and the dynamic instruction modification module writes the target update instruction stream to the target address interval through the second port to enable the processor core to execute the target update instruction stream after suspending the reading of the instruction stream by the processor core, in a case where the dynamic scheduling coordination module determines that the difference does not satisfy the preset difference condition.
[0015] According to some embodiments of the present application, the preset difference condition is that the difference between the target write address of the target update instruction stream and the current address is greater than or equal to 10.
[0016] According to an aspect of the present application, the present application provides an execution method of a processor architecture based on a dynamically overwritten instruction stream, the processor architecture being used for quantum computing, the method comprising: acquiring a current address of a current instruction stream of a processor core in real time; determining a target update instruction stream of the processor core according to a received quantum computing input signal; determining whether the current address is less than a start address of the target update instruction stream; and writing the target update instruction stream to a target address interval to enable the processor core to execute the target update instruction stream, if so.
[0017] According to some embodiments of the present application, the step of acquiring the current address of the current instruction stream of the processor core in real time comprises: acquiring a count value of a program counter of the current instruction stream; and determining the current address according to the count value of the program counter.
[0018] According to some embodiments of the present application, the quantum computing input signal at least comprises: target task data, a program count value and a count value of a program counter of the current instruction stream.
[0019] According to some embodiments of the present application, the step of writing the target update instruction stream to the target address interval to enable the processor core to execute the target update instruction stream comprises: determining whether a difference between a target write address of the target update instruction stream and the current address satisfies a preset difference condition; directly writing the target update instruction stream to the target address interval to enable the processor core to execute the target update instruction stream, if so; and writing the target update instruction stream to the target address interval to enable the processor core to execute the target update instruction stream after suspending the reading of the instruction stream by the processor core, if not.
[0020] According to some embodiments of the present application, the preset difference condition is that the difference between the target write address of the target update instruction stream and the current address is greater than or equal to 10.
[0021] According to another aspect of the present application, the present application further provides a non-volatile computer readable storage medium having stored thereon a computer program which, when executed by a processor, enables the processor to implement the execution method of the processor architecture based on dynamic overwritten instruction stream as described above.
[0022] According to another aspect of the present application, the present application further provides an electronic device comprising: one or more processors; a storage device for storing one or more programs which, when executed by the one or more processors, enable the one or more processors to implement the execution method of the processor architecture based on dynamic overwritten instruction stream as described above.
[0023] According to another aspect of the present application, the present application further provides a computer program product comprising: a computer program stored on a computer readable storage medium; the computer program comprising program instructions which, when executed by a computer, cause the computer to perform the execution method of the processor architecture based on dynamic overwritten instruction stream as described above.
[0024] The technical solution of the present application can obtain the current address of the current instruction stream of the processor core in real time, determine the target updated instruction stream of the processor core through a quantum computing input signal, and judge whether the current address is less than the start address of the target updated instruction stream. In the case where the current address is less than the start address of the target updated instruction stream, the target updated instruction stream is written to the target address interval, so that the processor core executes the target updated instruction stream.
[0025] The processor architecture of the present application has the capability of dynamically modifying instruction flow. Through the dynamic instruction modification module of the hardware, the instruction segment that has not been executed is generated and overwritten in real time according to the input signal when the processor core is running. The online updating and replacing of the main program instruction flow that cannot be completed by the traditional processor architecture are realized. The processor architecture is suitable for control systems with strong environmental dynamics, and has the flexibility of traditional software self-repairing code and the high performance of FPGA hardware partial reconfiguration. The processor architecture has high response speed and control accuracy. BRIEF DESCRIPTION OF DRAWINGS
[0026] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0027] Figure 1 A structural schematic diagram of a processor architecture according to an embodiment of the present application is shown; Figure 2 A flowchart of a method 1000 according to an embodiment of the present application is shown. Figure 3 A flowchart illustrating step S100 according to an embodiment of the present application is shown; Figure 4 A flowchart illustrating step S400 according to an embodiment of the present application is shown.
[0028] Reference Signs List: Processor architecture 20; processor core 21; instruction storage module 22; state detection module 23; dynamic instruction modification module 24; dynamic scheduling coordination module 25. DETAILED DESCRIPTION
[0029] Example embodiments now will be described more fully hereinafter with reference to the accompanying drawings. Example embodiments, however, can be implemented in many different forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of example embodiments to those skilled in the art. Like reference numerals refer to like elements throughout the several views.
[0030] The described features, structures, or characteristics can be combined in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the disclosure. One skilled in the relevant art will recognize, however, that the technology can be practiced without one or more of the specific details, or with other methods, components, materials, and so forth. In these instances, well-known structures, methods, devices, implementations, materials, and so forth can not be described in detail.
[0031] In addition, the terms "comprise / comprising" and "include / including" and any variations thereof are intended to cover a non-exclusive inclusion. For example, a process, method, system, product, or apparatus that comprises a list of steps or elements is not necessarily limited to those listed steps or elements, but can include other not-listed steps or elements, or can include other steps or elements that are inherent to the process, method, system, product, or apparatus.
[0032] The terms "first", "second", and the like, in the description of the specification and claims of the present application and the above drawings are used to distinguish different objects, and are not used to describe a particular order.
[0033] The technical solutions of the present application will be described clearly and completely in the following combined with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without making creative efforts are within the scope of protection of the present application.
[0034] The following is the English and its English full name and corresponding Chinese interpretation involved in this application.
[0035] PC, Program Counter, program counter.
[0036] FPGA, Field-Programmable Gate Array, field programmable gate array.
[0037] IP, Intellectual Property, IP core.
[0038] ISA, Instruction Set Architecture, instruction set architecture.
[0039] BRAM, Block Random-Access Memory, block random access memory.
[0040] RISC-V, Reduced Instruction Set Computer V, the fifth generation of reduced instruction set.
[0041] Referring to Figure 1 The processor architecture 20 based on dynamic overwritten instruction stream provided by the present application can include a processor core 21, an instruction storage module 22, a state detection module 23, a dynamic instruction modification module 24 and a dynamic scheduling coordination module 25. The processor architecture 20 can be used in the application scenario of quantum computing.
[0042] The following will be described in combination with Figure 1 The execution method 1000 of the processor architecture based on dynamic overwritten instruction stream provided by the present application is described.
[0043] Referring to Figure 2 The method 1000 can include steps S100-S400.
[0044] In step S100, the current address of the current instruction stream of the processor core is acquired in real time.
[0045] According to an example embodiment, the instruction storage module 22 stores the entire instruction stream of the processor core 21, and the instruction storage module 22 at least includes a first port and a second port. The first port is used to load the main program instruction stream of the processor core 21. The second port can be used for the processor core 21 to read the instruction stream and overwrite the instruction stream by the dynamic instruction modification module.
[0046] For example, the instruction storage module 22 can be a dual-port BRAM resource inside the FPGA. The first port is an initialization loading port, used for the external processing system to load the main program instruction stream. The second port is a runtime access port, used for the processor core 21 to read the instruction stream and the dynamic instruction modification module to overwrite the instruction stream.
[0047] The second port can also be provided with two, one second port is a read port, used for the processor core 21 to read the instruction stream, and the other second port is a write port, used for the dynamic instruction modification module 24 to overwrite the instruction stream. The two second ports can be accessed simultaneously.
[0048] The processor core 21 can be a physical unit that independently executes an instruction sequence (thread). The processor core 21 can be based on a custom instruction set architecture, with a five-stage pipeline structure, to achieve efficient instruction execution and peripheral control, and meet the timing control requirements in quantum computing experiments. For example, the processor core 21 can be based on the RISC-V basic instruction set, and extend a special instruction set subset optimized for control tasks. The processor core 21 can use a five-stage pipeline structure to improve the processing efficiency and throughput capacity of the instruction stream. The internal pipeline structure does not use a cache mechanism, simplifying the execution model, and is suitable for real-time applications with high requirements for determinism and controllability.
[0049] The current instruction stream can be a dynamic instruction sequence that the processor core fetches, decodes, and executes at runtime. The current address can be the address corresponding to the current instruction stream.
[0050] For example, in step S100, the state detection module 23 can obtain the current address of the current instruction stream of the processor core in real time.
[0051] The state detection module 23 can determine the current address by obtaining the count value of the program counter of the current instruction stream.
[0052] In step S200, the target updated instruction stream of the processor core is determined according to the received quantum computing input signal.
[0053] According to an example embodiment, the quantum computing input signal can be quantum information sent by an external device for the processor core to operate.
[0054] Optionally, the quantum computing input signal can include target task data, a program count value, and a count value of a program counter of the current instruction stream.
[0055] The target task data can be target processing data for a specific quantum computing task. The program count value can be a counter value (timestamp). The count value of the program counter of the current instruction stream can be the current control program execution position (PC) of the processor core.
[0056] The target update instruction stream can be a sequence of instructions to be executed by the processor core generated according to the quantum computing input signal.
[0057] For example, in step S200, the dynamic instruction modification module 24 determines the target update instruction stream of the processor core according to the received quantum computing input signal. The dynamic instruction modification module can generate the target update instruction stream according to the quantum computing input signal and a preset signal generation rule.
[0058] For example, in a mid-circuit feedback scenario, the target task data can be the result of mid-circuit measurement (0 or 1, detected and analyzed by an external quantum state detection module). The quantum computing input signal can include the result of mid-circuit measurement 0 or 1, the counter value (timestamp), and the current control program execution position (PC). The dynamic instruction modification module 24 can generate the target update instruction stream to be executed according to the preset feedback rule according to the result of mid-circuit measurement 0 or 1. For example, the result of mid-circuit measurement is 1, and the target update instruction stream is to insert an X gate; the result of mid-circuit measurement is 0, and the target update instruction stream is to insert an I gate. The generation method of the target update instruction stream can include a lookup table and a conditional instruction template.
[0059] For another example, in a quantum error correction scenario, the target task data can be the measurement result of a syndrome in a quantum error correction code. The quantum computing input signal can include the measurement result of a syndrome in a quantum error correction code, the counter value (timestamp), and the current control program execution position (PC). The quantum computing input signal can also include error model parameters, encoding scheme information, and quantum error correction round information. The dynamic instruction modification module 24 can determine which Pauli error correction operation needs to be executed according to the syndrome, and the implementation method includes a fast decoding algorithm and a neural network inference method. The dynamic instruction modification module 24 can further combine other information in the quantum computing input signal to construct a legal target update instruction stream.
[0060] In step S300, it is determined whether the current address is less than the start address of the target update instruction stream.
[0061] According to an example embodiment, the start address of the target update instruction stream can be the start storage address of the target update instruction stream in the instruction storage module 22. The dynamic scheduling coordination module 25 can determine whether the current address is less than the start address of the target update instruction stream, so that the target update instruction stream can be written to the unexecuted instruction address of the instruction storage module.
[0062] In a case where it is judged that the current address is greater than or equal to the start address of the target update instruction stream, it is indicated that the target update instruction stream has been executed or entered into the pipeline, and at this time, the dynamic modification operation should be stopped for safety consideration.
[0063] In a case where it is judged that the current address is less than the start address of the target update instruction stream, step S400 is executed.
[0064] In step S400, the target update instruction stream is written into the target address interval, so that the processor core executes the target update instruction stream.
[0065] According to an example embodiment, the target address interval can be an address interval in which the target update instruction stream is written into the instruction storage module. The target address interval is within an instruction address of the instruction storage module that has not been executed.
[0066] For example, in step S400, the dynamic instruction modification module 24 writes the target update instruction stream into the target address interval of the instruction storage module through the second port. The processor core 21 can execute the target update instruction stream to complete the operation (such as an insertion, replacement, or deletion operation, etc.) of the target update instruction stream.
[0067] Through the above embodiment, the technical scheme of the present application can acquire the current address of the current instruction stream of the processor core in real time, determine the target update instruction stream of the processor core through the quantum computing input signal, judge whether the current address is less than the start address of the target update instruction stream, and in a case where the current address is less than the start address of the target update instruction stream, write the target update instruction stream into the target address interval, so that the processor core executes the target update instruction stream.
[0068] The processor architecture of the present application has an instruction stream dynamic modification capability. Through the dynamic instruction modification module of hardware, an instruction segment that has not been executed is generated and overwritten in real time according to an input signal when the processor core is running, which realizes online update and replacement of the main program instruction stream that cannot be completed by a traditional processor architecture, and is suitable for a control system with strong environmental dynamics. At the same time, the processor architecture has the flexibility of traditional software self-repairing code and the high performance characteristics of FPGA hardware partial reconfiguration, and has high response speed and control accuracy.
[0069] The processor architecture of the present application avoids the high overhead and low timeliness problem of partial reconfiguration, and the technical scheme of the present application does not need to reload a logic region, which improves the response speed and control accuracy of the processor architecture.
[0070] The processor architecture of the present application can enhance the processing capability of abnormal conditions and unexpected events. In the face of sudden state changes in experiments or dynamic instruction flow requirements, the processor architecture can switch execution strategies and inject target update instruction flow in real time, enhancing the self-recovery and robustness of the processor architecture.
[0071] The processor architecture of the present application can provide efficient computing support for precision experiment control and dynamic feedback systems. This architecture is particularly suitable for scenarios such as quantum experiment control and programmable triggering, and can respond to changes in experimental state at processor level precision, effectively addressing the bottleneck of insufficient control precision of general-purpose architectures.
[0072] Optionally, referring to Figure 3 , step S100 can include steps S110-S120.
[0073] In step S110, the count value of the program counter of the current instruction stream is obtained.
[0074] According to an example embodiment, the count value of the program counter can be the register value of the memory address in the instruction storage module corresponding to the current instruction stream.
[0075] For example, in step S110, the state detection module 23 obtains the count value of the program counter of the current instruction stream. The state detection module 23 can read the count value of the program counter of the current instruction stream of the processor core.
[0076] In step S120, the current address is determined according to the count value of the program counter.
[0077] According to an example embodiment, the state detection module 23 can determine the current address according to the count value of the program counter. For example, the state detection module 23 can directly take the read count value of the program counter as the current address of the current instruction stream in the BRAM.
[0078] Through the above embodiments, the technical scheme of the present application can obtain the count value of the program counter of the current instruction stream, and determine the current address through the program count value.
[0079] The processor architecture of the present application can determine the current address by monitoring the count value of the program counter of the current instruction stream in real time, so as to determine whether the initial address of the target update instruction has entered the pipeline.
[0080] Optionally, referring to Figure 4 , step S400 can include steps S410-S430.
[0081] In step S410, it is determined whether the difference between the target write address of the target update instruction stream and the current address satisfies a preset difference value condition.
[0082] According to an example embodiment, the target write address can be an instruction address of the target update instruction stream being written. The preset difference condition can be a preset difference threshold of the target write address and the current address of the target update instruction stream.
[0083] Optionally, the preset difference condition can be that the difference between the target write address and the current address of the target update instruction stream is greater than or equal to 10.
[0084] For example, in step S410, the dynamic scheduling coordination module 25 determines whether the difference between the target write address and the current address of the target update instruction stream satisfies the preset difference condition. The dynamic instruction modification module 24 needs a certain time to write the instruction stream to the instruction storage module 22, and the dynamic scheduling coordination module 25 can determine whether to suspend the work of the processor core 21 by the writing of the target update instruction stream, so as to avoid that the processor core 21 reads the un-updated instruction stream.
[0085] If it is determined that the difference between the target write address and the current address of the target update instruction stream satisfies the preset difference condition, step S420 is performed.
[0086] In step S420, the target update instruction stream is directly written to the target address interval, so that the processor core executes the target update instruction stream.
[0087] According to an example embodiment, if it is determined that the difference between the target write address and the current address of the target update instruction stream satisfies the preset difference condition, it indicates that the address distance between the target write address and the current address is far, and the dynamic instruction modification module 24 can directly write the target update instruction stream to the target address interval of the instruction storage module 22 through the second port.
[0088] If it is determined that the difference between the target write address and the current address of the target update instruction stream does not satisfy the preset difference condition, step S430 is performed.
[0089] In step S430, after suspending the reading of the instruction stream by the processor core, the target update instruction stream is written to the target address interval, so that the processor core executes the target update instruction stream.
[0090] According to an example embodiment, if it is determined that the difference between the target write address and the current address of the target update instruction stream does not satisfy the preset difference condition, it indicates that the address distance between the target write address and the current address is close, and the dynamic instruction modification module 24 writes the target update instruction stream to the target address interval of the instruction storage module 22 through the second port after suspending the work of the processor core 21.
[0091] Through the above embodiments, the technical scheme of the present application can determine whether the work of the processor core needs to be suspended by judging whether the difference between the current address and the target write address of the target update instruction stream meets the preset difference condition, and in the case that the difference between the current address and the target write address of the target update instruction stream meets the preset difference condition, the program behavior can be quickly updated without suspending the entire processor architecture, thereby significantly improving the response speed and control accuracy of the processor architecture.
[0092] According to another aspect of the present application, the present application further provides a non-volatile computer readable storage medium having a computer program stored thereon, the computer program being executable by a processor to implement the execution method of the processor architecture based on the dynamic overwritten instruction stream as described above.
[0093] According to another aspect of the present application, the present application further provides an electronic device, comprising: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors are enabled to implement the execution method of the processor architecture based on the dynamic overwritten instruction stream as described above.
[0094] According to another aspect of the present application, the present application further provides a computer program product, comprising: a computer program stored on a computer readable storage medium; the computer program comprising program instructions, when the program instructions are executed by a computer, the computer executes the execution method of the processor architecture based on the dynamic overwritten instruction stream as described above.
[0095] Finally, it should be noted that the above only describes the preferred embodiments of the present application and is not intended to limit the present application, although the above embodiments of the present application are described in detail, those skilled in the art can still modify the technical solutions of the above embodiments, or make equivalent replacement to some technical features. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A processor architecture based on dynamically overwriting instruction streams, the processor architecture being used for quantum computing, characterized in that: The processor architecture includes: Processor core; An instruction storage module, storing all instruction streams of the processor core, the instruction storage module comprising a first port and a second port, the first port being used to load the main program instruction stream of the processor core; A status detection module, which obtains the current address of the current instruction stream of the processor core in real time; a dynamic instruction modification module, which determines a target update instruction stream of the processor core based on a received quantum computing input signal; A dynamic scheduling coordination module determines whether the current address is less than the starting address of the target update instruction stream; The dynamic instruction modification module, when the dynamic scheduling coordination module determines that the current address is smaller than the starting address of the target update instruction stream, writes the target update instruction stream into the target address interval of the instruction storage module through the second port, so that the processor core executes the target update instruction stream.
2. The architecture according to claim 1, wherein: The state detection module obtains a count value of a program counter of the current instruction stream, and determines the current address according to the count value of the program counter.
3. The architecture according to claim 1, wherein: The quantum computing input signal includes at least target task data, a program counter value, and a count value of a program counter of the current instruction stream.
4. The architecture according to claim 1, wherein: The dynamic scheduling coordination module determines whether the difference between the target write address of the target update instruction stream and the current address meets a preset difference condition; The dynamic instruction modification module, when the dynamic scheduling coordination module determines that the difference satisfies the preset difference condition, directly writes the target update instruction stream into the target address interval through the second port, so that the processor core executes the target update instruction stream; The dynamic instruction modification module, when the dynamic scheduling coordination module determines that the difference does not meet the preset difference condition, after pausing the reading instruction stream of the processor core, the dynamic instruction modification module writes the target update instruction stream to the target address interval through the second port, so that the processor core executes the target update instruction stream.
5. The architecture according to claim 4, characterized in that The preset difference condition is that the difference between the target write address of the target update instruction stream and the current address is greater than or equal to 10.
6. A method for executing a processor architecture based on a dynamic overwriting instruction stream, wherein the processor architecture is used for quantum computing, characterized in that: The method comprises: Get the current address of the current instruction stream of the processor core in real time; determining a target update instruction stream of the processor core according to the received quantum computing input signal; Determining whether the current address is less than the starting address of the target update instruction stream; If yes, the target update instruction stream is written into the target address interval, so that the processor core executes the target update instruction stream.
7. The method according to claim 6, characterized in that The real-time acquisition of the current address of the current instruction stream of the processor core includes: Obtaining a count value of a program counter of the current instruction stream; The current address is determined according to the count value of the program counter.
8. The method according to claim 6, characterized in that The quantum computing input signal includes at least target task data, a program counter value, and a count value of a program counter of the current instruction stream.
9. The method according to claim 6, characterized in that Writing the target update instruction stream into the target address interval so that the processor core executes the target update instruction stream includes: Determining whether a difference between a target write address of the target update instruction stream and the current address satisfies a preset difference condition; If yes, directly write the target update instruction stream into the target address interval, so that the processor core executes the target update instruction stream; If not, after pausing the read instruction stream of the processor core, the target update instruction stream is written to the target address interval, so that the processor core executes the target update instruction stream.
10. The method according to claim 9, characterized in that The preset difference condition is that the difference between the target write address of the target update instruction stream and the current address is greater than or equal to 10.
Citation Information
Patent Citations
Classic and quantum mixed instruction pipeline design method and device
CN116187455A
Real-time measurement and control system architecture of quantum physics experiment platform
CN116306953A
Optimization method and device of jump instruction, jump method and device of instruction and electronic equipment
CN116627502A
Quantum random access memory system and quantum computer
CN118709796A
Method and device for selecting jump address of jump instruction, equipment and storage medium
CN119718425A