Hardware prototype development method and device based on container technology, equipment and medium

By adopting a container-based hardware prototyping methodology, the problems of version inconsistency and long deployment time in hardware prototyping are solved, enabling convenient deployment and efficient development of hardware prototypes on different platforms.

CN115145548BActive Publication Date: 2025-11-21HUNAN GREAT WALL GALAXY TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210820752.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-13
Publication Date
2025-11-21
Estimated Expiration
2042-07-13

AI Technical Summary

Technical Problem

Hardware prototype development suffers from issues such as asynchronous development and testing versions, poor portability in redevelopment, and long environment deployment time.

Method used

This approach employs a container-based hardware prototyping methodology. By building a hardware toolchain in a virtual environment, using container technology to generate a hardware toolchain image, and developing hardware sub-prototypes in parallel, the method performs unit testing and integration testing, generating a hardware prototype image that can be used on any container technology platform.

Benefits of technology

It achieves consistency in the development environment, simplifies the deployment process of hardware prototypes, avoids errors and long deployment times caused by version differences, and improves the portability and efficiency of development.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115145548B_ABST
    Figure CN115145548B_ABST
Patent Text Reader

Abstract

The application relates to a hardware prototype development method and device based on a container technology, equipment and a medium. The method comprises the following steps: constructing a hardware tool chain in a virtual environment according to a virtual environment management tool, generating a hardware tool chain image according to a virtual environment containing the hardware tool chain and an operating system by using a container technology; starting a plurality of containers to run the hardware tool chain image and developing hardware sub-prototypes in parallel according to the container technology; writing a hardware prototype model according to the characteristics of the hardware sub-prototypes by using a programming language, and writing a test program to perform unit testing on the hardware prototype model; merging and testing all the unit testing hardware prototype models; and processing a pre-downloaded development environment, the hardware tool chain and the hardware prototype model after integration and testing according to the container technology to obtain a hardware prototype image. The method can solve the problem that development and test versions are not synchronized in the prior art.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of data processing, in particular to a hardware prototype development method and device based on container technology, computer equipment and storage medium. BACKGROUND

[0002] Hardware prototype development is the most important problem faced in the early stage of hardware development, with long development cycle, multiple iterations and high time cost. It is crucial to have an experienced hardware prototype design engineer in the hardware development process, which not only saves development cost, but also standardizes the development process. Experienced hardware prototype design engineers are relatively scarce in China, and beginners are difficult to meet the requirements. The development of hardware prototypes is often synchronized with testing. In actual work experience, the development and testing versions are often not unified, or the development version is updated and the testing end cannot be informed in time, resulting in increased communication cost between development and testing. If the development environment or testing environment is deployed in a new environment, it is usually a time-consuming task, not to mention transplantation to other platforms for further development.

[0003] However, the current hardware prototype development method has problems such as asynchronous development and testing versions, poor portability for further development, and long environment deployment time. SUMMARY

[0004] Therefore, it is necessary to provide a hardware prototype development method based on container technology that can solve the problems of asynchronous development and testing versions, poor portability for further development, and long environment deployment time in the prior art. Using the present application, the developed hardware prototype can be used on any platform supporting container technology.

[0005] A hardware prototype development method based on container technology, the method comprising:

[0006] constructing a hardware tool chain in a virtual environment according to a virtual environment management tool, and generating a hardware tool chain image according to the virtual environment containing the hardware tool chain and an operating system using container technology;

[0007] starting multiple containers to run the hardware tool chain image in parallel to develop hardware sub-prototypes according to the container technology, writing a hardware sub-prototype model according to the characteristics of the hardware sub-prototype using a programming language, and writing a test program to perform unit testing on the hardware sub-prototype model to obtain a unit tested hardware sub-prototype model;

[0008] merging and integrating all unit tested hardware sub-prototype models and testing to obtain an integrated and tested hardware prototype model;

[0009] According to the container technology, a pre-downloaded development environment, a hardware tool chain and an integrated test hardware prototype model are processed to obtain a hardware prototype image; the hardware prototype image is used to generate a hardware prototype on any platform supporting the container technology.

[0010] In one of the embodiments, a hardware tool chain is constructed in a virtual environment according to a virtual environment management tool, including:

