Chip SDK software development method and system and readable storage medium

By building plug-in libraries and model description files, a unified development process output result framework is generated, which solves the problem of low efficiency in chip SDK software development in the existing technology, and realizes efficient and easy-to-maintain SDK software development.

CN119149010AInactive Publication Date: 2024-12-17XINKE INTEGRATED CIRCUIT (SUZHOU) CO LTD

Patent Information

Application Number
CN202411648512.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-19
Publication Date
2024-12-17
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing chip SDK software development process depends on the development process and the level of developers, resulting in inconvenience in maintenance, low automation level, and low overall development efficiency.

Method used

By building the plug-in library, obtain the chip's model description file, traverse the plug-ins in the plug-in library, and generate a unified development process output framework based on the model description file, including driver code, test cases and user manual framework, to improve development efficiency and code consistency sex.

Benefits of technology

It realizes automatic generation of driver code with a unified architecture and style, improves the production efficiency of SDK software, simplifies the development process, reduces complexity, and is easy to expand and maintain.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119149010A_ABST
    Figure CN119149010A_ABST
Patent Text Reader

Abstract

The invention provides a chip SDK software development method and system and a readable storage medium, and the method comprises the steps: constructing a plug-in library containing a plurality of plug-ins, each plug-in being used for creating an output result framework of at least one development process in a chip SDK software development process; obtaining a first model description file of the chip, wherein the first model description file comprises driver description, meeting the first format specification, of each module in the chip; traversing each plug-in in the plug-in library, and implementing a corresponding development process on the module by each plug-in according to the driver description of each module in the first model description file to obtain an output result framework of the module in the development process; and generating SDK software of the chip according to the output result framework of each module in each development process. According to the method, the writing style of each module can be unified, the dependence on developers is reduced, the production efficiency is improved, and the method is easy to expand according to actual development process needs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of software development, and in particular to a chip SDK software development method and system, and a readable storage medium. Background Art

[0002] The chip SDK software is a software development kit (Software Development Kit) for users to build applications based on the chip. The kit usually includes drivers, user manuals, and sample codes for the modules included in the chip.

[0003] The development of chip SDK software usually requires the following process: developing driver code for each module in the chip, designing corresponding test cases, using test cases to test the driver code, revising the driver code according to the test results, obtaining a driver that passes the test after repeated testing and code modification, generating a corresponding user manual, and providing a demo (i.e. sample code).

[0004] The development process of existing SDK software is highly dependent on the development process and the level of developers. For example, the driver software framework, code style, and test cases of each hardware module in the chip vary greatly from person to person, making subsequent maintenance inconvenient. The automation level of the development process is low, and the overall development efficiency is low. Summary of the invention

[0005] One of the purposes of the present invention is to overcome at least some of the deficiencies in the prior art and to provide a chip SDK software development method and system, and a readable storage medium.

[0006] The technical solution provided by the present invention is as follows: A chip SDK software development method, comprising: building a function library, the plug-in library comprising a plurality of plug-ins, the plug-ins being used to create an output result framework of at least one development process in a chip SDK software development process; Obtaining a first model description file of a chip, wherein the first model description file includes a driver program description of each module of the chip that complies with a first format specification; Traversing each plug-in in the plug-in library, each plug-in implements a corresponding development process on the module according to the driver program description of each module in the first model description file, and obtains an output result framework expected by the module in the development process; The SDK software of the chip is generated according to the output result framework of each module in each development process.

[0007] In some embodiments, the output result framework of each development process created by the plug-in library includes a driver code framework of the chip, a test case framework for testing the driver code of the chip, and a user manual framework of the chip.

[0008] In some embodiments, obtaining a first model description file of a chip includes: Acquire a second model description file of the chip, wherein the second model description file includes a driver program description of each module in the chip that complies with a second format specification; The second model description file is parsed to obtain a corresponding first model description file.

[0009] In some embodiments, obtaining a second model description file of the chip includes: Importing a plurality of third model description files, wherein the third model description files describe the driver programs of some modules of the chip according to the second format specification; Verifying each third model description file according to the second format specification; All the third model description files that pass the verification are merged to obtain the second model description file.

[0010] In some embodiments, an editor is used to edit the third model description file of the chip.

[0011] In some embodiments, the editor supports simultaneous online collaborative editing or local editing by multiple people.

[0012] The present invention also provides a chip SDK software development system, comprising: A plug-in building module, used to build a function library, the plug-in library includes multiple plug-ins, and the plug-ins are used to create an output result framework of at least one development process in the chip SDK software development process; A model description acquisition module, used to acquire a first model description file of a chip, wherein the first model description file includes a driver program description of each module of the chip that complies with a first format specification; A software generation module is used to traverse each plug-in in the plug-in library, and each plug-in implements a corresponding development process for the module according to the driver description of each module in the first model description file to obtain the output result framework expected by the module in the development process; based on the output result framework of each module in each development process, the SDK software of the chip is generated.

