CN114327452B - Method for automatically generating IP core GUI based on XML - Google Patents

Method for automatically generating IP core GUI based on XML Download PDF

Info

Publication number
CN114327452B
CN114327452B CN202111528719.9A CN202111528719A CN114327452B CN 114327452 B CN114327452 B CN 114327452B CN 202111528719 A CN202111528719 A CN 202111528719A CN 114327452 B CN114327452 B CN 114327452B
Authority
CN
China
Prior art keywords
control
gui
node
core
xml
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111528719.9A
Other languages
Chinese (zh)
Other versions
CN114327452A (en
Inventor
李彬
白利达
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shandong Xinhui Microelectronics Technology Co ltd
Original Assignee
Shandong Xinhui Microelectronics Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shandong Xinhui Microelectronics Technology Co ltd filed Critical Shandong Xinhui Microelectronics Technology Co ltd
Priority to CN202111528719.9A priority Critical patent/CN114327452B/en
Publication of CN114327452A publication Critical patent/CN114327452A/en
Application granted granted Critical
Publication of CN114327452B publication Critical patent/CN114327452B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • User Interface Of Digital Computer (AREA)

Abstract

The invention relates to a method for automatically generating an IP core GUI based on XML, belonging to the technical field of electronic design automation. The method performs the steps of: 1) Reading an XML file; 2) Checking the read XML file format; 3) Generating controls required by GUI depiction; 4) Calculating and obtaining the layout of each control on the GUI; 5) Creating and displaying corresponding controls; 6) The GUI display of the IP core is complete. The invention adopts XML file to describe the attribute of IP core, automatically analyzes the attribute of the control and the quantity thereof required by drawing GUI by reading the XML file, calculates the layout of the control on the interface according to the attribute of the control and the quantity thereof, and finally generates the visualized user graphic interface. The problem that each IP core GUI needs to be independently developed is solved, and the development workload of GUI developers is reduced. XML only needs to describe the information of the IP core, does not need the information of the GUI, and can customize the GUI of the IP core for chip designers unfamiliar with the GUI.

Description

