Method for automatically generating chip pin multiplexing circuit code

By automatically generating chip pin multiplexed circuit codes, the problems of digital chip IO circuit code design complexity and high error rate are solved, and a fast and accurate chip design process is achieved, reducing design time and manual errors.

CN119065663APending Publication Date: 2024-12-03SUZHOU YIYI ELECTRONIC TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411068650.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-06
Publication Date
2024-12-03

AI Technical Summary

Technical Problem

The design of the IO circuit code of the digital chip is complicated, which leads to a long design time and prone to errors. Especially when chip functions are reused, manually modifying the RTL code can easily cause unrecognized errors and affect the chip function application.

Method used

Provide a method to automatically generate chip pin multiplexing circuit codes, and determine chip pin multiplexing information according to chip specifications, generate chip pin multiplexing tables, and determine whether there are content errors in the table based on preset rules. , automatically generate chip pin multiplexing circuit codes to reduce manual design errors.

Benefits of technology

It realizes the rapid generation of complex chip pin multiplexing codes, checks errors in the design process, shortens design time, reduces the probability of manual errors, and improves the standardization and efficiency of the design process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119065663A_ABST
    Figure CN119065663A_ABST
Patent Text Reader

Abstract

The invention discloses a method for automatically generating chip pin multiplexing circuit codes, and relates to the technical field of digital chip design, and the method comprises the following steps: firstly, determining related information needing to be multiplexed by different pins of a chip under different functions, generating a chip pin multiplexing table according to the related information, storing a plurality of rows of pin multiplexing information, one row of pin multiplexing information corresponds to function multiplexing information of one chip pin; secondly, whether content errors exist in the chip pin multiplexing table or not is judged based on a preset rule, when errors exist, the errors are reported in time and corrected manually, and when the content errors do not exist, chip pin multiplexing circuit codes can be automatically generated according to the chip pin multiplexing table. According to the method, designers can be rapidly helped to complete complex chip pin multiplexing codes, errors in the chip design process can be checked, the time of the whole chip design process is greatly shortened, and meanwhile the probability of manual errors and the standard of RTL writing are reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of digital chip design, and in particular to a method for automatically generating chip pin multiplexing circuit codes. Background Art

[0002] In the field of digital chips, chip functions are becoming increasingly powerful and their usage scenarios are becoming more and more abundant. In order to meet the functional requirements of different scenarios, general chips have a variety of functional pin interfaces, such as GPIO (General Purpose Input Output), CAN (Controller Area Network), LIN (Local Interconnect Network), and other interfaces, and the number of each interface is completely different. Therefore, the number of functional interfaces for chips to communicate with external devices is increasing, but the packaging method of the chip determines the number of pins of the chip. For example: in a 64-pin package, excluding power supply, crystal oscillator and other pins, the actual number of IOs used for communication is far less than 64, but in design, the chip needs to communicate with the outside world with hundreds or thousands of functional signals. Therefore, when designing digital chips, IOs often need to be multiplexed. For example, the same IO is used as GPIO in mode 1 and as CAN in mode 2.

[0003] At present, the design of IO circuit code of digital chips mainly adopts the method of manually writing Verilog code. However, as the complexity of chips increases, the functional signals of chips also increase, and the functional reuse of chip IO is also complex. The complexity of IO circuit code design will lead to more and more time consumed in design. Designers usually need to adjust and optimize the design many times under chip IO reuse and application scenarios. Each design iteration requires redesigning the RTL of IO reuse, which will waste a lot of time of designers. And faced with hundreds of IO reuse relationships, it is easy for designers to manually modify the RTL code to cause errors that are not easy to find, and such errors are often difficult to fix, which has a great impact on the functional application of the chip. Therefore, it is necessary to realize the automation of IO circuit code design in the field of digital chips. Summary of the invention

[0004] The purpose of this application is to provide a method for automatically generating chip pin multiplexing circuit codes, which can realize the automatic generation of digital chip pin multiplexing circuit codes, which can not only reduce manpower consumption, but also reduce the errors that are prone to occur in manual design.

[0005] To achieve the above objectives, this application provides the following solutions:

[0006] In a first aspect, the present application provides a method for automatically generating chip pin multiplexing circuit code, comprising the following steps:

