A method for loading massive data, electronic equipment and storage medium
By loading massive data in batches and combining with the scrolling speed optimization strategy, the problem of low loading efficiency of massive data in chip verification is solved, and more efficient data loading and system response are achieved.
Patent Information
- Application Number
- CN202410970078.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-19
- Publication Date
- 2024-10-08
- Estimated Expiration
- 2044-07-19
AI Technical Summary
During chip verification, the loading efficiency of massive data is low, resulting in system lags or crashes, and the inability to effectively process huge chip design data.
By storing the target attribute data sets in the target file in sequence, and loading the corresponding files into the memory in batches during loading, the loading strategy is optimized based on the scroll speed and position to avoid lags caused by one-time loading.
It achieves smooth loading of massive data, improves system response speed, avoids lag problems, and improves user experience.
Smart Images

Figure CN118535101B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of chip verification, and in particular to a method for loading mass data, an electronic device and a storage medium. Background Art
[0002] Chip verification mainly relies on Electronic Design Automation (EDA) tools, and the functions of EDA include PCB (printed circuit board) design. When facing a huge chip design, its PCB design is very complex. The PCB design includes multiple layers, each layer includes a large number of objects, and each object has a series of attribute information. The object can be a pin, component, module, etc. For large-scale integrated circuits, a chip will have 500,000 to 1 million pins, and each pin has attribute information, such as the shape, size, coordinate position, color, pin name and network name of the pin. The attribute information of a pin occupies about more than 100 bytes, so the attribute of a chip corresponding to the pin occupies about 50M bytes of data. Add to that the design data of other layers, such as the net layer, component layer, module layer, etc., and the attribute information of objects in all layers will be superimposed, and the attribute information is massive.
[0003] Currently, when users view one or more layers of attribute information, the system directly extracts the corresponding data information from the database and displays it visually. However, since it takes a lot of time to extract and load massive amounts of data information into the visual display interface, the loading efficiency is low, which leads to system freezes or crashes. Therefore, a method is urgently needed to load massive amounts of data without freezes. Summary of the invention
[0004] In view of the above technical problems, the technical solution adopted by the present invention is: a method for loading massive data, the method comprising the following steps:
[0005] S100, obtaining the specified N target stacking layers and target area; wherein the i-th stacking layer i Includes multiple design objects of chip design, and the value of i ranges from 1 to N.
[0006] S200, obtaining a database DB, wherein the database DB includes attribute information of all design objects in all stacks.
[0007] S300, acquiring all design objects in the lay of the area to obtain a target design object set OBJ.
[0008] S400, extract DB according to OBJ to obtain a massive target attribute data set Data.
[0009] S500, store Data into K target files in sequence, and generate K target files file={file1,file2,…,file k ,…,file K}, file k is the kth target file generated, and the value of k ranges from 1 to K; k It includes the attribute information of M(k) target design objects.
[0010] S600, store the files in file into the disk space in order.
[0011] S700, when the target load command is triggered, file1 is loaded from the disk space to the memory.
[0012] S800, when the target move command is triggered, the remaining target files in file are loaded from the disk space to the memory in sequence.
[0013] In addition, the present invention also provides a non-transitory computer-readable storage medium, in which at least one instruction or at least one program is stored, and the at least one instruction or the at least one program is loaded and executed by a processor to implement the above method.
[0014] In addition, the present invention also provides an electronic device, including a processor and the above-mentioned non-transitory computer-readable storage medium.
[0015] The present invention has at least the following beneficial effects:
[0016] The present invention provides a method for loading massive data, an electronic device and a storage medium, which sequentially stores the attribute data in a target attribute data set into a corresponding target file, and when a target loading command is triggered, file1 is loaded by default; when a target moving command is triggered, the remaining target files in file are sequentially loaded from the disk space to the memory. Compared with the method of directly loading the target attribute data set, the present invention sequentially loads the corresponding target files in batches without waiting, which can make the loading smoother and solve the jamming problem in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0018] Figure 1A flow chart of a method for loading massive data provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0019] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0020] See also Figure 1 , which shows a flow chart of a method for loading massive data, the method comprising the following steps:
[0021] S100, obtaining the specified N target stacking layers and target area; wherein the i-th stacking layer i Includes multiple design objects of chip design, and the value of i ranges from 1 to N.
[0022] It should be noted that the PCB design of the chip design includes multiple stacks, each of which includes different design objects, such as a pin stack, where the design object in the pin stack is a large number of pins. Another example is a wiring stack, where the design object in the wiring stack is a large number of wirings. All stacks are combined together to form the entire PCB design.
[0023] The target overlay is the overlay specified by the user.
[0024] The target area is a selection area specified by the user, and the target area acts on all target overlays. In other words, when the user specifies the target area, it is equivalent to selecting the same target area of all target overlays.
[0025] Optionally, the design objects are components, pins, wirings, pads and vias in PCB design, and other design objects in PCB design also fall within the protection scope of the present invention.
[0026] S200, obtaining a database DB, wherein the database DB includes attribute information of all design objects in all stacks.
[0027] Among them, DB is a database generated and maintained during the PCB design process that contains all aspects of the design attribute information. DB is the core of the design data, which stores the information and attributes of various objects related to the design.
[0028] The attribute information of the design object is the characteristics and behavior of the design object. For example, the attribute information of a pin includes information such as the pin number, pin name, shape and size of the pin.
[0029] S300, acquiring all design objects in the lay of the area to obtain a target design object set OBJ.
[0030] S400, extract DB according to OBJ to obtain a massive target attribute data set Data.
[0031] Among them, massive refers to the amount of data that is stuck during the one-time loading process when the amount of information exceeds the current system's ability to load in a timely manner.
[0032] Optionally, the target attribute data is obtained by querying the database according to the coordinate position of each target object. Other methods of extracting the corresponding target attribute data in the DB according to the target design object fall within the protection scope of the present invention.
[0033] S500, store Data into K target files in sequence, and generate K target files file={file1,file2,…,file k ,…,file K}, file k is the kth target file generated, and the value of k ranges from 1 to K; k The file includes the attribute information of M(k) target design objects. It should be noted that each target file has an index number.
[0034] S600, store the files in file into the disk space in order.
[0035] Disk space refers to the total capacity of a hard disk or storage device that can be used to store data.
[0036] S700, when the target load command is triggered, file1 is loaded from the disk space to the memory.
[0037] The triggering condition of the target loading command is: when the user triggers a click event, in response to the user's click event, the attribute information of the object is visually displayed in the window.
[0038] Among them, file1 is the default loaded target file. By loading the default target file, the property information of the corresponding design object can be displayed immediately without lag, which improves the efficiency of window loading.
[0039] S800, when the target move command is triggered, the remaining target files in file are loaded from the disk space to the memory in sequence.
[0040] The triggering condition of the target moving command is an input event generated by the user dragging the scroll bar or rolling the mouse wheel. When the system receives and processes a series of user input events, the content display position of the window view is changed.
[0041] Compared with the method of directly loading the target attribute data set, the present invention loads the corresponding target files in batches in sequence without waiting, which can make the loading smoother and solve the jamming problem in the prior art.
[0042] As a preferred embodiment, S500 further includes the step of dividing and generating a target file, wherein the file k The partition generation steps include:
[0043] S510, when traversing to the rth target design object obj in Data r When getting obj r Attribute information data r Size in bytes r And the cumulative sum when traversing the r-1th target design object; where r ranges from 1 to R, and R is the total number of target design objects in OBJ.
[0044] S520, sum and size r Add the sum to get the sum result, and assign the sum result back to sum to get the updated sum. That is, sum satisfies: sum = sum + size r .
[0045] S530: When sum is less than the preset file capacity threshold sum th When data r Save to file k Otherwise, create the k+1th target file file k+1 , data r Save to file k+1 And initialize sum to size r .
[0046] Through the steps S510-S520, the massive attribute information data of the design objects in Data is divided into different target files, and the size of each target file obtained does not exceed sum th , so that it can be loaded in blocks during subsequent loading, solving the problem of lag.
[0047] As a preferred embodiment, before generating file, S500 also includes: obtaining the total byte amount total of Data, when total is less than a preset total amount threshold, not starting the step of dividing and generating a target file, and storing all attribute information in Data into a target file; otherwise, starting the step of dividing and generating a target file to generate file.
[0048] It should be noted that, since the target design object needs to be divided into different target files in a traversal manner each time the partitioning and file generation process is started, when the bytes in the Data are not enough to cause the system to freeze, there is no need to start the partitioning and target file generation process, which can save system computing resources.
[0049] As a preferred embodiment, S800 further includes a first optimization step:
[0050] S810, obtain an index table, the index table includes K mapping relationships, wherein each k-th mapping relationship is file k and loading position threshold loc k,th The corresponding relationship. Among them, loc k,th The pixel distance between the scroll bar and the top of the window. When the scroll position is greater than or equal to loc k,th Load file k .
[0051] S820, obtain the scroll position loc of the current window t .loc t is the pixel distance between the current scroll bar and the top of the window. Methods for obtaining the scroll position of the current window by monitoring the input events generated by dragging the scroll bar or rolling the mouse all fall within the protection scope of the present invention.
[0052] S830, when loc t ≥loc k,th When loading file k Others are used to determine sloc t Whether it falls into loc k All of the methods fall within the protection scope of the present invention.
[0053] Through the steps S810-S830, the purpose of loading the corresponding target file as the scrolling position changes can be achieved. There is no need to load the target file corresponding to the position that has not been scrolled, thereby reducing the occupation of computing resources and memory usage.
[0054] As a preferred embodiment, S800 further includes a second optimization step:
[0055] S801, obtaining the scrolling speed v of the window.
[0056] Optionally, v satisfies: v=L / Δt, wherein L is the pixel distance between at least two consecutive scrolling events, and Δt is the time difference between at least two consecutive scrolling events.
[0057] S802, get the scroll position loc of the window q .
[0058] S803, when v>v t1 When v t1 is the preset first speed threshold v t1 , not executed according to loc q Step to load the target file. Optional, v t1 The preset standard is: when the scroll speed is less than v t1 When the scrolling speed is greater than v, the human eye can distinguish the outline of a single word in the window. t1 When the human eye cannot distinguish the outline of the text in the window. Others are used to configure v t1 When the human eye cannot distinguish the outline of the text in the window, it means that the content is invalid information for the user. Loading the attribute information in real time will only increase the loading amount and slow down the loading speed of the valid attribute information. Therefore, when v>v t1 Do not load loc q The corresponding target file can reduce the amount of calculation and improve the loading of effective attribute information.
[0059] As a preferred embodiment, S800 further includes: S804, when 0≤v≤v t1 When executing according to loc q Steps to load the target file:
[0060] S8031, according to loc q Query the index table, when loc q ≥loc k,th When you get file k ; Wherein, the index table includes K mapping relationships, wherein each k-th mapping relationship is file k and loading position threshold loc k,th The mapping relationship.
[0061] Among them, when v=0, it means that the window stops scrolling.
[0062] It should be noted that through v t1 Distinguish the speed of scrolling, greater than v t1 The scrolling speed is fast, less than v t1 The scrolling speed is slow. When the user scrolls slowly, all target files corresponding to the scrolling position are loaded sequentially, which reduces lag and improves loading efficiency while taking into account user needs.
[0063] The K mapping relationships in the index table correspond to K target files respectively, and each target file corresponds to a loading position threshold.
[0064] S8032, load file k .
[0065] Through the above method, it can be achieved that when the scrolling speed is less than the first loading speed threshold v t1 When scrolling, the corresponding target files are loaded in real time and sequentially according to the scrolling position, which not only meets the needs of users, but also reduces the jamming and improves the loading efficiency.
[0066] The combination of steps S803 and S804 can effectively load valid attribute information in real time, improve loading efficiency, and reduce computing resource usage and memory usage.
[0067] In summary, the present invention obtains a target attribute data set through a specified target stack and target area, stores the attribute data in the target attribute data set in order into the corresponding target file, and obtains K target files; stores the K target files in order into the disk space, and when the target load command is triggered, file1 is loaded by default; when the target move command is triggered, the remaining target files in file are loaded from the disk space to the memory in order. Compared with the method of directly loading the target attribute data set, the present invention loads the corresponding target files in batches in order, without waiting, which can make the loading smoother and solve the jamming problem in the prior art.
[0068] An embodiment of the present invention also provides a non-transitory computer-readable storage medium, which can be set in an electronic device to store at least one instruction or at least one program related to implementing a method in a method embodiment. The at least one instruction or the at least one program is loaded and executed by the processor to implement the method provided in the above embodiment.
[0069] An embodiment of the present invention further provides an electronic device, comprising a processor and the aforementioned non-transitory computer-readable storage medium.
[0070] An embodiment of the present invention further provides a computer program product, which includes program code. When the program product is run on an electronic device, the program code is used to enable the electronic device to execute the steps of the method according to various exemplary embodiments of the present invention described above in this specification.
[0071] Although some specific embodiments of the present invention have been described in detail by way of example, it should be understood by those skilled in the art that the above examples are for illustration only and are not intended to limit the scope of the present invention. It should also be understood by those skilled in the art that various modifications may be made to the embodiments without departing from the scope and spirit of the present invention. The scope of the present invention is defined by the appended claims.
Claims
1. A method for loading massive data, characterized in that: The method comprises the following steps: S100, the PCB design of the chip design includes multiple stacks, each stack includes different design objects; obtain the specified N target stack lays and target area; wherein the i-th stack lay i Including multiple design objects of chip design, i ranges from 1 to N; S200, obtaining a database DB, wherein the database DB includes attribute information of all design objects in all stacks; S300, acquiring all design objects in the lay of the area to obtain a target design object set OBJ; S400, extracting DB according to OBJ to obtain a massive target attribute data set Data; S500, store Data into K target files in sequence, and generate K target files file={file1,file2,…,file k ,…,file K }, file k is the kth target file generated, and the value of k ranges from 1 to K; k includes the attribute information of M(k) target design objects; S600, storing the files in file into the disk space in order; S700, when the target load command is triggered, file1 is loaded from the disk space to the memory; S800, when the target move command is triggered, the remaining target files in file are loaded from the disk space to the memory in sequence; Among them, S800 also includes a first optimization step: S810, obtain an index table, the index table includes K mapping relationships, wherein each k-th mapping relationship is file k and loading position threshold loc k,th The corresponding relationship; S820, obtain the scroll position loc of the current window t ; S830, when loc t ≥loc k,th When loading file k .
2. The method according to claim 1, characterized in that S500 also includes the step of dividing and generating a target file, wherein the file k The partition generation steps include: S510, when traversing to the rth target design object obj in Data r When getting obj r Attribute information data r Size in bytes r and the cumulative sum when traversing the r-1th target design object; where r ranges from 1 to R, and R is the total number of target design objects in OBJ; S520, sum and size r Add the sum to get the sum result, and assign the sum result back to sum to get the updated sum; S530: When sum is less than the preset file capacity threshold sum th When data r Save to file k Otherwise, create the k+1th target file file k+1 , data r Save to file k+1 And initialize sum to size r .
3. The method according to claim 1, characterized in that: Before generating file, S500 also includes: obtaining the total byte amount total of Data, when total is less than a preset total amount threshold, not starting the step of dividing and generating target files, and storing all attribute information in Data into a target file; otherwise, starting the step of dividing and generating target files to generate file.
4. The method according to claim 1, characterized in that S800 also includes a second optimization step: S801, obtaining the scrolling speed v of the window; S802, get the scroll position loc of the window q ; S803, when v>v t1 When v t1 is the preset first speed threshold v t1 , not executed according to loc q Steps to load the target file.
5. The method according to claim 4, characterized in that The S800 also includes: S804, when 0≤v≤v t1 When executing according to loc q Steps to load the target file: S8031, according to loc q Query the index table, when loc q ≥loc k,th When you get file k ; Wherein, the index table includes K mapping relationships, wherein each k-th mapping relationship is file k and loading position threshold loc k,th The mapping relationship; S8032, load file k .
6. The method according to claim 4, characterized in that In S801, v satisfies: v=L / ∆t; wherein L is the pixel distance between at least two consecutive scrolling events, and ∆t is the time difference between at least two consecutive scrolling events.
7. The method according to claim 1, characterized in that The target stackup in S100 is the stackup in the PCB design.
8. A non-transitory computer-readable storage medium, wherein at least one instruction or at least one program is stored in the storage medium, characterized in that: The at least one instruction or the at least one program is loaded and executed by the processor to implement the method according to any one of claims 1 to 7.
9. An electronic device, characterized in that: The invention comprises a processor and the non-transitory computer-readable storage medium as claimed in claim 8.