Method for automatically generating IP core GUI based on XML
Technical Field
The invention relates to a method for automatically generating an IP core GUI based on XML, belonging to the technical field of electronic design automation.
Background
IP Core (Intellectual Property Core, intellectual property Core, IP Core for short) refers to a logic function block or data block that can be used to generate an Application Specific Integrated Circuit (ASIC) or programmable logic device (FPGA), is a macro block with specific functions that has been repeatedly verified, is independent of the chip manufacturing process, and can be transplanted into different semiconductor processes. The IP core is functionally divided into a basic module, a communication network module, a digital signal processing module, a digital budget capability module, a memory module, a controller and peripheral module, a protocol processing module, a standard bus module and the like.
With the development of FPGA technology, the performance of the chip is stronger, the scale is larger, and the development period is longer, so that the chip design is facing a series of new problems: the design quality is difficult to control, the design cost is also higher and higher, some functional modules (such as an FIR filter, an SDRAM controller and a PCI interface) which are commonly used in digital circuits and are complex are designed into IP cores with modifiable parameters, and chip designers can directly call the designed and verified IP cores. The IP core is called to avoid repeated work, so that the burden of a designer is greatly reduced, and the working efficiency is improved, therefore, the use of the IP core is a development trend, and the reuse of the IP core greatly shortens the time of product marketing.
A graphical user interface (GRAPHICAL USER INTERFACE, abbreviated GUI, also called graphical user interface) refers to a computer-operated user interface that is displayed in a graphical manner. The various elements that make up the graphical user interface are referred to as controls. A friendly, easy-to-use Graphical User Interface (GUI) plays a very important role when the chip designer views and configures the IP core parameters.
Because the types of the IP cores are various, the attribute and the parameter of each IP core are different, and the corresponding interfaces of each IP core are different. Some EDA manufacturers currently develop and design GUIs for each IP core in a fully encoded manner, and each interface requires a large amount of code to implement, which undoubtedly increases the burden on programmers. In addition, if the interface needs to be modified, the code needs to be modified again, and the compiled code is reissued, so that maintenance is not facilitated. Some vendors use tool command language (Tool Command Language, TCL) to implement interactions with the GUI, and dynamically configure the interface by modifying the TCL control file. This approach has some effect on existing IP cores and when the control layout on the GUI is unchanged. However, if a new IP core appears or the GUI display needs to be changed according to the user's needs, then the programmer is required to re-develop and is required to be familiar with both the TCL language and the language in which the GUI is developed.
Disclosure of Invention
The invention aims to solve the technical problems that: a method for automatically generating an IP checkup graphical user interface is provided, which is suitable for any designer with zero base on GUI.
In order to solve the technical problems, the technical scheme provided by the invention is as follows: a method for automatically generating an IP core GUI based on XML, which comprises the following steps,
1) Reading an XML file; reading an XML file which depicts IP core information and is selected by a user into a system;
2) Checking the read XML file format, and confirming whether the read XML file format accords with the XML file format and whether the information of the IP core is marked with attributes or parameters;
3) Analyzing the information of the checked XML file to generate a control required by GUI drawing;
4) The layout of each control on the GUI is calculated and obtained, wherein the layout comprises a display reference value h, a GUI display area, a length of each control, a height ch and a width cw of each control and a total area size of the control;
5) Creating and displaying corresponding controls according to the data calculated in the step 4);
6) And finishing display of all the controls, namely finishing display of the GUI of the IP core.
The scheme is further improved that the rule of generating each control in the step 3) is as follows:
① The name of each node except the value node generates a Label control;
② When the node type=property, if the node has a modification= "true" description, generating a Textbox control, otherwise, generating a Label control;
③ When the node type=param, if a child node exists and when a multi= "true" description exists, the child node generates a corresponding Checkbox control;
④ Node type=param, if there is a child node that does not have a multi= "true" description,
When the number of the child nodes is more than or equal to 3, generating a Combo box control;
When the number of the child nodes is smaller than 3, the child nodes generate corresponding Radio button controls;
⑤ When the node type=param, if the node has min and max values, a Spin box control is generated;
⑥ When the node level is larger than 3 except the value node, corresponding Group box controls are generated, the number of the generated Group box controls is equal to the number of node layers minus 2, and meanwhile, the corresponding Label controls generated in ① are deleted;
⑦ If the node has the description information, a Label control is correspondingly generated;
⑧ And recording the sequence of the correspondingly generated controls according to the node sequence.
The further improvement of the scheme is as follows: and if the total control area is larger than the GUI display area, adding a Tab control.
The beneficial effects of the invention are as follows: the method adopts an XML file to describe the attribute of the IP core, automatically analyzes the attribute of the control and the quantity thereof required for drawing the GUI by reading the XML file, calculates the layout of the control on the interface according to the attribute of the control and the quantity thereof, and finally generates a visualized user graphical interface. The problem that each IP core GUI needs to be independently developed is solved, the development workload of GUI developers is reduced, and the GUI can be developed even once. XML only needs to describe the information of the IP core, does not need the information of the GUI, and can customize the GUI of the IP core of a chip designer who is not familiar with the GUI, for example, only displays a certain concerned attribute or parameter on the GUI, thereby bringing convenience to development work.
Drawings
Fig. 1 is a flowchart of a method for automatically generating an IP core GUI based on XML according to an embodiment of the present invention.
Fig. 2 is an exemplary diagram of an XML format of an embodiment of the present invention.
Fig. 3 is an XML file analysis flowchart of a method for automatically generating an IP core GUI based on XML according to an embodiment of the present invention.
Fig. 4 is a flowchart of a computation space layout of a method for automatically generating an IP core GUI based on XML according to an embodiment of the present invention.
Fig. 5 is a GUI effect diagram generated by taking the XML format example diagram of fig. 2 as an example in a method for automatically generating an IP core GUI based on XML according to an embodiment of the present invention.
Detailed Description
Example 1
The method for automatically generating the IP core GUI based on XML according to the embodiment, as shown in fig. 1, performs the following steps:
1) Reading an XML file; reading an XML file which depicts IP core information and is selected by a user into a system;
2) Checking the read XML file format, and confirming whether the read XML file format accords with the XML file format and whether the information of the IP core is marked with attributes or parameters;
3) Analyzing the information of the checked XML file to generate a control required by GUI drawing;
the generation flow is shown in fig. 3, the rule for generating each control is as follows,
① The name of each node except the value node generates a Label control;
② When the node type=property, if the node has a modification= "true" description, generating a Textbox control, otherwise, generating a Label control;
③ When the node type=param, if a child node exists and when a multi= "true" description exists, the child node generates a corresponding Checkbox control;
④ Node type=param, if there is a child node that does not have a multi= "true" description,
When the number of the child nodes is more than or equal to 3, generating a Combo box control;
When the number of the child nodes is smaller than 3, the child nodes generate corresponding Radio button controls;
⑤ When the node type=param, if the node has min and max values, a Spin box control is generated;
⑥ When the node level is larger than 3 except the value node, corresponding Group box controls are generated, the number of the generated Group box controls is equal to the number of node layers minus 2, and meanwhile, the corresponding Label controls generated in ① are deleted;
⑦ If the node has the description information, a Label control is correspondingly generated;
⑧ Recording the sequence of the correspondingly generated controls according to the node sequence;
4) The layout of each control on the GUI is calculated and obtained, wherein the layout comprises a display reference value h, a GUI display area, a length of each control, a height ch and a width cw of each control and a total area size of the control; the flow of which is shown in figure 4,
① A reference value h for display is set, and GUI display area Size (GH, GW) is set.
② Calculating the length of the display content of each control;
③ Setting the control height as ch=h, setting the control width cw=h×length, and if the control width cw is larger than the GUI area width GW, resetting the control height as ch=h (cw/gw+1), and setting the control width w=h×length/ch;
④ Calculating the total area size required for drawing the controls = area addition of each control;
⑤ The total area Size of the controls is larger than the GUI display area Size, tab controls are added, and the number of Tab controls is increased=size/size+1;
⑥ Setting coordinates of the controls in sequence from top to bottom according to the control sequence;
⑦ The ordinate of the control generated by each node in the XML is the same, that is, a plurality of controls generated by the same node are transversely arranged in parallel;
5) Creating and displaying corresponding controls according to the data calculated in the step 4);
6) And finishing display of all the controls, namely finishing display of the GUI of the IP core.
The XML depicting the IP core information is first checked for compliance with the format required in process flow 2 using the XML format example of fig. 2 as input.
Analyzing the XML will generate 9 Label controls, generate Textbox controls, generate a Combo box control, generate 3 Spin box controls, generate three Group box controls, and correspondingly delete three corresponding Label controls, for example, generate a Group box control named Base, so that the Label control named Base can not exist any more. And calculating the corresponding control position according to the calculation flow.
Finally, a GUI effect diagram as shown in FIG. 5 is realized, wherein the broken line part automatically generates a picture according to XML, and because the framework for developing the GUI adopted by the example is QT, the QT has layout controls to adjust the positions of the controls, so that the space layout is more attractive and tidy.
XML (Extensible Markup Language, an extensible markup language) is well known as a set of rules and guidelines, primarily for describing structured data in plain text. XML is a simple, efficient, platform-independent and widely adopted standard. It uses a set of tags to render data elements, each element being either very simple or very complex data, and an unlimited set of XML tags can be defined.
Because the relationship of elements and attributes in XML files is very similar to the hierarchical and nested relationships between the various elements (controls) that make up the graphical interface, using XML to describe a user graphical interface (GUI) is also a very efficient method, but it still requires the user or developer to be familiar with the controls on the GUI.
The method of the embodiment is applicable to any designer unfamiliar with GUI, and can easily customize the GUI of the IP core meeting the own requirements, for example, only one concerned attribute or parameter is displayed on the GUI.
The present invention is not limited to the specific technical solutions described in the above embodiments, and other embodiments may be provided in addition to the above embodiments. Any modifications, equivalent substitutions, improvements, etc. made by those skilled in the art, which are within the spirit and principles of the present invention, are intended to be included within the scope of the present invention.

