Method and device for converting synchronous circuit into asynchronous circuit and electronic equipment

By acquiring and processing the Verilog code and annotation information of the synchronous module, it is automatically converted into asynchronous circuit code, which solves the problems of low conversion efficiency and poor reliability of synchronous circuits, improves the efficiency and reliability of asynchronous circuit design, and reduces design difficulty and cost. .

CN118839652APending Publication Date: 2024-10-25HUAWEI TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310471523.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-04-25
Publication Date
2024-10-25

AI Technical Summary

Technical Problem

The existing technology has low efficiency and poor reliability when converting synchronous circuits into asynchronous circuits, resulting in asynchronous circuit design with low efficiency, poor reliability, high implementation difficulty, and high design costs.

Method used

By obtaining the Verilog code and annotation information of the synchronous module, determine the module level and instantiated module information, query the asynchronous control unit model library, generate asynchronous control structure information, and convert the synchronous module code into asynchronous circuit code to achieve automated conversion and avoid manual labor. participate.

Benefits of technology

It improves the efficiency and reliability of asynchronous circuit design, reduces design difficulty and cost, realizes the conversion of complex pipelines and superscalar pipelines, and generates timing constraints.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118839652A_ABST
    Figure CN118839652A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a method and device for converting a synchronous circuit into an asynchronous circuit and electronic equipment, relates to the field of integrated circuit design, and solves the problems of low efficiency and poor reliability when the synchronous circuit is converted into the asynchronous circuit in the prior art. The synchronization circuit comprises a plurality of synchronization modules which are connected through a multi-stage assembly line, the method comprises the steps that code information of the plurality of synchronization modules is obtained, the code information of the plurality of synchronization modules comprises Verilog codes and labeling information of each synchronization module, and the labeling information of each synchronization module comprises the type and position information of an asynchronous control unit. And determining levels and instantiated module information of the plurality of synchronization modules according to the code information of the plurality of synchronization modules. And determining asynchronous control structure information according to the code information of the plurality of synchronization modules and the levels and instantiated module information of the plurality of synchronization modules. And converting the code information of the plurality of synchronization modules into code information of an asynchronous circuit according to the asynchronous control structure information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present application relate to the field of integrated circuit design, and in particular, to a method, device, and electronic device for converting a synchronous circuit into an asynchronous circuit. Background Art

[0002] Integrated circuit design includes synchronous circuit design and asynchronous circuit design. With the continuous reduction of integrated circuit manufacturing process size and the increase of design scale, the problems brought by synchronous circuit design, such as clock offset, high power consumption, electromagnetic interference, etc., have become more and more prominent. In asynchronous circuit design, each module realizes data communication through mutual handshake, which has the characteristics of low power consumption, no clock offset problem and event-driven, and is expected to become a breakthrough direction for the development of integrated circuits in the post-Moore era.

[0003] However, due to the lack of mature and reliable electronic design automation (EDA) tools, synchronous circuit design is currently mainly converted by manual work to achieve asynchronous circuit design. However, the low efficiency and poor reliability of manual conversion will lead to low efficiency and poor reliability of asynchronous circuit design, and high difficulty in implementation. Summary of the invention

[0004] The embodiments of the present application provide a method, device and electronic device for converting a synchronous circuit into an asynchronous circuit, which solves the problem of low efficiency and poor reliability in the prior art when converting a synchronous circuit into an asynchronous circuit.

[0005] In order to achieve the above objectives, the embodiments of the present application adopt the following technical solutions:

[0006] In a first aspect of an embodiment of the present application, a method for converting a synchronous circuit into an asynchronous circuit is provided, the method comprising: first, obtaining code information of multiple synchronous modules, the code information of the multiple synchronous modules including the Verilog code and annotation information of each synchronous module, the annotation information of each synchronous module including the type and position information of an asynchronous control unit, the position information being used to indicate the position of the asynchronous control unit in a multi-stage pipeline. Secondly, according to the code information of the multiple synchronous modules, the levels and instantiation module information of the multiple synchronous modules are determined. Then, according to the code information of the multiple synchronous modules, and the levels and instantiation module information of the multiple synchronous modules, the asynchronous control structure information is determined, the asynchronous control structure information being used to indicate the types of multiple asynchronous control units corresponding to the multiple synchronous modules, and the position of each asynchronous control unit in the multi-stage pipeline. Finally, according to the asynchronous control structure information, the code information of the multiple synchronous modules is converted into code information of an asynchronous circuit.

[0007] Optionally, the above-mentioned multiple synchronization modules may be the same synchronization module, or may be different synchronization modules, which is not limited in the embodiment of the present application.

[0008] Optionally, each synchronization module may not include an instantiation module, or may include at least one instantiation module. The embodiment of the present application does not limit the specific number of instantiation modules included in each synchronization module.

[0009] Based on this solution, the code information of the above-mentioned multiple synchronous modules includes the Verilog code and annotation information of each synchronous module, and the annotation information of each synchronous module includes the type and position information of the asynchronous control unit. The position information is used to indicate the position of the asynchronous control unit in the multi-stage pipeline. Therefore, according to the code information of the multiple synchronous modules, the levels and instantiation module information of the multiple synchronous modules and the asynchronous control structure information can be determined. According to the asynchronous control structure information, the code information of the multiple synchronous modules can be converted into the code information of the asynchronous circuit, and the conversion of superscalar and complex pipelines can be realized. At the same time, after the code information of the multiple synchronous modules is obtained, no manual participation is required in the conversion process, so the conversion efficiency and conversion reliability can be improved.

[0010] In combination with the first aspect, in a possible implementation, multiple synchronization modules include a first synchronization module, and there is no instantiation module for the first synchronization module. The levels of the multiple synchronization modules are determined according to the code information of the multiple synchronization modules, including: determining the initial level of the first synchronization module according to the Verilog code of the first synchronization module, and using the initial level of the first synchronization module as the level of the first synchronization module.

[0011] In combination with the first aspect, in a possible implementation, the multiple synchronization modules also include a second synchronization module, the second synchronization module includes a first instantiation module, and the levels of the multiple synchronization modules are determined according to the code information of the multiple synchronization modules, including: determining the initial level of the first instantiation module according to the Verilog code of the second synchronization module. Traversing the Verilog codes of the multiple synchronization modules, it is determined whether there is a sub-instantiation module in the first instantiation module. When there is no sub-instantiation module in the first instantiation module, the level of the first instantiation module is determined to be the initial level. When the first instantiation module includes at least one sub-instantiation module, the level of the first instantiation module is determined to be the level of the first sub-instantiation module plus 1, and the first sub-instantiation module is the sub-instantiation module with the highest level among the at least one sub-instantiation module. The level of the second synchronization module is determined to be the level of the first instantiation module plus 1.

[0012] In combination with the first aspect, in a possible implementation method, asynchronous control structure information is determined based on code information of multiple synchronization modules, as well as levels and instantiated module information of multiple synchronization modules, including: querying an asynchronous control unit model library to determine the asynchronous control structure information based on code information of multiple synchronization modules, as well as levels and instantiated module information of multiple synchronization modules; wherein the asynchronous control unit model library includes multiple preset types of asynchronous control units.