[0011] The virtual environment management tool is pre-selected to be installed on an operating system of a computer to obtain a virtual environment;

[0012] The virtual environment is activated according to an operation instruction of the virtual environment management tool, the independence of the virtual environment is verified by checking software properties in the activated virtual environment, if the virtual environment is independent, a related dependent library is constructed according to the characteristics of the hardware, the related dependent library is installed in the virtual environment to obtain a hardware tool chain.

[0013] In one of the embodiments, a hardware tool chain image is generated according to a virtual environment containing the hardware tool chain and an operating system by using the container technology, including:

[0014] The virtual environment containing the hardware tool chain is packaged, the absolute path in a virtual environment startup document is changed to a path in the container, a container application engine is installed, an automatic image generator is generated by using the installed container application engine, the packaged virtual environment is uploaded to a pre-constructed code repository, and the hardware tool chain image is generated according to the automatic image generator and the path in the container.

[0015] In one of the embodiments, a code repository and a container repository are pre-constructed, the hardware tool chain image is automatically pushed to the container repository, and a tester directly pulls the hardware tool chain image from the container repository for testing.

[0016] In one of the embodiments, all hardware sub-prototype models that pass the unit test are merged, integrated and tested to obtain an integrated test hardware prototype model, including:

[0017] A new container is restarted to run the hardware tool chain image, the hardware sub-prototype models that pass the unit test are imported into the new container for integration to obtain an integrated hardware prototype model;

[0018] The pre-set test data and test program are imported into the new container to perform integration testing on the integrated hardware prototype model to obtain an integrated test hardware prototype model.

[0019] In one of the embodiments, the pre-set test data and test program are imported into the new container to perform integration testing on the integrated hardware prototype model, and after the integration testing passes, an application program is written according to the test data and test program for testing on the hardware prototype.

[0020] In one embodiment, the pre-downloaded development environment, hardware tool chain and integrated test hardware prototype model are processed according to the container technology to obtain a hardware prototype image, including:

[0021] The corresponding development environment image is downloaded from the selected container application official website, the development environment image, the virtual environment of the hardware tool chain and the hardware prototype are stored in a folder, pushed to the code repository, the image is generated by the automatic image generator and pushed to the container repository, the image is pulled from the container repository to the local to obtain the hardware prototype image.

[0022] A hardware prototype development device based on container technology, the device comprises:

[0023] A hardware tool chain image generation module for constructing a hardware tool chain in a virtual environment according to a virtual environment management tool and generating a hardware tool chain image according to the virtual environment containing the hardware tool chain and an operating system by using container technology;

[0024] A development and test hardware prototype model module for starting multiple containers to run the hardware tool chain image and developing hardware sub-prototypes in parallel according to the container technology, writing hardware sub-prototype models according to the characteristics of the hardware sub-prototypes and writing test programs to perform unit testing on the hardware sub-prototype models to obtain unit tested hardware sub-prototype models;

[0025] An integrated test module for merging and testing all unit tested hardware sub-prototype models to obtain an integrated test hardware prototype model;

[0026] A hardware prototype generation module for processing the pre-downloaded development environment, hardware tool chain and integrated test hardware prototype model according to the container technology to obtain a hardware prototype image; the hardware prototype image is used to generate a hardware prototype on any platform supporting the container technology.

[0027] A computer device comprising a memory and a processor, the memory storing a computer program, and the processor implementing the following steps when executing the computer program:

[0028] Constructing a hardware tool chain in a virtual environment according to a virtual environment management tool and generating a hardware tool chain image according to the virtual environment containing the hardware tool chain and an operating system by using container technology;

[0029] Starting multiple containers to run the hardware tool chain image and developing hardware sub-prototypes in parallel according to the container technology, writing hardware sub-prototype models according to the characteristics of the hardware sub-prototypes and writing test programs to perform unit testing on the hardware sub-prototype models to obtain unit tested hardware sub-prototype models;

[0030] All the hardware sub-prototype models that have passed the unit test are integrated and tested to obtain the hardware prototype model after integration test;

[0031] The pre-downloaded development environment, hardware tool chain and hardware prototype model after integration test are processed according to the container technology to obtain a hardware prototype image; the hardware prototype image is used to generate a hardware prototype on any platform supporting the container technology.