[0007] Determine chip pin multiplexing information according to the chip specification; the chip pin multiplexing information includes relevant information that different pins of the chip need to be multiplexed under different functions.

[0008] A chip pin multiplexing table is generated according to the chip pin multiplexing information; the chip pin multiplexing table includes several rows of pin multiplexing information; one row of the pin multiplexing information corresponds to the functional multiplexing information of a chip pin; the functional multiplexing information includes the signal name of the chip pin in different multiplexing modes and the corresponding interface type.

[0009] Based on a preset rule, it is determined whether there is a content error in the chip pin reuse table to obtain a first judgment result.

[0010] When the first judgment result is yes, an error is reported and the content error in the chip multiplexing table is manually corrected, and the process returns to the step of determining whether there is a content error in the chip pin multiplexing table based on a preset rule to obtain a first judgment result.

[0011] When the first judgment result is no, a chip pin multiplexing circuit code is generated according to the chip pin multiplexing table; after the chip pin multiplexing circuit code is instantiated to the chip top-level module, the chip pin multiplexing mode can be directly selected according to the chip register.

[0012] Optionally, determining the chip pin multiplexing information according to the chip specification sheet specifically includes the following steps:

[0013] Based on market research, plan the functions and uses of the chip and obtain the chip specification.

[0014] The chip pin multiplexing logic is analyzed according to the chip specification sheet, and the chip pin multiplexing information is extracted.

[0015] Optionally, the relevant information that different pins of the chip need to be multiplexed under different functions specifically includes: the pin numbers of the chip that need to be multiplexed, the signal name of each multiplexed pin in different multiplexing modes, and the corresponding interface type.

[0016] Optionally, the number of data rows in the chip pin multiplexing table is the same as the number of pins that need to be multiplexed on the chip; the pin numbers that need to be multiplexed on the chip start from 0 and increase by one for each row.

[0017] Optionally, the signal names of chip pins in different multiplexing modes may appear repeatedly, but the interface types corresponding to the same signal name remain consistent.

[0018] Optionally, the preset rules include: there is a signal name but the corresponding interface type is empty, there are the same signal names but the corresponding interface types are different, the signal name does not comply with the grammatical rules, and the pin numbers that the chip needs to reuse do not appear repeatedly.

[0019] According to the specific embodiments provided in this application, this application discloses the following technical effects:

[0020] The present application provides a method for automatically generating chip pin multiplexing circuit code, which determines the relevant information that different pins of the chip need to be reused under different functions through the chip specification book, generates a chip pin reuse table based on this information, and stores several rows of pin reuse information; one row of pin reuse information corresponds to the function reuse information of a chip pin; and determines whether there is a content error in the chip pin reuse table based on preset rules. When there is a content error, the error is reported in time and corrected manually. When there is no content error, the chip pin reuse circuit code can be automatically generated according to the chip pin reuse table. After being instantiated to the top-level module of the chip, the reuse mode of the chip pin can be directly selected according to the chip register. The above scheme of the present application can not only quickly help designers complete the completion of complex chip pin reuse codes, but also check the errors of chip pin reuse information in the chip design process, and the generated pin reuse circuit code can be directly used in the remaining processes of chip design, such as simulation verification, synthesis and other processes, which greatly shortens the time of the entire chip design process, and the automated process reduces the probability of manual errors and the specification of RTL writing. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0022] Figure 1 A flowchart of a method for automatically generating chip pin multiplexing circuit codes is provided in one embodiment of the present application.

[0023] Figure 2 A schematic diagram of a chip pin multiplexing table in a method for automatically generating chip pin multiplexing circuit code provided in another embodiment of the present application.

[0024] Figure 3 A schematic diagram of the structure of a computer device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0025] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0026] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.

[0027] In an exemplary embodiment, Figure 1 As shown, a method for automatically generating chip pin multiplexing circuit code is provided. The method is executed by a computer device, and can be executed by a computer device such as a terminal or a server alone, or by a terminal and a server together. In an embodiment of the present application, the method includes the following steps S1 to S5:

