Font Size: a A A

Design And Implementation Of A Driver Software Generator For Arbitrary Waveform Generators

Posted on:2024-02-19Degree:MasterType:Thesis
Country:ChinaCandidate:Y L LiFull Text:PDF
GTID:2558307079469744Subject:Electronic information
Abstract/Summary:
As the world of modern testing evolves,the capabilities of arbitrary waveform generators(AWG)have grown more sophisticated.As the control program of AWG,the driver’s complexity and development difficulty also increase accordingly.Due to the close connection between the driver and the hardware,driver development need to develop adapted drivers for different hardware solutions,which leads to problems such as low development efficiency,low code reuse rate,and inconsistent structure of the driver.In view of the above problems,this thesis proposes the design of a driver software generator for arbitrary waveform generators.The design converts the driver development work from code writing to parameter configuration in the human-machine interface(HMI),and generates a complete driver program according to the configured parameters.This program code has a unified structure,and can also be combined with the driver framework technology to achieve efficient use of reusable code,so that driver developers can focus on the processing of core logic.The main research contents are as follows:1.Model design of driver program.The driver model is the basis of the driver software generator.By modeling the driver,the program code is converted into the model parameter configuration,and the human-computer interaction interface is further designed to realize the configuration visualization of the model parameters.Aiming at the problems of low code utilization rate and inconsistent structure,this thesis adopts the driver framework as the basis of the driver program.Model the capabilities and devices in the driver framework,abstract the model of the driver developed,and use it to describe the key code of the driver.2.Design of the code generation module.The code generation module uses the model data to generate specific program codes.In this thesis,the processing of the driver model data is mainly implemented through templates.The model data of the driver is mainly implemented through the template,the parameters of the model are processed and filled into the corresponding template to get the corresponding driver code.In addition to the corresponding template of the model,the structure of the driver is also completed to control the driver and provide project In addition to the corresponding templates for the model,the design of the auxiliary templates for controlling the structure of the driver and providing project compilation is also completed.3.The design of transpiler.When modeling the driver program,it is found that the core logic that is strongly related to the specific project is difficult to describe with parameters.For this,the logic is described in Python language and converted into driver code through a transpiler.The transpiler designed in this thesis is implemented based on syntax analysis.When the transpiler converts the code of the core logic,the Python code is first parsed into an abstract syntax tree,and then the tree is traversed.During the traversal process,the differences in the grammatical structure,type system,and language features of the two programming languages are processed and handled,and finally convert the abstract syntax tree into the Vala code used by the driver corresponding to the core logic.The unit test of the code generation module of the driver software generator verifies the correct functionality of the software.Finally,the software was used to develop drivers for several different models of arbitrary waveform generators.The final driver development using the software was carried out for several different models of arbitrary waveform generators,and the functionality of the driver generated by the software was verified by functional testing.
Keywords/Search Tags:Arbitrary Waveform Generator, Driver, Code Generation, Template Technique, Abstract Syntax Tree
Related items