[0013] In combination with the first aspect, in a possible implementation, the synchronization module includes at least one instantiation module, and the annotation information of each synchronization module includes the annotation information of at least one instantiation module. According to the code information of multiple synchronization modules, and the levels and instantiation module information of multiple synchronization modules, the asynchronous control unit model library is queried, including: according to the levels and instantiation module information of multiple synchronization modules, the multiple synchronization modules are sequentially traversed in order from small to large levels. According to the code information of each synchronization module, the asynchronous control unit model library is queried to determine whether the type of the asynchronous control unit in the annotation information of each synchronization module is the type of the asynchronous control unit preset in the asynchronous control unit model library. When the type of the asynchronous control unit in the annotation information of the synchronization module is the type of the asynchronous control unit preset in the asynchronous control unit model library, the annotation information of the synchronization module is used to determine the asynchronous control structure information. When the type of the asynchronous control unit in the annotation information of the synchronization module is not the type of the asynchronous control unit preset in the asynchronous control unit model library, the annotation information of at least one instantiation module is used to determine the asynchronous control structure information.

[0014] In combination with the first aspect, in a possible implementation, the asynchronous control unit model library also includes port information corresponding to each of the preset multiple asynchronous control units, and according to the asynchronous control structure information, the code information of the multiple synchronous modules is converted into the code information of the asynchronous circuit, including: according to the asynchronous control structure information and the asynchronous control unit model library, the multiple asynchronous control units corresponding to the multiple synchronous modules are instantiated. According to the Verilog codes of the multiple synchronous modules, the position information of the clock ports in the Verilog codes of the multiple synchronous modules is determined. According to the position information of the clock port, the clock port is modified to a click port. Timing constraints are generated according to the asynchronous control structure information to convert the code information of the multiple synchronous modules into the code information of the asynchronous circuit.

[0015] In combination with the first aspect, in a possible implementation, the method also includes: generating an asynchronous control unit model library based on the Verilog code of the asynchronous circuit library, the Verilog code of the asynchronous circuit library includes multiple preset asynchronous control unit types, and port information corresponding to each asynchronous control unit.

[0016] In a second aspect of the embodiment of the present application, a device for converting a synchronous circuit into an asynchronous circuit is provided, wherein the synchronous circuit includes a plurality of synchronous modules, and the plurality of synchronous modules are connected by a multi-stage pipeline, and the device includes an acquisition module and a processing module. The acquisition module is used to acquire code information of the plurality of synchronous modules, the code information of the plurality of synchronous modules includes the Verilog code and annotation information of each synchronous module, the annotation information of each synchronous module includes the type and position information of the asynchronous control unit, and the position information is used to indicate the position of the asynchronous control unit in the multi-stage pipeline. The processing module is used to determine the level and instantiation module information of the plurality of synchronous modules according to the code information of the plurality of synchronous modules. The processing module is also used to determine the asynchronous control structure information according to the code information of the plurality of synchronous modules, and the level and instantiation module information of the plurality of synchronous modules, and the asynchronous control structure information is used to indicate the type of the plurality of asynchronous control units corresponding to the plurality of synchronous modules, and the position of each asynchronous control unit in the multi-stage pipeline. The processing module is also used to convert the code information of the plurality of synchronous modules into the code information of the asynchronous circuit according to the asynchronous control structure information.

[0017] In conjunction with the second aspect, in a possible implementation, the multiple synchronization modules include a first synchronization module, and the first synchronization module does not have an instantiation module. The processing module is specifically used to determine the initial level of the first synchronization module according to the Verilog code of the first synchronization module, and use the initial level of the first synchronization module as the level of the first synchronization module.

[0018] In combination with the second aspect, in a possible implementation, the plurality of synchronization modules further include a second synchronization module, and the second synchronization module includes a first instantiation module. The processing module is specifically used to determine the initial level of the first instantiation module according to the Verilog code of the second synchronization module. The processing module is also used to traverse the Verilog codes of the plurality of synchronization modules to determine whether there is a sub-instantiation module in the first instantiation module. The processing module is also used to determine that the level of the first instantiation module is the initial level when there is no sub-instantiation module in the first instantiation module. The processing module is also used to determine that the level of the first instantiation module is the level of the first sub-instantiation module plus 1 when the first instantiation module includes at least one sub-instantiation module, and the first sub-instantiation module is the sub-instantiation module with the highest level among the at least one sub-instantiation module. The processing module is also used to determine that the level of the second synchronization module is the level of the first instantiation module plus 1.

[0019] In combination with the second aspect, in a possible implementation method, the processing module is specifically used to query the asynchronous control unit model library based on the code information of multiple synchronization modules, as well as the levels and instantiation module information of multiple synchronization modules, so as to determine the asynchronous control structure information; wherein the asynchronous control unit model library includes multiple preset asynchronous control unit types.

[0020] In combination with the second aspect, in a possible implementation, the synchronization module includes at least one instantiation module, and the annotation information of each synchronization module includes the annotation information of at least one instantiation module. The processing module is specifically used to traverse the multiple synchronization modules in order from small to large levels according to the levels of the multiple synchronization modules and the instantiation module information. The processing module is also used to query the asynchronous control unit model library according to the code information of each synchronization module, and determine whether the type of the asynchronous control unit in the annotation information of each synchronization module is the type of the asynchronous control unit preset in the asynchronous control unit model library. When the type of the asynchronous control unit in the annotation information of the synchronization module is the type of the asynchronous control unit preset in the asynchronous control unit model library, the annotation information of the synchronization module is used to determine the asynchronous control structure information. When the type of the asynchronous control unit in the annotation information of the synchronization module is not the type of the asynchronous control unit preset in the asynchronous control unit model library, the annotation information of at least one instantiation module is used to determine the asynchronous control structure information.

[0021] In combination with the second aspect, in a possible implementation, the asynchronous control unit model library also includes port information corresponding to each of the preset multiple asynchronous control units. The processing module is specifically used to instantiate multiple asynchronous control units corresponding to multiple synchronous modules according to the asynchronous control structure information and the asynchronous control unit model library. The processing module is also used to determine the location information of the clock port in the Verilog code of the multiple synchronous modules according to the Verilog code of the multiple synchronous modules. The processing module is also used to modify the clock port to a Click port according to the location information of the clock port. The processing module is also used to generate timing constraints according to the asynchronous control structure information to convert the code information of the multiple synchronous modules into the code information of the asynchronous circuit.

[0022] In combination with the second aspect, in a possible implementation, the processing module is also used to generate an asynchronous control unit model library based on the Verilog code of the asynchronous circuit library, and the Verilog code of the asynchronous circuit library includes multiple preset types of asynchronous control units and port information corresponding to each asynchronous control unit.

[0023] In a third aspect of an embodiment of the present application, an electronic device is provided, which includes a memory and a processor; the memory and the processor are coupled; the memory is used to store computer program code, and the computer program code includes computer instructions; when the processor executes the computer instructions, the electronic device executes the method of converting a synchronous circuit into an asynchronous circuit as in the first aspect or any possible implementation of the first aspect.

[0024] In a fourth aspect of the embodiments of the present application, a computer-readable storage medium is provided, the computer-readable storage medium comprising instructions. When the instructions are executed on a computer, the device for converting a synchronous circuit into an asynchronous circuit executes the method for converting a synchronous circuit into an asynchronous circuit in the first aspect or any possible implementation of the first aspect.

[0025] According to a fifth aspect of an embodiment of the present application, a computer program product is provided. When the computer program product is run on a computer, the device for converting a synchronous circuit into an asynchronous circuit executes the method for converting a synchronous circuit into an asynchronous circuit as described in the first aspect or any possible implementation of the first aspect.

[0026] The descriptions of the second to fifth aspects of the present application can refer to the detailed description of the first aspect; and the beneficial effects described in the second to fifth aspects can refer to the beneficial effect analysis of the first aspect, which will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1 A flowchart of a method for converting a synchronous circuit into an asynchronous circuit provided in an embodiment of the present application;

[0028] Figure 2 A schematic diagram of the structure of a pipeline circuit provided in an embodiment of the present application;

[0029] Figure 3 A schematic diagram of a module structure provided in an embodiment of the present application;

[0030] Figure 4 A flowchart of another method for converting a synchronous circuit into an asynchronous circuit provided in an embodiment of the present application;

[0031] Figure 5 A schematic diagram of the structure of a device for converting a synchronous circuit into an asynchronous circuit provided in an embodiment of the present application;

[0032] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0033] The following will discuss the making and use of various embodiments in detail. However, it should be understood that many applicable inventive concepts provided by this application can be implemented in a variety of specific environments. The specific embodiments discussed are only illustrative of specific ways to implement and use this description and this technology, and do not limit the scope of this application.

[0034] Unless defined otherwise, all technical and scientific terms used herein have the same meanings as commonly understood by one of ordinary skill in the art.

[0035] Various circuits or other components may be described or referred to as being "configured to" perform one or more tasks. In this case, "configured to" is used to imply structure by indicating that the circuit / component includes structure (e.g., circuitry) that performs the one or more tasks during operation. Thus, even when the specified circuit / component is not currently operational (e.g., not turned on), the circuit / component may be referred to as being configured to perform the task. Circuits / components used with the phrase "configured to" include hardware, such as circuits that perform an operation, etc.

[0036] The technical scheme in the embodiment of the present application will be described below in conjunction with the accompanying drawings in the embodiment of the present application. In the present application, "at least one" refers to one or more, and "multiple" refers to two or more. "And / or" describes the association relationship of the associated objects, indicating that there may be three relationships, for example, A and / or B, which can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the associated objects before and after are in an "or" relationship. "At least one of the following" or its similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b or c can represent: a, b, c, a and b, a and c, b and c or a, b and c, where a, b and c can be single or multiple. In addition, in the embodiment of the present application, the words "first", "second" and the like do not limit the quantity and order.

[0037] It should be noted that, in this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in this application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0038] Before introducing the embodiments of the present application, the technical terms and background technologies involved in the present application are first introduced.

[0039] Synchronous circuit: refers to all clock-controlled units in the circuit, such as flip-flops or registers, which are all controlled by a unified global clock.

[0040] Asynchronous circuit: refers to a circuit in which data transmission can occur at any time and there is no global control clock in the circuit.

[0041] Integrated circuit design includes synchronous circuit design and asynchronous circuit design. Compared with the high degree of automation of synchronous circuit design, asynchronous circuit design lacks mature and reliable EDA tools, resulting in complex design and long cycle, low design efficiency, and the performance of the designed asynchronous circuit is not as good as that of the synchronous circuit, which requires continuous improvement, resulting in the cost of asynchronous circuit design being higher than that of synchronous circuit design.

[0042] At present, there are many asynchronous circuit design methods, such as syntax-driven conversion, synchronous to asynchronous conversion, customized pipeline, etc. Among them, converting synchronous circuit design to achieve asynchronous circuit design through manual operation is still the mainstream design method. However, the low efficiency and poor reliability of manual conversion will lead to low efficiency and poor reliability of asynchronous circuit design, high difficulty in implementation, and high design cost.

[0043] In a method for converting a synchronous circuit into an asynchronous circuit, the difference between a synchronous pipeline circuit and a bundled data asynchronous circuit based on a click unit is first compared, and then the Verilog code of the synchronous circuit is converted into the Verilog code of the bundled data asynchronous circuit based on the click unit through a tool command language (TCL) script, and finally the asynchronous circuit is synthesized through a Synopsys design compiler (DC) tool to achieve the conversion from synchronous circuit to asynchronous circuit.

[0044] However, this method can only convert simple synchronous pipelines, cannot handle complex circuit designs, cannot convert superscalar pipelines, and cannot generate timing constraints. Using this method for asynchronous circuit design still has problems such as low efficiency, poor reliability, high implementation difficulty, and high design cost.

[0045] In order to solve the above problems, an embodiment of the present application provides a method for converting a synchronous circuit into an asynchronous circuit, which can improve the efficiency and reliability of asynchronous circuit design and reduce design difficulty and design cost.

[0046] Figure 1 A flowchart of a method for converting a synchronous circuit into an asynchronous circuit is provided in an embodiment of the present application, and the method includes steps S101-S104. The synchronous circuit includes a plurality of synchronous modules, and the plurality of synchronous modules are connected by a multi-stage pipeline. The embodiment of the present application does not limit the specific number of synchronous modules included in the synchronous circuit.

[0047] S101. Obtain code information of multiple synchronization modules, where the code information of the multiple synchronization modules includes Verilog code and annotation information of each synchronization module, where the annotation information of each synchronization module includes type and position information of an asynchronous control unit, where the position information is used to indicate the position of the asynchronous control unit in a multi-stage pipeline.

[0048] Optionally, the above-mentioned multiple synchronization modules may be the same synchronization module, or may be different synchronization modules, which is not limited in the embodiment of the present application.

[0049] Optionally, each synchronization module may not include an instantiation module, or may include at least one instantiation module. The embodiment of the present application does not limit the specific number of instantiation modules included in each synchronization module. Among them, the instantiation module means: when a synchronization module calls another synchronization module, the called synchronization module can be called an instantiation module.

[0050] In a possible embodiment, when the synchronization module includes at least one instantiated module, the code information of the synchronization module also includes the Verilog code and annotation information of the at least one instantiated module, and the annotation information of each instantiated module includes the type and location information of the asynchronous control unit, and the location information is used to indicate the position of the asynchronous control unit in the multi-stage pipeline.

[0051] In a possible embodiment, the annotation information of the synchronization module and the annotation information of the instantiation module can be added by the user according to the pipeline structure when the multiple synchronization modules are connected by a multi-stage pipeline by analyzing the Verilog code of the multiple synchronization modules. Taking the multiple synchronization modules connected by an n-stage pipeline, where n is an integer greater than 1, as an example, when adding annotation information for each synchronization module, the user can add it in the manner shown in Table 1.

[0052] Table 1

[0053]

[0054]

