Heterogeneous chip design method and system based on Internet of Things

By deeply analyzing and semantic framework construction of the development documents and initial code of IoT applications, the problem of insufficient task adaptability in chip design is solved, efficient heterogeneous chip design is achieved, and design efficiency and resource utilization efficiency are improved.

CN119862833APending Publication Date: 2025-04-22ZHONGKEXIN MAGNETIC TECH (ZHUHAI) CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510280187.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-11
Publication Date
2025-04-22

AI Technical Summary

Technical Problem

The existing chip design process lacks in-depth understanding of the task characteristics of IoT applications, resulting in insufficient task adaptability of programming heterogeneous chips and IoT applications, and multiple designs are required to cope with special needs, resulting in low design efficiency.

Method used

By obtaining the development documents and initial code of the target Internet of Things application, semantic analysis and obtaining application tasks, further syntax analysis and constructing a task semantic framework, code matching and obtaining task code mapping relationships, building a directed graph of the task, evaluating resource requirements, generating object codes and determining heterogeneous chip design schemes.

Benefits of technology

It improves the efficiency and accuracy of heterogeneous chip design, clarifies the resource requirements for Internet of Things applications, reduces the number of chip designs, and improves resource utilization efficiency and design rationality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119862833A_ABST
    Figure CN119862833A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of chip design, and discloses a heterogeneous chip design method and system based on the Internet of Things, and the method comprises the steps: obtaining a development document and an initial code of a target Internet of Things application; performing semantic analysis on the development document to obtain an application task; based on the application task, performing grammar analysis on the development document to obtain a task semantic framework; based on the initial code and the task semantic framework, performing code matching on the application task to obtain a task code mapping relation; constructing a task directed graph of the application task based on the task code mapping relation and the initial code; based on the initial code and the task directed graph, performing resource demand evaluation on the application task to obtain task resource demand data; based on a preset heterogeneous chip unit and the task resource demand data, performing code generation on the application task to obtain a target code; and determining a target heterogeneous chip design scheme based on a preset heterogeneous chip unit and the target code. According to the method, the chip design efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of chip design, and in particular to a heterogeneous chip design method and system based on the Internet of Things. Background Art

[0002] With the rapid development of IoT technology, the demand for programmable heterogeneous chips in IoT applications is growing. Programmable heterogeneous chips can achieve high performance standards in multiple dimensions to meet the complex and changing task requirements of IoT applications.

[0003] However, the common chip design process currently lacks a deep understanding of the task characteristics in IoT applications, which leads to insufficient adaptability between programmed heterogeneous chips and IoT application tasks. Multiple chip designs are required to enable programmable heterogeneous chips to effectively meet the special needs of IoT applications, resulting in low design efficiency for heterogeneous chips. Therefore, how to improve the efficiency of heterogeneous chip design has become an urgent problem to be solved. Summary of the invention

[0004] The present invention provides a heterogeneous chip design method based on the Internet of Things and a computer-readable storage medium, the main purpose of which is to improve the efficiency of heterogeneous chip design.

[0005] To achieve the above object, the present invention provides a heterogeneous chip design method based on the Internet of Things, comprising: Obtain the development documents and initial code of the target IoT application; Performing semantic analysis on the development document to obtain application tasks; Based on the application task, the development document is parsed to obtain a task semantic framework; Based on the initial code and the task semantic framework, code matching is performed on the application task to obtain a task code mapping relationship; Based on the task code mapping relationship and the initial code, construct a task directed graph of the application task; Based on the initial code and the task directed graph, performing resource requirement evaluation on the application task to obtain task resource requirement data; Based on the preset heterogeneous chip units and the task resource requirement data, code generation is performed on the application task to obtain a target code; Based on the preset heterogeneous chip unit and the target code, a target heterogeneous chip design scheme is determined.

[0006] Optionally, the performing grammatical parsing on the development document based on the application task to obtain a task semantic framework includes: Based on the application task, the development document is segmented to obtain task document phrases; Extracting keywords from the task document phrases to obtain task keywords; Performing grammatical analysis on the task keywords to obtain grammatical relations of the keywords; Based on the keyword grammatical relationship, a task semantic framework is constructed.

[0007] Optionally, performing code matching on the application task based on the initial code and the task semantic framework to obtain a task code mapping relationship includes: Traversing the initial code to obtain code elements; Performing semantic analysis on the task semantic framework to obtain task elements; The code element is mapped to the task element to obtain a task-code mapping relationship.

[0008] Optionally, constructing a task directed graph of the application task based on the task code mapping relationship and the initial code includes: Based on the initial code, identifying the association relationship of the code elements to obtain the element association relationship; Determine a task association relationship based on the task code mapping relationship and the element association relationship; Based on the task association relationship, a directed graph is drawn for the application tasks to obtain a task directed graph.

[0009] Optionally, the performing resource requirement evaluation on the application task based on the initial code and the task directed graph to obtain task resource requirement data includes: Performing attribute analysis on the application task to obtain task attributes; Based on the task attributes, determining storage resource requirement data of the application task; Parsing the initial code to obtain computing resource requirement data; Determining a data flow relationship of the application task based on the task directed graph; Determining communication resource demand data based on the data flow relationship; The storage resource requirement data, computing resource requirement data and communication resource requirement data are merged to obtain task resource requirement data.

[0010] Optionally, parsing the initial code to obtain computing resource requirement data includes: Based on a preset resource requirement code, code matching is performed on the initial code to obtain a target resource requirement code; Performing static code analysis on the target resource requirement code to obtain file resources and computing resources; The file resources and the computing resources are merged to obtain computing resource demand data.