[0028] S1. Determine the chip pin reuse information according to the chip specification; the chip pin reuse information includes relevant information that different pins of the chip need to be reused under different functions. Step S1 specifically includes the following steps:

[0029] S11. Based on market research, plan the functions and uses of the chip and obtain the chip specification.

[0030] S12. Analyze the chip pin multiplexing logic according to the chip specification and extract the chip pin multiplexing information.

[0031] In this embodiment, the relevant information that different chip pins need to be reused under different functions specifically includes: the pin numbers of the chip that need to be reused, the signal name of each reused pin in different multiplexing modes, and the corresponding interface type.

[0032] S2. Generate a chip pin multiplexing table according to the chip pin multiplexing information; the chip pin multiplexing table includes several rows of pin multiplexing information; one row of pin multiplexing information corresponds to the functional multiplexing information of a chip pin; the functional multiplexing information includes the signal name of the chip pin in different multiplexing modes and the corresponding interface type.

[0033] In this embodiment, in step S2, the number of data rows in the generated chip pin multiplexing table is the same as the number of pins that need to be multiplexed on the chip; the pin numbers that need to be multiplexed on the chip start from 0 and increase by one per row. In addition, the signal names of the chip pins in different multiplexing modes may appear repeatedly, but the interface type corresponding to the same signal name remains consistent.

[0034] S3. Determine whether there is a content error in the chip pin reuse table based on preset rules to obtain a first judgment result. The preset rules include: there is a signal name but the corresponding interface type is empty, there are the same signal names but the corresponding interface types are different, the signal name does not conform to the grammatical rules, and the pin numbers that need to be reused by the chip do not appear repeatedly.

[0035] When the first judgment result is yes, step S4 is executed; when the first judgment result is no, step S5 is executed.

[0036] S4, reporting an error and manually correcting the content errors in the chip reuse table, and then jumping to step S3 for re-judgment.

[0037] S5. Generate chip pin multiplexing circuit code according to the chip pin multiplexing table; after the chip pin multiplexing circuit code is instantiated to the chip top-level module, the chip pin multiplexing mode can be directly selected according to the chip register.

[0038] In another more specific embodiment of the present application, a method for automatically generating chip pin multiplexing circuit codes proposed in the present application includes the following process:

[0039] Through market research, etc., we plan the functions and uses of the chip, obtain the chip specification, and then obtain the information on the need to reuse the chip pins from the chip specification, analyze the chip pin multiplexing logic, and obtain the signal interface type information that needs to be reused according to the different functions of different chip pins.

[0040] After that, the acquired information should be filled into the chip reuse table according to the rules. In this embodiment, the chip reuse table is an Excel table. The information that needs to be filled in the Excel table includes: the pin number (PINNUM) that the chip needs to reuse, the mode (MODE) that each pin of the chip needs to reuse, and the interface type (DIR) of the reuse mode; the interface type includes four types, namely: input and output type (io), input type (i), output type (o), and enable output type (oz). Each reuse mode needs to name the name of the reused function signal, and the signal name must comply with the Verilog syntax rules.

[0041] Excel table format is as follows Figure 2 As shown, the PINNUM column indicates the pin number that the chip needs to reuse, starting from 0 and increasing by one each time ( Figure 2 For example, PIN NUM2 can be added according to the actual situation of the chip).

[0042] The MODE in the table indicates different reuse modes and usage scenarios of chip functions, starting from 0 and increasing by one each time. Figure 2The example is MODE3, and MODE can be increased according to the actual situation of the chip. Each line represents the multiplexing relationship of a pin.

[0043] In the table, DIR indicates the interface type corresponding to the chip function multiplexing signal, where DIR0 indicates the interface type of the multiplexing mode MODE0 function signal, DIR1 indicates the interface type of the multiplexing mode MODE1 function signal, and so on. DIR increases with the increase of MODE.

[0044] In the chip multiplexing table, if the mode is blank, it means that there is no signal in this position of the chip participating in the multiplexing. When filling in information, the signal name in the table is allowed to appear multiple times, but the corresponding interface type must be consistent. Write all target pin signal names into the MODE column. Write all target pin interface types into the DIR column adjacent to the corresponding MODE.