[0013] In some embodiments, it also includes: An editor, used for editing a third model description file of the chip, wherein the third model description file describes the driver program of some modules of the chip according to a second format specification; The model description acquisition module includes: A verification and merging unit, used for importing a plurality of third model description files, verifying each third model description file according to the second format specification; merging all the third model description files that pass the verification to obtain the second model description file; The parsing unit is used to parse the second model description file to obtain the corresponding first model description file.

[0014] The present invention also provides a chip SDK software development system, comprising: Memory for storing computer programs; A processor is used to implement the chip SDK software development method described in any of the above embodiments when running the computer program.

[0015] The present invention also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the chip SDK software development method described in any of the aforementioned embodiments is implemented.

[0016] The chip SDK software development method, system, and readable storage medium provided by the present invention can at least bring about the following beneficial effects: the present invention utilizes the first model description file of the chip and, by using a plug-in system matching the model, automatically generates driver code with a unified architecture and style, thereby improving the production efficiency of the SDK software and being easy to expand according to the actual development process needs. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The following will explain the preferred implementation mode in a clear and understandable manner with reference to the accompanying drawings, and further explain the above-mentioned characteristics, technical features, advantages and implementation methods of a chip SDK software development method and system, and a readable storage medium.

[0018] Figure 1 It is a flow chart of an embodiment of a method for developing chip SDK software of the present invention; Figure 2 It is a structural schematic diagram of an embodiment of a chip SDK software development system of the present invention; Figure 3 It is a structural diagram of another embodiment of a chip SDK software development system of the present invention.

[0019] Description of Figure Numbers: 100. Plug-in building module, 200. Model description acquisition module, 300. Software generation module, 10. Memory, 20. Computer program, 30. Processor. DETAILED DESCRIPTION

[0020] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the specific implementation methods of the present invention will be described below with reference to the accompanying drawings. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings and other implementation methods can be obtained based on these drawings without creative work.

[0021] In order to simplify the drawings, only the parts related to the present invention are schematically shown in each figure, and they do not represent the actual structure of the product. In addition, in order to simplify the drawings and facilitate understanding, in some figures, only one of the parts with the same structure or function is schematically drawn or marked. In this article, "one" not only means "only one", but also means "more than one".

[0022] One embodiment of the present invention, as Figure 1 As shown, a chip SDK software development method includes: Step S100 builds a plug-in library including a plurality of plug-ins, each plug-in being used to create an output result framework of at least one development process in the chip SDK software development process.

[0023] Specifically, a plug-in is an auxiliary program that enhances software functions. It can add new functions without modifying the software architecture and the main software program, thereby enhancing the flexibility and scalability of the software.

[0024] The chip SDK software development process includes but is not limited to the following development processes: generating chip driver code, generating test cases corresponding to the chip driver code, and generating chip user manuals. Each development process has a corresponding output result. For example, the output result of the "generate chip user manual" development process is the chip user manual.

[0025] Use plug-ins to create output result frameworks for each development process. For example, plug-in A is used to create the chip driver code framework, plug-in B is used to create the test case framework for testing the driver code, and plug-in C is used to create the chip manual framework. The SDK development process can be covered by combining the functions of different plug-ins to create the expected output result framework for each development process.

[0026] It should be noted that the output result framework is not equal to the expected output result. Taking the driver code as an example, the driver code framework is a "semi-finished product" of the driver code. It only implements the common part of the driver code and provides some defined variable points. These variable points need to be supplemented by the developer according to the actual situation. When the developer completes the content of the variable points, the required driver code is obtained. The driver code framework provides a development foundation for developers and establishes some constraints. Use plug-ins to automatically generate chip driver code frameworks. Such an automated process can improve development efficiency, reduce human errors, and ensure code consistency and standardization.

[0027] Other test case frameworks and user manual frameworks also have similar effects.

[0028] Step S200 obtains a first model description file of the chip, where the first model description file includes a driver program description of each module of the chip that complies with a first format specification.

[0029] Specifically, the driver is a program for upper-layer software to interact with various modules in the chip, providing a communication interface between the upper-layer software and the hardware.

[0030] The driver description of each module in the chip includes not only the description of the physical characteristics related to the driver of the module, such as specifications and functional descriptions, but also the module's identification, test case descriptions, and user instructions descriptions.