[0055] Specifically, when the position to add annotation information is the first stage of the pipeline in the pipeline structure, the annotation information " / / source s-1" can be added. Among them, "source" is the source, indicating the type of asynchronous control unit, which can be abbreviated as "src", and "s-1" indicates the first stage of the pipeline of the asynchronous control unit in the pipeline structure. When there are no parallel asynchronous control units, "p1" indicating the number of parallelism can be omitted.

[0056] When the location to add annotation information is the last pipeline stage (nth pipeline stage) in the pipeline structure, the annotation information " / / sink sn" can be added. "Sink" is a sink, which can be understood as the end. It indicates the type of asynchronous control unit and can be abbreviated as "sik". "sn" indicates the last pipeline stage of the asynchronous control unit in the pipeline structure. When there are no parallel asynchronous control units, "p1" indicating the number of parallel operations can be omitted.

[0057] When the location to add annotation information is a synchronization module, and the synchronization module includes a first-level pipeline, the user does not need to add annotation information, and the software can recognize the always@(posedgeclk) statement and add a first-level pipeline.

[0058] When the location to add annotation information is a synchronous module, and the synchronous module includes multiple pipelines or multiple parallel numbers and includes an always@(posedgeclk) statement, for each always@(posedgeclk) statement, the annotation information " / / reg s-k_pm" can be added. Among them, "reg" is a register (register, reg), which indicates the type of the asynchronous control unit, "sk" indicates the k-th pipeline of the asynchronous control unit in the pipeline structure, k is a positive integer less than n, and "pm" indicates that the asynchronous control unit is the m-th parallel asynchronous control unit in the k-th pipeline, and m is a positive integer.

[0059] When the location where the annotation information is added is an instantiated module, and the instantiated module corresponds to a single-stage pipeline, the annotation information " / / module name s-k_pm" can be added. The "module name" is the name of the instantiated module, and the "module name" is used to indicate the type of the asynchronous control unit, "sk" indicates the k-th stage pipeline of the asynchronous control unit in the pipeline structure, and "pm" indicates that the asynchronous control unit is the m-th parallel asynchronous control unit in the k-th stage pipeline.

[0060] When the location where the annotation information is added is an instantiated module, and the instantiated module corresponds to a multi-stage pipeline, taking the instantiated module corresponding to a 3-stage pipeline as an example, the annotation information " / / module name skx-y_pm" can be added. Among them, "module name" is the name of the instantiated module, which is used to indicate the type of asynchronous control unit, "skxy" indicates that the 3 asynchronous control units corresponding to the instantiated module are respectively in the k-th stage pipeline, the x-th stage pipeline, and the y-th stage pipeline in the pipeline structure, and "pm" indicates that the 3 asynchronous control units corresponding to the instantiated module are respectively the m-th parallel asynchronous control unit in the k-th stage pipeline, the x-th stage pipeline, and the y-th stage pipeline. The embodiment of the present application does not limit the specific number of stages of the pipeline corresponding to each instantiated module.

[0061] For example, take the instantiation module as a fetch module, the fetch module corresponds to a 3-stage pipeline, and the 3 asynchronous control units corresponding to the fetch module do not have parallel asynchronous control units in the 3-stage pipeline. The annotation information of the fetch module can be "fetch s-1-2-3", where "fetch" indicates the type of the asynchronous control unit, and "s-1-2-3" indicates that the fetch module corresponds to 3 asynchronous control units, and the 3 asynchronous control units are respectively in the 1st stage pipeline, the 2nd stage pipeline, and the 3rd stage pipeline. Since there are no parallel asynchronous control units, the "_p1" in the annotation information can be omitted.

[0062] When the location for adding annotation information is multiple instantiated modules, and the multiple instantiated modules correspond to the same pipeline stage and different parallel levels, taking the multiple instantiated modules as two instantiated modules as an example, the annotation information " / / module name sk-x_pm" can be added. Among them, "module name" is the name of the instantiated module, which is used to indicate the type of asynchronous control unit, "skx" indicates the two asynchronous control units corresponding to the instantiated module, and the two asynchronous control units are respectively in the k-th pipeline and the x-th pipeline in the pipeline structure, and "pm" indicates that the two asynchronous control units corresponding to the instantiated module are the m-th parallel asynchronous control units in the k-th pipeline and the x-th pipeline.

[0063] For example, the positions where annotation information is added are the first alu instantiation module, the second alu instantiation module, and the Bru instantiation module. The three instantiation modules all correspond to the first-level pipeline and the second-level pipeline. The two asynchronous control units corresponding to the first alu instantiation module are the first parallel asynchronous control units in the first-level pipeline and the second-level pipeline, respectively. The two asynchronous control units corresponding to the second alu instantiation module are the second parallel asynchronous control units in the first-level pipeline and the second-level pipeline, respectively. The two asynchronous control units corresponding to the Bru instantiation module are the third parallel asynchronous control units in the first-level pipeline and the second-level pipeline. The first alu instantiation module can add annotation information " / / alu s-1-2_p1", the second alu instantiation module can add annotation information " / / alu s-1-2_p2", and the Bru instantiation module can add annotation information " / / alus-1-2_p3".

[0064] When the synchronization module at the position where the annotation is added corresponds to a pipeline of a multiplex (Mux) / demultiplexer (Demux) structure, the annotation information " / / (source / sink / reg)_i_ie_o_oe s-k_pm" can be added. The pipeline of the Mux structure means that the upper-level pipeline of the pipeline includes multiple parallel asynchronous control units, and the pipeline of the Demux structure means that the lower-level pipeline of the pipeline includes multiple parallel asynchronous control units. Among them, "(source / sink / reg)" represents the type of asynchronous control unit. According to the type of the synchronization module, the type of asynchronous control unit can be selected in "(source / sink / reg)". For example, when the position where the annotation information is added is the first-level pipeline in the pipeline structure, "source" can be selected as the type of asynchronous control unit. "i" represents the number of input request (in Req, in Request) signals, "ie" represents the number of enabled in Req signals, "o" represents the number of output request (Out__Req, Out__Request) signals, and "oe" represents the number of enabled out_Req signals. "sk" indicates that the asynchronous control unit is the k-th stage pipeline in a multi-stage pipeline, and "pm" indicates that the asynchronous control unit is regarded as the m-th parallel asynchronous control unit in the k-th stage pipeline.

[0065] Optionally, the specific value of "i_ie_o_oe" in the above-mentioned annotation information " / / reg_i_ie_o_oe s-k_pm" can be set by the user. By adjusting the specific value of "i_ie_o_oe", different parallel asynchronous circuits can be realized.

[0066] For example, if the synchronization module is an issue module, the issue module corresponds to the 5th stage pipeline of the Mux / Demux structure, and there is no parallel asynchronous control unit, the annotation information of the issue module can be " / / reg_1_0_7_6s-5", where "reg" indicates the type of the asynchronous control unit, "1" indicates that the number of in Req signals is 1, "0" indicates that the number of enabled in Req signals is 0, "7" indicates that the number of Out_Req signals is 7, "6" indicates that the number of enabled out_Req signals is 6, and "s-5" indicates that the asynchronous control unit is the 5th stage pipeline in the multi-stage pipeline.

[0067] In a possible embodiment, when adding annotation information, the instantiation modules in each synchronization module can be firstly annotated in the order from the lower-level modules to the top-level modules, thereby reducing the difficulty of adding annotation information and improving the annotation efficiency. Moreover, the port naming conflict problem when the instantiation modules are repeated can be avoided.