[0045] by Figure 2 For example, the chip reuse table in the figure below shows that the entire chip pin reuse PIN NUM includes PIN0, PIN1 and PIN2.

[0046] PIN0 has four multiplexing modes:

[0047] ①When mode 0 is selected, the pin signal function is func_a and the interface type DIR is i.

[0048] ②When mode 1 is selected, the pin signal function is func_b and the interface type DIR is o.

[0049] ③When mode 2 is selected, the pin signal function is func_c and the interface type DIR is io.

[0050] ④When mode 3 is selected, the pin signal function is func_d and the interface type DIR is oz.

[0051] PIN1 has three multiplexing modes:

[0052] ①When mode 0 is selected, the pin signal function is func_b and the interface type DIR is o.

[0053] ②When mode 2 is selected, the pin signal function is func_d and the interface type DIR is oz.

[0054] ③When mode 3 is selected, the pin signal function is func_a and the interface type DIR is i.

[0055] PIN2 has three multiplexing modes:

[0056] ①When mode 0 is selected, the pin signal function is func_e and the interface type DIR is io.

[0057] ②When mode 1 is selected, the pin signal function is func_b and the interface type DIR is o.

[0058] ③When mode 2 is selected, the pin signal function is func_f and the interface type DIR is i.

[0059] After filling in all the chip information in the Excel table, before automatically generating the chip pin multiplexing circuit code based on the table, automatically check whether there are any errors in the content:

[0060] (1) Check whether the signal in each row and column of the pin multiplexing table in the table has an interface type (DIR). If there is a signal name in the MODE column but the corresponding interface type in the DIR column is empty, output an error message, print the error type, and indicate the error location.

[0061] (2) Check whether the DIRs of the same signal name at different positions in the table are consistent. If there is a mismatch, output an error message, print the error type, and indicate the error location.

[0062] (3) Check whether there are any characters in the signal name information in the table that do not conform to the Verilog syntax rules. If so, output an error message, print the error type, and indicate the error location.

[0063] (4) Check the PINNUM numbers in the table. They cannot be repeated. If they are repeated, an error message is output, along with the error type and the error location.

[0064] After filling in all the information in the Excel table, the required chip pin multiplexing circuit code can be automatically generated in the form of Verilog code. Figure 2 Taking the chip multiplexing table shown in FIG. 1 as an example, the generated chip pin multiplexing circuit code is shown in the code in Table 1.

[0065] Table 1 Example of chip pin multiplexing circuit code

[0066]

[0067]

[0068]

[0069] According to the interface type DIR, the generated chip pin multiplexing circuit code is mainly divided into four parts:

[0070] ① Input port signal, output port signal, and output enable port signal part.

[0071] ②Signal multiplexing mode selection decoder part, where the mode selection is controlled by external registers, and the register implementation logic is not listed in this article.

[0072] ③Input signal selection logic part.

[0073] ④Output signal selection and enable logic part.

[0074] In combination with the chip pin multiplexing circuit code shown in Table 1, the generated chip pin multiplexing circuit code is further described in more detail, and the number before each code is the line number.

[0075] Lines 2 to 12 are Figure 1 The pin multiplexing port in the table. The 13th line swm_mode_sel is the external register control pin multiplexing mode selection port signal. The 14th line SWM1_P_C is the input port signal of the external input / output unit PAD. The 15th line SWM1_P_I is the output port signal of the external input / output unit PAD. The 16th line SWM1_P_IE is the input enable port signal of the external input / output unit PAD. The 17th line SWM1_P_OE is the output enable port signal of the external input / output unit PAD. Lines 19 to 41 are the module internal signal declaration and assignment logic. Lines 43 to 50 are the signal multiplexing mode selection decoding logic for different PINs. Lines 52 to 79 are the multiplexing selection logic for output signals and output enable signals. Lines 81 to 105 are the multiplexing selection logic for input signals and enable.

[0076] The decode_8_en module (which means it supports up to 8 mode selections) used in the chip pin multiplexing circuit code in Table 1 is an 8-bit decoder logic, and its circuit code is shown in the code in Table 2.

[0077] Table 2decode_8_en module circuit code example

[0078]