[0031] If the chip includes multiple modules with different functions, each module has its own corresponding driver program description, and the first model description file of the chip also includes the driver program descriptions of the multiple modules.

[0032] The driver description can be described using different specifications. The driver description in the first model description file is described according to the first format specification.

[0033] Step S300 traverses each plug-in in the plug-in library, and each plug-in implements a corresponding development process on the module according to the driver program description of each module in the first model description file to obtain an output result framework expected by the module in the corresponding development process.

[0034] Step S400 generates the SDK software of the chip according to the output result framework of each module in each development process.

[0035] Specifically, the plug-in of this embodiment is a program for creating an output result framework of at least one development process, and its input is the driver description of the module in the chip, and its output is the output result framework of the module in the corresponding development process. For example, plug-in C is used to create the output result framework of the development process "Generate a user manual for the chip". The driver description of module 1 is input into plug-in C, and plug-in C generates a user manual framework for module 1 based on the driver description of module 1. If the driver description of module 2 is input into plug-in C, plug-in C outputs the user manual framework for module 2.

[0036] The reason why the plug-in can create the output result framework of the corresponding development process based on the module's driver description is that the physical characteristics of each module can be abstractly classified into elements, and then the different modules can be unified into a unified model based on the elements. For example, the model has functional elements, specification elements, interface elements, etc. Different modules are just different instances of the model. For the same element, different modules have different values. The driver descriptions of different modules follow the same specifications, for example, they can be described according to the elements of the model. The plug-in can create the output result framework of the corresponding development process based on the elements of the model, and the specific values ​​of the elements can be obtained from the driver description of the module.

[0037] Taking the "Generate User Manual" development process implemented by plugin C as an example, plugin C needs to describe the specific functions of the module when generating the user manual framework. It only needs to obtain the module's functional element value from the module's driver description and copy its content to the corresponding position of the document. In this way, the user manual framework of each module can be automatically generated, greatly improving the generation efficiency.

[0038] The chip SDK software development process includes multiple development processes. The output result framework of some or all open processes can be created with corresponding plug-ins according to actual conditions.

[0039] The chip may contain multiple modules. Some special modules can still be developed using traditional methods. The remaining modules can use plug-ins to create the output result framework of each development process. Developers can then improve these output result frameworks and finally get the required chip SDK software. You can also use plug-ins for all modules to first generate the output result framework of each development process, and then developers can improve the framework.

[0040] For example, assuming that the first model description file of the chip includes multiple modules, the driver description of each module includes the module identification (such as module_id, category, entity, annotation), specification (dev_count, the number of modules in the chip), function description (api), test case description (utest) and corresponding user description (user_manual). Taking module 0 as an example, assuming that module 0 is an SPI module, the driver description of the SPI module is as follows:

[0041]

[0042] Assume that the plug-in library includes plug-in A-plug-in C, plug-in A is used to create a driver code framework for the chip, plug-in B is used to create a test case framework for testing the driver code, and plug-in C is used to create a user manual framework for the chip.

[0043] The first model description file is input into the plug-in library, and each plug-in in the plug-in library is traversed. Plug-in A creates a driver code framework of the corresponding module according to the functional description of the driver description of each module in the first model description file.

[0044] Taking module 0 as an example, the driver code framework of the SPI module is generated according to the functional description of the SPI module. All modules have some common functions, such as initialization function, which can be described outside the functional description of the module. Plug-in A will automatically generate function frameworks corresponding to the common functions, such as initialization function framework.

[0045] According to the functional description of the SPI module, the SPI module has two functions, namely, writing data (write) and reading data (read), so plugin A automatically generates the corresponding writing data function framework and reading data function framework, including the definition of function name, entry parameters, return parameters and related comments, among which " / * implementation * / " is a variable point, which needs to be supplemented by the developer according to the specific situation of the module. The driver code framework of the SPI module is as follows:

[0046] Plug-in B creates a test case framework for the corresponding module according to the test case description in the driver program description of each module in the first model description file.

[0047] The test case description in the driver description of the SPI module contains two test cases, namely, data interaction between SPI modules ("write_and_read") and SPI write performance test ("write_performance"), and plug-in B automatically generates the corresponding test case framework based on this.

[0048] The first test point (for "write_and_read") is the data interaction between modules. The chip has two SPI modules, so it is necessary to test SPI0 sending data and SPI1 receiving data, and SPI1 sending data and SPI0 receiving data. Two test points tp_interaction_spi0_write_spi1_read() and tp_interaction_spi1_write_spi0_read() are designed accordingly. The corresponding test case framework is: initialize the two SPIs first, then test the above two situations, and perform corresponding cleanup after the test. Variable points can be set in it to allow developers to make corresponding supplements, such as the " / * SOME CLEANUP CODE * / " part. Generate a test case framework similar to the second test.

[0049] The test case framework for the first test is as follows:

[0050] Plug-in C creates a user manual framework of the corresponding module according to the user description in the driver program description of each module in the first model description file.

[0051] The user description in the driver description of the SPI module includes generate_doc (whether to generate the module's usage instructions), description (module introduction), feature (module features), regsiter (register description) and api (API usage instructions), etc. The user manual framework of the SPI module is generated according to the user description of the SPI module. For example, the content of the introduction section comes from description, and the content of the feature section comes from feature. If the value of generate_doc is true, the register description (register section) and API usage instructions (Api section) of the SPI are generated. The content of the register section comes from register, and the content of the Api section comes from api, as follows:

[0052] As mentioned above, the driver code framework, test case framework and user manual framework of each module are obtained. Based on the above framework, the developer improves the variable points in the framework, adds special content related to the specific module, and then conducts multiple tests - code modification, user manual review and other processes to obtain the final chip SDK software.

[0053] In this embodiment, the first model description file of the chip is utilized, and a plug-in system matching the model is used to automatically generate the output result framework expected for each development process according to the model data. The framework can be automatically refreshed as the model changes, and further development is performed on the obtained framework structure, which greatly reduces the complexity of the software development process and improves the production efficiency and quality of the SDK software. At the same time, the styles of each part are unified, which is conducive to subsequent maintenance.

[0054] In one embodiment, step S200 obtains a first model description file of a chip, including: Step S210 obtains a second model description file of the chip, where the second model description file includes a driver program description of each module in the chip that complies with a second format specification; Step S220 parses the second model description file to obtain the corresponding first model description file.

[0055] The second format specification is easier to understand or easier for novices to use than the first format specification, similar to the difference between high-level programming languages ​​and assembly languages. For example, the first format specification is more concise and has a certain degree of difficulty in use, which is suitable for professionals, while the second format specification is more easy to understand and easier to use. Writing model description files according to the second format specification can reduce the threshold and difficulty of use for users.

[0056] An editor may be used to write a model description file of the chip according to the second format specification, the written model description file may be verified according to the second format specification, and the model description file that passes the verification may be used as the second model description file of the chip.

[0057] In one embodiment, step S210 obtains a second model description file of the chip, including: Step S211 imports a plurality of third model description files, where the third model description files describe the driver programs of some modules of the chip according to the second format specification; Step S212 verifies each third model description file according to the second format specification; Step S213 merges all the third model description files that have passed the verification to obtain a second model description file.

[0058] The third model description file only contains the driver program description of some modules of the chip. In this embodiment, multiple people are allowed to write driver program descriptions of different modules, obtain multiple third model description files, and then verify the third model description files respectively, and then synthesize all the verified third model description files into a second model description file. This method allows multiple people to write model description files at the same time, thereby improving production efficiency.

[0059] A dedicated editor can be used to edit the third model description file of the chip. The editor supports multiple people to edit online or locally.

[0060] One embodiment of the present invention, as Figure 2 As shown, a chip SDK software development system includes: A plug-in construction module 100 is used to construct a plug-in library, the plug-in library includes multiple plug-ins, each plug-in is used to create an output result framework of at least one development process in the chip SDK software development process; The model description acquisition module 200 is used to acquire a first model description file of the chip, wherein the first model description file includes a driver program description of each module of the chip that complies with a first format specification; The software generation module 300 is used to traverse each plug-in in the plug-in library. Each plug-in implements a corresponding development process for the module according to the driver description of each module in the first model description file, and obtains the output result framework of the module in the development process; based on the output result framework of each module in each development process, the SDK software of the chip is generated.

[0061] In one embodiment, the model description acquisition module 200 is also used to obtain a second model description file of the chip, the second model description file contains a driver description of each module in the chip that complies with the second format specification; the second model description file is parsed to obtain the corresponding first model description file.

[0062] In one embodiment, the model description acquisition module 200 includes: A verification and merging unit is used to import multiple third model description files, where the third model description files describe the driver programs of some modules of the chip according to the second format specification; verify each third model description file according to the second format specification; and merge all the verified third model description files to obtain a second model description file; The parsing unit is used to parse the second model description file to obtain the corresponding first model description file.

[0063] In one embodiment, the system further includes an editor for editing a third model description file of the chip.

[0064] It should be noted that the embodiment of the chip SDK software development system provided by the present invention and the embodiment of the chip SDK software development method provided above are based on the same inventive concept and can achieve the same technical effect. Therefore, other specific contents of the embodiment of the chip SDK software development system can refer to the contents of the embodiment of the chip SDK software development method provided above.

[0065] One embodiment of the present invention, as Figure 3 As shown, a chip SDK software development system includes: A memory 10 for storing a computer program 20; The processor 30 is used to implement the chip SDK software development method described in any of the above embodiments when running the computer program 20.

[0066] The memory 10 may be any internal storage unit and / or external storage device capable of storing data and programs. For example, the memory 10 may be a plug-in hard disk, a smart memory card (SMC), a secure digital (SD) card, or a flash memory card.

[0067] As needed, the processor 30 can be a central processing unit (CPU), a graphics processing unit (GPU), a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), a general-purpose processor or other logic devices, etc.

