Embodiment
At length set forth to the main realization principle of embodiment of the invention technical scheme, embodiment and to the beneficial effect that should be able to reach below in conjunction with each accompanying drawing.
The embodiment of the invention provides a kind of generation method of PCB design file, the schematic diagram of circuit is divided into a plurality of different piece subgraphs, can divide according to functional module during division, realize that promptly device that a function need use is as a functional module, also can divide, for example band of position of device etc. according to reaching other modes that make things convenient for design effect.After designing respectively according to each partial subgraph, a plurality of subnet table files have been formed.As shown in Figure 1, this method may further comprise the steps:
Step 101, obtain a plurality of subnet table files that the different piece subgraph according to the printed circuit board (PCB) schematic diagram forms respectively;
Obtain a plurality of subnet table files that the different piece subgraph according to the printed circuit board (PCB) schematic diagram forms respectively, can read each subnet table file successively when obtaining the subnet table file, also can read a plurality of subnet table files simultaneously.Can detect each subnet table file and whether finish according to the schematic diagram of each subnet table file correspondence after reading,, write down this uncompleted subnet table file, so that follow-up additional complete if do not finish.Can write down the sign such as title, numbering of this subnet table file during record.
Then, the separating part that belongs to same network item in each subnet table file is merged, owing to might produce the situation that same network item is separated when generating the subnet table file, therefore should merge network item before this subnet table file being write total net meter file, the part line segment that for example belongs to same netting twine is separated, then will belong to the line segment merging of the separating part of same netting twine according to the sign (numbering, parameter etc.) of line segment.
At last, can whether finish, for example whether have the interface that does not connect, uncompleted connection line etc.,, can write down this network item so that follow-up replenishing if do not finish according to the network item that schematic diagram detects in each subnet table file.Can write down the sign such as numbering, title of this network item during record.
Step 102, at each subnet table file, when initial origin position in the group net meter file and predetermined start origin position were inequality, it was the position coordinates of initial origin position that the position coordinates in this subnet table file is transformed to the predetermined start origin position;
Concrete, initial origin position in each subnet table file and predetermined start origin position are compared, if it is inequality, then obtain the difference relation of initial origin position in the subnet table file and predetermined start origin position, and concern that according to this difference it is the position coordinates of initial origin position that the position coordinates of each device in this subnet table file is transformed to the predetermined start origin position.For example, the predetermined start origin position is first grid of the lower right corner, if the initial origin position in this subnet table file is first grid of the upper left corner, then obtain with initial origin position in this subnet table file move to that the predetermined start origin position needs laterally, vertically move grid number, then according to should be laterally, vertically move the position coordinates of device in the grid number varitron net meter file.
In addition, can also detect the coordinate transforming position after, according to schematic diagram, detect each device in the subnet table file successively, whether position coordinates is adjusted into the precalculated position coordinate with the position coordinates of precalculated position coordinate device inequality, and writes down controlled device.Can write down the sign such as numbering, title of this device during record.
Step 103, a plurality of subnet table files are write total net meter file, wherein, when having the network item that function repeats between a plurality of subnet table files, the network item of selecting a function to repeat according to pre-defined rule writes total net meter file;
Concrete, each deviser is during according to principle diagram design, might certain network item in other the partial subgraph be joined in the design part of itself, so the network item that the subnet table file after forming and other subnet table files might exist function to repeat for the convenience that designs.Therefore, each subnet table file is write total net meter file successively or simultaneously, write fashionable need to detect in the book net meter file network item whether with other subnet table files in network item whether repeat, just there are the repetition on the function in some network item in the present networks file and the network item in other network files, function repeats to be meant that the network item in the different sub-network list file all finishes function in certain functional module herein, can be according to the device number in the network item during detection, the function that title etc. or network item are finished judges whether to exist the network item of function repetition.Can priority be set to each subnet table file, when having the network item of function repetition in a plurality of subnet table files, in the whole network item, select this network item in the high subnet table file of priority, can certainly directly specify a certain subnet table file; Also can in the whole network item, select the short network item of network item length according to the length of network item, the whole network item is meant the network item of finishing design herein.If all do not finish, can select to get and finish the longest network item of length.
Step 104, this total net meter file of basis generate the PCB design file.
Should import PCB design software by total net meter file, carry out processing such as device layout, wiring, inspection, check, output, so that generate the PCB design file.Because device layout, wiring, regular inspection, verification, output etc. are conventional techniques known to a person of ordinary skill in the art, do not repeat them here.
From above description, the method that provides by the embodiment of the invention as can be seen, by schematic diagram being divided into a plurality of parts, design simultaneously by several devisers, read the subnet table after the design then and merge a plurality of subnet table files, can increase work efficiency saving under the condition of cost thus.
Below by another embodiment the generation method of a kind of PCB design file provided by the invention is elaborated, the schematic diagram of circuit is divided into a plurality of partial subgraphs, can divide according to functional module during division, realize that promptly device that a function need use is as a functional module, also can divide, for example band of position of device etc. according to reaching other modes that make things convenient for design effect.After designing respectively according to each partial subgraph, formed a plurality of subnet table files, as shown in Figure 2, this method may further comprise the steps:
Step 201, read a plurality of subnet table files; Each subnet table file can be read successively when reading the subnet table file, also a plurality of subnet table files can be read simultaneously;
Whether each subnet table file that step 202, detection are read exists uncompleted design;
Concrete, according to the schematic diagram of this subnet table file correspondence, detect this subnet table file and whether have uncompleted design, if exist, then can write down this subnet table file so that additional complete, execution in step 203 then; If do not exist, direct execution in step 203;
Step 203, detect the situation that whether exists same network item to separate in this subnet table file;
If exist, after the separating part that then will belong to same network merges, execution in step 204, the part line segment that for example belongs to same netting twine is separated, then will belong to the part line segment merging of same netting twine according to the sign (numbering, parameter etc.) of line segment; If do not exist, direct execution in step 204;
Whether step 204, the network item that detects in each subnet table file be complete; For example whether there are the interface that does not connect, uncompleted connection line etc.; If imperfect, can write down this network item so that follow-up additional, execution in step 205 again; Otherwise, direct execution in step 205; Can write down the sign such as title, numbering of this subnet table file during record;
Whether the initial origin position in step 205, the detection subnet table file is identical with the predetermined start origin position; When initial origin position in the group net meter file and predetermined start origin position are inequality, execution in step 206; Otherwise, execution in step 207;
Step 206, the position coordinates in this subnet table file is transformed to the predetermined start origin position is the position coordinates of initial origin position;
Concrete, initial origin position in the subnet table file and predetermined start origin position are compared, when the result is inequality, obtain the difference relation of initial origin position in the subnet table file and predetermined start origin position, and concern that according to this difference it is the position coordinates of initial origin position that the position coordinates of each device in this subnet table file is transformed to the predetermined start origin position.For example, the predetermined start origin position is first grid of the lower left corner, if the initial origin position in this subnet table file is first grid of the upper left corner, then obtain with initial origin position in this subnet table file move to that the predetermined start origin position needs laterally, vertically move grid number, then according to should be laterally, vertically move the position coordinates of device in the grid number varitron net meter file.
Whether step 207, the device position coordinate that detects in the subnet table file successively be identical with the precalculated position coordinate, if it is inequality, the position coordinates of this device is adjusted into the preposition coordinate, and write down controlled device so as follow-uply to add up, operation such as adjustment, execution in step 208 then; Otherwise, direct execution in step 208;
Step 208, should write total net meter file by a plurality of subnet table files, and write the network item whether these a plurality of subnet table files of fashionable detection exist repetition;
Concrete, each subnet table file is write total net meter file successively or simultaneously, write fashionable need to detect in the book net meter file network item whether with other subnet table files in network item repeat.Can judge whether to exist the network item of repetition during detection according to the function that the device number in the network item, title etc. or network item are finished.If exist, then execution in step 209; Otherwise, execution in step 210;
Step 209, select the network item of a repetition to write total net meter file according to pre-defined rule;
Concrete, can priority be set to each subnet table file, when having the network item of repetition in a plurality of subnet table files, in the whole network item, select this network item in the high subnet table file of priority, can certainly directly specify a certain subnet table file, also can in the whole network item, select the short network item of network item length according to the length of network item, maybe when the network item of this repetition in each subnet table file all imperfect tense, select the longest network item of length.
Step 210, detect whether the all-ones subnet list file has all write finishes; If the all-ones subnet list file has all write and finished, then execution in step 211; Otherwise, execution in step 201;
Step 211, this total net meter file of basis generate the PCB design file.
Should import PCB design software by total net meter file, carry out processing such as device layout, wiring, inspection, verification, output, so that generate the PCB design file.Because device layout, wiring, inspection, verification, output etc. are conventional techniques known to a person of ordinary skill in the art, do not repeat them here.
From above description, the method that provides by the embodiment of the invention as can be seen, by schematic diagram being divided into a plurality of parts, design simultaneously by several devisers, read the subnet table after the design then and merge a plurality of subnet table files, can increase work efficiency saving under the condition of cost thus.
Accordingly, the embodiment of the invention also provides a kind of generating apparatus of PCB design file, and as shown in Figure 3, this device comprises:
Acquisition module 301 is used to obtain a plurality of subnet table files that the different piece subgraph according to the printed circuit board (PCB) schematic diagram forms respectively;
Conversion module 302, be used at each subnet table file, when initial origin position in the group net meter file and predetermined start origin position were inequality, it was the position coordinates of initial origin position that the position coordinates in the subnet table file is transformed to the predetermined start origin position;
Writing module 303 is used for described a plurality of subnet table files are write total net meter file, and wherein, when having the network item of function repetition between described a plurality of subnet table files, the network item of selecting a function to repeat according to pre-defined rule writes total net meter file;
Generation module 304 is used for generating described PCB design file according to described total net meter file.
Wherein, conversion module 302, specifically be used for according to the difference of initial origin position of subnet table file and predetermined start origin position relation, it is the position coordinates of initial origin position that the position coordinates of each device in the subnet table file is transformed to the predetermined start origin position.
Writing module 303 comprises the chooser module, is used at the whole network item, according to the priority of subnet table file, selects network item; And/or in the whole network item,, select network item according to the space length of network item.
Preferable, in another embodiment of the present invention, this device can also comprise:
Whether processing module is used to detect each subnet table file and finishes, if do not finish, writes down uncompleted subnet table file; The separating part that belongs to same network item in each subnet table file is merged; According to schematic diagram, whether the network item that detects in each subnet table file is finished, if do not finish, writes down uncompleted network item.
Preferable, in another embodiment of the present invention, this device can also comprise:
Detection module is used for according to schematic diagram, detects each device in the subnet table file successively, whether position coordinates is adjusted into the precalculated position coordinate with the position coordinates of precalculated position coordinate device inequality, and writes down controlled device.
Concrete, the schematic diagram of circuit is divided into a plurality of partial subgraphs, can divides according to functional module during division, realize that promptly device that a function need use is as a functional module, also can divide, for example band of position of device etc. according to reaching other modes that make things convenient for design effect.After designing respectively according to each partial subgraph, a plurality of subnet table files have been formed.
After acquisition module 301 obtains these a plurality of subnet table files, whether processing module can detect each subnet table file complete, and promptly the schematic diagram according to this subnet table file correspondence detects whether there is uncompleted design, if imperfect, then can write down this subnet table file, so that replenish complete; Whether the network item that can also detect in each subnet table file is complete, as whether having the interface that does not connect, uncompleted connection line etc., if imperfect, can write down this network item.Simultaneously, can also detect the situation that whether exists same network item to separate in this subnet table file,, then merge separating part if exist, the part line segment that for example belongs to same netting twine is separated, then will belong to the part line segment merging of same netting twine according to the sign (numbering, parameter etc.) of line segment.
Then, conversion module 302 compares initial origin position in the subnet table file and predetermined start origin position, if it is inequality, then obtain the difference relation of initial origin position in the subnet table file and predetermined start origin position, and concern that according to this difference it is the position coordinates of initial origin position that the position coordinates of each device in this subnet table file is transformed to the predetermined start origin position.For example, the predetermined start origin position is first grid of the lower left corner, if the initial origin position in this subnet table file is first grid of the upper left corner, then obtain with initial origin position in this subnet table file move to that the predetermined start origin position needs laterally, vertically move grid number, then according to should be laterally, vertically move the position coordinates of device in the grid number varitron net meter file.In addition, after detection module can detect the coordinate transforming position, whether the device position coordinate in the subnet table file was identical with the preposition coordinate, if inequality, the position coordinates of device be adjusted into the preposition coordinate, and write down controlled device.
Writing module 303 writes total net meter file with a plurality of subnet table files, and wherein, when having the network item of function repetition between a plurality of subnet table files, the network item of selecting a function to repeat according to pre-defined rule writes total net meter file.Can judge whether to exist the network item of repetition during detection according to the function that device number in the network item etc. or network item are finished.If there is the network item that repeats, chooser module in the writing module 303 selects the network item of a repetition to write total net meter file according to predetermined rule, rule that should be predetermined can for: each subnet table file is provided with priority, when having the network item of repetition in a plurality of subnet table files, in the whole network item, select this network item in the high subnet table file of priority, can certainly directly specify a certain subnet table file; Also can in the whole network item, select the short network item of network item length according to the length of network item.
At last, generation module 304 generates described PCB design file according to total net meter file.
From above description, as can be seen, method and apparatus according to embodiment of the invention proposition, by schematic diagram being divided into a plurality of parts, design simultaneously by several devisers, read the subnet table after the design then and merge a plurality of subnet table files, can increase work efficiency saving under the condition of cost thus.
Obviously, those skilled in the art can carry out various changes and modification to the present invention and not break away from the spirit and scope of the present invention.Like this, if of the present invention these are revised and modification belongs within the scope of claim of the present invention and equivalent technologies thereof, then the present invention also is intended to comprise these changes and modification interior.