Rapid word segmentation system for cross-module reference
By storing preset words and sub-word information in chip design in the database, and using prefix word analysis to determine the word ticking results, the storage space and execution efficiency problems caused by cross-module citation are solved, and the efficiency of the fast word ticking system is achieved. .
Patent Information
- Application Number
- CN202411138489.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-19
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2044-08-19
AI Technical Summary
In chip design, the deep reference structure caused by cross-module reference (XMR) causes increased storage space consumption and reduced code interface execution efficiency. The prior art cannot effectively solve this problem by splitting and recording XMR words.
By storing the first and last column information of preset words and their subwords in the database, prefix word analysis determines the preliminary index words, avoiding split storage, directly forming word slicing results, reducing storage space usage and improving Find efficiency.
It effectively reduces the storage space of XMR words, improves the function execution efficiency of the code interface, and realizes the technological progress of the fast word ticking system.
Smart Images

Figure CN119089900A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of chip design verification, and in particular to a fast word segmentation system for cross-module references. Background Art
[0002] Cross Module Referencing (XMR), also known as hierarchical referencing, is a built-in mechanism in Verilog, HDL, and SystemVerilog languages that is used to globally reference a network in a hierarchy in any module. Any network of a specific module in a different module can be directly referenced through XMR without going through a port.
[0003] In chip design codes, XMR is widely used to facilitate the reference of signals in one module in another module. As the amount of design code increases, the reference level will gradually deepen. As a result, an XMR object may have a deeper reference level. At this time, the developer and verifier needs to pay attention not only to the complete signal, but also to the pre-order index level signal at any level of the signal. The existing technology usually splits the XMR words and records them.
[0004] However, directly splitting and recording XMR words requires recording multiple pre-order index level signals corresponding to an XMR word containing multiple sub-words. This method consumes more storage space to record new words, increases the implementation cost of functions such as word search and keyword highlighting, and also reduces the function execution efficiency of the code interface.
[0005] Therefore, how to reduce the memory space occupied by word segmentation and improve the functional execution efficiency of the code interface has become an urgent problem to be solved. Summary of the invention
[0006] In view of the above technical problems, the technical solution adopted by the present invention is:
[0007] A fast word segmentation system for cross-module reference, the system comprising: a database, a processor and a memory storing a computer program, wherein the database comprises M preset words [a1, a2, ..., a m , …, a M ], a m is the mth preset word, where m is an integer in the range [1, M], and a m Includes K(m) subwords [b m 1, b m 2, …, b m k(m) , …, b m k(m) ], b mk(m) is the k(m)th subword in the mth preset word, k(m) is an integer in the range [1, K(m)], b m k(m) Corresponding to the first column information c m k(m)1 and tail column information c m k(m)2 , when the computer program is executed by a processor, the following steps are implemented:
[0008] S101, obtaining a target range selected by a user, and determining a preset word a corresponding to the target range from the M preset words n As the target word, determine a n The corresponding first column information c 1 11 , n is an integer in the range [1, M].
[0009] S102, based on the target range and a n The tail column information corresponding to the k(n) sub-words in the word is used to determine the current word.
[0010] S103: If the current word has a corresponding prefix word, a reference word is formed by the current word and the prefix word.
[0011] S104: Determine reference position information corresponding to the reference word.
[0012] S105, if the reference position information does not include c 1 11 , then the reference word is used as the current word, and the process returns to step S103 until the reference position information contains c 1 11 , taking the reference word as the word segmentation result.
[0013] Compared with the prior art, the present invention has obvious beneficial effects. By means of the above technical solution, the fast word segmentation system for cross-module reference provided by the present invention can achieve considerable technical progress and practicality, and has wide industrial utilization value, and has at least the following beneficial effects:
[0014] The present invention provides a fast word segmentation system for cross-module reference, the system comprising: a database, a processor and a memory storing a computer program, wherein the database comprises M preset words [a1, a2, ..., a m , …, a M ], a m is the mth preset word, where m is an integer in the range [1, M], and a m Includes K(m) subwords [bm 1, b m 2, …, b m k(m) , …, b m k(m) ], b m k(m) is the k(m)th subword in the mth preset word, k(m) is an integer in the range [1, K(m)], b m k(m) Corresponding to the first column information c m k(m)1 and tail column information c m k(m)2 When the computer program is executed by the processor, the following steps are implemented: S101, obtaining the target range selected by the user, and determining the preset word a corresponding to the target range from the M preset words. n As the target word, determine a n The corresponding first column information c 1 11 , n is an integer in the range of [1, M], S102, according to the target range and a n The tail column information corresponding to the k(n) subwords in the above text is respectively used to determine the current word, S103, if the current word has a corresponding prefix word, the current word and the prefix word form a reference word, S104, determine the reference position information corresponding to the reference word, S105, if the reference position information does not contain c 1 11 , then the reference word is used as the current word, and the process returns to step S103 until the reference position information contains c 1 11 , taking the reference word as the word segmentation result.
[0015] It can be seen that multiple preset words each containing several sub-words are directly stored in the database. When in use, the pre-order index word is determined by prefix word analysis without the need for split storage, which effectively reduces the memory space occupied by XMR word storage. The reduction in the number of stored words also effectively improves the efficiency of word segmentation and search, thereby improving the functional execution efficiency of the code interface. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] 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.
[0017] Figure 1A flowchart of a computer program executed by a processor in a fast word segmentation system for cross-module reference provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0018] 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.
[0019] This embodiment provides a fast word segmentation system for cross-module reference, the system comprising: a database, a processor and a memory storing a computer program, wherein the database comprises M preset words [a1, a2, ..., a m , …, a M ], a m is the mth preset word, where m is an integer in the range [1, M], and a m Includes K(m) subwords [b m 1, b m 2, …, b m k(m) , …, b m k(m) ], b m k(m) is the k(m)th subword in the mth preset word, k(m) is an integer in the range [1, K(m)], b m k(m) Corresponding to the first column information c m k(m)1 and tail column information c m k(m)2 , see Figure 1 , is a flowchart of a computer program in a fast word segmentation system for cross-module reference provided by an embodiment of the present invention when being executed by a processor. When the computer program is executed by the processor, the following steps are implemented:
[0020] S101, obtaining a target range selected by a user, and determining a preset word a corresponding to the target range from the M preset words n As the target word, determine a n The corresponding first column information c 1 11 , n is an integer in the range [1, M];
[0021] S102, based on the target range and a n The tail column information corresponding to the k(n) subwords in the word is used to determine the current word;
[0022] S103, if the current word has a corresponding prefix word, forming a reference word by the current word and the prefix word;
[0023] S104, determining reference position information corresponding to the reference word;
[0024] S105, if the reference position information does not include c 1 11 , then the reference word is used as the current word, and the process returns to step S103 until the reference position information contains c 1 11 , taking the reference word as the word segmentation result.
[0025] The preset word may refer to an XMR word. The preset word may include a plurality of sub-words. The sub-words may be separated by preset characters. The preset characters may be punctuation characters, etc. The first column of information c m k(m)1 It can refer to the column information corresponding to the first character of the k(m)th subword. Correspondingly, the tail column information c m k(m)2 It may refer to the column information corresponding to the last character of the k(m)th sub-word. It should be noted that, in this embodiment, the row information of the target word is assumed to be consistent with the row information of each sub-word it contains, so it will not be elaborated.
[0026] Specifically, the database can use a lightweight database based on DmNode, which is a lightweight data structure. By recording the object ID and type to build the target object, it can quickly respond to the loading and search requirements of a large number of objects of different types. It is a data structure that saves memory and improves operating efficiency.
[0027] In a specific implementation, obtaining the target range selected by the user includes:
[0028] When the user performs a first operation, a range corresponding to the first operation is used as the target range.
[0029] The first operation may refer to a user performing a drag operation on the selected XMR word, and accordingly, the target range is a range corresponding to the drag operation.
[0030] In one embodiment, based on the user performing the second operation, when the user performs the first operation, the range corresponding to the first operation is used as the target range, and the second operation may refer to the user selecting the XMR word, and the selection operation may be implemented by single-clicking or other operations.
[0031] In a specific implementation, the target range corresponds to the tail column information d2, and step S102 includes the following steps:
[0032] S1021, if there is a sub-word among the k(n) sub-words whose corresponding tail column information is the same as d2, then the sub-word is used as the current word;
[0033] S1022, otherwise, the subword corresponding to the tail column information which is smaller than d2 and has the smallest difference with d2 is used as the current word.
[0034] Among them, this embodiment allows the target range corresponding to the user operation not strictly corresponding to the preceding index word. When the last column information of the target range is not the last column information of a sub-word, it means that the user has not selected a complete sub-word at this time, and the sub-word closest to the last column information of the target range is used as the current word.
[0035] It should be noted that, since the pre-order index word in this embodiment is determined by prefix word analysis, the first column information of the target range can be before the first column information of the target word, but the user is required to not select other subwords before the first column information of the target word.
[0036] In a specific implementation, step S103 includes:
[0037] If in a n If there is a subword adjacent to the current word and before the current word, the subword is determined to be a prefix word corresponding to the current word, and a reference word is formed by the current word and the prefix word.
[0038] In a specific implementation, the determining the reference position information corresponding to the reference word includes:
[0039] The reference position information corresponding to the reference word is formed by using the first column information of the prefix word and the last column information of the current word.
[0040] In a specific implementation, after step S101 and before step S102, the following steps are also included:
[0041] S201, determining the type information corresponding to the target word;
[0042] S202: If the type information meets the preset condition, execute step S102.
[0043] The type information can be determined by searching for the corresponding ID and type from the database. The ID can be regarded as the key, and the type can be regarded as the value. The value corresponding to the target word is first determined by the ID, and then the type information is determined by the value.
[0044] Specifically, the preset condition may be that the type information is among a plurality of preset limited types, and the type information may include a module type, an instance type, a signal type, a function type, and the like.
[0045] Through this embodiment, after determining that the type of the target word does not meet the preset conditions, subsequent prefix word analysis is not performed, thereby avoiding invalid iterative operations and further ensuring the efficiency of code interface operations.
[0046] In a specific implementation, when the computer program is executed by a processor, the following steps are also implemented:
[0047] The display mode of the word segmentation result is determined according to the type information.
[0048] The display mode may refer to the color corresponding to the highlighted word segmentation result.
[0049] In a specific implementation, when the computer program is executed by a processor, the following steps are also implemented:
[0050] According to the type information, the functions supported by the word segmentation result are determined.
[0051] Among them, when the type information is a signal type, the functions supported by the segmentation result may include search, trace / load, drag and select, etc.; when the type information is a module type, instance type, or function type, the functions supported by the segmentation result may include search, drag and select, etc.
[0052] Specifically, the implementer can set the user to perform a third operation on the word segmentation result and select a corresponding function to execute. The third operation may refer to right-clicking.
[0053] In this embodiment, a plurality of preset words each containing a number of sub-words are directly stored in the database. When in use, the preceding index word is determined by prefix word analysis without the need for split storage, thereby effectively reducing the memory space occupied by XMR word storage. The reduction in the number of stored words also effectively improves the efficiency of word segmentation and search, thereby improving the functional execution efficiency of the code interface.
[0054] Although some specific embodiments of the present invention have been described in detail by way of example, it will be appreciated 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 will also be appreciated 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 fast word segmentation system for cross-module references, characterized in that: The system comprises: a database, a processor and a memory storing a computer program, wherein the database comprises M preset words [a1, a2, ..., a m , …, a M ], a m is the mth preset word, where m is an integer in the range [1, M], and a m Includes K(m) subwords [b m 1, b m 2, …, b m k(m) , …, b m k(m) ], b m k(m) is the k(m)th subword in the mth preset word, k(m) is an integer in the range [1, K(m)], b m k(m) Corresponding to the first column information c m k(m)1 and tail column information c m k(m)2 , when the computer program is executed by a processor, the following steps are implemented: S101, obtaining a target range selected by a user, and determining a preset word a corresponding to the target range from the M preset words n As the target word, determine a n The corresponding first column information c 1 11 , n is an integer in the range [1, M]; S102, based on the target range and a n The tail column information corresponding to the k(n) subwords in the word is used to determine the current word; S103, if the current word has a corresponding prefix word, forming a reference word by the current word and the prefix word; S104, determining reference position information corresponding to the reference word; S105, if the reference position information does not include c 1 11 , then the reference word is used as the current word, and the process returns to step S103 until the reference position information contains c 1 11 , taking the reference word as the word segmentation result.
2. The fast word segmentation system for cross-module reference according to claim 1 is characterized in that: The step of obtaining the target range selected by the user includes: When the user performs a first operation, a range corresponding to the first operation is used as the target range.
3. The fast word segmentation system for cross-module reference according to claim 1 is characterized in that: The target range corresponds to the tail column information d2, and step S102 includes the following steps: S1021, if there is a sub-word among the k(n) sub-words whose tail column information is the same as d2, then the sub-word is used as the current word; S1022, otherwise, the subword corresponding to the tail column information which is smaller than d2 and has the smallest difference with d2 is used as the current word.
4. The fast word segmentation system for cross-module reference according to claim 1 is characterized in that: Step S103 includes: If in a n If there is a subword adjacent to the current word and before the current word, the subword is determined to be a prefix word corresponding to the current word, and a reference word is formed by the current word and the prefix word.
5. The fast word segmentation system for cross-module reference according to claim 1 is characterized in that: The determining the reference position information corresponding to the reference word includes: The reference position information corresponding to the reference word is formed by using the first column information of the prefix word and the last column information of the current word.
6. The fast word segmentation system for cross-module reference according to claim 1 is characterized in that: After step S101 and before step S102, the following steps are also included: S201, determining the type information corresponding to the target word; S202: If the type information meets the preset condition, execute step S102.
7. The fast word segmentation system for cross-module reference according to claim 6 is characterized in that: When the computer program is executed by a processor, the following steps are also implemented: The display mode of the word segmentation result is determined according to the type information.
8. The fast word segmentation system for cross-module reference according to claim 6, characterized in that: When the computer program is executed by a processor, the following steps are also implemented: According to the type information, the functions supported by the word segmentation result are determined.
Citation Information
Patent Citations
Character string data retrieval method and device, computer equipment and storage medium
CN111339382A
Method and device for converting XMR signal transmission mode
CN116956787A
Hierarchical structure tree node searching method, electronic equipment and medium
CN117150095A
Regularized word segmentation
CN117355840A
Hierarchical B + tree algorithm and device based on dynamic prefix and computer storage medium
CN117632946A