[0011] Optionally, the performing code generation on the application task based on the preset heterogeneous chip unit and the task resource requirement data to obtain the target code includes: Based on the task resource requirement data and the application task, the preset heterogeneous chip unit is assigned tasks to obtain task scheduling data; Based on the application task, a preset code framework template library is screened to obtain a task code framework; Based on the task scheduling data, the task code framework is filled with code to obtain the target code.

[0012] Optionally, the determining a target heterogeneous chip design solution based on the preset heterogeneous chip unit and the target code includes: Performing logic verification on the target code to obtain logic verification failure data or logic verification success data; Based on the logic verification failure data, code correction is performed on the target code to obtain a corrected code; Based on the preset heterogeneous chip unit and the correction code, generating a target heterogeneous chip design solution; A target heterogeneous chip design solution is generated based on the logic verification success data, the preset heterogeneous chip unit and the target code.

[0013] Optionally, performing semantic parsing on the development document to obtain the application task includes: Extracting functions from the development document to obtain application function text; Based on the application function text, the development document is split to obtain an application text module; Perform task definition on the application text module to obtain application tasks.

[0014] To achieve the above object, the present invention further provides a heterogeneous chip design system based on the Internet of Things, comprising: A data acquisition module is used to acquire the development documents and initial codes of the target IoT application, perform semantic analysis on the development documents, and obtain application tasks; A task model construction module is used to perform syntax analysis on the development document based on the application task to obtain a task semantic framework, perform code matching on the application task based on the initial code and the task semantic framework to obtain a task code mapping relationship, and construct a task directed graph of the application task based on the task code mapping relationship and the initial code; A resource requirement evaluation module, used to evaluate the resource requirement of the application task based on the initial code and the task directed graph, and obtain task resource requirement data; The design scheme generation module is used to generate code for the application task based on the preset heterogeneous chip unit and the task resource requirement data to obtain the target code, and determine the target heterogeneous chip design scheme based on the preset heterogeneous chip unit and the target code.

[0015] In order to solve the above problem, the present invention further provides an electronic device, the electronic device comprising: a memory storing at least one instruction; and The processor executes the instructions stored in the memory to implement the heterogeneous chip design method based on the Internet of Things described above.

[0016] In order to solve the above problems, the present invention also provides a computer-readable storage medium, in which at least one instruction is stored. The at least one instruction is executed by a processor in an electronic device to implement the above-mentioned heterogeneous chip design method based on the Internet of Things.

[0017] The present invention obtains the development document and initial code of the target Internet of Things application, and performs semantic analysis on the development document to obtain the application task. Furthermore, by performing grammatical analysis on the development document, a task semantic framework of the application task is constructed. Secondly, based on the task semantic framework and the initial code, code matching is performed on the application task to obtain a task code mapping relationship, and a task directed graph is constructed according to the task code mapping relationship and the initial code, thereby improving the accuracy and efficiency of code generation. Then, the resource requirements of the application task are evaluated to obtain task resource requirement data, so that the resource requirements of the Internet of Things application can be clearly defined during chip design, thereby improving the efficiency and rationality of resource utilization in the heterogeneous chip design process. Finally, the target code is generated based on the preset heterogeneous chip unit and the task resource requirement data, and the target heterogeneous chip design scheme is determined according to the target code, thereby reducing the number of chip designs and improving the efficiency of heterogeneous chip design. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 A schematic diagram of a flow chart of a heterogeneous chip design method based on the Internet of Things provided by an embodiment of the present invention; Figure 2 A functional module diagram of a heterogeneous chip design system based on the Internet of Things provided by an embodiment of the present invention; Figure 3 A schematic diagram of the structure of an electronic device for implementing the heterogeneous chip design method based on the Internet of Things provided by an embodiment of the present invention.

[0019] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0020] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0021] The embodiment of the present application provides a heterogeneous chip design method based on the Internet of Things. The execution subject of the heterogeneous chip design method based on the Internet of Things includes but is not limited to at least one of the electronic devices such as a server and a terminal that can be configured to execute the method provided in the embodiment of the present application. In other words, the heterogeneous chip design method based on the Internet of Things can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc.

[0022] Reference Figure 1 FIG. 1 is a flow chart of a heterogeneous chip design method based on the Internet of Things provided by an embodiment of the present invention. In this embodiment, the heterogeneous chip design method based on the Internet of Things includes: S1. Obtain the development documents and initial code of the target IoT application.

[0023] It is understandable that the target IoT application refers to the application system under the IoT application scenario, such as smart security monitoring system, smart agricultural monitoring system, etc. Development documents refer to the documents that describe the design, requirements, functions and implementation details of the target IoT application. Development documents include requirements analysis documents and design documents. The requirements analysis documents are used to describe the functional requirements, performance requirements, interface requirements, etc. of the application, and the design documents are used to describe the system architecture, module design, interface design, etc. of the application. The initial code refers to the code written in the hardware description language at the beginning of the design of the target IoT application. The initial code can be used to describe the behavior and structure of the hardware circuit.

[0024] In an embodiment of the present application, a document describing the functional requirements, system architecture, module design, interface definition, etc. of the target IoT application, i.e., the development document of the target IoT application, can be obtained from the user or the project team. Furthermore, the initial code of the target IoT application can be obtained by querying all the codes written by the user or the project team in a hardware description language. For example, when the target IoT application is an intelligent agricultural detection system, the development document describing the functions that need to be implemented by the intelligent agricultural detection system, such as soil moisture monitoring, temperature monitoring, data analysis, and irrigation control, is obtained from the user or the project team, and the code of the data acquisition module of the soil moisture sensor, the data acquisition module of the temperature sensor, the data analysis module, and the irrigation control module is obtained.

[0025] It is understandable that this application, by obtaining the development documents of the target IoT application, facilitates the clarification of the functional requirements, system architecture, module design and other information of the target IoT application, which can provide a basis for subsequent application splitting. By obtaining the initial code of the target IoT application, the initial implementation details of the target IoT application, namely the code architecture, function implementation and variable definition, can be determined, which can provide a basis for subsequent code matching and resource requirement assessment.

[0026] It is important to know that when obtaining the initial code of the target IoT application, this application can annotate the initial code to facilitate code parsing. In addition, it is also necessary to ensure the consistency between the development document and the initial code to avoid document parsing errors or code parsing errors due to information mismatch.

[0027] S2. Perform semantic analysis on the development document to obtain application tasks.

[0028] It is understandable that application tasks refer to specific tasks that need to be completed in the target IoT application. Each application task is responsible for realizing specific functions. For example, when the target IoT application is an intelligent agricultural detection system, the application tasks can be soil moisture data collection, temperature data collection, data analysis, and irrigation control.

[0029] The embodiment of the present application can obtain the application task by extracting functional information from the development document, splitting the development document into multiple text modules according to the extracted functional information, and further defining the information in each text module.

[0030] In detail, the semantic parsing of the development document to obtain the application task includes: Extracting functions from the development document to obtain application function text; Based on the application function text, the development document is split to obtain an application text module; Perform task definition on the application text module to obtain application tasks.

[0031] It is understandable that the application function text refers to the text content in the development document that describes the functions that the target IoT application needs to implement. For example, in the development document of the smart agricultural detection system, the application function text can be a text that describes functions such as soil moisture monitoring, temperature monitoring, data analysis, and irrigation control. The application text module refers to the text module in the development document that describes the functions mentioned in the application function text. For example, according to the application function text of the smart agricultural detection system, the smart agricultural detection system can be divided into a soil moisture data acquisition text module, a temperature data acquisition text module, a data analysis text module, an irrigation control text module, etc.

[0032] The embodiment of the present application can use natural language processing technology to perform text extraction and format conversion on the development document, convert the text content of the development document into structured data, and then extract keywords describing the function from the structured data to form an application function text. Secondly, according to the semantic information of the open document, the development document is initially divided into multiple initial document modules, and then according to the keywords in the application function text, each initial document module is matched with the application function text. Furthermore, the initial document modules with the same matching results are merged to form an application text module. Finally, the semantic information of each application text module is summarized to obtain the application task of the target IoT application.

[0033] It is important to know that when splitting the development document into multiple application text modules, you should ensure that each application text module is used to describe independent functional information. You also need to ensure that the application text module covers all functional information of the target IoT application. Furthermore, you also need to ensure that the granularity of the application text module is moderate to avoid the application text module being too rough or too detailed.

[0034] The embodiment of the present application extracts functions from development documents to obtain application function texts, then splits the development documents according to the application function texts to obtain application text modules, and finally, defines tasks for the application text modules to obtain application tasks, thereby improving the accuracy of application tasks and providing a solid foundation for subsequent task allocation, resource mapping, and code generation, thereby improving the design efficiency and performance of heterogeneous chips.

[0035] S3. Based on the application task, parse the development document to obtain a task semantic framework.

[0036] It is understandable that the task semantic framework is a structured representation of the semantic information and logical relationships of the application task. It should be known that the task semantic framework may include the name, function, input and output, resource requirements, etc. of the application task. For example, the task semantic framework may be a JSON object composed of the semantic information and logical relationships of the application task.

[0037] The embodiment of the present application can segment the development document into words according to the application task to obtain task document phrases, then extract the task keywords therein, further analyze the grammatical relationship of the task keywords, and construct a task semantic framework accordingly.

[0038] Specifically, based on the application task, the development document is parsed to obtain a task semantic framework, including: Based on the application task, the development document is segmented to obtain task document phrases; Extracting keywords from the task document phrases to obtain task keywords; Performing grammatical analysis on the task keywords to obtain grammatical relations of the keywords; Based on the keyword grammatical relationship, a task semantic framework is constructed.

[0039] It is understandable that task document phrases refer to words or phrases related to application tasks in development documents. For example, in the development documents of the intelligent agricultural detection system, task document phrases used to describe application tasks can be soil moisture sensor, data collection, system architecture, data analysis, irrigation judgment, etc. Task keywords refer to words or phrases in task document phrases that represent the core functions of application tasks. For example, in the task document phrases "soil moisture sensor, data collection, system architecture, data analysis, irrigation judgment", task keywords can be soil moisture sensor, data collection, data analysis, irrigation judgment. Keyword grammatical relations refer to the grammatical relations between task keywords. For example, "soil moisture sensor" is the executor of "data collection", the results of "data collection" are used for "data analysis", and the purpose of "data analysis" is for "irrigation judgment".

[0040] In an embodiment of the present application, the forward maximum matching method, the reverse maximum matching method or the word segmentation model based on machine learning can be used to split the text content related to the application task in the development document into words or phrases, and then these words or phrases are merged into a set to obtain a task document phrase. Furthermore, the word frequency and inverse document frequency of the words or phrases in the task document phrase in the development document can be calculated by a keyword extraction algorithm, and then the task keywords are screened out from the words or phrases in the task document phrase according to the size of the word frequency and the inverse document frequency. Secondly, by performing dependency syntactic analysis on the document sentence where the task keyword is located, the subject, predicate, object and other components of the document sentence are determined, and then the grammatical relationship between each task keyword is determined according to the grammatical role played by the task keyword in the document sentence, that is, the keyword grammatical relationship. Finally, the logical relationship between each application task is determined according to the keyword grammatical relationship, and then the pre-constructed semantic framework is filled according to the logical relationship and the semantic information of the application task to obtain the task semantic framework.

[0041] Through keyword extraction, the present application can identify key information related to application tasks from development documents and obtain task keywords. Secondly, by performing grammatical analysis on task keywords, the keyword grammatical relationship between task keywords can be determined, which facilitates understanding of the logic and structure between application tasks. Finally, a task semantic framework is constructed based on the keyword grammatical relationship, which can represent the semantic information and logical relationship of application tasks in a structured manner, thereby improving the design efficiency and design rationality of heterogeneous chips.

[0042] S4. Based on the initial code and the task semantic framework, code matching is performed on the application task to obtain a task code mapping relationship.

[0043] It is understandable that the task code mapping relationship refers to the mapping relationship between the application task and the initial code. Specifically, the task code mapping relationship can be the mapping relationship between the application task and the code function, the mapping relationship between the application task and the code class, the mapping relationship between the application task and the code variable, etc.

[0044] The embodiment of the present application can determine the mapping relationship between the initial code and the application task, that is, the task code mapping relationship, by matching the code elements in the initial code with the task elements in the task semantic framework.

[0045] In detail, the code matching of the application task based on the initial code and the task semantic framework to obtain the task code mapping relationship includes: Traversing the initial code to obtain code elements; Performing semantic analysis on the task semantic framework to obtain task elements; The code element is mapped to the task element to obtain a task-code mapping relationship.

[0046] It is understandable that code elements refer to components of the initial code, such as code functions, code classes, code variables, etc. Task elements refer to components of the task semantic framework, such as the task name and function description of the application task.

[0047] Specifically, the embodiment of the present application accesses the initial code along a predetermined search route to identify each code element in the initial code. Secondly, the task information of each application task in the task semantic framework is semantically understood to determine the name, function description, input, output, etc. of the application task. Then, the task element of the task semantic framework is generated according to the name, function description, input, and output of the application task. Finally, the grammatical structure of each code element is identified to determine the name, type, implementation function, etc. of each code element. Then, according to the name, type, implementation function of each code element and the name, function description, input, output, etc. of the application task represented by the task element, the code element is paired with the task element to obtain a task code mapping relationship.

[0048] The embodiment of the present application traverses the initial code to obtain code elements, performs semantic analysis on the task semantic framework to obtain task elements, and then maps the code elements with the task elements. This can ensure that the code implementation of each application task is consistent with the semantic definition of the application task, thereby improving the conversion rate and conversion accuracy between application tasks and codes, thereby improving the design efficiency and accuracy of heterogeneous chips.

[0049] S5. Construct a task directed graph of the application task based on the task code mapping relationship and the initial code.

[0050] It is understandable that the task directed graph represents a graph structure of dependencies and execution order between application tasks. It should be noted that in the task directed graph, nodes can represent application tasks, and edges connecting nodes can represent dependencies between application tasks.

[0051] The embodiment of the present application can determine the logical relationship between each task element according to the mapping relationship between the initial code and the task code. Further, according to the logical relationship between each task element, a directed graph is drawn to obtain a task directed graph.

[0052] In detail, constructing a task directed graph of the application task based on the task code mapping relationship and the initial code includes: Based on the initial code, identifying the association relationship of the code elements to obtain the element association relationship; Determine a task association relationship based on the task code mapping relationship and the element association relationship; Based on the task association relationship, a directed graph is drawn for the application tasks to obtain a task directed graph.

[0053] It is understandable that the element association relationship refers to the logical relationship between code elements, for example, there is a data transfer relationship between the code element "input port sensor_data" and the code element "output port processed_data". The task association relationship refers to the logical relationship between task elements, for example, the task element "data analysis" depends on the task element "soil moisture sensor data collection".

[0054] The embodiment of the present application can parse the initial code to determine the data transfer path and variable reference relationship between the above-mentioned code elements, that is, the element association relationship, and then determine the task elements mapped by each code element according to the task code mapping relationship, and use the element association relationship between the code elements as the logical relationship between these task elements, that is, the task association relationship. Furthermore, a task directed graph can be drawn with the task association relationship as the edge and the task elements as the node.

[0055] The embodiment of the present application identifies the association relationship of code elements based on the initial code to obtain the element association relationship. Secondly, the task association relationship is determined according to the task code mapping relationship and the element association relationship. Finally, based on the task association relationship, a directed graph is drawn for the application tasks to obtain a task directed graph, which facilitates the understanding of the dependencies and execution order between application tasks, thereby improving the accuracy of understanding the application tasks.

[0056] S6. Based on the initial code and the task directed graph, perform resource requirement evaluation on the application task to obtain task resource requirement data.

[0057] Task resource requirement data refers to the resources required when an application task implements a specific function. For example, when the application task is to collect soil moisture data, the task resource requirement data may be lower CPU computing data, lower memory usage, higher storage capacity, and higher storage speed.

[0058] The embodiments of the present application can determine the resource requirements of application tasks in storage and computing dimensions by parsing application tasks and initial codes. Furthermore, based on the above-mentioned task directed graph, the data flow relationship between application tasks can be determined, and then based on the data flow relationship between application tasks, the resource requirements of application tasks in the communication dimension can be determined.

[0059] In detail, based on the initial code and the task directed graph, the resource requirement evaluation of the application task is performed to obtain the task resource requirement data, including: Performing attribute analysis on the application task to obtain task attributes; Based on the task attributes, determining storage resource requirement data of the application task; Parsing the initial code to obtain computing resource requirement data; Determining a data flow relationship of the application task based on the task directed graph; Determining communication resource demand data based on the data flow relationship; The storage resource requirement data, computing resource requirement data and communication resource requirement data are merged to obtain task resource requirement data.

[0060] It is understandable that task attributes refer to the characteristics of application tasks, and task attributes include the name, function, input parameters, output parameters, resource requirements, etc. of the application task. For example, the task attributes of the soil moisture data collection task include the name "soil moisture data collection", the function "collect soil moisture data", the input "soil moisture sensor", the output "soil moisture data", etc. Storage resource demand data refers to the demand for storage resources during the execution of the application task, and the storage resource demand data includes memory size, storage capacity, etc. For example, the soil moisture data collection task may require a larger storage capacity to store the collected data. Computing resource demand data refers to the demand for computing resources during the execution of the application task, and the computing resource demand data includes CPU operation time, GPU acceleration time, etc. For example, the data analysis task may require higher computing resources to process a large amount of data. The data flow relationship refers to the flow direction of the data flow in the application task. For example, the data collected in the application task soil moisture data collection needs to be used for irrigation judgment, and then irrigation control is performed based on the result of the irrigation judgment. Therefore, the communication distance between the application task soil moisture data collection and the application task irrigation control should not be too far.

[0061] The embodiments of the present application can perform key extraction and semantic analysis on the application task according to the above-mentioned task semantic framework and task directed graph to obtain the task attributes of the application task. Furthermore, according to the functional description and resource requirements in the task attributes, the amount of data and the storage frequency that the application task needs to store are estimated. For example, when the application task needs to store a large amount of sensor data and the data is updated frequently, it can be determined that the storage resource requirement data of the application task can be a high storage capacity and a high storage speed.

[0062] In addition, the embodiment of the present application can filter out the target resource requirement code representing the resource requirement from the initial code according to the pre-set code screening rules, and then obtain the computing resource requirement data of the application task through static analysis of the target resource requirement code.

[0063] Secondly, the embodiment of the present application can determine the data dependency relationship between each application task based on the edges of the above-mentioned task directed graph, and determine the data flow relationship based on the data dependency relationship. Further, based on the data flow relationship, the communication requirements between each application task can be determined, thereby obtaining the communication resource requirement data of the application task.

[0064] Finally, the embodiment of the present application summarizes the above-mentioned storage resource requirement data, computing resource requirement data and communication resource requirement data to obtain the task resource requirement data of each application task.

[0065] The embodiment of the present application determines the task resource requirement data of each application task by analyzing the storage requirements, computing requirements, and communication requirements of the application tasks, thereby comprehensively evaluating the resource requirements of the application tasks and providing a basis for reasonable module allocation for subsequent heterogeneous chip design solutions.

[0066] Furthermore, the code parsing of the initial code to obtain computing resource requirement data includes: Based on a preset resource requirement code, code matching is performed on the initial code to obtain a target resource requirement code; Performing static code analysis on the target resource requirement code to obtain file resources and computing resources; The file resources and the computing resources are merged to obtain computing resource demand data.

[0067] It is understandable that the preset resource requirement code refers to a pre-defined code. It is important to know that the resource requirement code is used to describe the resource requirements of different application tasks. The target resource requirement data refers to the code portion in the initial code that represents the resource requirements. File resources refer to the resources involving files in the target resource requirement code, such as data files, configuration files, log files, etc. It is important to know that the requirements for file resources can be information such as file size, read and write frequency, and storage location. Computing resources refer to the computing power required during the execution of the initial code, such as CPU time, number of floating-point operations, etc.

[0068] The embodiments of the present application can compare the preset resource requirement code with the initial code through string matching or regular expression and other technologies, find the matching part from the initial code, that is, the target resource requirement code, further perform grammatical analysis and semantic analysis on the target resource requirement code, and extract the file resources and computing resources required for each application task from the target resource requirement code. Finally, the file resources and computing resources required for the application task are summarized to obtain complete computing resource requirement data for the application task.

[0069] The embodiment of the present application performs code matching on the initial code according to the preset resource requirement code, and can quickly identify the code fragments related to the resource requirement in the initial code, and then obtain the file resource and computing resource information of each task application through code static analysis. Finally, by merging the file resources and computing resources, the computing resource requirement data of each task application can be obtained, which helps to optimize resource utilization, improve system performance, and ensure the efficient execution of application tasks.

[0070] S7. Based on the preset heterogeneous chip unit and the task resource requirement data, code is generated for the application task to obtain a target code.

[0071] It is understandable that the preset heterogeneous chip unit refers to a computing unit of a programmable heterogeneous chip used to implement a target IoT application, such as a CPU unit, a GPU unit, an FPGA unit, etc. The target code refers to a code that can be used for an adaptation application task in a preset heterogeneous chip unit.

[0072] The embodiment of the present application can allocate each application task to different heterogeneous chip units according to the task resource requirement data of the application task to obtain task scheduling data. Further, according to the task scheduling data, the code framework of the application task is filled to obtain the target code.

[0073] In detail, the code generation for the application task based on the preset heterogeneous chip unit and the task resource requirement data to obtain the target code includes: Based on the task resource requirement data and the application task, the preset heterogeneous chip unit is assigned tasks to obtain task scheduling data; Based on the application task, a preset code framework template library is screened to obtain a task code framework; Based on the task scheduling data, the task code framework is filled with code to obtain the target code.

[0074] It is understandable that the task scheduling data refers to the heterogeneous chip units to which the application tasks are assigned and the execution order of the application tasks. The preset code framework template library refers to a predefined code template database containing multiple task types. The task code framework refers to a code framework adapted to the application task selected from the preset code framework template library.

[0075] The embodiment of the present application can generate a solution for allocating application tasks to appropriate heterogeneous chip units, i.e., task scheduling data, based on the task resource requirement data of each application task and the performance characteristics of the heterogeneous chip units, using an optimization algorithm based on integer linear programming. Secondly, based on the type of application task, a template matching algorithm is used to screen out a task code framework from a pre-built code framework template library. Finally, based on the application task allocation route in the task scheduling data, the functions that need to be implemented by each module in the task code framework are determined, and a code generation tool is used to generate specific code for the function to obtain the target code.

[0076] The embodiment of the present application performs task allocation according to task resource requirement data and application tasks, which can ensure that each application task is allocated to the computing unit of the heterogeneous chip that best suits its resource requirements, thereby improving the execution efficiency of the application tasks. Secondly, by screening the code framework according to the application tasks, the code template adapted to the application tasks can be quickly found, reducing the workload of code development. Finally, by filling in the code according to the task scheduling data, the target code for the heterogeneous chip can be generated.

[0077] S8. Determine a target heterogeneous chip design solution based on the preset heterogeneous chip unit and the target code.

[0078] It is understandable that the target heterogeneous chip design solution refers to a code solution that can reasonably implement application tasks on a preset heterogeneous chip unit.

[0079] After obtaining the target code, the embodiment of the present application can perform code verification on the target code to ensure that the target code can run stably on the heterogeneous chip. If there are problems with the target code during the code verification stage, the target code can be optimized to ensure that the optimized target code can run stably on the heterogeneous chip. Finally, based on the target code that has passed the above code verification or the optimized target code, a target heterogeneous chip design solution can be generated.

[0080] In detail, the determining of a target heterogeneous chip design scheme based on the preset heterogeneous chip unit and the target code includes: Performing logic verification on the target code to obtain logic verification failure data or logic verification success data; Based on the logic verification failure data, code correction is performed on the target code to obtain a corrected code; Based on the preset heterogeneous chip unit and the correction code, generating a target heterogeneous chip design solution; A target heterogeneous chip design solution is generated based on the logic verification success data, the preset heterogeneous chip unit and the target code.

[0081] It is understandable that logic verification failure data indicates that the target code is found to have a logic error or an unexpected part during the logic verification process. For example, during the logic verification process, it is found that the execution order or data transmission path of the application task corresponding to the target code is not in line with expectations. Logic verification success data indicates that the target code is found to have a normal or expected code logic during the logic verification process.

[0082] The embodiments of the present application can implement logic verification of the target code by simulating the target code, and generate logic verification failure data or logic verification success data based on the simulation results of the target code. For example, when a logic error or an unexpected part is found in the target code during the simulation process, logic verification failure data is generated; when no logic error or an unexpected part is found in the target code during the simulation process, logic verification success data is generated.

[0083] Furthermore, when the simulation result of the target code is logic verification failure data, the heterogeneous chip unit allocation and resource configuration of the application task can be adjusted according to the logic verification failure data, so as to realize the modification and optimization of the target code, thereby generating a correction code, and integrating the hardware configuration file of the above-mentioned heterogeneous chip unit with the correction code to obtain the target heterogeneous chip design solution.

[0084] In addition, when the simulation result of the target code is logic verification success data, the target code can be integrated with the hardware configuration file of the above-mentioned heterogeneous chip unit according to the logic verification success data to obtain the target heterogeneous chip design solution.

[0085] It is important to know that the hardware configuration file contains the configuration parameters of the heterogeneous chip units, such as the logic units and wiring resources of the FPGA unit, the number of stream processors and memory bandwidth of the GPU unit, and the number of cores, frequency, and cache size of the CPU unit.

[0086] The embodiment of the present application can avoid code logic errors by performing logic verification on the target code and can ensure that each application task runs efficiently on the most suitable heterogeneous chip unit.

[0087] The present invention obtains the development document and initial code of the target Internet of Things application, and performs semantic analysis on the development document to obtain the application task. Furthermore, by performing grammatical analysis on the development document, a task semantic framework of the application task is constructed. Secondly, based on the task semantic framework and the initial code, code matching is performed on the application task to obtain a task code mapping relationship, and a task directed graph is constructed according to the task code mapping relationship and the initial code, thereby improving the accuracy and efficiency of code generation. Then, the resource requirements of the application task are evaluated to obtain task resource requirement data, so that the resource requirements of the Internet of Things application can be clearly defined during chip design, thereby improving the efficiency and rationality of resource utilization in the heterogeneous chip design process. Finally, the target code is generated based on the preset heterogeneous chip unit and the task resource requirement data, and the target heterogeneous chip design scheme is determined according to the target code, thereby reducing the number of chip designs and improving the efficiency of heterogeneous chip design.

[0088] like Figure 2 , which is a functional module diagram of a heterogeneous chip design system based on the Internet of Things provided by an embodiment of the present invention.

[0089] The heterogeneous chip design system 100 based on the Internet of Things of the present invention can be installed in an electronic device. According to the functions implemented, the heterogeneous chip design system 100 based on the Internet of Things can include a data acquisition module 101, a task model construction module 102, a resource demand assessment module 103 and a design solution generation module 104. The module of the present invention can also be called a unit, which refers to a series of computer program segments that can be executed by an electronic device processor and can complete fixed functions, which are stored in the memory of the electronic device.

[0090] The data acquisition module 101 is used to acquire the development documents and initial codes of the target IoT application, perform semantic analysis on the development documents, and obtain application tasks; The task model construction module 102 is used to perform syntax analysis on the development document based on the application task to obtain a task semantic framework, perform code matching on the application task based on the initial code and the task semantic framework to obtain a task code mapping relationship, and construct a task directed graph of the application task based on the task code mapping relationship and the initial code; The resource requirement evaluation module 103 is used to evaluate the resource requirement of the application task based on the initial code and the task directed graph to obtain task resource requirement data; The design solution generation module 104 is used to generate code for the application task based on the preset heterogeneous chip unit and the task resource requirement data to obtain the target code, and determine the target heterogeneous chip design solution based on the preset heterogeneous chip unit and the target code.

[0091] In detail, each module in the heterogeneous chip design system 100 based on the Internet of Things in the embodiment of the present invention is used in the same manner as described above. Figure 1 The same technical means are used as the heterogeneous chip design method based on the Internet of Things described in the text, and can produce the same technical effects, so I will not go into details here.

[0092] like Figure 3 , which is a schematic diagram of the structure of an electronic device for implementing a heterogeneous chip design method based on the Internet of Things provided by an embodiment of the present invention.

[0093] The electronic device 1 may include a processor 10, a memory 11 and a bus 12, and may also include a computer program stored in the memory 11 and executable on the processor 10, such as a heterogeneous chip design method program based on the Internet of Things.

[0094] The memory 11 includes at least one type of readable storage medium, and the readable storage medium includes a flash memory, a mobile hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a magnetic memory, a disk, an optical disk, etc. In some embodiments, the memory 11 may be an internal storage unit of the electronic device 1, such as a mobile hard disk of the electronic device 1. In other embodiments, the memory 11 may also be an external storage device of the electronic device 1, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device 1. Further, the memory 11 also includes an internal storage unit of the electronic device 1 and an external storage device. The memory 11 can not only be used to store application software and various types of data installed in the electronic device 1, such as the code of the heterogeneous chip design method program based on the Internet of Things, but also can be used to temporarily store data that has been output or is to be output.

[0095] The processor 10 may be composed of an integrated circuit in some embodiments, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and combinations of various control chips, etc. The processor 10 is the control core (Control Unit) of the electronic device, and uses various interfaces and lines to connect various components of the entire electronic device, and executes or executes programs or modules (such as heterogeneous chip design method programs based on the Internet of Things, etc.) stored in the memory 11, and calls data stored in the memory 11 to execute various functions of the electronic device 1 and process data.

[0096] The bus 12 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus 12 may be divided into an address bus, a data bus, a control bus, etc. The bus 12 is configured to realize connection and communication between the memory 11 and at least one processor 10, etc.

[0097] Figure 3 Only an electronic device with components is shown, and those skilled in the art will understand that Figure 3The structure shown does not constitute a limitation on the electronic device 1, and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.

[0098] For example, although not shown, the electronic device 1 may also include a power source (such as a battery) for supplying power to various components. Preferably, the power source may be logically connected to the at least one processor 10 through a power management system, so that the power management system can realize functions such as charging management, discharging management, and power consumption management. The power source may also include any components such as one or more DC or AC power sources, recharging systems, power failure detection circuits, power converters or inverters, and power status indicators. The electronic device 1 may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.

[0099] Furthermore, the electronic device 1 may also include a network interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between the electronic device 1 and other electronic devices.

[0100] Optionally, the electronic device 1 may further include a user interface, which may be a display, an input unit (such as a keyboard), or a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode) touch device. The display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device 1 and to display a visual user interface.

[0101] The program of the heterogeneous chip design method based on the Internet of Things stored in the memory 11 in the electronic device 1 is a combination of multiple instructions. When running in the processor 10, it can achieve: Obtain the development documents and initial code of the target IoT application; Performing semantic analysis on the development document to obtain application tasks; Based on the application task, the development document is parsed to obtain a task semantic framework; Based on the initial code and the task semantic framework, code matching is performed on the application task to obtain a task code mapping relationship; Based on the task code mapping relationship and the initial code, construct a task directed graph of the application task; Based on the initial code and the task directed graph, performing resource requirement evaluation on the application task to obtain task resource requirement data; Based on the preset heterogeneous chip units and the task resource requirement data, code generation is performed on the application task to obtain a target code; Based on the preset heterogeneous chip unit and the target code, a target heterogeneous chip design scheme is determined.

[0102] Specifically, the specific implementation method of the processor 10 for the above instructions can refer to Figures 1 to 3 The description of the relevant steps in the corresponding embodiments will not be repeated here.

[0103] Furthermore, if the module / unit integrated in the electronic device 1 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. The computer-readable storage medium can be volatile or non-volatile. For example, the computer-readable medium can include: any entity or system that can carry the computer program code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, and a read-only memory (ROM).

[0104] The present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor of an electronic device, the computer program can implement: Obtain the development documents and initial code of the target IoT application; Performing semantic analysis on the development document to obtain application tasks; Based on the application task, the development document is parsed to obtain a task semantic framework; Based on the initial code and the task semantic framework, code matching is performed on the application task to obtain a task code mapping relationship; Based on the task code mapping relationship and the initial code, construct a task directed graph of the application task; Based on the initial code and the task directed graph, performing resource requirement evaluation on the application task to obtain task resource requirement data; Based on the preset heterogeneous chip units and the task resource requirement data, code generation is performed on the application task to obtain a target code; Based on the preset heterogeneous chip unit and the target code, a target heterogeneous chip design scheme is determined.

[0105] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, systems and methods can be implemented in other ways. For example, the system embodiments described above are only illustrative, and actual implementation may have other division methods.

[0106] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0107] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional modules.

[0108] It is obvious to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.

[0109] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.

Claims

1. A heterogeneous chip design method based on the Internet of Things, characterized in that: The method comprises: Obtain the development documents and initial code of the target IoT application; Performing semantic analysis on the development document to obtain application tasks; Based on the application task, the development document is parsed to obtain a task semantic framework; Based on the initial code and the task semantic framework, code matching is performed on the application task to obtain a task code mapping relationship; Based on the task code mapping relationship and the initial code, construct a task directed graph of the application task; Performing storage resource demand evaluation on the application task to obtain storage resource demand data; Based on the initial code, evaluating computing resource requirements of the application task to obtain computing resource requirement data; Based on the task directed graph, evaluating the communication resource demand of the application task to obtain communication resource demand data; Based on the preset heterogeneous chip unit, the storage resource requirement data, the computing resource requirement data and the communication resource requirement data, code generation is performed on the application task to obtain a target code; Based on the preset heterogeneous chip unit and the target code, a target heterogeneous chip design scheme is determined.

2. The heterogeneous chip design method based on the Internet of Things according to claim 1, characterized in that: The step of parsing the development document based on the application task to obtain a task semantic framework includes: Based on the application task, the development document is segmented to obtain task document phrases; Extracting keywords from the task document phrases to obtain task keywords; Performing grammatical analysis on the task keywords to obtain grammatical relations of the keywords; Based on the keyword grammatical relationship, a task semantic framework is constructed.

3. The heterogeneous chip design method based on the Internet of Things according to claim 1, characterized in that: The code matching of the application task based on the initial code and the task semantic framework to obtain a task code mapping relationship includes: Traversing the initial code to obtain code elements; Performing semantic analysis on the task semantic framework to obtain task elements; The code element is mapped to the task element to obtain a task-code mapping relationship.

4. The method for designing heterogeneous chips based on the Internet of Things according to claim 3, characterized in that: The step of constructing a task directed graph of the application task based on the task code mapping relationship and the initial code includes: Based on the initial code, identifying the association relationship of the code elements to obtain the element association relationship; Determine a task association relationship based on the task code mapping relationship and the element association relationship; Based on the task association relationship, a directed graph is drawn for the application tasks to obtain a task directed graph.

5. The method for designing heterogeneous chips based on the Internet of Things according to claim 1, characterized in that: The performing storage resource requirement evaluation on the application task to obtain storage resource requirement data includes: Performing attribute analysis on the application task to obtain task attributes; Based on the task attributes, storage resource requirement data of the application task is determined.

6. The heterogeneous chip design method based on the Internet of Things according to claim 1, characterized in that: The step of evaluating computing resource requirements of the application task based on the initial code to obtain computing resource requirement data includes: Based on a preset resource requirement code, code matching is performed on the initial code to obtain a target resource requirement code; Performing static code analysis on the target resource requirement code to obtain file resources and computing resources; The file resources and the computing resources are merged to obtain computing resource demand data.

7. The method for designing heterogeneous chips based on the Internet of Things according to claim 1, characterized in that: The step of generating code for the application task based on the preset heterogeneous chip unit, the storage resource requirement data, the computing resource requirement data, and the communication resource requirement data to obtain a target code includes: Based on the storage resource requirement data, computing resource requirement data, communication resource requirement data and application tasks, the preset heterogeneous chip units are assigned tasks to obtain task scheduling data; Based on the application task, a preset code framework template library is screened to obtain a task code framework; Based on the task scheduling data, the task code framework is filled with code to obtain the target code.

8. The heterogeneous chip design method based on the Internet of Things according to claim 1, characterized in that: The determining a target heterogeneous chip design scheme based on the preset heterogeneous chip unit and the target code includes: Performing logic verification on the target code to obtain logic verification failure data or logic verification success data; Based on the logic verification failure data, code correction is performed on the target code to obtain a corrected code; Based on the preset heterogeneous chip unit and the correction code, generating a target heterogeneous chip design solution; A target heterogeneous chip design solution is generated based on the logic verification success data, the preset heterogeneous chip unit and the target code.

9. The heterogeneous chip design method based on the Internet of Things according to claim 1, characterized in that: The semantic parsing of the development document to obtain the application task includes: Extracting functions from the development document to obtain application function text; Based on the application function text, the development document is split to obtain an application text module; Performing task definition on the application text module to obtain application tasks.

10. A heterogeneous chip design system based on the Internet of Things, characterized in that: The system comprises: A data acquisition module is used to acquire the development documents and initial codes of the target IoT application, perform semantic analysis on the development documents, and obtain application tasks; A task model construction module is used to perform syntax analysis on the development document based on the application task to obtain a task semantic framework, perform code matching on the application task based on the initial code and the task semantic framework to obtain a task code mapping relationship, and construct a task directed graph of the application task based on the task code mapping relationship and the initial code; A resource requirement evaluation module, configured to perform a storage resource requirement evaluation on the application task to obtain storage resource requirement data, perform a computing resource requirement evaluation on the application task based on the initial code to obtain computing resource requirement data, and perform a communication resource requirement evaluation on the application task based on the task directed graph to obtain communication resource requirement data; The design scheme generation module is used to generate code for the application task based on the preset heterogeneous chip unit, the storage resource requirement data, the computing resource requirement data and the communication resource requirement data to obtain the target code, and determine the target heterogeneous chip design scheme based on the preset heterogeneous chip unit and the target code.

Citation Information

Cited By

  • Server scheduling method and device, storage medium and program product

    CN120066800A

  • Chip document automatic generation system

    CN121031542A