[0068] One embodiment of the present invention is a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, can implement a chip SDK software development method as described in the aforementioned embodiment. That is, when part or all of the technical solutions that contribute to the prior art in the aforementioned embodiment of the present invention are embodied in the form of a computer software product, the aforementioned computer software product is stored in a computer-readable storage medium. The computer-readable storage medium can be any physical device or equipment that can carry computer program code. For example, a USB flash drive, a mobile disk, a magnetic disk, an optical disk, a computer memory, a read-only memory, a random access memory, etc.

[0069] It should be noted that the above embodiments can be freely combined as needed. The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered as the protection scope of the present invention.

Claims

1. A chip SDK software development method, characterized in that: include: Building a plug-in library including a plurality of plug-ins, wherein the plug-ins are used to create an output result framework of at least one development process in a chip SDK software development process; Obtaining a first model description file of a chip, wherein the first model description file includes a driver program description of each module of the chip that complies with a first format specification; Traversing each plug-in in the plug-in library, each plug-in implements a corresponding development process on the module according to the driver program description of each module in the first model description file, and obtains an output result framework expected by the module in the development process; The SDK software of the chip is generated according to the output result framework of each module in each development process.

2. The chip SDK software development method according to claim 1, characterized in that: The output result framework of each development process created by the plug-in library includes a driver code framework of the chip, a test case framework for testing the driver code of the chip, and a user manual framework of the chip.

3. The chip SDK software development method according to claim 1, characterized in that: The obtaining of the first model description file of the chip comprises: Acquire a second model description file of the chip, wherein the second model description file includes a driver program description of each module in the chip that complies with a second format specification; The second model description file is parsed to obtain a corresponding first model description file.

4. The chip SDK software development method according to claim 3, characterized in that: Acquiring a second model description file of the chip includes: Importing a plurality of third model description files, wherein the third model description files describe the driver programs of some modules of the chip according to the second format specification; Verifying each third model description file according to the second format specification; All the third model description files that pass the verification are merged to obtain the second model description file.

5. The chip SDK software development method according to claim 4, characterized in that: An editor is used to edit the third model description file of the chip.

6. The chip SDK software development method according to claim 5, characterized in that: The editor supports multiple people to edit online together or in a local editing mode.

7. A chip SDK software development system, characterized in that: include: A plug-in building module, used to build a plug-in library containing multiple plug-ins, wherein the plug-ins are used to create an output result framework of at least one development process in the chip SDK software development process; A model description acquisition module, used to acquire a first model description file of a chip, wherein the first model description file includes a driver program description of each module of the chip that complies with a first format specification; A software generation module is used to traverse each plug-in in the plug-in library, and each plug-in implements a corresponding development process for the module according to the driver description of each module in the first model description file to obtain the output result framework expected by the module in the development process; based on the output result framework of each module in each development process, the SDK software of the chip is generated.

8. The chip SDK software development system according to claim 7, characterized in that: Also includes: An editor, used for editing a third model description file of the chip, wherein the third model description file describes the driver program of some modules of the chip according to a second format specification; The model description acquisition module includes: A verification and merging unit is used to import multiple third model description files, verify each third model description file according to the second format specification; merge all the third model description files that pass the verification to obtain a second model description file; The parsing unit is used to parse the second model description file to obtain the corresponding first model description file.

9. A chip SDK software development system, characterized in that: include: Memory for storing computer programs; A processor, used to implement the chip SDK software development method according to any one of claims 1 to 6 when running the computer program.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the chip SDK software development method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Generation method and device of software development kit and terminal device

    CN109976761A

  • SDK generation method, device and equipment and readable storage medium

    CN112380145A

  • SDK (Software Development Kit) file generation method and device, equipment and storage medium

    CN114115854A

  • Method and device for generating software development kit, and terminal device

    WO2020173128A1

Cited By

  • Conference management component generation method and device, electronic equipment and storage medium

    CN119960931A