Method, device and equipment for determining origin coordinates of PCB (Printed Circuit Board) and storage medium
By using the target program to automatically set the origin to the first foot in PCB packaging design, the problem of cumbersome and inefficient manual setting of the packaging origin in the prior art is solved, and more efficient, accurate and automated origin setting is achieved, and design efficiency and accuracy are improved.
Patent Information
- Application Number
- CN202510462872.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-14
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2045-04-14
AI Technical Summary
In the prior art, the setting of the packaging origin relies on manual operations, and the steps are cumbersome and time-consuming, resulting in low design efficiency and low accuracy.
Automatically set the origin to the first pin by entering commands in the PCB packaging design, use the target program to traverse all pin names, determine the coordinates of the target pin, and set it to the origin coordinate.
It greatly reduces the operating time of setting the origin, improves design efficiency and accuracy, reduces human errors, and meets the needs of modern electronic design for high precision and high efficiency.
Smart Images

Figure CN119989451A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, device, equipment and storage medium for determining origin coordinates of a PCB. Background Art
[0002] In electronic device packaging and PCB design, the setting of the origin has an important impact on design efficiency and production accuracy. In the prior art, the origin is usually used as a reference position for pad placement, device rotation, movement and placement. If the origin is not set properly, such as far away from the pad, it will cause inconvenience in PCB design.
[0003] In the current origin setting method, the setting of the package origin usually relies on manual operation, which is cumbersome and time-consuming, reducing the design efficiency. Therefore, there is an urgent need for a method that can automatically set the package origin to simplify the design process, improve the design accuracy, and meet the needs of standardized design. Summary of the invention
[0004] The main purpose of the present application is to provide a method, device, equipment and storage medium for determining the origin coordinates of a PCB to improve the efficiency of origin setting.
[0005] To achieve the above purpose, the present application provides a method for determining the origin coordinates of a PCB, comprising: Receive a call request input by a user, and call a target program based on the call request to obtain the coordinates of the target pin, wherein the target program is used to execute traversal of all pin names to determine the coordinates of the target pin; The coordinates of the target pin are used as the origin coordinates of the PCB.
[0006] Optionally, the target program is also used to open the package design interface before executing the traversal of all pin names, and determine whether the current interface is the package design interface, and when it is determined that the current interface is not the package design interface, pop up a first prompt window, and when it is determined that the current interface is the package design interface, execute the traversal of all pin names.
[0007] Optionally, the target program is further configured to pop up a second prompt window if it is determined that the target pin does not exist in all the pin names after executing the traversal of all the pin names.
[0008] Optionally, the target program is configured based on a skill language.
[0009] Optionally, the calling request is a request received in the Allegro software running environment.
[0010] In addition, to achieve the above-mentioned purpose, the present application also provides a device for determining the origin coordinates of a PCB, including: a receiving module, used to receive a call request input by a user, and call a target program based on the call request to obtain the coordinates of a target pin, wherein the target program is used to traverse all pin names and determine the coordinates of the target pin; an origin determination module, used to use the coordinates of the target pin as the origin coordinates of the PCB.
[0011] Optionally, the target program is also used to execute opening of a package design interface, and determine whether the current interface is a package design interface, and if it is determined that the current interface is not a package design interface, pop up a first prompt window.
[0012] Optionally, the target program is further configured to pop up a second prompt window when it is determined that the target pin does not exist in all pin names.
[0013] The present application also provides a server, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for determining the origin coordinates of a PCB as described in any one of the above is implemented.
[0014] The present application also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method for determining the origin coordinates of a PCB as described in any one of the above is implemented.
[0015] The method for determining the origin coordinates of a PCB of the present application configures a target program. When a user needs to determine the origin of a PCB board, the user only needs to call the target program. By executing the target program, the coordinates of the origin are automatically determined, thereby simplifying the operation steps of packaging the origin and improving the efficiency of packaging the origin. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 is a flow chart of a method for determining the origin coordinates of a PCB according to an embodiment of the present application; Figure 2 is a schematic diagram of an origin coordinate determination device according to an embodiment of the present application; Figure 3 An example of a physical structure diagram of a server is provided; In the figure: 200, origin coordinate determination device; 210, receiving module; 220, origin determination module; 310, processor; 320, communication interface; 330, memory; 340, communication bus.
[0017] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0018] In order to make the purpose, technical solutions and advantages of this application clearer, the technical solutions in this application will be clearly and completely described below in conjunction with the drawings in this application. Obviously, the described embodiments are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0019] In the field of electronic design automation (EDA), printed circuit board (PCB) design is a complex and delicate process, in which the creation and management of device packages is a crucial part. The device package not only defines the physical layout of the device on the PCB, but also determines the positioning accuracy of the device during the manufacturing and assembly process.
[0020] Origin plays a key role in device package design. Its main functions include: First, when making device packages, the origin is usually used as a reference position for placing pads. Reasonable setting of the origin helps to quickly and accurately locate and place devices during PCB design. Secondly, during PCB design, the origin can be used as a reference point for rotating, moving and placing devices. If the origin position is properly set during package design, the design efficiency can be significantly improved; conversely, if the origin position is improperly set (such as too far from the pad), it will cause inconvenience and errors in the design process. Finally, after the PCB design is completed, it is usually necessary to generate a GERBER file for PCB production and patching. The GERBER file contains the origin coordinate file of the device, which can be used in the programming of the patch machine so that the patch machine can grab the device and perform accurate patching according to the origin coordinate file. Especially for patch devices with irregular shapes, using the first foot of the PCB as the origin can more accurately locate and correct, ensuring accurate installation of components.
[0021] Currently, the traditional steps for setting the device package origin to the first pin are: open the package editing page; select Element under the Display menu; clear the rest of the options in the Find menu and select only Pins; select the first pin, copy the coordinates of the first pin in the pop-up page, close the page, and end the current command; select Change Drawing Origin under the Setup menu; enter the coordinates of the first pin in the command line, and then press Enter to confirm.
[0022] However, this operation process has obvious disadvantages: the operation steps are cumbersome, time-consuming, and it is easy to cause inaccurate origin settings due to human errors. Especially in complex PCB designs with a large number of components, manually setting the origin coordinates of each component is not only inefficient, but also increases the risk of errors.
[0023] Based on this, the present application provides a method, device, equipment and storage medium for determining the origin coordinates of a PCB. The origin is automatically set to the first pin by inputting a command during PCB package design. This method can greatly reduce the operation time of the layout engineer setting the origin to the first pin, from setting one by one and operating step by step to quickly completing the work of setting the origin to the first pin by inputting a command, thereby achieving a more efficient, accurate and automated method to set the origin of the device package, so as to improve the efficiency and accuracy of PCB design, reduce human errors, and meet the growing demand for high precision and high efficiency in modern electronic design.
[0024] Figure 1 is a flow chart of a method for determining the origin coordinates of a PCB according to an embodiment of the present application. The method for determining the origin coordinates of a PCB may be executed by a processor of a server, such as Figure 1 As shown, the method for determining the origin coordinates of the PCB may include the following steps: Step 110: receiving a call request input by a user, and calling a target program based on the call request to obtain the coordinates of a target pin, wherein the target program is used to traverse all pin names and determine the coordinates of the target pin.
[0025] Step 120: Using the coordinates of the target pin as the origin coordinates of the PCB.
[0026] It should be noted that the method for determining the origin coordinates of the PCB in the embodiment of the present application can be used in the design of any PCB scenario, especially in the design of set-top boxes, converged gateways, routers, cameras, wireless kittens, smart doorbells, remote control panels, switches, etc., and is suitable for component design tasks with a large number of pins and complex packaging, which can significantly improve design efficiency and reduce error rates. In addition, the method also has good scalability, and users can modify and optimize the Skill program according to actual needs, such as supporting other pins as the origin, batch processing of multiple components, etc., so as to meet more diverse design needs.
[0027] It is understandable that Cadence Allegro software, as a powerful PCB design tool, not only provides rich design functions, but also has an interface that is convenient for users to conduct secondary development and a relatively complete development language library, on which users can conduct secondary development according to their needs. Skill language is a high-level programming language based on C language and LISP language built into Cadence Allegro, which can make good use of the rich interactive functions of Cadence Allegro. Auxiliary tools written using Skill language as a writing tool can greatly improve work efficiency. Therefore, the embodiment of the present application writes a method for automatically setting the origin to the first pin of the PCB based on the skill program, and implants it into Allegro to form a command.
[0028] In step 110, when the PCB origin position needs to be determined, the user can upload a call request through the user terminal to call the target program. The method of uploading the call request can be: inputting a preset call entry shortcut key for calling the target program in the command box.
[0029] It should be noted that the user terminal may include (but not limited to): mobile terminals such as mobile phones, laptops, PADs (tablet computers), etc. and fixed terminals such as digital TVs, desktop computers, etc. The user terminal includes a display, which can display the user interface of the Allegro software and a command input box, etc.
[0030] Furthermore, the user terminal can establish a communication connection with the server through the Internet. After the user uploads the call request through the user terminal, the server receives the call request input by the user and activates the target program based on the call request, so that the target program automatically runs in the Allegro software, and realizes the process of setting the package origin to the target pin.
[0031] In some embodiments, the target program is also used to open the package design interface before executing the traversal of all pin names, and determine whether the current interface is the package design interface, and when it is determined that the current interface is not the package design interface, pop up a first prompt window, and when it is determined that the current interface is the package design interface, execute the traversal of all pin names.
[0032] When the target program is running, the target program can first execute: use the axlDesignType function to obtain the current interface, and determine whether the current interface is the "PACKAGE" package design interface. Specifically, call the axlDesignType function to obtain the current design type of the Allegro software, and use a conditional statement to determine whether the current interface is the "PACKAGE" package design interface.
[0033] When the target program is used to determine that the current interface is the "PACKAGE" package design interface, the target program executes the next step. If the target program determines that the current interface is not the "PACKAGE" package design interface, the server can be controlled to issue a first prompt instruction to the user terminal. After receiving the first prompt instruction, the user terminal can pop up a first prompt window according to the first prompt instruction. The first prompt window may include text such as "The skill only run in package!", that is, the Skill program can only run in package design. The first prompt window may also include other prompt information, and the prompt information of the second prompt window is not specifically limited here. At the same time, the server ends the execution of the target program.
[0034] When the target program is used to determine that the current interface is the "PACKAGE" package design interface, the foreach function is used to traverse all PIN pin names to find out whether the target pin exists among all pins. The specific implementation method of using the foreach function to traverse all PIN pin names to find out whether the target pin (for example, pin 1) exists is: use the axlDBCellGetPins function to obtain all PIN pin objects in the package design interface; use the foreach function to traverse all PIN pin objects; use the axlPinName function to obtain the name of each PIN pin; determine whether the PIN pin name matches the target pin name (for example, "PIN1").
[0035] The target program is also used to execute: after determining that the name of the target pin exists in all pin names, obtain the coordinates of the target pin, and set the coordinates of the target pin as the origin coordinates. A prompt message indicating successful setting may also be displayed in the command line. For example, the prompt message may include "Change Origin To (%L, %L)", that is, the origin coordinates are changed to (%L, %L), and (%L, %L) are the coordinates of the target pin.
[0036] In some implementations, the target program is further configured to pop up a second prompt window if it is determined that the target pin does not exist in all the pin names after traversing all the pin names.
[0037] Specifically, when the target program is used to determine that the target pin does not exist in all the pin names, the server can be controlled to send a second prompt instruction to the user terminal. After receiving the second prompt instruction, the user terminal can pop up a second prompt window according to the second prompt instruction. The second prompt window may include text such as "Not Find Pin 1!", that is, the first pin is not found. The second prompt window may also include other prompt information, and the prompt information of the second prompt window is not specifically limited here. At the same time, the server ends the execution of the target program.
[0038] In some implementations, before receiving a call request input by a user and calling a target program based on the call request to obtain the coordinates of the target pin, the target program may be written in the skill language. In addition, a call entry shortcut key of the target program also needs to be set in the target program so that the Allegro software can call the target program. In this embodiment, the axlCmdRegister function may be used to set the program call entry shortcut key.
[0039] Furthermore, the written target program can be packaged and integrated into the Cadence Allegro software in the following ways: First, package the target program into a .il file, that is, save the written target program into a .il file, which is the Skill script file format supported by the Allegro software; specifically, you can use a text editor (such as Notepad++ or VSCode) to save the target program code into a .il file, such as set_origin_to_pin1.il. Ensure that the file content is complete, including all function definitions and logic codes.
[0040] Furthermore, check the computer's environment variable values. Allegro software locates the loading path of the target program file through environment variables. You need to find the value of the environment variable CDSROOT or SKILLPATH to determine the storage location of the target program file; if you are in Windows system, you can right-click "This Computer" or "My Computer" and select "Properties". Click "Advanced System Settings", then click "Environment Variables", find CDSROOT or SKILLPATH in the system variable list, and check its value. If you are in Linux system, you can open the terminal and enter echo$CDSROOT or echo$SKILLPATH to check its value.
[0041] Furthermore, put the .il file into the folder pointed to by the environment variable, that is, put the packaged .il file into the folder pointed to by the environment variable to ensure that the Allegro software can find and load the file. Specifically, you can find the folder path pointed to by the environment variable CDSROOT or SKILLPATH; copy the set_origin_to_pin1.il file into the folder.
[0042] Further, find the allegro.ilinit file. The allegro.ilinit file is the interface file of the Allegro software, which is used to load the target program at startup. You need to add code to this file to call the custom target program. Specifically, you can find the allegro.ilinit file in the folder pointed to by the environment variable. If the file does not exist, you can create a new text file and name it allegro.ilinit.
[0043] Further, open the allegro.ilinit file with Notepad, edit the allegro.ilinit file, and add code to load the custom target program. Specifically, you can right-click the allegro.ilinit file, select "Open with", and then select Notepad or other text editor.
[0044] Furthermore, the load function is used to call the .il program file, and the custom target program is loaded through the load function so that it runs automatically when the Allegro software is started. Specifically, in the allegro.ilinit file, the load function can be used to specify the path of the .il file. If the .il file is located in the folder pointed to by the environment variable, the file name can be used directly; if it is located in other paths, the full path needs to be provided.
[0045] In the above manner, the target program can be configured in the Allegro software of the server. In actual application, only one configuration process is required. When the target program has been configured in the Allegro software of the server, subsequent users only need to input a call request to automatically call and execute the target program. In some embodiments, the call request is a request received in the Allegro software operating environment.
[0046] As an example, the target program could be: axlCmdRegister("sop" 'SetOriginToPin1) procedure( SetOriginToPin1() prog( (DesignType AllPins Pone OriginX OriginY) NoPin1 = nil DesignType = axlDesignType(t) unless( DesignType == "PACKAGE" axlUIConfirm("The skill only run in package!") return(nil) ) axlVisibleDesign(t) axlClearSelSet() axlSetFindFilter(?enabled '("NOALL" "PINS") ?onButtons '("NOALL" "PINS")) AllPins = axlGetSelSet(axlAddSelectAll()) axlClearSelSet() foreach( Pone AllPins when( Pone->number == "1" OriginX = car(Pone->xy) OriginY = cadr(Pone->xy) NoPin1 = t ) ) if( NoPin1 == nil then axlUIConfirm("Not Find Pin 1 !") else unless( (zerop(OriginX)&&zerop(OriginY)) axlDBChangeDesignOrigin(list((- OriginX) (- OriginY))) printf("Change Origin To (%L %L)" OriginX OriginY) )))) Therefore, by encapsulating the target program of this embodiment in the Allegro software, the function of automatically setting the encapsulation origin to the target pin is realized, which solves the problems of low efficiency, easy errors and cumbersome processes of traditional manual operations. It improves operating efficiency, reduces human errors, simplifies operating procedures, improves design consistency, supports rapid modification and expansion, reduces learning costs, improves the value of design tools, supports batch processing, enhances user experience and reduces design costs.
[0047] On the basis of the above-mentioned embodiment, the embodiment of the present application also includes a device for determining the origin coordinates of a PCB. Figure 2 is a schematic diagram of an origin coordinate determination device according to an embodiment of the present application. Figure 2 As shown, the device 200 for determining the origin coordinates of a PCB may include a receiving module 210 and an origin determining module 220, and the receiving module 210 and the origin determining module 220 are connected.
[0048] The receiving module 210 is used to receive a call request input by a user, and based on the call request, call a target program to obtain the coordinates of a target pin, and the target program is used to perform a traversal of all pin names to determine the coordinates of the target pin. The origin determination module 220 is used to use the coordinates of the target pin as the origin coordinates of the PCB.
[0049] Therefore, by configuring the target program, when the user needs to determine the origin of the PCB board, he only needs to call the target program. By executing the target program, the coordinates of the origin are automatically determined, thereby simplifying the operation steps of the packaging origin and improving the efficiency of the packaging origin.
[0050] In some embodiments, the target program is also used to open the package design interface before executing the traversal of all pin names, and determine whether the current interface is the package design interface, and when it is determined that the current interface is not the package design interface, pop up a first prompt window, and when it is determined that the current interface is the package design interface, execute the traversal of all pin names.
[0051] In some implementations, the target program is further configured to pop up a second prompt window if it is determined that the target pin does not exist in all the pin names after traversing all the pin names.
[0052] In some implementations, the target program is configured based on a skill language.
[0053] In some implementations, the call request is a request received in the Allegro software operating environment.
[0054] It should be noted that for details not disclosed in the device for determining the origin coordinates of a PCB in this embodiment, please refer to the details disclosed in the embodiment of the method for determining the origin coordinates of a PCB in the embodiments of this specification, and will not be repeated here.
[0055] Based on the above embodiments, Figure 3 An example of a server physical structure diagram is shown below: Figure 3 As shown, the server may include: a processor 310, a communication interface 320, a memory 330 and a communication bus 340, wherein the processor 310, the communication interface 320 and the memory 330 communicate with each other through the communication bus 340. The processor 310 may call the logic instructions in the memory 330 to execute the method for determining the origin coordinates of the PCB, the method comprising: receiving a call request input by a user, and calling a target program based on the call request to obtain the coordinates of the target pin, the target program being used to perform traversal of all pin names to determine the coordinates of the target pin; and using the coordinates of the target pin as the origin coordinates of the PCB.
[0056] In addition, the logic instructions in the above-mentioned memory 330 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0057] On the basis of the above embodiments, on the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the method for determining the origin coordinates of the PCB provided by the above methods, the method including: receiving a call request input by a user, and calling a target program based on the call request to obtain the coordinates of a target pin, the target program being used to traverse all pin names to determine the coordinates of the target pin; and using the coordinates of the target pin as the origin coordinates of the PCB.
[0058] On the basis of the above embodiments, on another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, it is implemented to execute the method for determining the origin coordinates of the PCB provided by the above methods. The method includes: receiving a call request input by a user, and calling a target program based on the call request to obtain the coordinates of a target pin, wherein the target program is used to traverse all pin names to determine the coordinates of the target pin; and using the coordinates of the target pin as the origin coordinates of the PCB.
[0059] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0060] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
Claims
1. A method for determining the origin coordinates of a PCB, characterized in that: include: Receive a call request input by a user, and call a target program based on the call request to obtain the coordinates of the target pin, wherein the target program is used to execute traversal of all pin names to determine the coordinates of the target pin; The coordinates of the target pin are used as the origin coordinates of the PCB.
2. The method for determining the origin coordinates of a PCB according to claim 1, characterized in that: The target program is also used to open the package design interface before executing the traversal of all pin names, and determine whether the current interface is the package design interface, and when it is determined that the current interface is not the package design interface, pop up a first prompt window, and when it is determined that the current interface is the package design interface, execute the traversal of all pin names.
3. The method for determining the origin coordinates of a PCB according to claim 1, characterized in that: The target program is further configured to pop up a second prompt window after executing the traversal of all pin names and, if it is determined that the target pin does not exist in all pin names.
4. The method for determining the origin coordinates of a PCB according to claim 1, characterized in that: The target program is configured based on the skill language.
5. The method for determining the origin coordinates of a PCB according to claim 1, characterized in that: The call request is a request received in the Allegro software operating environment.
6. A device for determining the origin coordinates of a PCB, characterized in that: include: A receiving module, used to receive a call request input by a user, and based on the call request, call a target program to obtain the coordinates of a target pin, wherein the target program is used to execute a traversal of all pin names to determine the coordinates of the target pin; The origin determination module is used to use the coordinates of the target pin as the origin coordinates of the PCB.
7. The device for determining the origin coordinates of a PCB according to claim 6, characterized in that: The target program is also used to execute opening of the package design interface, and determine whether the current interface is the package design interface, and when it is determined that the current interface is not the package design interface, pop up a first prompt window.
8. The device for determining the origin coordinates of a PCB according to claim 6, characterized in that: The target program is further configured to pop up a second prompt window when it is determined that the target pin does not exist in all pin names.
9. A server comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method for determining the origin coordinates of the PCB as described in any one of claims 1 to 5 is implemented.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for determining the origin coordinates of a PCB as claimed in any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Server PCB packaging coordinate setting method
CN104200024A
Method and device for creating ball grid array BGA packaging label
CN109635413A
Method and system for automatically creating packaging pin silk-screen mark based on allegro skill
CN110083925A
Packaged file checking method and device, equipment and computer readable storage medium
CN113962170A
Bonding type selection method and device, electronic equipment and medium
CN114065689A