[0068] Specifically, when adding annotation information to multiple synchronization modules, the user can first annotate the instantiation modules inside each synchronization module. Each synchronization module can include at least one instantiation module and a multi-stage pipeline. When adding annotation information to the instantiation module in the synchronization module, the instantiation module can be annotated according to the position of the pipeline corresponding to the instantiation module in the multi-stage pipeline, without the user having to first determine the pipeline structure of the multiple synchronization modules, and annotate the instantiation module according to the position of the pipeline corresponding to the instantiation module in the pipeline structure, thereby reducing the difficulty of adding annotation information and improving annotation efficiency.

[0069] For example, take the case where multiple synchronization modules include synchronization module A, and synchronization module A includes instantiation module B, instantiation module C, and 2-stage pipeline. When adding annotation information to the multiple synchronization modules, annotation information "B s1" can be added to instantiation module B in synchronization module A, and annotation information "C s2" can be added to instantiation module C, without first determining the pipeline structure of the multiple synchronization modules. According to the positions of the pipelines corresponding to instantiation module B and instantiation module C in the pipeline structure, annotation information is added to instantiation module B and instantiation module C, thereby reducing the difficulty of adding annotation information and improving annotation efficiency.

[0070] For ease of understanding, the following describes the types of asynchronous control units from the perspective of pipelines. Figure 2 As shown, it is a structural schematic diagram of a pipeline circuit, and the pipeline circuit includes a 5-stage pipeline. Among them, the 1st, 2nd, 4th, and 5th stage pipelines all include a D flip-flop (data flip-flop, DFF), and the 2nd stage pipeline includes 2 D flip-flops, each D flip-flop is connected to an asynchronous control unit, and the asynchronous control units are connected through ports. The asynchronous control unit corresponding to the 1st stage pipeline is located at the 1st stage of the 5-stage pipeline, so the type of the asynchronous control unit is src. The next stage (the third stage pipeline) of the 2nd stage pipeline includes 2 parallel asynchronous control units, so the type of the asynchronous control unit corresponding to the 2nd stage pipeline is Demux, the type of the asynchronous control unit corresponding to the 4th stage pipeline is Mux, and the type of the 2 parallel asynchronous control units in the 3rd stage pipeline is reg. The asynchronous control unit corresponding to the 5th stage pipeline is located at the 5th stage of the 5-stage pipeline, so the type of the asynchronous control unit is sik.

[0071] S102: Determine levels and instantiation module information of multiple synchronization modules according to code information of multiple synchronization modules.

[0072] The level of each synchronization module is related to the number of instantiation modules included in the synchronization module and the level of the instantiation modules included in the synchronization module. When the synchronization module includes an instantiation module, the levels and instantiation module information of multiple synchronization modules are determined, including determining the level of the instantiation module in each synchronization module and the information of the instantiation sub-module included in each instantiation module, and the level of each instantiation module is related to the number of instantiation sub-modules included in the instantiation module and the level of the instantiation sub-module included in the instantiation module.

[0073] In a possible embodiment, the above-mentioned multiple synchronization modules include a first synchronization module, and the first synchronization module does not have an instantiation module. The above-mentioned determining the levels and instantiation module information of the multiple synchronization modules based on the code information of the multiple synchronization modules includes: determining the initial level of the first synchronization module based on the Verilog code of the first synchronization module, and using the initial level of the first synchronization module as the level of the first synchronization module.

[0074] Optionally, the initial level of the first synchronization module can be any value, which is not limited in the embodiment of the present application.

[0075] For example, according to the Verilog code of the first synchronization module, it can be determined that the first synchronization module includes 0 instantiation modules, the initial level of the first synchronization module is determined to be 1, and the initial level 1 is used as the level of the first synchronization module.

[0076] In a possible embodiment, the plurality of synchronization modules further include a second synchronization module, the second synchronization module includes a first instantiation module, and the determining the levels of the plurality of synchronization modules according to the code information of the plurality of synchronization modules includes:

[0077] First, the initial level of the first instantiation module is determined according to the Verilog code of the second synchronization module.

[0078] Optionally, the initial level of the first instantiated module can be any value. In the following embodiments, the initial level of the first instantiated module is 1 as an example for illustrative description.

[0079] For example, taking the second synchronization module including the first instantiation module as an example, first, according to the Verilog code of the second synchronization module, it can be determined that the second synchronization module includes the first instantiation module, and the initial level 1 of the first instantiation module is determined.

[0080] Then, the Verilog codes of the multiple synchronous modules are traversed to determine whether the first instantiated module has a child instantiated module.

[0081] When there is no child instantiation module in the first instantiation module, it is determined that the level of the first instantiation module is the initial level.

[0082] For example, the level of the first instantiated module may be determined to be initial level 1.

[0083] When the first instantiated module includes at least one sub-instantiated module, the level of the first instantiated module is determined to be the level of the first sub-instantiated module plus 1, and the first sub-instantiated module is the sub-instantiated module with the highest level among the at least one sub-instantiated module.

[0084] For example, taking the example that at least one sub-instantiated module includes a first sub-instantiated module and a second sub-instantiated module, the level of the first sub-instantiated module is 1, and the level of the second sub-instantiated module is 0, it can be determined that the level of the first instantiation module is the level 1 of the first sub-instantiated module plus 1, and the level of the first instantiation module is 2.

[0085] Finally, the level of the second synchronization module is determined to be the level of the first instantiation module plus 1.

[0086] For example, when the level of the first instantiated module is 1, it can be determined that the level of the second synchronization module is the level of the first instantiated module plus 1, and the level of the second synchronization module is 2.

[0087] For another example, when the level of the first instantiated module is 2, it can be determined that the level of the second synchronization module is the level of the first instantiated module plus 1, and the level of the second synchronization module is 3.

[0088] In a possible embodiment, the second synchronization module may include more instantiation modules in addition to the first instantiation module. When the second synchronization module includes more instantiation modules, the first instantiation module is the highest-level instantiation module among the multiple instantiation modules included in the second synchronization module.

[0089] In a possible embodiment, the levels of the multiple synchronization modules and the instantiated module information determined in the above step S102, as well as the level of the instantiated modules in each synchronization module, and each instantiated module including the information of the instantiated sub-module, can be stored in the form of [synchronization module name, level, instantiated module name], [instantiated module name, level, instantiated sub-module name], and sorted according to the level of the module, for example, sorted in order from small to large level, to facilitate processing in subsequent steps and improve conversion efficiency.

[0090] S103. Determine asynchronous control structure information according to code information of multiple synchronous modules, as well as levels and instantiated module information of multiple synchronous modules. The asynchronous control structure information is used to indicate types of multiple asynchronous control units corresponding to the multiple synchronous modules, and the position of each asynchronous control unit in the multi-stage pipeline.

[0091] Specifically, according to the code information of multiple synchronization modules, the levels of multiple synchronization modules and the instantiation module information, the asynchronous control unit model library is queried to determine the asynchronous control structure information. The asynchronous control unit model library includes multiple preset asynchronous control unit types, such as "source", "sink", etc.