[0032] A computer readable storage medium has a computer program stored thereon, and the computer program is executed by a processor to implement the following steps:

[0033] The hardware tool chain is constructed in a virtual environment according to a virtual environment management tool, and a hardware tool chain image is generated according to the virtual environment containing the hardware tool chain and an operating system by using the container technology;

[0034] The hardware sub-prototypes are developed in parallel by starting multiple containers to run the hardware tool chain image according to the container technology, and the hardware sub-prototype models are written according to the characteristics of the hardware sub-prototypes by using a programming language, and the hardware sub-prototype models are unit tested by writing test programs to obtain the hardware sub-prototype models that have passed the unit test;

[0035] All the hardware sub-prototype models that have passed the unit test are integrated and tested to obtain the hardware prototype model after integration test;

[0036] The pre-downloaded development environment, hardware tool chain and hardware prototype model after integration test are processed according to the container technology to obtain a hardware prototype image; the hardware prototype image is used to generate a hardware prototype on any platform supporting the container technology.

[0037] The hardware prototype development method, device, computer equipment and storage medium based on the container technology constructs a hardware tool chain in a virtual environment according to a virtual environment management tool, installs a dependent library and software required for hardware prototype development into the virtual environment, and generates a hardware tool chain image according to the virtual environment containing the hardware tool chain and an operating system by using the container technology. The hardware tool chain is an environment basis for hardware development. The hardware tool chain is constructed in the virtual environment to make the environment independent and facilitate transplantation. The virtual environment containing the hardware tool chain is made into an image to start a container to develop a hardware model on any platform that can support the container system. A plurality of containers are started to run the hardware tool chain image in parallel to develop hardware sub prototypes according to the container technology. A hardware sub prototype model is written according to the characteristics of the hardware sub prototype by using a programming language, and a test program is written to perform unit testing on the hardware sub prototype model to obtain a hardware sub prototype model that has passed unit testing. All hardware sub prototype models that have passed unit testing are merged, integrated and tested to obtain a hardware prototype model that has passed integration testing. The development environment, the hardware tool chain and the hardware prototype model that has passed integration testing are processed according to the container technology to generate a hardware prototype image to the local. The exported hardware prototype image can be used on any platform that supports the container technology without worrying about installation, dependency and configuration. The hardware prototype image generated by the application can be directly developed in the container when redeveloped, and the hardware tool chain image is redeveloped. When deployed, only one container needs to be installed to complete the installation, and no other complex software and dependent libraries need to be installed, thereby avoiding the problems of inconsistent development environment error, poor development portability and long environment deployment time caused by the difference between the personal download version and the development environment. BRIEF DESCRIPTION OF DRAWINGS

[0038] Figure 1 FIG. 1 is a flowchart of a hardware prototype development method based on a container technology in an embodiment;

[0039] Figure 2 FIG. 4 is a schematic diagram of constructing a virtual environment based on a Linux system in an embodiment.

[0040] Figure 3 FIG. 6 is a schematic diagram of testing that a virtual environment is independent of an operating system in an embodiment.

[0041] Figure 4 FIG. 8 is a schematic diagram of contents required to be contained in a directory during image construction in an embodiment.

[0042] Figure 5 FIG. 10 is a schematic diagram of realizing synchronous development and testing in an embodiment.

[0043] Figure 6 FIG. 11 is a structural block diagram of a hardware prototype development device based on a container technology in an embodiment;

[0044] Figure 7 Figure 1 is a diagram of the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0045] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and not intended to limit the present application.

[0046] In one embodiment, as shown in Figure 1 a hardware prototype development method based on container technology is provided, including the following steps:

[0047] Step 102, constructing a hardware toolchain in a virtual environment according to a virtual environment management tool, generating a hardware toolchain image according to the virtual environment containing the hardware toolchain and an operating system by using container technology.

[0048] The hardware toolchain is the basis of the environment for hardware development. The hardware toolchain is constructed in a virtual environment to make the environment independent and facilitate porting. The virtual environment containing the hardware toolchain is made into an image to start container development of the hardware model on any platform that can support the container system. The image is a file storage form and a type of redundancy. A copy of the data on one disk that is exactly the same as the data on another disk is an image. The virtual environment management tool is not limited to python-venv and conda.

