System-on-chip SoC reset management module automatic generation method
By collecting SoC reset information and using Perl scripts and Emacs automatic instantiation functions, Verilog code and register table of the system-on-chip SoC reset management module is generated, which solves the problem of inefficient design in the existing technology and realizes efficient and reliable code generation and register table management.
Patent Information
- Application Number
- CN202411169133.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-23
- Publication Date
- 2024-11-26
AI Technical Summary
The existing technology is inefficient in the design of system-on-chip SoC reset management modules. Manual writing of Verilog code can easily lead to functional defects. Automation tools lack flexibility and cannot automatically generate efficient code and structured register tables, which increases the work burden of designers. .
By collecting reset information of each IP core of SoC, filling in the hardware configuration table, configuring the input parameters of the Perl script, executing the Perl script based on the command line mode, generating RTL code and register tables, and using Emacs' automatic instantiation function to generate comprehensive codes to ensure that Code consistency and reliability.
It realizes flexible generation of efficient codes based on design requirements and reset strategies, reduces manual design time, improves design efficiency, and simplifies the maintenance and update of register tables.
Smart Images

Figure CN119024942A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to integrated circuit design automation, and in particular to a method for automatically generating a reset management module of a system on chip (SoC). Background Art
[0002] In the design of system-on-chip (SoC), the reset management module is an important part to ensure system stability and reliability. This module is responsible for generating and controlling reset signals to ensure the normal operation of each submodule during startup, operation and abnormal conditions. As the complexity of system-on-chip (SoC) design continues to increase, the design requirements of the reset management module are also becoming increasingly diverse, covering a variety of reset strategies, timing requirements and support for different working modes.
[0003] Traditional reset management module design methods usually rely on manually writing Verilog code and register configuration tables, which is not only time-consuming but also prone to functional defects due to human errors. Designers need to have a full understanding of the timing characteristics of the reset signal, the reset requirements of each sub-module and their interactions, which makes the manual design process cumbersome and easy to miss key scenarios.
[0004] Although there are some existing automated tools that can generate Verilog code, these tools often lack flexibility and cannot adapt to specific design requirements, especially in complex scenarios of reset management modules. At the same time, these tools usually cannot automatically generate efficient code and structured register tables, resulting in designers still having to manually adjust and optimize the generated code. In addition, the maintenance and update of register tables also increases the workload of designers, affecting development efficiency. Summary of the invention
[0005] 1. Technical issues to be resolved
[0006] In view of the above shortcomings of the prior art, the present invention provides a method for automatically generating a reset management module of a system on chip (SoC), which can effectively overcome the defect of low design efficiency of the reset management module of the system on chip (SoC) in the prior art.
[0007] (II) Technical solution
[0008] To achieve the above objectives, the present invention is implemented through the following technical solutions:
[0009] A method for automatically generating a reset management module of a system on chip (SoC), comprising the following steps:
[0010] S1, collect reset information of each IP core of the system on chip SoC, and fill the collected reset information into the hardware configuration table;
[0011] S2. Configure the input parameters of the Perl script;
[0012] S3, based on the command line mode input running code, the system executes the Perl script according to the input parameters;
[0013] S4. Check the RTL code and register table generated after the Perl script is run. If there is a problem, the Perl script will give a prompt.
[0014] Preferably, before collecting reset information of each IP core of the system on chip SoC and filling the collected reset information into the hardware configuration table in S1, it includes:
[0015] Configure the system environment, install the software tools Perl and Emacs, and add corresponding environment variables and path variables in the system configuration file.
[0016] Preferably, S1 collects reset information of each IP core of the system on chip SoC and fills the collected reset information into the hardware configuration table, including:
[0017] Collect the reset information of each IP core of the system on chip SoC, including whether reset is required, whether software reset is required, the default value of software reset, whether hardware reset is required, the signal composition of hardware reset, whether clock synchronization is required and the name of the synchronization clock, and fill the collected reset information into the hardware configuration table.
[0018] Preferably, the input parameters of the Perl script configured in S2 include:
[0019] Configure the input parameters of the Perl script, including the path to the hardware configuration table, the name and location of the generated RTL code and register table.
[0020] Preferably, the code is run based on the command line mode input in S3, and the system executes the Perl script according to the input parameters, including:
[0021] Based on the command line mode input running code, the system executes the Perl script according to the input parameters, and the Perl script calls the combinational logic module used for instantiation to generate the final reset signal by combining the hardware reset signal and the software reset signal.
[0022] Preferably, the combinational logic module includes a first OR gate OR1, a second OR gate OR2, a third OR gate OR3, a first AND gate AND1 and a second AND gate AND2;
[0023] The input end of the first OR gate OR1 inputs the hardware reset signals HARD_RSTN00 and HARD_RSTN01, the input end of the second OR gate OR2 inputs the hardware reset signals HARD_RSTN10 and HARD_RSTN11, the input end of the first AND gate AND1 inputs the outputs of the first OR gate OR1 and the second OR gate OR2, the input end of the third OR gate OR3 inputs the no hardware reset signal NO_HARD_RSTN and the output of the first AND gate AND1, and the input end of the second AND gate AND2 inputs the software reset signal SOFT_RSTN and the output of the third OR gate OR3;
[0024] If no hardware reset signal participates in the generation of the final reset signal, no information is filled in the hardware reset signals HARD_RSTN00, HARD_RSTN01, HARD_RSTN10, and HARD_RSTN11 in the hardware configuration table. The hardware reset signals without information are connected to 0 during instantiation, and the hardware reset signal NO_HARD_RSTN that is not required is connected to 1.
[0025] If a hardware reset signal participates in the generation of the final reset signal, the corresponding hardware reset signal names are filled in the hardware reset signals HARD_RSTN00, HARD_RSTN01, HARD_RSTN10, and HARD_RSTN11 in the hardware configuration table. The hardware reset signal without information is connected to 0 during instantiation, and the hardware reset signal NO_HARD_RSTN that is not required is connected to 0.
[0026] If no software reset signal participates in the generation of the final reset signal, no information is filled in the software reset signal SOFT_RSTN in the hardware configuration table, and the software reset signal SOFT_RSTN is connected to 1 during instantiation;
[0027] If a software reset signal participates in the generation of the final reset signal, fill in Y at the software reset signal SOFT_RSTN in the hardware configuration table. The software reset control register will be connected during instantiation, and the default value of the control register will be filled in at the software reset default value SOFT_DEF in the hardware configuration table.
[0028] Preferably, if the final reset signal requires a specific clock for synchronization, the combinational logic module is connected to a synchronization unit SYNC, the input end of the synchronization unit SYNC inputs the output of the second AND gate AND2 and the synchronization clock signal IP_CLK, and the output end of the synchronization unit SYNC outputs the final reset signal IP_RSTN;
[0029] If the final reset signal requires a specific clock for synchronization, fill in Y at the clock synchronization signal RST_SYNC in the hardware configuration table, and fill in the corresponding synchronization clock name at the synchronization clock name CLK_NAME. The synchronization unit SYNC will be inserted when the RTL code is generated;
[0030] If the final reset signal does not require a specific clock for synchronization, the clock synchronization signal RST_SYNC and the synchronization clock name CLK_NAME in the hardware configuration table are not filled in with information, and the output of the second AND gate AND2 is directly connected to the final reset signal IP_RSTN when generating the RTL code.
[0031] Preferably, the code is run based on the command line mode input in S3, and the system executes the Perl script according to the input parameters, including:
[0032] Based on the command line mode input running code, the system executes the Perl script according to the input parameters. The Perl script grabs all reset information in the hardware configuration table as configuration information, and generates RTL code text and register table with default values according to the configuration information;
[0033] The register table includes all software reset control registers and the default values of each control register. The developer generates a register control module based on the register table.
[0034] Preferably, in S4, the RTL code and register table generated after the Perl script is run are checked. If there is a problem, the Perl script will give a prompt, including:
[0035] The automatic instantiation function of the Emacs plug-in is used to generate the synthesizable code of the required reset management module;
[0036] The RTL code complies with the Emacs Verilog-mode automatic instantiation format.
[0037] (III) Beneficial effects
[0038] Compared with the prior art, the method for automatically generating a reset management module for a system on chip (SoC) provided by the present invention combines the automatic instantiation function of Perl scripts and Emacs to automatically generate the Verilog code of the reset management module for the system on chip (SoC) and its corresponding register table. By using Perl scripts, efficient code can be flexibly generated according to design requirements and reset strategies to ensure the consistency and reliability of the code. At the same time, the automatic instantiation function of Emacs can simplify the templating and repetitive work of the code, greatly reducing the design time required for manual design, facilitating the iteration of design functions, and greatly improving the design efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0040] Figure 1 It is a schematic diagram of the process of the present invention;
[0041] Figure 2 It is a structural diagram of the combinational logic module in the present invention;
[0042] Figure 3 For the present invention Figure 2 Schematic diagram of the expanded structure of the combinational logic module. DETAILED DESCRIPTION
[0043] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0044] A method for automatically generating a reset management module of a system on chip (SoC), such as Figure 1 As shown, ① collect the reset information of each IP core of the system on chip SoC, and fill the collected reset information into the hardware configuration table, including:
[0045] Collect the reset information of each IP core of the system on chip SoC, including whether reset is required, whether software reset is required, the default value of software reset, whether hardware reset is required, the signal composition of hardware reset, whether clock synchronization is required and the name of the synchronization clock, and fill the collected reset information into the hardware configuration table.
[0046] Specifically, the reset information of each IP core of the system on chip SoC is collected, and before the collected reset information is filled into the hardware configuration table, it includes:
[0047] Configure the system environment, install the software tools Perl and Emacs, and add corresponding environment variables and path variables in the system configuration file.
[0048] ②Configure the input parameters of the Perl script, including:
[0049] Configure the input parameters of the Perl script, including the path to the hardware configuration table, the name and location of the generated RTL code and register table.
[0050] ③ Based on the command line mode input running code, the system executes the Perl script according to the input parameters, including:
[0051] Based on the command line mode input running code, the system executes the Perl script according to the input parameters, and the Perl script calls the combinational logic module used for instantiation to generate the final reset signal by combining the hardware reset signal and the software reset signal;
[0052] Based on the command line mode input running code, the system executes the Perl script according to the input parameters. The Perl script grabs all reset information in the hardware configuration table as configuration information, and generates RTL code text and register table with default values according to the configuration information;
[0053] The register table includes all software reset control registers and the default values of each control register. The developer generates a register control module based on the register table.
[0054] In the technical solution of this application, if Figure 2 As shown, the combinational logic module includes a first OR gate OR1, a second OR gate OR2, a third OR gate OR3, a first AND gate AND1 and a second AND gate AND2;
[0055] The input end of the first OR gate OR1 inputs the hardware reset signals HARD_RSTN00 and HARD_RSTN01, the input end of the second OR gate OR2 inputs the hardware reset signals HARD_RSTN10 and HARD_RSTN11, the input end of the first AND gate AND1 inputs the outputs of the first OR gate OR1 and the second OR gate OR2, the input end of the third OR gate OR3 inputs the no hardware reset signal NO_HARD_RSTN and the output of the first AND gate AND1, and the input end of the second AND gate AND2 inputs the software reset signal SOFT_RSTN and the output of the third OR gate OR3;
[0056] If no hardware reset signal participates in the generation of the final reset signal, no information is filled in the hardware reset signals HARD_RSTN00, HARD_RSTN01, HARD_RSTN10, and HARD_RSTN11 in the hardware configuration table. The hardware reset signals without information are connected to 0 during instantiation, and the hardware reset signal NO_HARD_RSTN that is not required is connected to 1.
[0057] If a hardware reset signal participates in the generation of the final reset signal, the corresponding hardware reset signal names are filled in the hardware reset signals HARD_RSTN00, HARD_RSTN01, HARD_RSTN10, and HARD_RSTN11 in the hardware configuration table. The hardware reset signal without information is connected to 0 during instantiation, and the hardware reset signal NO_HARD_RSTN that is not required is connected to 0.
[0058] If no software reset signal participates in the generation of the final reset signal, no information is filled in the software reset signal SOFT_RSTN in the hardware configuration table, and the software reset signal SOFT_RSTN is connected to 1 during instantiation;
[0059] If a software reset signal participates in the generation of the final reset signal, fill in Y at the software reset signal SOFT_RSTN in the hardware configuration table. The software reset control register will be connected during instantiation, and the default value of the control register will be filled in at the software reset default value SOFT_DEF in the hardware configuration table.
[0060] like Figure 3 As shown, if the final reset signal requires a specific clock for synchronization, the combinational logic module is connected to a synchronization unit SYNC, the input end of the synchronization unit SYNC inputs the output of the second AND gate AND2 and the synchronization clock signal IP_CLK, and the output end of the synchronization unit SYNC outputs the final reset signal IP_RSTN;
[0061] If the final reset signal requires a specific clock for synchronization, fill in Y at the clock synchronization signal RST_SYNC in the hardware configuration table, and fill in the corresponding synchronization clock name at the synchronization clock name CLK_NAME. The synchronization unit SYNC will be inserted when the RTL code is generated;
[0062] If the final reset signal does not require a specific clock for synchronization, the clock synchronization signal RST_SYNC and the synchronization clock name CLK_NAME in the hardware configuration table are not filled in with information, and the output of the second AND gate AND2 is directly connected to the final reset signal IP_RSTN when generating the RTL code.
[0063] In order to better illustrate the technical solution of this application, the specific form of the hardware configuration table is given below:
[0064] Table 1 Hardware Configuration Table
[0065]
[0066] ④ Check the RTL code and register table generated after the Perl script is run. If there is a problem, the Perl script will give a prompt.
[0067] Specifically, check the RTL code and register table generated after the Perl script is run. If there is a problem, the Perl script will give a prompt, including:
[0068] The automatic instantiation function of the Emacs plug-in is used to generate the synthesizable code of the required reset management module;
[0069] The RTL code complies with the Emacs Verilog-mode automatic instantiation format.
[0070] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements will not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for automatically generating a reset management module of a system on chip (SoC), characterized in that: The following steps are involved: S1, collect reset information of each IP core of the system on chip SoC, and fill the collected reset information into the hardware configuration table; S2. Configure the input parameters of the Perl script; S3, based on the command line mode input running code, the system executes the Perl script according to the input parameters; S4. Check the RTL code and register table generated after the Perl script is run. If there is a problem, the Perl script will give a prompt.
2. The method for automatically generating a reset management module of a system on chip (SoC) according to claim 1, characterized in that: S1 collects the reset information of each IP core of the system on chip SoC and fills the collected reset information into the hardware configuration table, including: Configure the system environment, install the software tools Perl and Emacs, and add corresponding environment variables and path variables in the system configuration file.
3. The method for automatically generating a reset management module of a system on chip (SoC) according to claim 1, characterized in that: S1 collects the reset information of each IP core of the system on chip SoC and fills the collected reset information into the hardware configuration table, including: Collect the reset information of each IP core of the system on chip SoC, including whether reset is required, whether software reset is required, the default value of software reset, whether hardware reset is required, the signal composition of hardware reset, whether clock synchronization is required and the name of the synchronization clock, and fill the collected reset information into the hardware configuration table.
4. The method for automatically generating a reset management module of a system on chip (SoC) according to claim 1, characterized in that: The input parameters for configuring the Perl script in S2 include: Configure the input parameters of the Perl script, including the path to the hardware configuration table, the name and location of the generated RTL code and register table.
5. The method for automatically generating a reset management module of a system on chip (SoC) according to claim 1, characterized in that: S3 runs code based on command line input. The system executes Perl scripts based on input parameters, including: Based on the command line mode input running code, the system executes the Perl script according to the input parameters, and the Perl script calls the combinational logic module used for instantiation to generate the final reset signal by combining the hardware reset signal and the software reset signal.
6. The method for automatically generating a reset management module of a system on chip (SoC) according to claim 5, characterized in that: The combinational logic module includes a first OR gate OR1, a second OR gate OR2, a third OR gate OR3, a first AND gate AND1 and a second AND gate AND2; The input end of the first OR gate OR1 inputs the hardware reset signals HARD_RSTN00 and HARD_RSTN01, the input end of the second OR gate OR2 inputs the hardware reset signals HARD_RSTN10 and HARD_RSTN11, the input end of the first AND gate AND1 inputs the outputs of the first OR gate OR1 and the second OR gate OR2, the input end of the third OR gate OR3 inputs the no hardware reset signal NO_HARD_RSTN and the output of the first AND gate AND1, and the input end of the second AND gate AND2 inputs the software reset signal SOFT_RSTN and the output of the third OR gate OR3; If no hardware reset signal participates in the generation of the final reset signal, no information is filled in the hardware reset signals HARD_RSTN00, HARD_RSTN01, HARD_RSTN10, and HARD_RSTN11 in the hardware configuration table. The hardware reset signals without information are connected to 0 during instantiation, and the hardware reset signal NO_HARD_RSTN that is not required is connected to 1. If a hardware reset signal participates in the generation of the final reset signal, the corresponding hardware reset signal names are filled in the hardware reset signals HARD_RSTN00, HARD_RSTN01, HARD_RSTN10, and HARD_RSTN11 in the hardware configuration table. The hardware reset signal without information is connected to 0 during instantiation, and the hardware reset signal NO_HARD_RSTN that is not required is connected to 0. If no software reset signal participates in the generation of the final reset signal, no information is filled in the software reset signal SOFT_RSTN in the hardware configuration table, and the software reset signal SOFT_RSTN is connected to 1 during instantiation; If a software reset signal participates in the generation of the final reset signal, fill in Y at the software reset signal SOFT_RSTN in the hardware configuration table. The software reset control register will be connected during instantiation, and the default value of the control register will be filled in at the software reset default value SOFT_DEF in the hardware configuration table.
7. The method for automatically generating a reset management module of a system on chip (SoC) according to claim 6, characterized in that: If the final reset signal requires a specific clock for synchronization, the combinational logic module is connected to a synchronization unit SYNC, the input end of the synchronization unit SYNC inputs the output of the second AND gate AND2 and the synchronization clock signal IP_CLK, and the output end of the synchronization unit SYNC outputs the final reset signal IP_RSTN; If the final reset signal requires a specific clock for synchronization, fill in Y at the clock synchronization signal RST_SYNC in the hardware configuration table, and fill in the corresponding synchronization clock name at the synchronization clock name CLK_NAME. The synchronization unit SYNC will be inserted when the RTL code is generated; If the final reset signal does not require a specific clock for synchronization, the clock synchronization signal RST_SYNC and the synchronization clock name CLK_NAME in the hardware configuration table are not filled in with information, and the output of the second AND gate AND2 is directly connected to the final reset signal IP_RSTN when generating the RTL code.
8. The method for automatically generating a reset management module of a system on chip (SoC) according to claim 5, characterized in that: S3 runs code based on command line input. The system executes Perl scripts based on input parameters, including: Based on the command line mode input running code, the system executes the Perl script according to the input parameters. The Perl script grabs all reset information in the hardware configuration table as configuration information, and generates RTL code text and register table with default values according to the configuration information; The register table includes all software reset control registers and the default values of each control register. The developer generates a register control module based on the register table.
9. The method for automatically generating a reset management module of a system on chip (SoC) according to claim 1, characterized in that: In S4, check the RTL code and register table generated after the Perl script is run. If there is a problem, the Perl script will give a prompt, including: The automatic instantiation function of the Emacs plug-in is used to generate the synthesizable code of the required reset management module; The RTL code complies with the Emacs Verilog-mode automatic instantiation format.
Citation Information
Cited By
Template-based method for improving efficiency of CPU (Central Processing Unit) configuration accelerator
CN119621354A
Method, device and equipment for automatically generating chip power consumption management controller
CN120163122A
