Method, device and computer-readable storage medium for batch configuration of registers
By obtaining and parsing the string information input by the user in the table format configuration interface of the register, batch configuration of register addresses and variable names is realized, complex operation problems in the prior art are solved, and configuration efficiency and flexibility are improved.
Patent Information
- Application Number
- CN202210704206.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-10-31
- Publication Date
- 2025-08-26
- Estimated Expiration
- 2039-10-31
AI Technical Summary
In the prior art, the method and device software for batch quickly configuring register addresses and point variable names lack batch modification functions and complicated operations, and most software does not provide effective batch configuration methods.
By obtaining the string information input by the user in the register table format configuration interface, determining the increment or decrement method, step value and table modification range, batch configuration of register address and variable name is realized, and the cell content acquisition module, step method determination module, step value determination module and batch configuration module are used for automatic configuration.
It realizes rapid batch modification of register addresses and variable names, improves the work efficiency of engineers, simplifies the operation process, and supports certain fault tolerance and flexible configuration.
Smart Images

Figure CN115080118B_ABST
Abstract
Description
[0001] This application is a divisional application of the Chinese patent application filed on October 31, 2019, with application number 201911063076.8 and title “Method, device and computer-readable storage medium for batch configuration of registers”. The entire contents of the Chinese patent application are incorporated herein by reference. Technical Field
[0002] The present invention relates to a method, a device and a computer-readable storage medium for configuring registers in batches. Background Art
[0003] Most of the methods and device software for batch rapid configuration of register addresses and point variable names on the current market do not have batch modification functions. Some software provide import and export functions, using external Excel for batch modification, and some software provides interface entry, but the operation is relatively complicated.
[0004] For example, the document with Chinese patent application number CN201910447596.2 discloses a device, method and system for configuring registers, but it does not disclose a method for quickly configuring register addresses or register variable names in batches. Summary of the Invention
[0005] In view of this, the main object of the present invention is to provide a method, apparatus and computer-readable storage medium for batch configuring registers, so as to enable users to quickly configure register information in batches in a tabular configuration interface of registers.
[0006] The method for batch configuring registers provided by the present invention is applied to a tabular configuration interface of registers, and includes:
[0007] A. Obtaining a first number representing a register address or a register variable name including the first number, and a character string adjacent to the first number, edited by a user in a cell of a tabular configuration interface;
[0008] B. In the string:
[0009] When determining that there is a first substring for identifying an increasing or decreasing step, determining the stepping mode accordingly;
[0010] When determining that there is a second number adjacent to the first substring, determining the second number as the step value;
[0011] When it is determined that the second substring for identifying the table modification range is present and that there is a third number adjacent to the second substring, the third number is determined as the table modification range value indicated by the string;
[0012] C. For each cell in the table range corresponding to the third number, starting with the first number and using the second number as the step value, the value of the register address in each cell or the value of the character string in the digital format corresponding to the first digital position in the register variable name is configured in sequence according to the determined increasing or decreasing step method.
[0013] As described above, the present invention provides a tabular configuration interface involving register addresses and variable names, which allows for rapid batch modification and input by inputting character strings, i.e., operators, thereby greatly improving the work efficiency of engineers.
[0014] Optionally, the first number and the character string adjacent to the first number are composed of the first number, the first substring, the second number, the second substring, and the third number in this order.
[0015] From the above, you can set the strings to the above order as needed.
[0016] Optionally, step B further includes: when it is determined that there is no second digit adjacent to the first substring, setting the step value in step C to 1.
[0017] As described above, by defaulting to this step value mode, it is more convenient for users to input this step value.
[0018] Optionally, the configuration is a configuration register variable name, and the cell is a cell corresponding to the register variable name item.
[0019] Step A further includes: the register variable name edited in the cell further includes symbols that appear in pairs, and the adjacent first number and character string are located within the pair of symbols;
[0020] The configuration in step C also includes: deleting the symbols that appear in pairs.
[0021] From the above, we can better distinguish the first number to be modified in the register variable name.
[0022] Optionally, the register variable name edited in the cell contains multiple pairs of symbols that appear in pairs, and multiple groups of the same or different first numbers and character strings are correspondingly located within the multiple pairs of symbols;
[0023] Step B is to judge each group of character strings;
[0024] The method between step B and step C further includes: taking the multiplication result of each third digit in each group of character strings as the total table modification range value;
[0025] The configuration described in step C also includes: executing step C for each group in sequence in a calculation method that forms a nested loop for each group, and configuring the value of the substring in the digital format corresponding to the first digital position of each group in the register variable name in each cell within the modification range of the total table.
[0026] As described above, for a register variable name, when the register variable name has numbers at multiple positions, the present invention can also perform batch configuration of the numbers at these multiple positions in the variable name.
[0027] Optionally, the character strings of each group in step A further include a third substring indicating a priority; and during the configuration in step C, the priority corresponding to the third substring is used as the priority of the loop in the nested loop.
[0028] From the above, when batch configuring the numbers in multiple positions in the register variable name, the order in which the numbers in these multiple positions are batch modified can be flexibly configured through the third character string representing the priority.
[0029] The present invention also provides a device for batch configuration of registers, comprising:
[0030] A cell content acquisition module, configured to acquire a first number representing a register address or a register variable name containing the first number, and a character string adjacent to the first number, edited by a user in a cell of a table-format configuration interface;
[0031] a stepping mode determining module, configured to determine a stepping mode based on a first substring for identifying an increasing or decreasing stepping mode when determining in the character string that the substring has the first substring;
[0032] a step value determining module, configured to, when determining that there is a second number adjacent to the first substring in the string, determine the second number as the step value;
[0033] a table modification range determining module, configured to, when determining that the second substring for identifying the table modification range is present and that the third number is adjacent to the second substring, determine the third number as the table modification range value indicated by the string;
[0034] A batch configuration module is used to configure the values of the register addresses in each cell or the values of the character strings in the digital format corresponding to the first digital position in the register variable name in sequence according to the determined increasing or decreasing stepping method, starting with the first number and using the second number as the stepping value, for each cell in the table range corresponding to the third number.
[0035] Optionally, when the configuration is to configure a register variable name, and the cell is a cell corresponding to a register variable name item, the register variable name edited in the cell acquired by the cell content acquisition module also has symbols that appear in pairs, and the adjacent first number and character string are located within the pair of symbols,
[0036] The batch configuration module is also used to delete the symbols that appear in pairs during configuration.
[0037] Optionally, when the register variable name edited in the cell acquired by the cell content acquisition module contains multiple pairs of symbols that appear in pairs, and multiple groups of the same or different first numbers and character strings are correspondingly located within the multiple pairs of symbols,
[0038] The stepping mode determination module is further used to determine the stepping mode corresponding to each group of character strings;
[0039] The step value determination module is further configured to use the multiplication result of each third digit in each group of character strings as the total table modification range value;
[0040] When performing batch configuration, the batch configuration module is also used to execute batch configuration for each group in sequence in a calculation method that each group constitutes a nested loop, and configure the value of the substring in the digital format corresponding to the first digital position of each group in the register variable name in each cell within the modification range of the total table.
[0041] The present invention also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the method for batch configuring registers described in the above technical solutions are implemented. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 Flowchart for batch configuration registers;
[0043] Figure 2-A This is a schematic diagram of a cell in a selected register address item; Figure 2-B is a schematic diagram of the editing of this cell; Figure 2-C This is a schematic diagram after configuration is executed;
[0044] Figure 3-A This is a schematic diagram of a cell with a selected register variable name; Figure 3-B is a schematic diagram of the editing of this cell; Figure 3-C This is a schematic diagram after configuration is executed;
[0045] Figure 4-A This is a schematic diagram of a cell with a selected register variable name; Figure 4-B is a schematic diagram of the editing of this cell; Figure 4-C This is a schematic diagram after configuration is executed;
[0046] Figure 5-A This is a schematic diagram of a cell with a selected register variable name; Figure 5-B is a schematic diagram of the editing of this cell; Figure 5-C This is a schematic diagram after configuration is executed;
[0047] Figure 6-A This is a schematic diagram of a cell with a selected register variable name; Figure 6-B is a schematic diagram of the editing of this cell; Figure 6-C This is a diagram after configuration is executed. DETAILED DESCRIPTION
[0048] The present invention can be applied to a tabular configuration interface of a register, that is, the register information is read by a configuration software and displayed through a tabular configuration interface, and the user can edit the register information displayed on the configuration interface. After the user clicks a submit control (such as a virtual button) through the configuration interface, the configuration information on the configuration interface is updated to the register. The method of batch configuration of registers of the present invention is described in detail below, see Figure 1 The flowchart of the batch configuration register is shown, comprising the following steps:
[0049] S100: The table configuration interface displays register information in a table style. The user clicks to select a cell in the table displayed on the table configuration interface and edits the information in the cell by inputting or modifying.
[0050] Among them, Figures 2-A to 5-C In the table format shown, each column contains information about the registers to be configured, including the register address, register variable name, and other items. It can also include comments, etc. The following examples will illustrate how to batch modify the register address and register variable name items.
[0051] When the user selects a cell of a register address item, the content of the cell after editing can be the register address (such as Figure 2-B The bold cell "10") and a string connected to it. The string includes: the first substring, such as Figure 2-B "++" in the bold box cell; the second number, such as Figure 2-B The "2" in the bold cell; the second substring, such as Figure 2-B The “:” in the bold box cell; the third number, such as Figure 2-BThe "4" in the bold cell. That is, the content of the cell after editing is as follows Figure 2-B The “10++2:4” shown in .
[0052] It should be noted that when the user clicks the cell, a prompt for the required input format is provided to facilitate subsequent correct parsing of the edited cell content. The string can also include other substrings that do not affect subsequent parsing, such as "10++2,:4," "10++2&:4," "10,RE++2:4," or "10 ++ 2:4" (with a space before and after the "++"). This provides a certain degree of error tolerance during the subsequent parsing process.
[0053] When the user selects a cell of a register variable name, the content of the cell after editing may be a register variable name containing the first number (e.g. Figure 3-B "IO1" in the bold cell) and a string adjacent to the first number, wherein the string includes: a first substring, such as Figure 3-B "++" in the bold box cell; the second number, such as Figure 3-B "2" in the bold cell; the second substring, such as Figure 3-B The “:” in the bold box cell; the third number, such as Figure 3-B The "3" in the bold cell. That is, the content of the cell after editing is as follows Figure 3-B ”IO1++2:3” shown in .
[0054] In addition, to better distinguish the first digit to be modified in the register variable name, you can also set symbols that appear in pairs and place the first digit and string within the pair of symbols. In this example, a pair of "()" is used, that is, the content of the cell after editing can also be "IO (1++2:3)". The advantage of using symbols that appear in pairs is that the position of the first digit in the register variable name to be modified can be more clearly determined. For example, for "IO4 (1++2:3)", "4IO (1++2:3)", "IO (1++2:3)_4", "IO (1++2:3)_OUT4" or "(1++2:3)IO _4", the position corresponding to "4" will not be modified in batch modification, and only the digit corresponding to "1" will be modified.
[0055] As with the register address item cell mentioned above, when the user clicks the cell for the register variable name item, the user may be prompted with the format to be entered, and the string may also include other substrings that do not affect subsequent parsing. In order to avoid mistaking the other substrings in the string for register variable names, the format of using paired symbols should be adopted, such as "IO(1++2,:3)_4".
[0056] S200: Obtaining the information in the cell edited by the user through the table configuration interface, and determining whether it matches the type of the item corresponding to the cell. If it matches, proceed to the subsequent steps.
[0057] For example, when the cell is a cell of a register address item, it is determined whether the content other than the character string in the information in the cell is in a numeric format.
[0058] S300: Parse the content in the cell and cache the parsed instructions, wherein the parsing step specifically includes the following sub-steps:
[0059] S3001: Determine whether the string contains a first substring for identifying incrementing or decrementing steps. If so, determine the incrementing mode accordingly and proceed to the next substep. Otherwise, exit the process and modify the data in the cell in the same manner as for modifying a single piece of data. The first substring may also be referred to as an operator.
[0060] In this example, "++" or "--" is used as the first substring to identify the incrementing or decrementing step, respectively.
[0061] S3002: When it is determined that the character string contains a second number adjacent to the first substring, the second number is determined as a step value; if it is determined that there is no second number adjacent to the first substring, the step value is set to 1.
[0062] For example, when a cell corresponding to the register address item is “10++2:4”, the character string is “++2:4”, and the step value is determined to be 2.
[0063] For another example, when a cell corresponding to the register variable name is "IO1++2:3" or "IO(1++2:3)", the character string is "++2:3", and the step value is determined to be 2.
[0064] For example, when a cell corresponding to a register address item contains "10++:4", or when a cell corresponding to a register variable name item contains "IO1++:4", the character string is both "++:4", and the first substring "++" in the character string does not have a second number adjacent to it, so the step value is set to 1.
[0065] S3003: When it is determined that the string contains a second substring for identifying a table modification range and a third number adjacent to the second substring, the third number is determined as the table modification range value indicated by the string; when it is determined that there is neither a second substring nor a third number, the table range is set to be a range from the cell corresponding to the item to the last cell with data. By modifying the range by default, user input is simplified when such modification is required.
[0066] In this example, ":" is used as the second substring.
[0067] For example, when a cell corresponding to the register address item contains "10++2:4", the character string is "++2:4". Accordingly, the table range is the cell under the register address item and the four cells thereafter.
[0068] For example, when a cell corresponding to the register variable name is "IO1++2:3" or "IO (1++2:3)", the character string is "++2:3". Accordingly, the table range is the cell under the register variable name and the three cells thereafter.
[0069] For example, Figure 6-B As shown, when the cell corresponding to the register address item is "10++2", the string is "++2", and the second substring ":" and the numbers following it do not appear. Figure 6-C The modified table range shown is from the cell under the register address to the last cell with data, that is, Figure 6-C As shown in , modify the cell in the last row to the register address item.
[0070] S400: configuring the corresponding cells according to the cached instructions, wherein the configuration action may be triggered when the user presses the Enter key after editing the cell, or clicks a configuration control displayed on the table configuration interface after editing the cell.
[0071] The configuration process is: for each cell in the table range corresponding to the third number, starting with the first number and using the second number as the step value, the value of the register address in each cell or the value of the string in the digital format corresponding to the first digital position in the register variable name is configured in sequence according to the determined increasing or decreasing step method.
[0072] like Figure 2-C 、 Figure 3-C Shown are the Figure 2-B 、 Figure 3-BThe results of each cell after parsing the corresponding cell and configuring it accordingly.
[0073] S500: The user clicks a submit control in the table configuration interface. After submitting the instruction, the configured content is updated to the register.
[0074] In addition, the user can also select Save As or Save in the menu provided in the tabular configuration interface to store the configuration information in the computer as a file so that it can be read from the computer when needed, and use the Submit control to update the configuration content to the register.
[0075] As described above, the present invention can realize batch configuration of register addresses and register variable names, and the above step S300 has a certain fault tolerance when parsing the string. For example, spaces and other punctuation marks can be filtered out through the above step and parsed normally.
[0076] When the cell is a cell corresponding to a register variable name, and the configuration is to configure the register variable name, since multiple first digits, the same or different, may appear in different positions of the register variable name, for example, the register variable name is "BP1_IO1_VAR", these multiple first digits may be configured when configuring the register variable name, as described in detail below:
[0077] As described above, for register variable names with multiple first digits, it is necessary to clearly identify the position of the first digit in the register variable name to be modified. Therefore, it is necessary to use the above-mentioned multiple pairs of symbols that appear in pairs, and set multiple sets of the same or different first digits and character strings correspondingly within the multiple pairs of symbols. Corresponding to the above-mentioned step S100, when editing a cell of the register variable name item, the cell is edited to: "BP(1++:2)_IO(1++:3)_VAR", which can be seen in Figure 4-B Schematic diagram shown.
[0078] When parsing the cell content, after determining that multiple pairs of symbols appear, each string within the symbol is parsed using the steps described in step S300. Furthermore, the product of the third digits in each string group is used as the total table modification range value. In this example, 2*3=6 is used as the total table modification range value.
[0079] When configuring each cell involved, the above step S400 is performed in sequence for each group in a calculation method that forms a nested loop for each group, so as to configure the value of the substring in the digital format corresponding to the first digital position of each group in the register variable name in each cell within the modification range of the total table.
[0080] For example Figure 4-B "BP(1++:2)_IO(1++:3)_VAR" in the bold cell has two groups of first numbers and strings, the first group is "1++:2" and the second group is "1++:3". The calculation method of the two groups forming a nested loop is: the table modification operation corresponding to the first group is used as the outer loop, and its table modification range value 2 is the number of outer loops; the table modification operation corresponding to the second group is used as the inner loop, and its table modification range value 3 is the number of inner loops. Based on this, a nested loop is formed, and the numbers in the first digit positions of each group are calculated and modified in this way.
[0081] The calculation process of the nested loop is specifically described with "BP(1++:2)_IO(1++:3)_VAR". The nested loop is as follows: the outer loop corresponds to "BP": the step value is 1 and the number of outer loops is 2; the inner loop corresponds to "IO": the step value is 1 and the number of inner loops is 3. The modification process according to this nested loop is as follows:
[0082] The parameter in the outer loop is set to the first value, namely BP1. The inner loop performs three loop calculations. Each loop in the inner loop increases the first number corresponding to IO by 1 (the first loop defaults to 0). Based on this, after three inner loops, IO1, IO2, and IO3 are generated. The corresponding complete register variable names are BP1_IO1_VAR, BP1_IO2_VAR, and BP1_IO3_VAR.
[0083] The parameter in the outer loop is set to the second value. According to the step value of 1, BP2 is set. The inner loop re-executes the calculation three times to generate IO1, IO2, and IO3. The corresponding complete register variable names are BP2_IO1_VAR, BP2_IO2_VAR, and BP2_IO3_VAR.
[0084] The calculated BP1_IO1_VAR, BP1_IO2_VAR, BP1_IO3_VAR, BP2_IO1_VAR, BP2_IO2_VAR, and BP2_IO3_VAR are sequentially configured into the 6 cells corresponding to the register variable name. The configuration results can be seen in Figure 4-C .
[0085] In addition, a third substring indicating a priority can be edited in each group of strings; in this way, when configuring the cells involved, the priority of the third substring is used as the priority of the loop in the nested loop. For example, if "; number" is used to represent the third string, then you can use Figure 5-B"BP(1++:2;1)_IO(1++:3;2)_VAR" in the bold cell indicates that the priority of the first group of loops is lower than that of the second group of loops, that is, the first group serves as an inner loop and the second group as an outer loop.
[0086] The calculation process of the nested loop is specifically described by "BP(1++:2;1)_IO(1++:3;2)_VAR". The nested loop is based on the priority: the outer loop corresponds to "IO": the step value is 1 and the number of outer loops is 3; the inner loop corresponds to "BP": the step value is 1 and the number of inner loops is 2. The modification process according to the nested loop is as follows:
[0087] The parameter in the outer loop is set to the first value, i.e. IO1. The inner loop performs two loop calculations. Each loop in the inner loop increases the first number corresponding to BP by 1 (the default value is 0 in the first loop). Based on this, after two inner loops, BP1 and BP2 are generated. The corresponding full register variable names are BP1_IO1_VAR and BP2_IO1_VAR.
[0088] The parameter in the outer loop is set to the second value. According to the step value 1, IO2 is set. The inner loop re-executes the loop calculation twice to generate BP1 and BP2. The corresponding complete register variable names are BP1_IO2_VAR and BP2_IO2_VAR.
[0089] The parameter in the outer loop is set to the third value. According to the step value 1, IO3 is set. The inner loop re-executes the loop calculation twice to generate BP1 and BP2. The corresponding full register variable names are BP1_IO3_VAR and BP2_IO3_VAR.
[0090] The calculated BP1_IO1_VAR, BP2_IO1_VAR, BP1_IO2_VAR, BP2_IO2_VAR, BP1_IO3_VAR, BP2_IO3_VAR are sequentially configured into the 6 cells corresponding to the register variable name. The corresponding configuration results can be found in Figure 5-C .
[0091] As described above, for register variable names, the present invention can also batch configure the numbers in multiple positions in the variable name, and through the third character string representing the priority, the order in which the numbers in multiple positions in the variable name are batch modified can be flexibly configured.
[0092] The present invention also provides a device for batch configuration registers, comprising:
[0093] A cell content acquisition module, configured to acquire a first number representing a register address or a register variable name containing the first number, and a character string adjacent to the first number, edited by a user in a cell of a table-format configuration interface;
[0094] a stepping mode determining module, configured to determine a stepping mode based on a first substring for identifying an increasing or decreasing stepping mode when determining in the character string that the substring has the first substring;
[0095] a step value determining module, configured to, when determining that the character string contains a second number adjacent to the first substring, determine the second number as the step value; and when determining that the character string does not contain a second number adjacent to the first substring, set the step value to 1;
[0096] a table modification range determining module, configured to, when determining that the second substring for identifying the table modification range is present and that the third number is adjacent to the second substring, determine the third number as the table modification range value indicated by the string;
[0097] A batch configuration module is used to configure the values of the register addresses in each cell or the values of the character strings in the digital format corresponding to the first digital position in the register variable name in sequence according to the determined increasing or decreasing stepping method, starting with the first number and using the second number as the stepping value, for each cell in the table range corresponding to the third number.
[0098] When the configuration is to configure the register variable name, and the cell is a cell corresponding to the register variable name item, the register variable name edited in the cell acquired by the cell content acquisition module also has symbols that appear in pairs, and the adjacent first number and character string are located within the pair of symbols, correspondingly, the batch configuration module is also used to delete the symbols that appear in pairs during configuration.
[0099] When the register variable name edited in the cell acquired by the cell content acquisition module contains multiple pairs of symbols that appear in pairs, and multiple groups of the same or different first numbers and character strings are correspondingly located within the multiple pairs of symbols, correspondingly,
[0100] The step mode determination module determines the step mode corresponding to each group of character strings;
[0101] The step value determination module is further configured to use the multiplication result of each third digit in each group of character strings as the total table modification range value;
[0102] When performing batch configuration, the batch configuration module is also used to: execute batch configuration for each group in turn in a calculation method that each group constitutes a nested loop, and configure the value of the substring in the digital format corresponding to the first digital position of each group in the register variable name in each cell within the modification range of the total table.
[0103] When the character strings of the groups in the cell acquired by the cell content acquisition module further include a third substring indicating a priority, the method further includes:
[0104] A priority determination module, used to determine the priority of each group of character strings;
[0105] When performing batch configuration, the batch configuration module is further configured to: use the priority corresponding to the third substring as the priority of the loop in the nested loop.
[0106] It also includes a configuration submission module, which is used to update the configured content to the register after obtaining the user submission instruction.
[0107] The present invention further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the steps S100 to S500 in the above-mentioned method for batch configuring registers are implemented.
[0108] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention, such as the first substring representing the increment or decrement step can also be ">>", "<<", or "+ + +", "- - -", etc.; the second substring can also be "#", "^", etc.; the symbols appearing in pairs can also be "[ ]", "< >", "{}", etc., or the position change of the first substring and the second substring, or the change of the front and back positions when the adjacent settings are set, should all be included in the scope of protection of the present invention. In addition, the embodiments of the present invention do not limit the order in which the steps of the present invention are executed. For example, the order of the three steps S3001 to S3003 can be adjusted arbitrarily.
Claims
1. A method for batch configuration of registers, applied to a table configuration interface of registers, characterized in that: include: A. Obtaining a first number representing a register address or a register variable name including the first number, and a character string adjacent to the first number, edited by a user in a cell of a tabular configuration interface; B. In the string: When determining that there is a first substring for identifying an increasing or decreasing step, determining the stepping mode accordingly; When determining that there is a second number adjacent to the first substring, determining the second number as the step value; When it is determined that the second substring for identifying the table modification range is present and that there is a third number adjacent to the second substring, the third number is determined as the table modification range value indicated by the string; C. For each cell within the modification range, starting with the first number and using the second number as a step value, sequentially configure the value of the register address in each cell or the value of the string in the digital format corresponding to the first digital position in the register variable name in accordance with the determined increasing or decreasing stepping method. During the configuration, if it is determined that the string contains other substrings that do not affect the parsing, the other substrings are filtered out, where the other substrings that do not affect the parsing do not include the first substring and the second substring.
2. The method according to claim 1, characterized in that The other substrings include at least one of the following: Spaces, punctuation marks outside the first and second substrings.
3. The method according to claim 1, characterized in that When it is determined that the second substring for identifying the table modification range and the third number adjacent to the second substring are not present, the cell to the last cell having data is determined as the table modification range.
4. The method according to claim 1, wherein The first number and the character string adjacent to the first number are composed in the order of the first number, the first substring, the second number, the second substring, and the third number.
5. The method according to claim 1, wherein Step B further includes: when it is determined that there is no second digit adjacent to the first substring, setting the step value in step C to 1.
6. The method according to any one of claims 1 to 5, characterized in that: The configuration is a configuration register variable name, and the cell is a cell corresponding to the register variable name item. Step A further includes: the register variable name edited in the cell further includes symbols that appear in pairs, and the adjacent first number and character string are located within the pair of symbols; The configuration in step C also includes: deleting the symbols that appear in pairs.
7. The method according to claim 6, characterized in that The register variable name edited in the cell has multiple pairs of symbols that appear in pairs, and multiple groups of the same or different first numbers and character strings are correspondingly located in the multiple pairs of symbols; Step B is to judge each group of character strings; The method between step B and step C further includes: taking the multiplication result of each third digit in each group of character strings as the total table modification range value; The configuration described in step C also includes: executing step C for each group in sequence in a calculation method that forms a nested loop for each group, and configuring the value of the substring in the digital format corresponding to the first digital position of each group in the register variable name in each cell within the modification range of the total table.
8. The method according to claim 7, characterized in that The character strings of each group in step A also include a third substring indicating a priority; during the configuration in step C, the priority corresponding to the third substring is used as the priority of the loop in the nested loop.
9. A device for batch configuration of registers, characterized in that: include: A cell content acquisition module, configured to acquire a first number representing a register address or a register variable name containing the first number, and a character string adjacent to the first number, edited by a user in a cell of a table-format configuration interface; a stepping mode determining module, configured to determine a stepping mode based on a first substring for identifying an increasing or decreasing stepping mode when determining in the character string that the substring has the first substring; a step value determining module, configured to, when determining that there is a second number adjacent to the first substring in the string, determine the second number as the step value; a table modification range determining module, configured to, when determining that the second substring for identifying the table modification range is present and that the third number is adjacent to the second substring, determine the third number as the table modification range value indicated by the string; The batch configuration module is used to configure the value of the register address in each cell or the value of the string in the digital format corresponding to the first digital position in the register variable name in each cell within the modification range of the table, starting with the first number and using the second number as the step value, in a determined increasing or decreasing stepping manner, and when configuring, if it is determined that the string contains other substrings that do not affect the parsing, the other substrings are filtered out, wherein the other substrings that do not affect the parsing do not include the first substring and the second substring.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for configuring registers in batches according to any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Apparatus, methods and systems for configuring registers
CN110187919B
Register initialization method, basic configuration table generation method and embedded system
CN109597654A
Apparatus, system, and method for batch and realtime data processing
CN110222069A