CN116700688A - Pinmux verification code rapid generation method based on python implementation - Google Patents

Pinmux verification code rapid generation method based on python implementation Download PDF

Info

Publication number
CN116700688A
CN116700688A CN202310659984.3A CN202310659984A CN116700688A CN 116700688 A CN116700688 A CN 116700688A CN 202310659984 A CN202310659984 A CN 202310659984A CN 116700688 A CN116700688 A CN 116700688A
Authority
CN
China
Prior art keywords
python
verification
code
generation method
rapid generation
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.)
Pending
Application number
CN202310659984.3A
Other languages
Chinese (zh)
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.)
Wuxi Moxin Semiconductor Co ltd
Original Assignee
Wuxi Moxin Semiconductor 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 Wuxi Moxin Semiconductor Co ltd filed Critical Wuxi Moxin Semiconductor Co ltd
Priority to CN202310659984.3A priority Critical patent/CN116700688A/en
Publication of CN116700688A publication Critical patent/CN116700688A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The invention provides a python-based rapid generation method of a pinmux verification code, which comprises the following steps: step one: acquiring an IO port multiplexing document, and identifying relevant information about the pinmux; step two: writing a python script, and extracting IO port multiplexing document content; step three: adding useful information into a fixed-format code, and storing the generated code into a file with V as a suffix; step four: compiling the script by using a compiling tool pychar; step five: the generated codes are embedded into projects for compiling and debugging, and coverage rate is collected, the method for quickly generating the pin mux verification codes based on python is easy to realize, the writing difficulty of python scripts is low, and related operation libraries for execl in python are very mature, so that the method is easy to apply to specific projects, can complete a large number of code generation in extremely short compiling time, and is not limited in code quantity.

Description