[0092] In a possible embodiment, each synchronization module includes at least one instantiation module, and the annotation information of each synchronization module includes the annotation information of at least one instantiation module. The above-mentioned querying the asynchronous control unit model library according to the code information of multiple synchronization modules, and the levels and instantiation module information of multiple synchronization modules includes:

[0093] First, according to the levels of the multiple synchronization modules and the instantiation module information, the multiple synchronization modules are traversed in order from the smallest to the largest level.

[0094] For example, Figure 3 As shown, taking the example that multiple synchronization modules include synchronization module A, synchronization module A includes instantiation module B and instantiation module C, instantiation module C includes sub-instantiation module D and sub-instantiation module E, the level of synchronization module A is 3, the level of instantiation module B is 1, the level of instantiation module C is 2, and the levels of sub-instantiation module D and sub-instantiation module E are both 1, the sub-instantiation module D, instantiation module B, instantiation module C, and synchronization module A can be traversed in order from small to large levels.

[0095] Then, the asynchronous control unit model library is queried according to the code information of each synchronous module to determine whether the type of the asynchronous control unit in the annotation information of each synchronous module is the type of the asynchronous control unit preset in the asynchronous control unit model library.

[0096] Specifically, the asynchronous control unit model library is queried according to the annotation information of each synchronization module, or according to the annotation information of each instantiated module.

[0097] When the type of the asynchronous control unit in the annotation information of the synchronous module is the type of the asynchronous control unit preset in the asynchronous control unit model library, the annotation information of the synchronous module is used to determine the asynchronous control structure information.

[0098] For example, Figure 3As shown, taking the annotation information of the synchronization module A as " / / As-1-2-3", the annotation information of the instantiated module B as " / / src s-1", the annotation information of the instantiated module C as " / / C s-1-2", the annotation information of the sub-instantiated module D as " / / Mux s-1", and the annotation information of the sub-instantiated module E as " / / sik s-1", the type of the asynchronous control unit in the annotation information of the instantiated module B, the sub-instantiated module D and the sub-instantiated module E is the type of asynchronous control unit preset in the asynchronous control unit model library as an example, the annotation information of the instantiated module B, the sub-instantiated module D and the sub-instantiated module E is used to determine the asynchronous control structure information.

[0099] When the type of the asynchronous control unit in the annotation information of the synchronization module is not the type of the asynchronous control unit preset in the asynchronous control unit model library, the annotation information of at least one instantiation module is used to determine the asynchronous control structure information.

[0100] For example, Figure 3 As shown, the type of asynchronous control unit in the annotation information of the synchronous module A and the instantiation module C is not the type of asynchronous control unit preset in the asynchronous control unit model library. The annotation information of the sub-instantiation module D and the sub-instantiation module E is used to determine the asynchronous control structure information [1: Mux, 2: sik] corresponding to the instantiation module C, and the annotation information of the instantiation module B, the sub-instantiation module D and the sub-instantiation module E is used to determine the asynchronous control structure information [1: src, 2: Mux, 3: sik] corresponding to the synchronous module A. Among them, "Mux" and the like are used to indicate the type of asynchronous control unit corresponding to the synchronous module, and the number "1" and the like are used to indicate the position of each asynchronous control unit in the multi-stage pipeline.

[0101] It can be understood that, for a synchronous circuit including multiple synchronous modules, the asynchronous control structure information corresponding to the multiple synchronous modules as a whole can be determined through the above step S103, and the asynchronous control structure information corresponding to each synchronous module can also be determined.

[0102] S104. Convert code information of multiple synchronous modules into code information of asynchronous circuits according to the asynchronous control structure information.

[0103] The above asynchronous control unit model library also includes port information corresponding to each of the preset multiple asynchronous control units.

[0104] Exemplarily, the asynchronous control unit model library can store the type of each preset asynchronous control unit and the corresponding port information in the manner of [asynchronous control unit type, 'rst':rst, 'port0':[(\d)], ..., 'port7':[(\d)]], where the specific values ​​of "(\d)" in 'port0' to 'port7' can be obtained from the annotation information of the synchronization module.

[0105] The above-mentioned converting the code information of multiple synchronous modules into the code information of asynchronous circuits according to the asynchronous control structure information includes:

[0106] First, according to the asynchronous control structure information and the asynchronous control unit model library, multiple asynchronous control units corresponding to multiple synchronous modules are instantiated. The process includes: according to the asynchronous control structure information and the asynchronous control unit model library, determining the asynchronous control unit included in each level of the pipeline, and connecting the req and ack handshake signals of the asynchronous control units in the two adjacent levels of the pipeline with assign to connect the handshake signals. The process can refer to the process of instantiating the asynchronous control unit in the prior art, and the embodiments of the present application will not be repeated here.

[0107] Then, based on the Verilog codes of multiple synchronization modules, determine the location information of the clock (CLK) port in the Verilog codes of multiple synchronization modules, and based on the location information of the clock port, modify the clock port to a Click port. This process can refer to the process of replacing the clock port with a Click port in the prior art, and the embodiments of the present application will not be repeated here.

[0108] Finally, timing constraints are generated according to the asynchronous control structure information to convert code information of multiple synchronous modules into code information of asynchronous circuits.

[0109] In a possible embodiment, the above generation of timing constraints based on asynchronous control structure information includes: first, using create_clock to define the first level clock constraints, and then using create_generate_clock to define each level of clock. Then, set_multicycle_path constraints are set between each level of pipelines. Finally, if it is an application specific integrated circuit (ASIC) design, set_ideal_networks, set_disable_timing, and set_case_analysis constraints can also be generated as needed.

[0110] For example, you can generate timing constraints like the following:

[0111] #------------------------------clockcreation------------------------------#

[0112] creat-clock–name click_s1p1-period 5–waveform{0 1}[get_pins

[0113] u_asyncon_riscv_tcm_top / u_source_0i0e1o0e_s1p1 / click]

[0114] create_generated_clock-name click_s2p1-source[get pins

[0115] u_asyncon_riscv_tcm_top / u_source_0i0e1o0e_s1p1 / click]-edges{123}-edge_shift{444}[get_pins u_asyncon_riscv_tcm_top / u_reg_1i0e1o0e_s2p1 / click]

[0116] create_generated_clock-name click_s3p1-source[get pins u_asyncon_riscv_tcm_top / u_reg_reg1i0e1o0e_s2p1 / click]-edges{123}-edge_shift{444}[get_pins u_asyncon_riscv_tcm_top / u_reg_1i0e1o0e_s3p1 / click]

[0117] #------------------------------set_multicycle_path------------------------------#

[0118] set_multicycle_path 2-setup-from[get_clocks click_s2p1]-to[get_clocksclick_s1p1]

[0119] set_multicycle_path 1-hold-from[get_clocks click_s2p1]-to[get_clocksclick_s1p1]

[0120] set_multicycle_path 3-setup-from[get_clocks click_s3p1]-to[get_clocksclick_s1p1]

[0121] set_multicycle_path 2-hold-from[get_clocks click_s3p1]-to[get_clocksclick_s1p1]