[0049] Step 104, starting multiple containers to run the hardware toolchain image in parallel to develop hardware sub-prototypes according to the container technology, writing a hardware sub-prototype model according to the characteristics of the hardware sub-prototype using a programming language and writing a test program to perform unit testing on the hardware sub-prototype model to obtain a hardware sub-prototype model that has passed unit testing.

[0050] Based on the created hardware toolchain image, a container can be created on a terminal using “docker container run-it developtools:v1” (developtools:v1 is replaced according to actual conditions), a corresponding number of containers are created according to hardware characteristics and development requirements. Using a programming language (such as C language) combined with hardware characteristics, such as storage characteristics, security characteristics, computing characteristics, etc., hardware prototypes are written in the container, such as cache, computing, I / O, etc. For the development of each module hardware prototype, the same development environment and process are achieved based on container technology, which do not interfere with each other. After development, the development content is sent to the code repository, and the test personnel pulls the developed hardware prototype image from the container repository, and copies the written test program into the container for unit testing.

[0051] Step 106, the integrated and tested hardware prototype model is obtained by merging and testing all the hardware sub-prototype models.

[0052] After the development of each hardware module corresponding to the hardware sub-prototype is completed and the unit test is passed, a container is restarted to generate a hardware tool chain image according to a virtual environment and an operating system containing the hardware tool chain by using container technology, and the hardware sub-prototype corresponding to each sub-module is imported into the container. In the newly started container, the hardware sub-prototype corresponding to each sub-module is integrated, the prepared test data and test program are imported into the container for integrated testing, and after the test is passed, an application program is written to test on the hardware prototype, and the integrated and tested hardware prototype model is obtained.

[0053] Step 108, the pre-downloaded development environment, hardware tool chain and integrated and tested hardware prototype model are processed according to the container technology to obtain a hardware prototype image; the hardware prototype image is used to generate a hardware prototype on any platform supporting the container technology.

[0054] The integrated and tested hardware prototype model is exported to the local, and the hardware prototype is exported to the docker_image directory. The system and tools contained in the development environment are pulled from the docker official website to the local docker_image directory. The current docker_image folder contains the image of the development environment, the folder of the hardware tool chain and the Dockerfile file. The docker_image folder is pushed to the code repository, and the final version of the hardware prototype is taken from the container repository to the local image. The exported hardware prototype image can be used on any system supporting the container technology, without worrying about installation, dependency and configuration problems, and can be used out of the box, which is simple to operate. When the image generated by the present application is developed again, it can be directly developed in the container, relying on the hardware tool chain image to develop again, and only one software container needs to be installed to complete the installation when deploying, without the need to install other complex software and dependent libraries, because these are completed when the hardware tool chain image is made, thereby avoiding the problems of inconsistent development environment error, poor development portability and long environment deployment time caused by the difference between the personal download version and the development environment.

[0055] In the hardware prototype development method based on the container technology, a hardware tool chain is constructed in a virtual environment according to a virtual environment management tool, dependent libraries and software required for hardware prototype development are installed into the virtual environment, and a hardware tool chain image is generated according to the virtual environment containing the hardware tool chain and an operating system by using the container technology; the hardware tool chain is the environment basis for hardware development, the hardware tool chain is constructed in the virtual environment to make the environment independent and facilitate transplantation, the virtual environment containing the hardware tool chain is made into an image to start a container to develop a hardware model on any platform that can support the container system, a plurality of containers are started to run the hardware tool chain image in parallel to develop hardware sub-prototypes according to the container technology, hardware sub-prototype models are written according to the characteristics of the hardware sub-prototypes by using a programming language, and a test program is written to perform unit testing on the hardware sub-prototype models to obtain hardware sub-prototype models that have passed unit testing; all hardware sub-prototype models that have passed unit testing are merged, integrated and tested to obtain a hardware prototype model after integration and testing; the development environment, the hardware tool chain and the hardware prototype model after integration and testing that are downloaded in advance are processed to generate a hardware prototype image to the local according to the container technology, and the exported hardware prototype image can be used on any platform that supports the container technology without worrying about installation, dependency and configuration, and the operation is simple; the image generated by the application can be directly developed in the container when redeveloping, and the hardware tool chain is constructed for redeveloping, and only one container needs to be installed to complete the installation when deploying, without the need to install other complex software and dependent libraries, thereby avoiding the problems of inconsistent error, poor development portability and long environment deployment time caused by the difference between the personal download version and the development environment.