Pinmux verification code rapid generation method based on python implementation
Technical Field
The invention relates to the technical field of computers, in particular to a method for rapidly generating a pinmux verification code based on python.
Background
For PINMUX (PinMultiplexing) module verification, i.e. pin multiplexing, the number of pins of the CPU is typically limited, and different functions are realized by multiplexing. At present, the complexity of chips is increasing, the corresponding pin is also multiplied, the description about pin multiplexing of most companies is mostly in the form of excel tables, and thousands of input and output signals and some control signals of different modules exist, so that when verifying the module, very complex repetitive work exists.
On the other hand, due to errors introduced by human factors or the non-standardization of the verification process, the occurrence of careless mistakes in the path verification is easy, so that the link verification of the internal path and the peripheral PAD of the chip is invalid, and the risk of abnormal chip functions is increased. And the repeated work brings time-consuming problems, which have a great influence on the whole project verification progress.
Disclosure of Invention
Aiming at the defects existing in the prior art, the invention aims to provide a rapid generation method of a pin mux verification code based on python, so as to solve the problems in the background art.
In order to achieve the above object, the present invention is realized by the following technical scheme: the rapid generation method of the pin mux verification code based on python comprises the following steps: step one: acquiring an IO port multiplexing document, and identifying relevant information about the pinmux; step two: writing a python script, and extracting IO port multiplexing document content; step three: adding useful information into a fixed-format code, and storing the generated code into a file with V as a suffix; step four: compiling the script by using a compiling tool pychar; step five: compiling and debugging the generated code into projects and collecting coverage rate.
Further, the related information about the pinmux includes, but is not limited to, an input signal, an input enable signal, an output enable signal, a multiplexing control register, a PAD name, and the like.
Further, in the second step, python script code is written in the integrated development environment pycharm of python by downloading the development environment pycharm.
Further, the python script extracts key information according to a specific verification scheme and an IO port multiplexing description, and generates a predetermined fixed format code.
Further, the generated fixed format code acts directly on the authentication case.
Further, the related information about the pinmux is extracted through script intelligence and combined for use, and the generated code can be covered in the signal path verification and related function verification testcase of the pinmux.
Further, the signal path verification of the pinmux includes the steps of: configuring a multiplexing control register, outputting path verification, inputting path verification and finishing verification flow.
Further, in the process of configuring the multiplexing control register, the multiplexing control register is weighted and is selected according to the path needing to be verified; in the output path verification, an output enabling signal is turned on to generate random numbers, all 0 s and all 1 s; forcing the value of the slave party to be assigned to an output signal by using uvm _hdl_desired; after waiting for a period of time, obtaining the value of the output signal for PAD; and comparing whether the values of the output signal and the PAD acquisition signal are equal, if so, performing path verification OK, and printing comparison log information.
Further, in the input path verification process, an input enabling signal is turned on to generate random numbers, all 0 s and all 1 s; forcing the value of the backup to be assigned to the PAD by using uvm _hdl_desired; after waiting for a period of time, the value of the input signal in the module is acquired, whether the value of the input signal is equal to the value of the PAD acquisition signal is compared, if so, the path verification is OK, and the log information is compared.
Further, after verification is completed, the generated codes are written into an empty file with the suffix of v.
The invention has the beneficial effects that:
1. the method for quickly generating the pinmux verification code based on the python implementation is easy to implement, the writing difficulty of the python script is low, and the related operation library of execl in the python is very mature, so that the method is easy to apply to specific projects.
2. The rapid generation method of the pin mux verification code based on python is more time-saving, the time for a verification engineer to verify the module by 80% can be saved in an actual project, because the chip functions are more and more complex, the corresponding interaction between internal data and external data is increased, the signal and control to be processed by the pin mux are more and more, the method can complete the generation of thousands of lines of codes in extremely short compiling time, and the code quantity is not limited.
3. The rapid generation method of the pin mux verification code based on python has high safety, a large number of repeated and withered repeated works are known, and the higher error rate is brought, so that the occurrence of the situation can be well avoided by using the method, the pin mux access verification is more reliable, the verification coverage rate is fast, the problem of abnormal access in a chip is further reduced, and the guarantee is provided for the work after the chip flows back; meanwhile, the method has high portability, and the method can be suitable for multi-project use, and can be quickly transplanted to a new project by simply adjusting script codes according to IO port multiplexing description documents provided by design.
Drawings
FIG. 1 is a flow chart of a method for generating a pin mux verification code based on a python implementation of the present invention;
FIG. 2 is a flow chart of a pin mux path verification of the method for fast generation of pin mux verification code based on python implementation of the present invention;
FIG. 3 is application code in a script of the argParse library of the present invention;
FIG. 4 is a detailed interface diagram of FIG. 3;
FIGS. 5, 6, 7 are application code in the script of the openpyl library of the present invention;
FIG. 8 is application code in the script of the datatime library of the present invention.
Detailed Description
The invention is further described in connection with the following detailed description, in order to make the technical means, the creation characteristics, the achievement of the purpose and the effect of the invention easy to understand.
Referring to fig. 1 and 8, the present invention provides a technical solution: the rapid generation method of the pin mux verification code based on python comprises the following steps: step one: acquiring an IO port multiplexing document, and identifying relevant information about the pinmux; step two: writing a python script, and extracting IO port multiplexing document content; step three: adding useful information into a fixed-format code, and storing the generated code into a file with V as a suffix; step four: compiling the script by using a compiling tool pychar; step five: compiling and debugging the generated code into projects and collecting coverage rate.
In the second step, by downloading the python integrated development environment pycharm and writing the python script code in the development environment, the python script extracts key information according to a specific verification scheme and IO port multiplexing description, and generates a predetermined fixed format code, and the generated fixed format code directly acts on the verification case.
In this embodiment, the relevant information about the pin mux intelligently extracts key information through a script, performs combined use, and covers signal path verification and relevant function verification to the pin mux, where the signal path verification of the pin mux includes the following steps: configuring a multiplexing control register, outputting path verification, inputting path verification and finishing verification flow.
In the process of configuring the multiplexing control register, carrying out balance weight on the multiplexing control register and selecting a path according to the verification requirement; in output path verification, an output enabling signal is turned on to generate random numbers, all 0 s and all 1 s; forcing the value of the slave party to be assigned to an output signal by using uvm _hdl_desired; after waiting for a period of time, obtaining the value of the output signal for PAD; and comparing whether the values of the output signal and the PAD acquisition signal are equal, if so, performing path verification OK, and printing comparison log information.
In the embodiment, in the input path verification process, an input enabling signal is turned on to generate a random number, all 0 s and all 1 s; forcing the value of the backup to be assigned to the PAD by using uvm _hdl_desired; after waiting for a period of time, the value of the input signal in the module is acquired, whether the value of the input signal is equal to the value of the PAD acquisition signal is compared, if so, the path verification is OK, and the log information is compared. After verification is completed, the generated codes are written into an empty file with the suffix of v.
The embodiment shows libraries used in a plurality of scripts, and after knowing the libraries, the key information can be flexibly extracted according to a set verification scheme to generate a desired code.
1. The argparse library is a library used to import parameters to the python script, and the application in the method is to identify which file needs to be extracted, as in fig. 3, which is the application in the script, and acts: when compiling the script by the command, the input of the IO port multiplexing description document file name of the information to be extracted is needed, and the detailed interface is shown in figure 4.
2. The openpyxl library is used for reading/writing into execl. The method is used for reading the content in the IO port multiplexing description document. The function of the application in the script is as shown in fig. 5: acquiring the content in execl, designating which worksheet is extracted and the maximum column number; the effect in fig. 6 is: obtaining the maximum number of lines of effective data; the effect in fig. 7 is: and acquiring the content of the designated column, carrying out format modification, converting into a character string type, inserting the content into a code format to be generated, and writing the extracted code into an empty file.
3. The datatime library is used for acquiring information such as current date and time, as shown in fig. 8, which is an application of the method, and functions as follows: and printing code generation time and date on a code naming band in the v file of the generated deposit code.
While the fundamental and principal features of the invention and advantages of the invention have been shown and described, it will be apparent to those skilled in the art that the invention is not limited to the details of the foregoing exemplary embodiments, but may be embodied in other specific forms without departing from the spirit or essential characteristics thereof. The present embodiments are, therefore, to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned.
Furthermore, it should be understood that although the present disclosure describes embodiments, not every embodiment is provided with a separate embodiment, and that this description is provided for clarity only, and that the disclosure is not limited to the embodiments described in detail below, and that the embodiments described in the examples may be combined as appropriate to form other embodiments that will be apparent to those skilled in the art.

