Encapsulation method and device based on automated engineering organization compiling script tool
By using automated engineering organization and compilation script tools, the problems of low efficiency and high error rate in the IP encapsulation process are solved, realizing an efficient and low-error encapsulation process and facilitating version management.
Patent Information
- Application Number
- CN202411043289.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-31
- Publication Date
- 2024-11-29
AI Technical Summary
Existing technologies have low IP encapsulation efficiency and high error probability. In particular, human error is frequent when processing signals of specific modules, which leads to extended project setup time and difficulty in version management.
An automated engineering organization and compilation script tool is used. The first script tool sets the target folder path and deletes historical configuration files. The second script tool obtains the configuration information and performs automated settings and encapsulation, including automated encapsulation of standard interfaces and private interfaces.
It automates the IP encapsulation process, reduces the probability of errors, improves efficiency, saves time and costs, and facilitates version management.
Smart Images

Figure CN119045861A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of electrical automation technology, and in particular to a packaging method and device based on an automation engineering organization compilation script tool. Background Art
[0002] IP Packaging refers to packaging IP modules (intellectual property modules) into a reusable design unit for reuse in different designs. IP packaging includes packaging IP modules with their required clock, reset, power and configuration signals to form a complete and configurable hardware component. The steps of traditional IP packaging include: creating an IP packaging project, adding functional modules, configuring functional modules, connecting functional modules, generating IP packaging, verifying IP packaging, exporting IP packaging, etc.
[0003] In the traditional IP packaging process, the above steps all need to be completed manually, which has high labor costs and low efficiency. In addition, due to the uncontrollability of manual work, the error rate is unstable. It should be explained that for integrable projects (such as SOC projects), the work mainly includes manually adding the designed code. For modules that cannot be synthesized, the IP core that comes with the tool is required to replace the function. In this case, if there are many IP cores that need to be instantiated, and the content that the IP core itself needs to be configured is very cumbersome, on the one hand, it will cause manual configuration of IP Operation errors, and on the other hand, it will greatly increase the time to package the IP, resulting in a longer project establishment time.
[0004] In the above steps of adding functional modules, for some specific modules of some projects, such as ALE, CLE, DQ, DQS, RE_N, CE_N, WP_N, DBI and other signals of nand flash module, the tool does not provide standard interfaces. This makes it impossible to encapsulate these nand signals into a set of nand interfaces. The staff needs to manually edit a set of nand interfaces. In the project, they need to be manually called out and then connected each time. On the one hand, it increases the probability of manual configuration operation errors, and on the other hand, it also leads to a longer project establishment time.
[0005] In addition, manual operations, whether configuring IP or naming a project, are not conducive to version management.
[0006] In summary, the existing technology has the problems of low efficiency and high error probability. Summary of the invention
[0007] The present invention provides a packaging method and device based on an automated engineering organization compilation script tool, which are used to solve the defects of low efficiency and high error probability in the prior art, and realize automated engineering packaging with low error probability and high efficiency.
[0008] The present invention provides a packaging method based on an automated engineering organization compilation script tool, comprising the following steps: Using the first script tool to open the target folder of the module to be packaged according to the preset target folder path; When the historical configuration file in the target folder does not meet the preset condition, the historical configuration file is deleted by using the first script tool and the target parameter is output to obtain the current configuration file; Running a second script tool to obtain configuration information according to the current configuration file; wherein the configuration information includes a project directory, an RTL directory, a current version, and an IP package directory; The second script tool is used to perform top-level automatic settings and automatic packaging of configuration item signals, standard interfaces and private interfaces according to the configuration information and the IP warehouse path to obtain a packaging result.
[0009] According to a packaging method based on an automated engineering organization compilation script tool provided by the present invention, a target folder path is set using a first script tool, specifically comprising: Switching the current working directory to a folder under a specified path based on a specified interpreter, an IP project to be configured of the module to be packaged, and project configuration parameters; wherein the project configuration parameters at least include a specified path; Setting the current date and the current version number in response to the acquired input date and version number; Set other related paths and variables in turn; If the storage directory exists in the folder under the specified path, output the information that the directory exists; if the storage directory does not exist in the folder under the specified path, create a storage directory under the folder; wherein the storage directory is a directory for storing basic projects and automatic packaging IP; If the basic project directory does not exist in the storage directory, copy the target file in the specified directory to the storage directory; wherein the basic project directory includes the private interface IP of the module to be packaged that has been configured and the standard interface IP involved in configuring the module to be packaged; Prepare the files required for the basic project and the working project based on the folder under the specified path to obtain the target folder path.
[0010] According to a packaging method for an automated engineering organization compilation script tool provided by the present invention, running a second script tool to obtain configuration information according to the current configuration file specifically includes: When the number of target parameters in the current configuration file is greater than 0, assign the value to the project directory variable according to the second parameter passed in; Read the configuration file based on the file handle, and set the reading position of the file handle to the beginning of the file; Read the first line of the configuration file and assign it to the project directory variable; Read the second line of the configuration file and assign it to the RTL directory variable; Read the third line of the configuration file and assign it to the current version variable; Read the fourth line of the configuration file and assign it to the IP packet directory variable; Open a project to be configured; Output the value of the project directory variable to obtain the project directory; Output the value of the RTL directory variable to obtain the RTL directory; Output the value of the current version variable to obtain the current version; Output the value of the IP packet directory variable to obtain the IP packet directory.
[0011] According to a packaging method based on an automated engineering organization compilation script tool provided by the present invention, the preset condition includes the absence of a historical configuration file.
[0012] According to a packaging method based on an automated engineering organization compilation script tool provided by the present invention, the target parameters include `vivado_xpr`, `vivado_rtl`, `cur_version`, `vivado_ip_prj`, `home_dir` and `nfc_ip_dir`.
[0013] According to a packaging method based on an automated engineering organization compilation script tool provided by the present invention, the second script tool is used to perform top-level automated settings and automated packaging of configuration item signals, standard interfaces and private interfaces according to the configuration information and the IP warehouse path to obtain a packaging result, and then further includes: Output a prompt message that the project has been opened; Delete files whose names begin with vivado.
[0014] The present invention also provides a packaging device based on an automated engineering organization compilation script tool, comprising the following modules: A directory unit, used to open a target folder of the module to be packaged according to a preset target folder path by using a first script tool; A configuration unit, configured to use a first script tool to delete the historical configuration file and output the target parameters to obtain a current configuration file when the historical configuration file in the target folder does not meet a preset condition; An information unit, used to run a second script tool to obtain configuration information according to the current configuration file; wherein the configuration information includes a project directory, an RTL directory, a current version, and an IP package directory; The encapsulation unit is used to use the second script tool to perform top-level automatic settings and automatic encapsulation of configuration item signals, standard interfaces and private interfaces according to the configuration information and the IP warehouse path to obtain an encapsulation result.
[0015] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the packaging method based on the automated engineering organization compilation script tool as described above is implemented.
[0016] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the above-described packaging methods based on the automated engineering organization compilation script tool.
[0017] The present invention also provides a computer program product, including a computer program, which, when executed by a processor, implements any of the above-mentioned packaging methods based on the automated engineering organization compilation script tool.
[0018] The encapsulation method and device based on the automated engineering organization compilation script tool provided by the present invention, by using the first script tool to open the target folder of the module to be encapsulated according to the preset target folder path; when the historical configuration file under the target folder does not meet the preset conditions, the first script tool is used to delete the historical configuration file and output the target parameters to obtain the current configuration file; the second script tool is run to obtain configuration information according to the current configuration file; wherein the configuration information includes the project directory, RTL directory, current version and IP package directory; the second script tool is used to perform the top-level automated setting and the automated encapsulation of the configuration item signal, standard interface and private interface according to the configuration information and the IP warehouse path to obtain the encapsulation result. The present invention uses the first script tool and the second script tool to automate all the steps of traditional IP encapsulation, thereby accelerating the establishment of the project, reducing the probability of errors, saving time and cost, and facilitating local verification and version management. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0020] Figure 1 It is one of the flow charts of the packaging method based on the automated engineering organization compilation script tool provided by the present invention.
[0021] Figure 2 This is the second flow chart of the packaging method based on the automated engineering organization compilation script tool provided by the present invention.
[0022] Figure 3 It is a structural schematic diagram of the packaging device based on the automated engineering organization compilation script tool provided by the present invention.
[0023] Figure 4 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0024] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings 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.
[0025] Combine the following Figure 1-Figure 2 Describe the packaging method of the present invention based on the automated engineering organization compilation script tool, Figure 1 It is one of the flow charts of the packaging method based on the automated engineering organization compilation script tool provided by the present invention, such as Figure 1 As shown, the method comprises the following steps: Step 110: Use the first script tool to open the target folder of the module to be packaged according to the preset target folder path.
[0026] It needs to be explained that the present invention is implemented based on the FPGA platform. The FPGA platform includes the ZYNQ platform, the HAPS platform, etc. The present invention does not limit this, and any executable platform can be used. Among them, it needs to be explained that the ZYNQ platform is a programmable logic device (PLD) platform developed by Xilinx, which integrates FPGA (Field Programmable Gate Array) and ARM Cortex-A9 processor core. The main feature of the ZYNQ platform is to combine the parallel processing capability of FPGA and the serial processing capability of ARM processor to provide powerful computing and data processing capabilities. The HAPS (High-Performance Acceleration Platform) platform is an FPGA development platform for hardware acceleration developed by Xilinx. The HAPS platform provides a method for rapid prototyping in a hardware environment, which allows engineers to run and test their designs on hardware, thereby accelerating product development and time to market.
[0027] In addition, the present invention is not limited to packaging tools, and any packaging tool, such as VIVADO tool, may be used.
[0028] The module to be packaged can be any module that needs to be packaged, such as a nand flash module. It should be explained that the nand flash module is a non-volatile memory based on NAND technology. NAND technology refers to a non-volatile memory using floating gate transistors, which is used to store data and can keep the data unchanged even without power.
[0029] For the sake of convenience, the present invention is described by taking the use of the VIVADO tool on the ZYNQ platform to encapsulate the nand flash module as an example, but this does not represent a limitation to the present invention.
[0030] In the prior art, on the ZYNQ platform, in theory, all the design codes of the nand flash module need to be loaded and packaged during the packaging process. However, since the ZYNQ platform does not allow non-synthesizable modules to appear, ONFI PHY in the module needs to be replaced. For example, the IP provided by the VIVADO tool, namely the "HighSpeed SelectIO Wizard", can be used for replacement. It should be noted that the VIVADO tool is an integrated design environment released by the FPGA manufacturer Xilinx in 2012. The "High Speed SelectIO Wizard" is a high-speed select IO wizard, which is a tool commonly used in FPGA (field programmable gate array) design. It helps designers configure the high-speed serial I / O (SelectIO) resources on the FPGA chip to achieve specific communication protocols or high-speed data transmission requirements.
[0031] At the same time, there are four channels in the nand flash module, and each channel needs to instantiate a PHY, so each time the package is packaged, it is necessary to call the high-speed IO selection wizard four times, and the wizard has many configuration items, such as: clock frequency, pin setting, pin attribute selection, bank selection, IO standard selection, etc. If any of them is selected incorrectly, it may cause the project test to fail. If this kind of project is done manually, the probability of error is very high, and the project efficiency is extremely low.
[0032] In addition, after each module is added, in the "Generate IP Package" stage, the standard interface needs to be packaged, for example: each AXI signal belonging to the same group is packaged into a set of standard AXI signal interfaces, and each APB signal belonging to the same group is packaged into a set of standard APB signal interfaces, etc. However, for the "private interface" of the project itself, Vivado does not provide standard interface component IP, such as the nand io signals of the nand flash module, which include ALE, CLE, DQ, DQS, RE_N, CE_N, WP_N, DBI and other signals. This requires the staff to manually edit a set of nand interfaces, and then manually call them out each time in the project, and then connect them. This operation increases the time for engineering.
[0033] On this basis, the encapsulation method based on the automated engineering organization compilation script tool provided by the present invention can complete the above-mentioned manual tasks well, especially the selection of configuration items when replacing IP, the encapsulation of private interfaces, etc., and aims to solve the following problems caused by manual operations: operational errors in manual configuration of IP, increased time for encapsulating IP, too long project establishment time, not conducive to version management, and the lack of private interfaces for specific projects.
[0034] Before step 110, it is necessary to first use the first script tool to construct the path of the project file to be packaged, and the path of the project file to be packaged is called the target folder path. The construction process includes: specifying the interpreter; describing the IP project to be configured and providing the required parameters; switching the folder; setting the date, version number, other paths and variables; constructing the files required for the basic project and the working project, etc. Among them, the aforementioned required parameters include `vivado_xpr` (a parameter representing the path of the Vivado project file), `vivado_rtl` (a parameter representing the relevant parameters of the RTL design stage), `cur_version` (a parameter representing the storage of the current version number), `vivado_ip_prj` (a parameter representing the relevant parameters of creating and using IP cores), `home_dir` (a parameter representing the storage of the current user's home directory path), `nfc_ip_dir` (a parameter representing the directory related to the NFC (near field communication) IP core), etc. The present invention will explain the construction of the path of the project file to be packaged in subsequent embodiments.
[0035] In step 110, the path of the completed project file to be packaged, that is, the target folder path, is obtained, and based on the target folder path, the target folder is opened using the first script tool and subsequent operations are performed.
[0036] This step can be implemented by the following steps: Output the prompt information of opening the vivado project directory and reference the variable `vivado_xpr`. It should be noted that the variable `vivado_xpr` is the path for storing the Vivado project file, that is, the aforementioned target folder path.
[0037] Step 120: When the historical configuration file in the target folder does not meet the preset condition, the historical configuration file is deleted by using the first script tool and the target parameters are output to obtain the current configuration file.
[0038] In step 120, the preset condition is used to determine and delete the file `confg_file`. Specifically, if the historical configuration file (i.e., confg_file) in the target folder does not meet the preset condition, the historical configuration file is deleted using the first script tool. In the actual implementation process, if the file `confg_file` exists, the file is deleted.
[0039] Based on the above embodiment, in some embodiments, the preset condition includes that there is no historical configuration file.
[0040] After deleting the historical configuration file, the target parameters are output to `confg_file` to obtain the current configuration file. It should be explained that the target parameters include parameter information that needs to be passed to the subsequent Tcl script (the second script tool).
[0041] In some embodiments, the output of the current configuration file can be implemented by the following steps: Use the `cat` command to output the target parameters to the `confg_file` file. In the actual operation process, step 120 includes creating a new file `confg_file`, and putting the above-mentioned `vivado_xpr`, `vivado_rtl`, `cur_version`, `vivado_ip_prj`, `home_dir`, `nfc_ip_dir` and other parameter information into the new file `confg_file`, so as to pass it to another Tcl script as parameter information.
[0042] Step 130: Run the second script tool to obtain configuration information according to the current configuration file; wherein the configuration information includes a project directory, an RTL directory, a current version, and an IP package directory.
[0043] Step 140: Use the second script tool to perform top-level automatic settings and automatic packaging of configuration item signals, standard interfaces and private interfaces according to the configuration information and the IP repository path to obtain packaging results.
[0044] In step 130 and step 140, a packaging tool (such as VIVADO tool) is used and a specified Tcl script (second script tool) is executed to open the project and generate IP. Specifically, the second script is used to obtain configuration information according to the current configuration file and set the IP warehouse path of the current project. After that, the second script tool is used to automatically set the top layer according to the configuration information and the IP warehouse path, automatically package the clock, reset and other signals, automatically package the standard interface and automatically package the private interface to complete the packaging and obtain the packaging result.
[0045] The present invention generates project operation scripts by automating local code base, customizing project files, customizing private interface extraction, and template generation. Through this script tool, the invention achieves the effect of "accelerating project establishment, reducing error probability, saving time and cost, and facilitating local verification and version management".
[0046] It should be noted that step 130 also includes: the encapsulated result is used as an IP to connect with the hard core and other IPs to form a complete platform project to generate a bit file for testing.
[0047] Furthermore, after step 130, the following steps are further included: Output a prompt message that the project has been opened; Delete files whose names begin with vivado.
[0048] The setting of the target folder path is further described below. In some embodiments, the setting of the target folder path using the first script tool specifically includes: Step 210: Switch the current working directory to a folder under a specified path based on the specified interpreter, the IP project to be configured of the module to be packaged, and the project configuration parameters; wherein the project configuration parameters at least include the specified path; Step 220: Setting the current date and the current version number in response to the acquired input date and version number; Step 230: Setting other related paths and variables in sequence; Step 240: if the storage directory exists in the folder under the specified path, output information about the existence of the directory; if the storage directory does not exist in the folder under the specified path, create a storage directory under the folder; wherein the storage directory is a directory for storing basic projects and automatic packaging IP; Step 250: If the basic project directory does not exist in the storage directory, copy the target file in the specified directory to the storage directory; wherein the basic project directory includes the private interface IP of the module to be packaged that has been configured and the standard interface IP involved in configuring the module to be packaged; Step 260: Prepare the files required for the basic project and the work project based on the folder under the specified path to obtain the target folder path.
[0049] Specifically, Figure 2 As shown, in step 210, the following three tasks need to be performed: 1) Specify which interpreter this script tool uses to perform the following operations; 2) Indicate the IP project this script tool is used to configure, and provide the required parameters (parameter information such as `vivado_xpr`, `vivado_rtl`, `cur_version`, `vivado_ip_prj`, `home_dir`, `nfc_ip_dir`); 3) Switch the current working directory to the folder under the specified path. It should be emphasized that the specified path is included in the required parameters.
[0050] Based on the above embodiments, in some embodiments, the target parameters include `vivado_xpr`, `vivado_rtl`, `cur_version`, `vivado_ip_prj`, `home_dir` and `nfc_ip_dir`.
[0051] In addition to step 210, it should be noted that before using the first script tool, it is necessary to manually call out the IP in the packaging tool to be applied and configure it once for the module to be packaged (corresponding to the nand flash module in the above embodiment), and the private interface (such as the private interface of nand io in the above embodiment) also needs to be manually configured and packaged into a private interface IP, so as to facilitate the subsequent automatic capture. The configured project here is recorded as a basic project or a basic project directory.
[0052] In step 220, the date and version number are obtained to set the current date and current version number. It should be noted that the date can be input by the user or automatically obtained by the local machine, and the version number can be input by the user or a default value set in advance, and the present invention does not limit this.
[0053] In some embodiments, step 220 can be performed in the following manner: output a prompt message, requiring input of a date (e.g., 1107); read the date input by the user, and assign the value to the variable `cur_date`; output a prompt message, requiring input of a version number (e.g., 1 or 2); read the version number input by the user, and assign the value to the variable `cur_version`. It should be noted that the variable `cur_date` is used to store the current date or the date value input by the user; the variable `cur_version` is used to store the current version number.
[0054] In step 230, other related paths and variables are set in sequence, such as `home_dir`, `svs_dir`, `svs_working_dir`, etc. Some of the other related paths and variables mentioned in step 230 are local paths, and some are public paths, which need to be distinguished during migration. Among them, it should be noted that the variable `home_dir` is used to store the home directory path of the current user. The variable `svs_dir` is used to store the directory path where the working copy of the version control system (such as Subversion) is located, or the directory of other specific services related to "SVS". The variable `svs_working_dir` is used to store the working directory path related to svs_dir, for example, for storing temporary files, build outputs, or working copies in progress.
[0055] In step 240, the specified directory `${ip_dir}` is recorded as the storage directory. If the specified directory `${ip_dir}` exists in the folder under the specified path, the information about the existence of the directory is output; otherwise, the directory is created in the folder under the specified path. It should be noted that the specified directory `${ip_dir}` (i.e., the storage directory) refers to the storage directory for storing basic projects and automatically encapsulated IPs. ip_dir is derived from the process of constructing the target folder path using the first script tool and is defined as the storage directory.
[0056] In step 250, if the base project directory `${ip_base_prj_400}` does not exist in the storage directory in step 240, the target file in the specified directory (storage directory) is copied to the directory, such as Figure 2 In some embodiments, the target file is a base_prj_400 file.
[0057] It can be understood that the basic project directory includes the configured private interface IP of the module to be packaged and the standard interface IP involved in configuring the module to be packaged, which are obtained by using the first script tool before configuration.
[0058] In step 260, a series of directory creation, deletion and copy operations are required to prepare the files required for the basic project and the working project, and finally the target folder path is obtained. For example, in a specific embodiment, ip_working_prj is first designated as the IP working directory, and the existence of the ip_working_prj directory is first determined. If so, the directory is deleted; then a new ip_working_prj directory is created, and the latest IP is placed in the directory. Similarly, ip_base_prj_400, ip_working_prj, ip_rtl_dir, and ip_rtl_cur can also perform the same operation.
[0059] It needs to be emphasized again that the first script tool mainly completes a series of operations such as path setting, file operation, parameter input, and second script tool execution to generate and configure the IP required in the project to be configured.
[0060] The following further describes step 130. In some embodiments, running the second script tool to obtain configuration information according to the current configuration file specifically includes: When the number of target parameters in the current configuration file is greater than 0, assign the value to the project directory variable according to the second parameter passed in; Read the configuration file based on the file handle, and set the reading position of the file handle to the beginning of the file; Read the first line of the configuration file and assign it to the project directory variable; Read the second line of the configuration file and assign it to the RTL directory variable; Read the third line of the configuration file and assign it to the current version variable; Read the fourth line of the configuration file and assign it to the IP packet directory variable; Open a project to be configured; Output the value of the project directory variable to obtain the project directory; Output the value of the RTL directory variable to obtain the RTL directory; Output the value of the current version variable to obtain the current version; Output the value of the IP packet directory variable to obtain the IP packet directory.
[0061] Specifically, it should be emphasized that the main function of the second script tool is to open a configuration file, read the project directory (prj_dir), RTL directory (rtl_dir), current version (cur_version) and IP package directory (ip_pck_dir) from it, and then use this information to open a Vivado project. Then output some parameters and finally set the IP repository path of the current project.
[0062] In the specific implementation process, the following steps are performed: S1: If the number of parameters (i.e. target parameters) passed in when the script is executed is greater than 0, the following code block is executed.
[0063] S2: Assign the second parameter (index 1) to the variable prj_dir (project directory variable). It should be emphasized that the meaning of step S2 is that if the value is greater than 0, the subsequent assignment operation is performed. In addition to assigning values to the variable prj_dir, you can also assign values to variables such as rtl_dir and cur_version.
[0064] S3: Open a file handle fileid for reading the configuration file.
[0065] S4: Set the read position of the file handle fileid to the beginning of the file.
[0066] S5: Read a line from the configuration file and assign it to the variable prj_dir (project directory variable).
[0067] S6: Read a line from the configuration file and assign it to the variable rtl_dir (RTL directory variable).
[0068] S7: Read a line from the configuration file and assign it to the variable cur_version (current version variable).
[0069] S8: Read a line from the configuration file and assign it to the variable ip_pck_dir (IP packet directory variable).
[0070] S9: Use the read project directory to open a project to be configured (such as a Vivado project).
[0071] S10: Outputs the value of the Vivado parameter prj_dir.
[0072] S11: Outputs the value of the Vivado parameter rtl_dir.
[0073] S12: Output the value of the Vivado parameter cur_version.
[0074] S13: Output the value of the Vivado parameter ip_pck_dir. It should be emphasized that the meaning of step S9 is to open the Vivado operation interface, and steps S10-13 are to automatically configure parameters to form a complete project.
[0075] After executing S13, the second script tool also needs to set the IP repository path of the current project, for example, specify multiple IP repository paths.
[0076] The second script tool automates multiple steps that need to be completed manually, greatly saving packaging time and reducing operational errors caused by manual labor.
[0077] Based on the above embodiment, in step 140, the automatic setting of the top layer; the automatic packaging of clock, reset and other signals; the automatic packaging of standard interfaces such as AXI and APB; and the automatic packaging of private interfaces such as nand io interface components are sequentially performed to finally obtain the packaging result.
[0078] The encapsulation method based on the automated engineering organization compilation script tool provided by the present invention uses a first script tool to open the target folder of the module to be encapsulated according to a preset target folder path; when the historical configuration file under the target folder does not meet the preset conditions, the first script tool is used to delete the historical configuration file and output the target parameters to obtain the current configuration file; the second script tool is run to obtain configuration information according to the current configuration file; wherein the configuration information includes a project directory, an RTL directory, a current version, and an IP package directory; the second script tool is used to perform the top-level automated settings and the automated encapsulation of the configuration item signals, standard interfaces, and private interfaces according to the configuration information and the IP warehouse path to obtain the encapsulation result. The present invention uses the first script tool and the second script tool to automate all the steps of traditional IP encapsulation, thereby accelerating the establishment of the project, reducing the probability of errors, saving time and cost, and facilitating local verification and version management.
[0079] The packaging device based on the automated engineering organization compilation script tool provided by the present invention is described below. The packaging device based on the automated engineering organization compilation script tool described below and the packaging method based on the automated engineering organization compilation script tool described above can be referred to each other. Figure 3 As shown, the device includes the following modules: The directory unit 310 is used to use the first script tool to open the target folder of the module to be packaged according to the preset target folder path; The configuration unit 320 is used to use the first script tool to delete the historical configuration file and output the target parameters to obtain the current configuration file when the historical configuration file in the target folder does not meet the preset condition; An information unit 330 is used to run a second script tool to obtain configuration information according to the current configuration file; wherein the configuration information includes a project directory, an RTL directory, a current version, and an IP package directory; The encapsulation unit 340 is used to use the second script tool to perform top-level automatic settings and automatic encapsulation of configuration item signals, standard interfaces and private interfaces according to the configuration information and the IP repository path to obtain an encapsulation result.
[0080] According to a packaging device based on an automated engineering organization compilation script tool provided by the present invention, a target folder path is set using a first script tool, specifically including: Switching the current working directory to a folder under a specified path based on a specified interpreter, an IP project to be configured of the module to be packaged, and project configuration parameters; wherein the project configuration parameters at least include a specified path; Setting the current date and the current version number in response to the acquired input date and version number; Set other related paths and variables in turn; If the storage directory exists in the folder under the specified path, output the information that the directory exists; if the storage directory does not exist in the folder under the specified path, create a storage directory under the folder; wherein the storage directory is a directory for storing basic projects and automatic packaging IP; If the basic project directory does not exist in the storage directory, copy the target file in the specified directory to the storage directory; wherein the basic project directory includes the private interface IP of the module to be packaged that has been configured and the standard interface IP involved in configuring the module to be packaged; Prepare the files required for the basic project and the working project based on the folder under the specified path to obtain the target folder path.
[0081] According to a packaging device based on an automated engineering organization compilation script tool provided by the present invention, running a second script tool to obtain configuration information according to the current configuration file specifically includes: When the number of target parameters in the current configuration file is greater than 0, assign the value to the project directory variable according to the second parameter passed in; Read the configuration file based on the file handle, and set the reading position of the file handle to the beginning of the file; Read the first line of the configuration file and assign it to the project directory variable; Read the second line of the configuration file and assign it to the RTL directory variable; Read the third line of the configuration file and assign it to the current version variable; Read the fourth line of the configuration file and assign it to the IP packet directory variable; Open a project to be configured; Output the value of the project directory variable to obtain the project directory; Output the value of the RTL directory variable to obtain the RTL directory; Output the value of the current version variable to obtain the current version; Output the value of the IP packet directory variable to obtain the IP packet directory.
[0082] According to a packaging device based on an automated engineering organization compilation script tool provided by the present invention, the preset condition includes the absence of a historical configuration file.
[0083] According to a packaging device based on an automated engineering organization compilation script tool provided by the present invention, the target parameters include `vivado_xpr`, `vivado_rtl`, `cur_version`, `vivado_ip_prj`, `home_dir` and `nfc_ip_dir`.
[0084] According to a packaging device based on an automated engineering organization compilation script tool provided by the present invention, the second script tool is used to perform top-level automated settings and automated packaging of configuration item signals, standard interfaces and private interfaces according to the configuration information and the IP warehouse path to obtain a packaging result, and then further includes: Output a prompt message that the project has been opened; Delete files whose names begin with vivado.
[0085] The encapsulation device based on the automated engineering organization compilation script tool provided by the present invention uses a first script tool to open the target folder of the module to be encapsulated according to a preset target folder path; when the historical configuration file under the target folder does not meet the preset conditions, the first script tool is used to delete the historical configuration file and output the target parameters to obtain the current configuration file; the second script tool is run to obtain configuration information according to the current configuration file; wherein the configuration information includes a project directory, an RTL directory, a current version, and an IP package directory; the second script tool is used to perform the top-level automated settings and the automated encapsulation of the configuration item signals, standard interfaces, and private interfaces according to the configuration information and the IP warehouse path to obtain the encapsulation result. The present invention uses the first script tool and the second script tool to automate all the steps of traditional IP encapsulation, thereby accelerating the establishment of the project, reducing the probability of errors, saving time and cost, and facilitating local verification and version management.
[0086] Figure 4 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 4As shown, the electronic device may include: a processor 410, a communication interface 420, a memory 430 and a communication bus 440, wherein the processor 410, the communication interface 420 and the memory 430 communicate with each other through the communication bus 440. The processor 410 may call the logic instructions in the memory 430 to execute the encapsulation method based on the automated engineering organization compilation script tool, the method comprising: using the first script tool to open the target folder of the module to be encapsulated according to the preset target folder path; when the historical configuration file under the target folder does not meet the preset conditions, using the first script tool to delete the historical configuration file and output the target parameters to obtain the current configuration file; running the second script tool to obtain configuration information according to the current configuration file; wherein the configuration information includes the project directory, the RTL directory, the current version and the IP package directory; using the second script tool to perform the top-level automated settings and the automated encapsulation of the configuration item signal, the standard interface and the private interface according to the configuration information and the IP warehouse path to obtain the encapsulation result.
[0087] In addition, the logic instructions in the above-mentioned memory 430 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0088] On the other hand, the present invention also provides a computer program product, which includes a computer program, which can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the packaging method based on the automated engineering organization compilation script tool provided by the above methods, the method including: using a first script tool to open a target folder of the module to be packaged according to a preset target folder path; when the historical configuration file under the target folder does not meet the preset conditions, using the first script tool to delete the historical configuration file and output the target parameters to obtain the current configuration file; running a second script tool to obtain configuration information according to the current configuration file; wherein the configuration information includes a project directory, an RTL directory, a current version and an IP package directory; using the second script tool to perform top-level automated settings and automated packaging of configuration item signals, standard interfaces and private interfaces according to the configuration information and the IP warehouse path to obtain a packaging result.
[0089] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the encapsulation method based on the automated engineering organization compilation script tool provided by the above-mentioned methods, the method comprising: using a first script tool to open a target folder of a module to be encapsulated according to a preset target folder path; when a historical configuration file under the target folder does not meet a preset condition, using the first script tool to delete the historical configuration file and output the target parameters to obtain a current configuration file; running a second script tool to obtain configuration information according to the current configuration file; wherein the configuration information includes a project directory, an RTL directory, a current version and an IP package directory; using the second script tool to perform top-level automated settings and automated encapsulation of configuration item signals, standard interfaces and private interfaces according to the configuration information and the IP warehouse path to obtain an encapsulation result.
[0090] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0091] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0092] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A packaging method based on an automated engineering organization compilation script tool, characterized in that: include: Using the first script tool to open the target folder of the module to be packaged according to the preset target folder path; When the historical configuration file in the target folder does not meet the preset condition, the historical configuration file is deleted by using the first script tool and the target parameter is output to obtain the current configuration file; Running a second script tool to obtain configuration information according to the current configuration file; wherein the configuration information includes a project directory, an RTL directory, a current version, and an IP package directory; The second script tool is used to perform top-level automatic settings and automatic packaging of configuration item signals, standard interfaces and private interfaces according to the configuration information and the IP warehouse path to obtain a packaging result.
2. The packaging method based on the automated engineering organization compilation script tool according to claim 1, characterized in that: Use the first script tool to set the target folder path, including: Switching the current working directory to a folder under a specified path based on a specified interpreter, an IP project to be configured of the module to be packaged, and project configuration parameters; wherein the project configuration parameters at least include a specified path; Setting the current date and the current version number in response to the acquired input date and version number; Set other related paths and variables in turn; If the storage directory exists in the folder under the specified path, output the information that the directory exists; if the storage directory does not exist in the folder under the specified path, create a storage directory under the folder; wherein the storage directory is a directory for storing basic projects and automatic packaging IP; If the basic project directory does not exist in the storage directory, copy the target file in the specified directory to the storage directory; wherein the basic project directory includes the private interface IP of the module to be packaged that has been configured and the standard interface IP involved in configuring the module to be packaged; Prepare the files required for the basic project and the working project based on the folder under the specified path to obtain the target folder path.
3. The packaging method based on the automated engineering organization compilation script tool according to claim 1, characterized in that: Running the second script tool to obtain configuration information according to the current configuration file specifically includes: When the number of target parameters in the current configuration file is greater than 0, assign the value to the project directory variable according to the second parameter passed in; Read the configuration file based on the file handle, and set the reading position of the file handle to the beginning of the file; Read the first line of the configuration file and assign it to the project directory variable; Read the second line of the configuration file and assign it to the RTL directory variable; Read the third line of the configuration file and assign it to the current version variable; Read the fourth line of the configuration file and assign it to the IP packet directory variable; Open a project to be configured; Output the value of the project directory variable to obtain the project directory; Output the value of the RTL directory variable to obtain the RTL directory; Output the value of the current version variable to obtain the current version; Output the value of the IP packet directory variable to obtain the IP packet directory.
4. The packaging method based on the automated engineering organization compilation script tool according to claim 1, characterized in that: The preset condition includes that there is no historical configuration file.
5. The packaging method based on the automated engineering organization compilation script tool according to claim 1, characterized in that: The target parameters include `vivado_xpr`, `vivado_rtl`, `cur_version`, `vivado_ip_prj`, `home_dir`, and `nfc_ip_dir`.
6. The packaging method based on the automated engineering organization compilation script tool according to claim 1, characterized in that: The second script tool is used to perform top-level automatic settings and automatic packaging of configuration item signals, standard interfaces and private interfaces according to the configuration information and the IP warehouse path to obtain packaging results, and then further includes: Output a prompt message that the project has been opened; Delete files whose names begin with vivado.
7. A packaging device based on an automated engineering organization compilation script tool, characterized in that: include: A directory unit, used to open a target folder of the module to be packaged according to a preset target folder path by using a first script tool; A configuration unit, configured to use a first script tool to delete the historical configuration file and output the target parameters to obtain a current configuration file when the historical configuration file in the target folder does not meet a preset condition; An information unit, used to run a second script tool to obtain configuration information according to the current configuration file; wherein the configuration information includes a project directory, an RTL directory, a current version, and an IP package directory; The encapsulation unit is used to use the second script tool to perform top-level automatic settings and automatic encapsulation of configuration item signals, standard interfaces and private interfaces according to the configuration information and the IP warehouse path to obtain an encapsulation result.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the packaging method based on the automated engineering organization compilation script tool as described in any one of claims 1 to 6 is implemented.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the packaging method based on the automated engineering organization compilation script tool as claimed in any one of claims 1 to 6 is implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the packaging method based on the automated engineering organization compilation script tool as claimed in any one of claims 1 to 6 is implemented.
Citation Information
Cited By
Clearing method based on Blaze decision engine rule file historical version
CN120067069A