Claims (2)

1. A method for automatically generating an IP core GUI based on XML, comprising the steps of:
1) Reading an XML file; reading an XML file which depicts IP core information and is selected by a user into a system;
2) Checking the read XML file format, and confirming whether the read XML file format accords with the XML file format and whether the information of the IP core is marked with attributes or parameters;
3) Analyzing the information of the checked XML file to generate a control required by GUI drawing;
4) The layout of each control on the GUI is calculated and obtained, wherein the layout comprises a display reference value h, a GUI display area, a length of each control, a height ch and a width cw of each control and a total area size of the control;
5) Creating and displaying corresponding controls according to the information calculated in the step 4);
6) The display of all the controls is completed, namely the display of the GUI of the IP core is completed;
the rule for generating each control in the step 3) is as follows:
① The name of each node except the value node generates a Label control;
② When the node type=property, if the node has a modification= "true" description, generating a Textbox control, otherwise, generating a Label control;
③ When the node type=param, if a child node exists and when a multi= "true" description exists, the child node generates a corresponding Checkbox control;
④ Node type=param, if there is a child node that does not have a multi= "true" description,
When the number of the child nodes is more than or equal to 3, generating a Combo box control;
When the number of the child nodes is smaller than 3, the child nodes generate corresponding Radio button controls;
⑤ When the node type=param, if the node has min and max values, a Spin box control is generated;
⑥ When the node level is larger than 3 except the value node, corresponding Group box controls are generated, the number of the generated Group box controls is equal to the number of node layers minus 2, and meanwhile, the corresponding Label controls generated in ① are deleted;
⑦ If the node has the description information, a Label control is correspondingly generated;
⑧ And recording the sequence of the correspondingly generated controls according to the node sequence.
2. The method for automatically generating an IP core GUI based on XML according to claim 1, wherein: and if the total control area is larger than the GUI display area, adding a Tab control.
CN202111528719.9A 2021-12-14 2021-12-14 Method for automatically generating IP core GUI based on XML Active CN114327452B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111528719.9A CN114327452B (en) 2021-12-14 2021-12-14 Method for automatically generating IP core GUI based on XML

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111528719.9A CN114327452B (en) 2021-12-14 2021-12-14 Method for automatically generating IP core GUI based on XML