[0056] In one embodiment, the hardware tool chain is constructed in the virtual environment according to the virtual environment management tool, including:

[0057] The virtual environment management tool is preselected to be installed on the operating system of the computer to obtain a virtual environment;

[0058] The virtual environment is activated according to the operation instruction of the virtual environment management tool, the independence of the virtual environment is verified by checking the software properties in the activated virtual environment, if the virtual environment is independent, the related dependent libraries are constructed according to the characteristics of the hardware, the related dependent libraries are installed in the virtual environment, and the hardware tool chain is obtained.

[0059] In specific embodiments, a python3 venv virtual environment is constructed based on a Linux operating system, such as Figure 2As shown. A folder named vir_test is created under the home path using the mkdir command; enter the cd command to enter the vir_test folder, and enter "python3-m venv env" in the terminal to create a folder named env under the vir_test folder to configure the virtual environment. The contents of the virtual environment can be viewed using the "ls-l env" command. After the construction is completed, it is necessary to test whether the environment is independent of the operating system. In this embodiment, the location of the python3 software can be distinguished, as shown in the following figure: Figure 3 As shown. Figure 3 The locations of python3 on the Linux system and in the virtual environment are displayed through two terminals. The white boxes in the figure represent, from top to bottom, the identifier of the virtual environment (in this embodiment, the virtual environment is activated using "source env / bin / activate"), the location of python3 in the virtual environment, and the location of python3 in the Linux system. According to the paths displayed in the figure, it can be seen that the virtual environment is independent of the operating system.

[0060] After the virtual environment is constructed, all the dependent libraries of the hardware tool chain are listed according to the hardware characteristics. The virtual environment is activated, the installation of the libraries is performed in the virtual environment, and it is tested that all the libraries have been successfully installed. After the installation is successful, the folders named after the dependent libraries can be viewed in the "env / bin / " directory.

[0061] In one embodiment, a hardware tool chain image is generated according to the virtual environment containing the hardware tool chain and the operating system by using container technology, including:

[0062] The virtual environment containing the hardware tool chain is packaged, and the absolute path in the virtual environment startup document is changed to the path in the container. The container application engine is installed, and the automatic image generator is generated by using the installed container application engine. The packaged virtual environment is uploaded to the pre-constructed code repository, and the hardware tool chain image is generated according to the automatic image generator and the path in the container.

[0063] In one embodiment, the pre-constructed code repository and the container repository are constructed, the hardware tool chain image is automatically pushed to the container repository, and the tester directly pulls the hardware tool chain image from the container repository for testing.

[0064] In a specific embodiment, an image is generated by using the Docker container technology based on the constructed virtual environment containing the hardware tool chain, which is used for parallel development. In this embodiment, the Docker container application engine is installed on the Linux system, and the "wget-qO- https: / / get.docker.com / Docker can be installed using the `|sh` command. After Docker is installed, create a new folder named `develop_tools` to store the build context. Copy the `env` folder, which contains the hardware toolchain, to this folder. Change the absolute path of the `env` virtual environment when it is activated. In this example, the absolute path is located in `env / bin / activate`. After changing the path, write a Dockerfile for image building. The Dockerfile can be placed in this directory or in another path; the path of the Dockerfile can be specified when building the image. Figure 4 As shown, a new develop_tools folder is created to store the context when building the image. Since this image mainly builds the S100 hardware toolchain image, develop_tools only contains the env folder and the Dockerfile file for building the image. The Dockerfile file can be written according to your needs by referring to the Docker official website.

[0065] The context for building the image is now ready. The code repository and container repository have been set up, as follows: Figure 5 As shown, developers can upload their developed versions to the code repository for version control. An automated image generator can be built based on the chosen container technology, such as Docker container applications. This can be achieved by automatically writing Dockerfiles and pushing them to the container repository. When the container repository is updated, testers will receive the update information via email or other means and can directly pull the latest image from the repository for testing, thus synchronizing development and testing.

[0066] In one embodiment, all the unit-tested hardware sub-prototype models are merged, integrated, and tested to obtain an integrated and tested hardware prototype model, including:

[0067] Restart a new container to run the hardware toolchain image, import the hardware sub-prototype model that has completed unit testing into the new container for integration, and obtain the integrated hardware prototype model.

[0068] Import the pre-set test data and test programs into the new container to perform integrated testing on the integrated hardware prototype model, and obtain the integrated hardware prototype model.

[0069] In one embodiment, pre-set test data and test programs are imported into a new container to perform integration testing on the integrated hardware prototype model. After the integration test is passed, an application program is written based on the test data and test programs and tested on the hardware prototype.

[0070] In one of the embodiments, the pre-downloaded development environment, hardware tool chain and integrated tested hardware prototype model are processed according to the container technology to obtain a hardware prototype image, including:

[0071] The corresponding development environment image is downloaded from the selected container application official website, the development environment image, the virtual environment of the hardware tool chain and the hardware prototype are stored in a folder, pushed to the code repository, the image is generated by the automatic image generator and pushed to the container repository, the image is pulled from the container repository to the local to obtain the hardware prototype image.

[0072] It should be understood that, although Figure 1 the steps in the flowchart are shown in the order indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, Figure 1 at least part of the steps in may include multiple sub-steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily sequential, but can be executed in rotation or alternation with other steps or sub-steps or stages of other steps.

[0073] In one embodiment, as shown in Figure 6 , a hardware prototype development device based on container technology is provided, including: a hardware tool chain image generation module 602, a development and test hardware prototype model module 604, an integrated test module 606 and a hardware prototype generation module 608, wherein:

[0074] The hardware tool chain image generation module 602 is configured to construct a hardware tool chain in a virtual environment according to a virtual environment management tool, and generate a hardware tool chain image according to the virtual environment containing the hardware tool chain and an operating system by using container technology;

[0075] The development and test hardware prototype model module 604 is configured to start multiple containers to run the hardware tool chain image and develop hardware sub-prototypes in parallel according to the container technology, write hardware sub-prototype models and test programs according to the characteristics of the hardware sub-prototypes by using a programming language to perform unit testing on the hardware sub-prototype models, and obtain unit tested hardware sub-prototype models;

[0076] The integrated test module 606 is configured to merge and test all the unit tested hardware sub-prototype models to obtain an integrated tested hardware prototype model;

[0077] The hardware prototype generation module 608 is configured to process the pre-downloaded development environment, the hardware tool chain and the integrated test hardware prototype model according to the container technology to obtain a hardware prototype image; and the hardware prototype image is used to generate a hardware prototype on any platform supporting the container technology.

[0078] In one of the embodiments, the hardware tool chain image generation module 602 is further configured to construct the hardware tool chain in the virtual environment according to a virtual environment management tool, including:

[0079] The virtual environment management tool is pre-selected to be installed on an operating system of a computer to obtain a virtual environment;

[0080] The virtual environment is activated according to an operation instruction of the virtual environment management tool, the independence of the virtual environment is verified by checking software properties in the activated virtual environment, if the virtual environment is independent, a related dependent library is constructed according to the characteristics of the hardware, the related dependent library is installed in the virtual environment to obtain the hardware tool chain.

[0081] In one of the embodiments, the hardware tool chain image generation module 602 is further configured to generate a hardware tool chain image according to the virtual environment containing the hardware tool chain and the operating system by using the container technology, including:

[0082] The virtual environment containing the hardware tool chain is packaged, the absolute path in a virtual environment start document is changed to a path in the container, a container application engine is installed, an automatic image generator is generated by using the installed container application engine, the packaged virtual environment is uploaded to a pre-constructed code repository, and the hardware tool chain image is generated according to the automatic image generator and the path in the container.

[0083] In one of the embodiments, the pre-constructed code repository and the container repository are used, the hardware tool chain image is automatically pushed to the container repository, and a tester directly pulls the hardware tool chain image from the container repository for testing.

[0084] In one of the embodiments, the integration test module 606 is further configured to merge and test all the hardware sub-prototype models that have passed the unit test to obtain an integrated test hardware prototype model, including:

[0085] A new container is restarted to run the hardware tool chain image, the hardware sub-prototype models that have passed the unit test are imported into the new container for integration to obtain an integrated hardware prototype model;