[0079] Furthermore, the decoder logic can be selected according to the number of multiplexing modes that the chip pins need to actually use in actual applications, including but not limited to 16-bit decoders, 32-bit decoders, 64-bit decoders, etc. Combined with the code shown in Table 2, the circuit code of the decoder is described in detail: the 2nd to 4th lines are the decoding logic input and output signals, respectively; the 6th to 13th lines are the selection logic of the decoder, respectively.

[0080] The chip pin multiplexing circuit code generated by this application as shown in Table 1 can be directly instantiated into the top-level module of the chip for use. If the pin multiplexing is updated, the multiplexing code can be regenerated and replaced using the method of this application. This application integrates the obtained chip pin multiplexing circuit code into the chip, which is convenient for the pin multiplexing function used by later personnel. It is manifested as follows: after the user configures the register to select the mode of chip pin multiplexing, the input and output of the pin can be automatically configured without manual configuration, which greatly improves the convenience of pin multiplexing.

[0081] In an exemplary embodiment, a computer device is provided. The computer device may be a server or a terminal. The internal structure diagram thereof may be as follows: Figure 3 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for automatically generating a chip pin multiplexing circuit code is implemented.

[0082] Those skilled in the art will understand that Figure 3 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0083] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0084] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM may be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).

[0085] The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. The non-relational database may include a distributed database based on blockchain, etc., but is not limited thereto. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but is not limited thereto.

[0086] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0087] This article uses specific examples to illustrate the principles and implementation methods of this application. The description of the above embodiments is only used to help understand the method and core ideas of this application. At the same time, for those skilled in the art, according to the ideas of this application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting this application.

Claims

1. A method for automatically generating chip pin multiplexing circuit code, It is characterized in that include: Determine chip pin reuse information according to the chip specification; the chip pin reuse information includes relevant information that different pins of the chip need to be reused under different functions; Generate a chip pin multiplexing table according to the chip pin multiplexing information; the chip pin multiplexing table includes a plurality of rows of pin multiplexing information; one row of the pin multiplexing information corresponds to the function multiplexing information of one chip pin; the function multiplexing information includes the signal name of the chip pin in different multiplexing modes and the corresponding interface type; Determine whether there is a content error in the chip pin reuse table based on a preset rule, and obtain a first judgment result; When the first judgment result is yes, an error is reported and the content error in the chip multiplexing table is manually corrected, and the process returns to the step of determining whether there is a content error in the chip pin multiplexing table based on a preset rule to obtain a first judgment result; When the first judgment result is no, a chip pin multiplexing circuit code is generated according to the chip pin multiplexing table; after the chip pin multiplexing circuit code is instantiated to the chip top-level module, the chip pin multiplexing mode can be directly selected according to the chip register.

2. The method for automatically generating chip pin multiplexing circuit codes according to claim 1, It is characterized in that Determine the chip pin multiplexing information according to the chip specification, including: Based on market research, plan the functions and uses of the chip and obtain the chip specification; The chip pin multiplexing logic is analyzed according to the chip specification sheet, and the chip pin multiplexing information is extracted.

3. The method for automatically generating chip pin multiplexing circuit code according to claim 2, It is characterized in that The relevant information that different pins of the chip need to be reused under different functions specifically includes: the pin numbers of the chip that need to be reused, the signal names of each reused pin in different multiplexing modes, and the corresponding interface types.

4. The method for automatically generating chip pin multiplexing circuit codes according to claim 3, It is characterized in that The number of data rows in the chip pin reuse table is the same as the number of pins that need to be reused on the chip; the pin numbers that need to be reused on the chip start from 0 and increase by one for each row.

5. The method for automatically generating chip pin multiplexing circuit codes according to claim 3, It is characterized in that The signal names of chip pins in different multiplexing modes can be repeated, but the interface types corresponding to the same signal names remain consistent.

6. The method for automatically generating chip pin multiplexing circuit codes according to claim 5, It is characterized in that The preset rules include: there is a signal name but the corresponding interface type is empty, there are the same signal names but the corresponding interface types are different, the signal name does not conform to the grammatical rules, and the pin numbers that the chip needs to reuse do not appear repeatedly.

Citation Information

Cited By

  • Chip pin multiplexing method and device, computer equipment and storage medium

    CN120371287A