Publications (2)

Publication Number Publication Date
CN114327452A CN114327452A (en) 2022-04-12
CN114327452B true CN114327452B (en) 2024-08-27

Family

ID=81050774

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111528719.9A Active CN114327452B (en) 2021-12-14 2021-12-14 Method for automatically generating IP core GUI based on XML

Country Status (1)

Country Link
CN (1) CN114327452B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117391002B (en) * 2023-10-23 2024-05-17 苏州异格技术有限公司 IP core extension description method and IP core generation method

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102609247A (en) * 2011-01-24 2012-07-25 谷歌公司 International graphic user interface
CN105279730A (en) * 2014-07-25 2016-01-27 英特尔公司 Compression techniques for dynamically-generated graphics resources

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6578174B2 (en) * 2001-06-08 2003-06-10 Cadence Design Systems, Inc. Method and system for chip design using remotely located resources
CN102323880A (en) * 2011-06-30 2012-01-18 中兴通讯股份有限公司 Mobile phone application interface development method and terminal based on browser parsing mode
CN106250158A (en) * 2016-08-01 2016-12-21 广州优视网络科技有限公司 The layout method of a kind of client end interface, device and mobile device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102609247A (en) * 2011-01-24 2012-07-25 谷歌公司 International graphic user interface
CN105279730A (en) * 2014-07-25 2016-01-27 英特尔公司 Compression techniques for dynamically-generated graphics resources

Also Published As

Publication number Publication date
CN114327452A (en) 2022-04-12

Similar Documents

Publication Publication Date Title
US10466980B2 (en) Techniques for generating microcontroller configuration information
US7849449B2 (en) Implementing a design flow for a programmable hardware element that includes a processor
JP4464665B2 (en) High speed chip management system
US7793273B2 (en) Type propagation for automatic casting of output types in a data flow program
US6480995B1 (en) Algorithm and methodology for the polygonalization of sparse circuit schematics
US20080022259A1 (en) Automatic Conversion of a Textual Language into a Graphical Program Representation
CN112711408A (en) Vue componentization-based visualization configuration rendering method, system and terminal
CN114327452B (en) Method for automatically generating IP core GUI based on XML
CN103513976A (en) Service process modeling method and device
CN115495069B (en) Model-driven coal industry software process implementation method, device and equipment
Krahl Extend: An interactive simulation tool
CN115455877B (en) Verification platform generation device, method, medium and electronic equipment
CN110795067A (en) Demand prototype reusable method
CN116301785A (en) Method and device for realizing custom text editor component
Smedley et al. Visual languages for the design and development of structured objects
Browne et al. Graphical programming for simulation of computer systems
CN112667210A (en) Modularization customizing method and device for geographic information system software
CN108227573B (en) Method for realizing motion controller axis information configuration based on OPC-UA
JP2005327192A (en) Hardware design system and method thereof
JP2000020295A (en) Program automatic generating device
CN116894422B (en) Method for drawing chip layout based on python
CN117725767B (en) Automatic generation method, plug-in, system, terminal and medium for parameterized component model
US6983427B2 (en) Generating a logic design
CN118394176B (en) Python-based clock network automatic generation method and device
Miyazaki et al. A CAD process scheduling technique

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant