Device Driver Generation Tool Using Template Archives
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current methods for synthesizing device driver code require extensive recoding and recompilation for changes in frameworks or new frameworks, and are cumbersome due to the need for manual modification of code, including fprintf() calls, which leads to inefficiencies and time-consuming processes.
Innovation Solution
A processor-implemented method and system using a device driver generation tool that employs a database with template archives, configuration files, template files, predefined rules, and specifications to generate device drivers, allowing for extraction and processing of template code based on labels and specifications, enabling efficient generation and modification of device drivers specific to hardware devices and operating systems.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Extent of automation
If device driver code is synthesized using fprintf() calls in the tool, then the code generation is automated, but any change in framework or addition of new framework requires recoding the tool and recompiling it
Solution Approach 1:
The patent segments the device driver code into template files that can be independently modified. Instead of having all code generated through fprintf() calls in a monolithic tool, the code is divided into reusable template segments that can be updated without recoding the entire tool. This allows framework changes to be accommodated by modifying individual template files rather than recoding the generation tool itself.
Solution Approach 2:
The patent applies preliminary action by pre-defining template files with common code patterns and structures before the actual code generation process. These templates are prepared in advance and stored in a database, allowing the tool to simply instantiate and customize them rather than generating code from scratch through fprintf() calls. This preliminary preparation enables faster adaptation to framework changes.
2Extent of automation
If device driver code is synthesized using fprintf() calls in the tool, then code generation is performed entirely within the tool, but bugs in the synthesized code require changing the tool and recompiling it
Solution Approach 1:
The patent extracts the code templates from the tool itself and stores them in external template files in a database. This separation allows bugs or issues in the generated code to be fixed by modifying the external template files rather than changing the tool's internal code. The tool simply reads and processes these templates, so maintenance becomes easier and doesn't require recompiling the tool.
Solution Approach 2:
The patent uses template files as reusable copies of common code patterns. Instead of generating code through fprintf() calls that embed logic within the tool, the actual code patterns are copied from external template files. This allows the templates to be independently maintained, versioned, and updated without affecting the tool itself, improving ease of manufacture and maintenance.
3Adaptability or versatility
If all device driver code is synthesized using fprintf() calls, then the tool can generate code for different devices, but any modification including missing semi colons requires changing the tool and recompiling it
Solution Approach 1:
The patent applies preliminary action by pre-defining code templates with proper syntax and structure before generation. Common code patterns, including correct syntax elements like semi-colons, are pre-established in the template files. This preliminary preparation eliminates the need for manual recoding and recompiling when generating code for different devices, as the templates are already properly formatted and ready for instantiation.
Solution Approach 2:
The patent uses template copying to generate device-specific code from standardized templates. Instead of using fprintf() calls to construct code strings that require manual verification and modification, the system copies proven, syntax-correct code patterns from templates. This copying approach ensures consistency and correctness while reducing the time loss associated with recoding and recompiling for each device variation.
Data Source
AI summary
A system for generating a device driver based on an archived template code using a device driver generation tool is provided. The device driver generation tool is configured to extract configuration files and template files from a template archive stored in a database, each of the files comprises high level configuration files and low level configuration files, each comprising one or more labels, parse a high-level configuration file, corresponding to a class of a device, and an operating system for which the driver is being generated, process a label from the high-level configuration file, extract template code from the template files to obtain an extracted template code, and generate a portion of the driver based on the extracted template code when a block label is identified, parse a low-level configuration file, and generate the driver using a first specification and a second specification when the label is a file label.