[0122] set_multicycle_path 2-setup-from[get_clocks click_s3p1]-to[get_clocksclick_s2p1]

[0123] In the method for converting a synchronous circuit into an asynchronous circuit provided by an embodiment of the present application, the code information of multiple synchronous modules includes the Verilog code and annotation information of each synchronous module, and the annotation information of each synchronous module includes the type and position information of the asynchronous control unit, and the position information is used to indicate the position of the asynchronous control unit in the multi-stage pipeline. Therefore, according to the code information of the multiple synchronous modules, the levels and instantiation module information of the multiple synchronous modules and the asynchronous control structure information can be determined. According to the asynchronous control structure information, the code information of the multiple synchronous modules can be converted into the code information of the asynchronous circuit, and the conversion of superscalar and complex pipelines can be realized. At the same time, after the code information of the multiple synchronous modules is obtained, no human intervention is required in the conversion process, so the conversion efficiency and conversion reliability can be improved.

[0124] In a possible embodiment, the asynchronous control model library may be obtained from the prior art, or may be generated according to the Verilog code of the asynchronous circuit library after obtaining the Verilog code of the asynchronous circuit library. The embodiment of the present application is not limited to this.

[0125] like Figure 4 As shown, when the asynchronous control model library is generated according to the acquired Verilog code of the asynchronous circuit library, before the above step S103, step S105 is also included.

[0126] S105. Generate an asynchronous control unit model library according to the Verilog code of the asynchronous circuit library.

[0127] The Verilog code of the asynchronous circuit library includes a plurality of preset asynchronous control unit types and port information corresponding to each asynchronous control unit.

[0128] Figure 5 A schematic diagram of the structure of a device 500 for converting a synchronous circuit into an asynchronous circuit is shown, and the device 500 includes: an acquisition module 501 and a processing module 502. Exemplarily, the acquisition module 501 is used to obtain code information of multiple synchronous modules, and the code information of the multiple synchronous modules includes the Verilog code and annotation information of each synchronous module. The annotation information of each synchronous module includes the type and position information of the asynchronous control unit, and the position information is used to indicate the position of the asynchronous control unit in the multi-stage pipeline. The processing module 502 is used to determine the level and instantiation module information of the multiple synchronous modules according to the code information of the multiple synchronous modules. Optionally, if the device 500 for converting a synchronous circuit into an asynchronous circuit includes a storage unit, the processing module 502 can also execute a program or instruction stored in the memory, so that the device 500 for converting a synchronous circuit into an asynchronous circuit implements the method and function involved in any of the above-mentioned embodiments.

[0129] Exemplarily, the acquisition module 501 may be used to perform, for example, Figure 1 , and / or other processes for the technology described herein. The processing module 502 may be used to perform, for example, Figure 1 All relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module, and will not be repeated here.

[0130] Exemplarily, in hardware implementation, the functions of the acquisition module 501 can be performed by a transceiver (transmitter / receiver) and / or a communication interface, and the functions of the processing module 502 can be performed by a processor or a microcontroller unit, wherein the processing module 502 can be embedded in or independent of the processor of the device 500 for converting a synchronous circuit into an asynchronous circuit in the form of hardware, or can be stored in the memory of the device 500 for converting a synchronous circuit into an asynchronous circuit in the form of software, so that the processor can call and execute the operations corresponding to the above-mentioned each functional unit.

[0131] Based on this, Figure 6 As shown, the embodiment of the present application further provides an electronic device 600, which includes a memory 610 and a processor 620; the memory 610 and the processor 620 are coupled. The memory 610 is used to store computer program codes, and the computer program codes include computer instructions; when the processor 620 executes the computer instructions, the electronic device 600 executes as follows Figure 1 or Figure 4 The steps in the method of converting a synchronous circuit to an asynchronous circuit are shown.

[0132] The embodiment of the present application also provides a computer-readable storage medium, in which a computer-executable instruction is stored. When at least one processor of a device executes the computer-executable instruction, the device executes Figure 1 or Figure 4 The steps in the method of converting a synchronous circuit to an asynchronous circuit are shown.

[0133] The present application also provides a computer program product. When at least one processor of a device runs the computer program product, the device executes Figure 1 or Figure 4 The steps in the method of converting a synchronous circuit to an asynchronous circuit are shown.

[0134] The relevant descriptions of the method for converting a synchronous circuit into an asynchronous circuit provided above can all be referred to the device 500, electronic device 600, computer-readable storage medium and computer program product for converting a synchronous circuit into an asynchronous circuit, and the embodiments of the present application will not be repeated here.

[0135] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application shall be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A method for converting a synchronous circuit into an asynchronous circuit, characterized in that: The synchronization circuit includes a plurality of synchronization modules, and the plurality of synchronization modules are connected by a multi-stage pipeline. The method includes: Acquire code information of the multiple synchronization modules, wherein the code information of the multiple synchronization modules includes Verilog code and annotation information of each synchronization module, and the annotation information of each synchronization module includes type and position information of an asynchronous control unit, wherein the position information is used to indicate the position of the asynchronous control unit in the multi-stage pipeline; Determining levels and instantiation module information of the plurality of synchronization modules according to code information of the plurality of synchronization modules; Determine asynchronous control structure information according to the code information of the multiple synchronous modules, the levels of the multiple synchronous modules, and the instantiation module information, wherein the asynchronous control structure information is used to indicate the types of the multiple asynchronous control units corresponding to the multiple synchronous modules, and the position of each asynchronous control unit in the multi-stage pipeline; The code information of the plurality of synchronous modules is converted into the code information of the asynchronous circuit according to the asynchronous control structure information.

2. The method according to claim 1, characterized in that The multiple synchronization modules include a first synchronization module, and the first synchronization module does not have an instantiation module. The determining the levels of the multiple synchronization modules according to the code information of the multiple synchronization modules includes: An initial level of the first synchronization module is determined according to the Verilog code of the first synchronization module, and the initial level of the first synchronization module is used as the level of the first synchronization module.

3. The method according to claim 1 or 2, characterized in that: The multiple synchronization modules further include a second synchronization module, the second synchronization module includes a first instantiation module, and the determining the levels of the multiple synchronization modules according to the code information of the multiple synchronization modules includes: Determining an initial level of the first instantiation module according to the Verilog code of the second synchronization module; Traversing the Verilog codes of the plurality of synchronization modules to determine whether the first instantiated module has a child instantiated module; When there is no child instantiation module in the first instantiation module, determining that the level of the first instantiation module is an initial level; When the first instantiation module includes at least one sub-instantiation module, determining the level of the first instantiation module to be the level of the first sub-instantiation module plus 1, the first sub-instantiation module being the sub-instantiation module with the highest level among the at least one sub-instantiation module; The level of the second synchronization module is determined to be the level of the first instantiation module plus 1.

4. The method according to any one of claims 1 to 3, characterized in that The step of determining the asynchronous control structure information according to the code information of the plurality of synchronization modules, and the levels and instantiation module information of the plurality of synchronization modules comprises: According to the code information of the multiple synchronization modules, as well as the levels and instantiation module information of the multiple synchronization modules, the asynchronous control unit model library is queried to determine the asynchronous control structure information; wherein the asynchronous control unit model library includes multiple preset asynchronous control unit types.