Claims (10)

1. The rapid generation method of the pin mux verification code based on python is characterized by comprising the following steps of: step one: acquiring an IO port multiplexing document, and identifying relevant information about the pinmux; step two: writing a python script, and extracting IO port multiplexing document content; step three: adding useful information into a fixed-format code, and storing the generated code into a file with V as a suffix; step four: compiling the script by using a compiling tool pychar; step five: compiling and debugging the generated code into projects and collecting coverage rate.
2. The python-based rapid generation method of pin mux verification code of claim 1, wherein: the related information about the pinmux includes, but is not limited to, an input signal, an input enable signal, an output enable signal, a multiplexing control register, a PAD name, and the like.
3. The python-based rapid generation method of pin mux verification code of claim 1, wherein: in the second step, python script code is written in the development environment by downloading pychar, an integrated development environment pychar of python.
4. A python-based rapid generation method of pin mux verification code as claimed in claim 3, wherein: the python script extracts key information according to a specific verification scheme and IO port multiplexing description, and generates a predetermined fixed format code.
5. The python-based rapid generation method of pin mux verification code of claim 4, wherein: the generated fixed-format code acts directly on the authentication case.
6. The python-based rapid generation method of pin mux authentication code according to claim 2 or 5, wherein: the related information about the pinmux is extracted key information intelligently through scripts and used in combination, and the generated codes can be covered in signal path verification and related function verification testcase of the pinmux.
7. The python-based rapid generation method of pin mux verification code of claim 6, wherein: the signal path verification of the pinmux comprises the following steps: configuring a multiplexing control register, outputting path verification, inputting path verification and finishing verification flow.
8. The python-based rapid generation method of pin mux verification code of claim 7, wherein: in the process of configuring the multiplexing control register, the multiplexing control register is weighted and the path is selected according to the requirement; in the output path verification, an output enabling signal is turned on to generate random numbers, all 0 s and all 1 s; forcing the value of the slave party to be assigned to an output signal by using uvm _hdl_desired; after waiting for a period of time, acquiring a value of PAD corresponding to the output signal; and comparing whether the values of the output signal and the PAD acquisition signal are equal, if so, performing path verification OK, and printing comparison log information.
9. The python-based rapid generation method of pin mux verification code of claim 7, wherein: in the input path verification process, an input enabling signal is turned on to generate random numbers, all 0 s and all 1 s; forcing the value of the backup to be assigned to the PAD by using uvm _hdl_desired; after waiting for a period of time, the value of the input signal in the module is acquired, whether the value of the input signal is equal to the value of the PAD acquisition signal is compared, if so, the path verification is OK, and the log information is compared.
10. The python-based rapid generation method of pin mux verification code of claim 7, wherein: after verification is completed, the generated codes are written into an empty file with the suffix of v.
CN202310659984.3A 2023-06-06 2023-06-06 Pinmux verification code rapid generation method based on python implementation Pending CN116700688A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310659984.3A CN116700688A (en) 2023-06-06 2023-06-06 Pinmux verification code rapid generation method based on python implementation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310659984.3A CN116700688A (en) 2023-06-06 2023-06-06 Pinmux verification code rapid generation method based on python implementation