[0086] The pre-set test data and test program are imported into the new container to perform integration test on the integrated hardware prototype model to obtain the integrated test hardware prototype model.

[0087] In one of the embodiments, the pre-set test data and test program are imported into the new container to perform integration test on the integrated hardware prototype model. After the integration test, an application program is written according to the test data and test program to test on the hardware prototype.

[0088] In one of the embodiments, the hardware prototype generation module 608 is further configured to process the pre-downloaded development environment, hardware tool chain and integrated hardware prototype model according to the container technology to obtain a hardware prototype image, including:

[0089] The corresponding development environment image is downloaded from a selected container application website. The development environment image, virtual environment of the hardware tool chain and the hardware prototype are stored in a folder and pushed to a code repository. An image is generated by an automatic image generator and pushed to a container repository. The image is pulled from the container repository to the local to obtain the hardware prototype image.

[0090] The specific limitations of the hardware prototype development device based on the container technology can be referred to the limitations of the hardware prototype development method based on the container technology, which will not be repeated here. Each module in the hardware prototype development device based on the container technology can be realized by software, hardware and combinations thereof. Each module can be embedded in or independent of the processor in the computer device in hardware form, or stored in the memory in the computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0091] In one embodiment, a computer device can be provided, which can be a terminal, and the internal structure diagram thereof can be as shown in Figure 7 The computer device includes a processor, a memory, a network interface, a display screen and an input device connected through a system bus. The processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is configured to communicate with external terminals through network connection. The computer program is executed by the processor to implement a hardware prototype development method based on the container technology. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer overlaid on the display screen, or a key, trackball or touchpad arranged on the computer device shell, or an external keyboard, touchpad or mouse, etc.

[0092] Those skilled in the art can understand that Figure 7The structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0093] In one embodiment, a computer device is provided, including a memory and a processor, the memory stores a computer program, and the processor implements the steps of the method in the above embodiments when executing the computer program.

[0094] In one embodiment, a computer storage medium is provided, which stores a computer program, and the computer program is executed by a processor to implement the steps of the method in the above embodiments.

[0095] A person of ordinary skill in the art can understand that all or part of the processes in the above embodiments can be completed by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer readable storage medium and can include the processes of the above embodiments when executed. Any reference to memory, storage, database or other medium used in the embodiments provided by the present application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration but not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0096] The technical features of the above embodiments can be combined in any manner. In order to make the description concise, not all possible combinations of the technical features in the above embodiments are described, however, as long as the combinations of the technical features do not contradict, they should be considered as the scope of the present application.

[0097] The above-described embodiments are merely illustrative of several embodiments of the present application, which are described in more detail and in a specific manner, but should not be construed as limiting the scope of the patent. It should be noted that for those skilled in the art, several modifications and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application should be subject to the appended claims.

Claims

1. A hardware prototyping method based on container technology, characterized in that, The method includes: In a virtual environment, a hardware toolchain is built based on a virtual environment management tool, and a hardware toolchain image is generated based on the virtual environment containing the hardware toolchain and the operating system using container technology. Based on container technology, multiple containers are launched to run the hardware toolchain image in parallel to develop hardware sub-prototypes. A hardware sub-prototype model is written using a programming language according to the characteristics of the hardware sub-prototype, and a test program is written to perform unit tests on the hardware sub-prototype model to obtain a hardware sub-prototype model that has passed unit tests. All the hardware sub-prototype models that have passed unit testing are merged, integrated, and tested to obtain the integrated and tested hardware prototype model. The pre-downloaded development environment, hardware toolchain, and integrated and tested hardware prototype model are processed using container technology to obtain a hardware prototype image; the hardware prototype image is used to generate hardware prototypes on any platform that supports container technology. The pre-downloaded development environment, hardware toolchain, and integrated tested hardware prototype model are processed using container technology to obtain a hardware prototype image, including: Download the corresponding development environment image from the official website of the selected container application, store the development environment image, the virtual environment of the hardware toolchain, and the hardware prototype in one folder, push it to the code repository, generate an image through the automatic image generator and push it to the container repository, pull the image from the container repository to the local machine, and obtain the hardware prototype image. Building a hardware toolchain within a virtual environment using virtual environment management tools includes: A virtual environment is created by pre-selecting and installing a virtual environment management tool on the computer's operating system; The virtual environment is activated according to the operation instructions of the virtual environment management tool. The independence of the virtual environment is verified by viewing the software properties within the activated virtual environment. If the virtual environment is independent, relevant dependency libraries are built according to the characteristics of the hardware, and the relevant dependency libraries are installed in the virtual environment to obtain the hardware toolchain. Container technology is used to generate hardware toolchain images based on a virtual environment containing the hardware toolchain and an operating system, including: The virtual environment containing the hardware toolchain is packaged and the absolute path in the virtual environment startup file is changed to the path inside the container. The container application engine is installed, and an automatic image generator is generated using the installed container application engine. The packaged virtual environment is uploaded to a pre-built code repository, and a hardware toolchain image is generated based on the automatic image generator and the path inside the container.