5. The method according to claim 4, characterized in that The synchronization module includes at least one instantiation module, and the annotation information of each synchronization module includes the annotation information of the at least one instantiation module. The querying of the asynchronous control unit model library according to the code information of the multiple synchronization modules, and the levels and instantiation module information of the multiple synchronization modules includes: According to the levels of the multiple synchronization modules and the instantiation module information, traverse the multiple synchronization modules in order from small to large levels; Querying the asynchronous control unit model library according to the code information of each synchronous module, and determining whether the type of the asynchronous control unit in the annotation information of each synchronous module is the type of the asynchronous control unit preset in the asynchronous control unit model library; When the type of the asynchronous control unit in the annotation information of the synchronization module is the type of the asynchronous control unit preset in the asynchronous control unit model library, the annotation information of the synchronization module is used to determine the asynchronous control structure information; When the type of the asynchronous control unit in the annotation information of the synchronization module is not the type of the asynchronous control unit preset in the asynchronous control unit model library, the annotation information of the at least one instantiation module is used to determine the asynchronous control structure information.

6. The method according to claim 4 or 5, characterized in that: The asynchronous control unit model library also includes the port information corresponding to each of the preset multiple asynchronous control units. The code information of the multiple synchronous modules is converted into the code information of the asynchronous circuit according to the asynchronous control structure information, including: Instantiating a plurality of asynchronous control units corresponding to the plurality of synchronous modules according to the asynchronous control structure information and the asynchronous control unit model library; Determine, according to the Verilog codes of the multiple synchronization modules, location information of clock ports in the Verilog codes of the multiple synchronization modules; According to the position information of the clock port, the clock port is modified to be a click port; Timing constraints are generated according to the asynchronous control structure information to convert the code information of the plurality of synchronous modules into code information of the asynchronous circuit.

7. The method according to any one of claims 4 to 6, characterized in that: The method further comprises: The asynchronous control unit model library is generated according to the Verilog code of the asynchronous circuit library, wherein the Verilog code of the asynchronous circuit library includes the types of the preset multiple asynchronous control units and the port information corresponding to each asynchronous control unit.

8. A device for converting a synchronous circuit into an asynchronous circuit, characterized in that: The synchronization circuit includes a plurality of synchronization modules, the plurality of synchronization modules are connected by a multi-stage pipeline, and the device includes an acquisition module and a processing module; The acquisition module is used to acquire code information of the multiple synchronization modules, wherein the code information of the multiple synchronization modules includes Verilog code and annotation information of each synchronization module, and the annotation information of each synchronization module includes type and position information of an asynchronous control unit, and the position information is used to indicate the position of the asynchronous control unit in the multi-stage pipeline; The processing module is used to determine the levels and instantiation module information of the multiple synchronization modules according to the code information of the multiple synchronization modules; The processing module is further used to determine asynchronous control structure information according to the code information of the multiple synchronization modules, and the levels and instantiation module information of the multiple synchronization modules, wherein the asynchronous control structure information is used to indicate the types of the multiple asynchronous control units corresponding to the multiple synchronization modules, and the position of each asynchronous control unit in the multi-stage pipeline; The processing module is further configured to convert the code information of the plurality of synchronization modules into the code information of the asynchronous circuit according to the asynchronous control structure information.

9. The device according to claim 8, characterized in that The multiple synchronization modules include a first synchronization module, and the first synchronization module does not have an instantiation module; The processing module is specifically configured to determine an initial level of the first synchronization module according to the Verilog code of the first synchronization module, and use the initial level of the first synchronization module as the level of the first synchronization module.

10. The device according to claim 8 or 9, characterized in that The plurality of synchronization modules further include a second synchronization module, the second synchronization module including a first instantiation module; The processing module is specifically configured to determine an initial level of the first instantiation module according to the Verilog code of the second synchronization module; The processing module is further used to traverse the Verilog codes of the multiple synchronization modules to determine whether the first instantiation module has a child instantiation module; The processing module is further configured to determine that the level of the first instantiation module is an initial level when there is no child instantiation module in the first instantiation module; The processing module is further configured to, when the first instantiated module includes at least one sub-instantiated module, determine that the level of the first instantiated module is the level of the first sub-instantiated module plus 1, and the first sub-instantiated module is the sub-instantiated module with the highest level among the at least one sub-instantiated module; The processing module is further used to determine that the level of the second synchronization module is the level of the first instantiation module plus 1.

11. The device according to any one of claims 8 to 10, characterized in that The processing module is specifically used to query the asynchronous control unit model library to determine the asynchronous control structure information based on the code information of the multiple synchronization modules, as well as the levels and instantiation module information of the multiple synchronization modules; wherein the asynchronous control unit model library includes multiple preset asynchronous control unit types.

12. The device according to claim 11, characterized in that The synchronization module includes at least one instantiation module, and the annotation information of each synchronization module includes the annotation information of the at least one instantiation module; The processing module is specifically configured to traverse the multiple synchronization modules in order from small to large levels according to the levels of the multiple synchronization modules and the instantiation module information; The processing module is further used to query the asynchronous control unit model library according to the code information of each synchronization module, and determine whether the type of the asynchronous control unit in the annotation information of each synchronization module is the type of the asynchronous control unit preset in the asynchronous control unit model library; When the type of the asynchronous control unit in the annotation information of the synchronization module is the type of the asynchronous control unit preset in the asynchronous control unit model library, the annotation information of the synchronization module is used to determine the asynchronous control structure information; When the type of the asynchronous control unit in the annotation information of the synchronization module is not the type of the asynchronous control unit preset in the asynchronous control unit model library, the annotation information of the at least one instantiation module is used to determine the asynchronous control structure information.

13. The device according to claim 11 or 12, characterized in that The asynchronous control unit model library also includes port information corresponding to each of the preset multiple asynchronous control units; The processing module is specifically used to instantiate multiple asynchronous control units corresponding to the multiple synchronization modules according to the asynchronous control structure information and the asynchronous control unit model library; The processing module is further used to determine the location information of the clock ports in the Verilog codes of the multiple synchronization modules according to the Verilog codes of the multiple synchronization modules; The processing module is further used to modify the clock port into a Click port according to the position information of the clock port; The processing module is further used to generate timing constraints according to the asynchronous control structure information, so as to convert the code information of the multiple synchronous modules into the code information of the asynchronous circuit.

14. The device according to any one of claims 11 to 13, characterized in that The processing module is also used to generate the asynchronous control unit model library according to the Verilog code of the asynchronous circuit library, and the Verilog code of the asynchronous circuit library includes the types of the preset multiple asynchronous control units and the port information corresponding to each asynchronous control unit.

15. An electronic device, characterized in that: The electronic device includes a memory and a processor; the memory and the processor are coupled; the memory is used to store computer program code, and the computer program code includes computer instructions; when the processor executes the computer instructions, the electronic device executes the method for converting a synchronous circuit into an asynchronous circuit as described in any one of claims 1-7.

16. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed on an electronic device, the electronic device executes the method for converting a synchronous circuit into an asynchronous circuit as claimed in any one of claims 1 to 7.