Publications (1)

Publication Number Publication Date
CN116700688A true CN116700688A (en) 2023-09-05

Family

ID=87833369

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310659984.3A Pending CN116700688A (en) 2023-06-06 2023-06-06 Pinmux verification code rapid generation method based on python implementation

Country Status (1)

Country Link
CN (1) CN116700688A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120005693A1 (en) * 2010-01-08 2012-01-05 Cypress Semiconductor Corporation Development, Programming, and Debugging Environment
CN114327476A (en) * 2021-12-24 2022-04-12 Oppo广东移动通信有限公司 Chip design file generation method and device and chip design method and device
CN114840193A (en) * 2022-05-09 2022-08-02 杭州云合智网技术有限公司 Method for reading electronic form file and automatically generating software source code
CN116151161A (en) * 2023-02-08 2023-05-23 珠海昇生微电子有限责任公司 Automatic generation method of pin multiplexing circuit based on script language

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120005693A1 (en) * 2010-01-08 2012-01-05 Cypress Semiconductor Corporation Development, Programming, and Debugging Environment
CN114327476A (en) * 2021-12-24 2022-04-12 Oppo广东移动通信有限公司 Chip design file generation method and device and chip design method and device
CN114840193A (en) * 2022-05-09 2022-08-02 杭州云合智网技术有限公司 Method for reading electronic form file and automatically generating software source code
CN116151161A (en) * 2023-02-08 2023-05-23 珠海昇生微电子有限责任公司 Automatic generation method of pin multiplexing circuit based on script language

Similar Documents

Publication Publication Date Title
CN106940428B (en) Chip verification method, device and system
CN100442293C (en) Method for combination of original files of hardware design language and checking data files
CN112100949A (en) Automatic development method and device of integrated circuit chip and electronic equipment
CN109933521A (en) Automated testing method, device, computer equipment and storage medium based on BDD
CN112181854B (en) Method, device, equipment and storage medium for generating process automation script
KR20000017333A (en) Semiconductor integrated circuit design and evaluation system
CN102479123A (en) System and method for testing chip operating system (COS)
CN115952758A (en) Chip verification method and device, electronic equipment and storage medium
CN110321292A (en) Chip detecting method, device, electronic equipment and computer readable storage medium
CN114327476A (en) Chip design file generation method and device and chip design method and device
CN106933711A (en) A kind of PCIe3.0 Tx signal method for automatic measurement
US8140315B2 (en) Test bench, method, and computer program product for performing a test case on an integrated circuit
CN111400169A (en) Method and system for automatically generating netlist file for testing software and hardware
CN114091383A (en) Test sequence generation method, device and system and related equipment
US10339242B2 (en) Semiconductor LSI design device and design method
CN101599014B (en) Generating device of program or design documents
CN109426671B (en) Method and device for generating boundary scan chain and computer readable storage medium
CN116227398B (en) Method and system for automatically generating IP core test stimulus
CN101017496A (en) Method and apparatus for automatically formatting data based on a best match test result type
CN116700688A (en) Pinmux verification code rapid generation method based on python implementation
CN116774016A (en) Chip testing method, device, equipment and storage medium
US10747920B2 (en) Semiconductor LSI design device and design method
US7290174B1 (en) Methods and apparatus for generating test instruction sequences
CN110717305A (en) Method, system, device and medium suitable for verifying and confirming FPGA
CN113378502B (en) Test method, device, medium and equipment for verifying signal trend code matching

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