Method for automatically generating driver codes according to chip manual

A chip manual and automatic generation technology, applied in the fields of electrical digital data processing, program control design, instruments, etc., can solve the problems such as the inability of the new IC to be put into mass production quickly, the driver code is not adapted to the new IC, and prone to clerical errors, etc., to achieve high efficiency. And easy to maintain, neat and beautiful code, time-saving effect

Inactive Publication Date: 2017-12-22
珠海亿智电子科技有限公司
View PDF5 Cites 8 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Since the code is purely written manually, the efficiency is low, and when the IC has many modules, it usually consumes a lot of manpower
And it is easy to make clerical errors, such as writing wrong register field offsets, which will take more time for subsequent debugging
When the IC is revised, due to the information asymmetry between software and hardware personnel, it is easy for the driver code to fail to adapt to the new IC, resulting in the failure of the new IC to be put into mass production quickly.

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method for automatically generating driver codes according to chip manual
  • Method for automatically generating driver codes according to chip manual
  • Method for automatically generating driver codes according to chip manual

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0022] Embodiments of the present invention are as image 3 As shown, it is divided into two steps. Firstly, the SPEC content analysis is performed to generate a TDB file, and then the TDB file is parsed to generate a CSP code.

[0023] 301, inputting a SPEC document in Word2003 format;

[0024] 302. Perform analysis using a SPEC analysis tool, extract register table information in the SPEC file, and generate a table database file;

[0025] 303. Use a code generation tool to parse the form database file, extract information such as the name, address, and default value of each register, and output it to the CSP header file after sorting out; extract information such as the offset address, name, and usage description of each field of the register, and pass After sorting, output to the C file of CSP.

[0026] According to an embodiment of the present invention, the specific steps of step 302 (SPEC analysis process) are as follows Figure 4 shown.

[0027] 401, open the SPEC d...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention relates to the field of embedded software and provides an algorithm for automatically generating device driver program C language codes according to a chip specification (SPEC) of an IC. In an embedded system, a device driver is a bridge between software and hardware. In a conventional device driver development mode, development personnel manually write header files and C files of registers by reference to a register table in the SPEC, so that coding and debugging are both relatively time-consuming. According to the algorithm, firstly an SPEC file in a Word2003 format is analyzed; tables for storing register address information, and tables of register description information are obtained; and all the obtained table information is stored in a table database file (a TDB file) according to a certain format. Then code generation is performed; all the table information of the TDB file is extracted in sequence; and a header file and a C file of the device driver are generated. Therefore, the coding efficiency of the driver is greatly improved; the debugging time of the driver is shortened; and errors of the SPEC can be automatically detected.

Description

technical field [0001] The invention relates to the technical field of embedded software, in particular to the development efficiency of device drivers for integrated circuit chips. Background technique [0002] Embedded systems have been more and more widely used in various fields of today's society. As the heart of embedded systems, integrated circuit chips (Integrated Circuit, IC) are the core hardware units of the system. A complete embedded system is composed of software and hardware. The hardware mainly includes IC and peripheral circuit boards. The software includes the driver, operating system, and application program of each hardware module of the IC. In the process of product development, IC design companies need to provide not only IC chips, but also software development kits (Software Development Kit, SDK). The SDK mainly includes modules such as drivers, operating systems, and applications. figure 1 It is a typical embedded system, 104 is the hardware part, ma...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): G06F9/45
CPCG06F8/443
Inventor 刘刚
Owner 珠海亿智电子科技有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products