2. The method according to claim 1, characterized in that, The method further includes; Code repositories and container repositories are pre-built, and the hardware toolchain image is automatically pushed to the container repository. Testers can directly pull the hardware toolchain image from the container repository for testing.

3. The method according to claim 1, characterized in that, All the unit-tested hardware sub-prototype models are merged, integrated, and tested to obtain the integrated and tested hardware prototype model, including: Restart a new container to run the hardware toolchain image, import the hardware prototype model with completed unit tests into the new container for integration, and obtain the integrated hardware prototype model. The pre-set test data and test program are imported into the new container to perform integrated testing on the integrated hardware prototype model, resulting in the integrated hardware prototype model.

4. The method according to claim 3, characterized in that, The method further includes: The pre-set test data and test program are imported into the new container to perform integration testing on the integrated hardware prototype model. After the integration test is passed, an application program is written based on the test data and test program and tested on the hardware prototype.

5. A hardware prototyping development device based on container technology, characterized in that, The device includes: The hardware toolchain image generation module is used to build a hardware toolchain in a virtual environment based on a virtual environment management tool. It uses container technology to generate a hardware toolchain image based on a virtual environment containing the hardware toolchain and an operating system. Building the hardware toolchain in the virtual environment based on the virtual environment management tool includes: pre-selecting the virtual environment management tool and installing it on the computer's operating system to obtain the virtual environment. The virtual environment is activated according to the operation instructions of the virtual environment management tool. The independence of the virtual environment is verified by viewing the software attributes within the activated virtual environment. If the virtual environment is independent, relevant dependency libraries are built according to the characteristics of the hardware, and the relevant dependency libraries are installed in the virtual environment to obtain the hardware toolchain. A hardware toolchain image is generated using container technology based on the virtual environment containing the hardware toolchain and the operating system. This includes: packaging the virtual environment containing the hardware toolchain and changing the absolute path in the virtual environment startup file to the path inside the container; installing the container application engine; using the installed container application engine to generate an automatic image generator; uploading the packaged virtual environment to a pre-built code repository; and generating the hardware toolchain image based on the automatic image generator and the path inside the container. The hardware prototype model development and testing module is used to launch multiple containers to run the hardware toolchain image in parallel to develop hardware sub-prototypes. It uses a programming language to write hardware sub-prototype models according to the characteristics of the hardware sub-prototypes and writes test programs to perform unit tests on the hardware sub-prototype models to obtain hardware sub-prototype models that have passed unit tests. The integration test module is used to merge and test all the unit-tested hardware sub-prototype models to obtain the integrated hardware prototype model. A hardware prototype generation module is used to process a pre-downloaded development environment, hardware toolchain, and integrated tested hardware prototype model using container technology to obtain a hardware prototype image. This hardware prototype image is used to generate hardware prototypes on any platform that supports container technology. The process of processing the pre-downloaded development environment, hardware toolchain, and integrated tested hardware prototype model using container technology to obtain the hardware prototype image includes: Download the corresponding development environment image from the official website of the selected container application. Store the development environment image, the virtual environment of the hardware toolchain, and the hardware prototype in one folder. Push the image to the code repository. Use the automatic image generator to generate an image and push it to the container repository. Pull the image from the container repository to your local machine to obtain the hardware prototype image.

6. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 4.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Cloud platform-based software development method, cloud platform, device and medium

    CN109240662A

  • Container-based continuous delivery method and device

    CN114489934A