A method, system, device, and medium for generating a control signal
By adopting an object-oriented design method and SV design language, the control signals of the AXI slave simulation verification model are randomly generated, which solves the problem of insufficient coverage and convergence speed in the existing technology, and achieves more efficient simulation verification.
Patent Information
- Application Number
- CN202111005935.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-30
- Publication Date
- 2025-07-08
- Estimated Expiration
- 2041-08-30
AI Technical Summary
In the existing AXI slave simulation verification model, the control signal generation form is single, and depends on changes in external input, resulting in insufficient coverage and convergence speed, which cannot meet the high requirements of external input signal scenarios.
采用面向对象的设计方法,使用SV作为设计语言,通过接收时机概率和值概率,随机生成控制信号的时序范围和值范围,生成对外的输出信号。
It improves verification coverage and convergence speed, reduces dependence on changes in external input signals, can detect design defects earlier and more comprehensively, and reduces labor time costs.
Smart Images

Figure CN113887012B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of signal transmission, and more particularly to a method, system, device, and storage medium for generating control signals. Background Art
[0002] Existing AXI slave simulation verification models are usually built using hardware thinking and used in the form of modules. The generation of their control signals completely relies on external signal inputs.
[0003] The solutions of the prior art have the following disadvantages: (1) The form of generating control signals is single and only changes depending on external inputs; (2) There are relatively high requirements for covering external input signals. In single-ended scenarios or scenarios passing through an arbiter, it is impossible to achieve relatively high coverage and convergence speed. Summary of the Invention
[0004] In view of this, in order to overcome at least one aspect of the above problems, the present invention proposes a method for generating control signals, including the following steps:
[0005] Receiving multiple timing probabilities and value probabilities corresponding to different control signals respectively;
[0006] Determining an initial timing range value and a value range value corresponding to each control signal specified by the signal transmission protocol;
[0007] Randomly using the timing probability for the corresponding initial timing range value to obtain an intermediate timing range value and randomly using the value probability for the corresponding value range value to obtain an output value;
[0008] Obtaining a sampling signal and determining the control signal to be generated according to the sampling signal;
[0009] Randomly obtaining a timing point for the intermediate timing range value of the control signal to be generated and generating the control signal to be generated using the timing point and the corresponding output value.
[0010] In some embodiments, it further includes:
[0011] Multiplying each timing probability and value probability by the same multiple.
[0012] In some embodiments, randomly using the timing probability for the corresponding initial timing range value to obtain an intermediate timing range value further includes:
[0013] Determining the probability of each value in the timing range value being randomly selected according to the timing probability.
[0014] In some embodiments, it further includes:
[0015] The intermediate timing range value is obtained by using the randomly assigned value and the minimum value in the initial timing range value.
[0016] In some embodiments, determining the probability that each value in the timing range value is randomly assigned according to the timing probability further includes:
[0017] Dividing the timing probability by a preset size to be used as the probability that each value in the multiple values of the timing range value is randomly assigned, where the preset size is the same as the number of the multiple values;
[0018] Using the value obtained by subtracting the timing probability from 1 as the probability that the remaining values in the timing range value are randomly assigned.
[0019] In some embodiments, randomly obtaining an output value by using a value probability for a corresponding value range value further includes:
[0020] Determining the probability that each value in the value range value is randomly assigned according to the value probability.
[0021] In some embodiments, determining the probability that each value in the value range value is randomly assigned according to the value probability further includes:
[0022] Dividing the value probability by a preset size to be used as the probability that each value in the multiple values of the value range value is randomly assigned, where the preset size is the same as the number of the multiple values;
[0023] Using the value obtained by subtracting the value probability from 1 as the probability that the remaining values in the value range value are randomly assigned.
[0024] Based on the same inventive concept, according to another aspect of the present invention, an embodiment of the present invention further provides a control signal generation system, including:
[0025] A receiving module, configured to receive a plurality of timing probabilities and value probabilities respectively corresponding to different control signals;
[0026] A determining module, configured to determine an initial timing range value and a value range value corresponding to each control signal specified by a signal transmission protocol;
[0027] A random module, configured to randomly obtain an intermediate timing range value by using the timing probability for a corresponding initial timing range value and randomly obtain an output value by using the value probability for a corresponding value range value;
[0028] A sampling module, configured to acquire a sampling signal and determine a control signal to be generated according to the sampling signal;
[0029] A generation module, configured to randomly obtain a timing point from the intermediate timing range values of the to-be-generated control signal and generate the to-be-generated control signal by using the timing point and the corresponding output value.
[0030] Based on the same inventive concept, according to another aspect of the present invention, an embodiment of the present invention further provides a computer device, including:
[0031] At least one processor; and
[0032] A memory storing a computer program that can run on the processor, characterized in that when the processor executes the program, the following steps are performed:
[0033] Receiving a plurality of timing probabilities and value probabilities respectively corresponding to different control signals;
[0034] Determining an initial timing range value and a value range value corresponding to each control signal specified by the signal transmission protocol;
[0035] Randomly obtaining an intermediate timing range value from the corresponding initial timing range value by using the timing probability and randomly obtaining an output value from the corresponding value range value by using the value probability;
[0036] Obtaining a sampling signal and determining a to-be-generated control signal according to the sampling signal;
[0037] Randomly obtaining a timing point from the intermediate timing range value of the to-be-generated control signal and generating the to-be-generated control signal by using the timing point and the corresponding output value.
[0038] In some embodiments, it further includes:
[0039] Amplifying each timing probability and value probability by the same multiple.
[0040] In some embodiments, randomly obtaining an intermediate timing range value from the corresponding initial timing range value by using the timing probability further includes:
[0041] Determining the probability of each value in the timing range value being randomly selected according to the timing probability.
[0042] In some embodiments, it further includes:
[0043] Obtaining the intermediate timing range value by using the randomly selected value and the minimum value in the initial timing range value.
[0044] In some embodiments, determining the probability of each value in the timing range value being randomly selected according to the timing probability further includes:
[0045] Divide the timing probability by a preset size, and use the result as the probability for each value in the timing range values to be randomly selected, where the preset size is the same as the number of the values;
[0046] Use the value obtained by subtracting the timing probability from 1 as the probability for the remaining values in the timing range values to be randomly selected.
[0047] In some embodiments, randomly selecting corresponding value range values using value probabilities to obtain output values, further comprising:
[0048] Determine the probability for each value in the value range values to be randomly selected according to the value probabilities.
[0049] In some embodiments, determining the probability for each value in the value range values to be randomly selected according to the value probabilities, further comprising:
[0050] Divide the value probability by a preset size, and use the result as the probability for each value in the value range values to be randomly selected, where the preset size is the same as the number of the values;
[0051] Use the value obtained by subtracting the value probability from 1 as the probability for the remaining values in the value range values to be randomly selected.
[0052] Based on the same inventive concept, according to another aspect of the present invention, embodiments of the present invention further provide a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are performed:
[0053] Receive a plurality of timing probabilities and value probabilities respectively corresponding to different control signals;
[0054] Determine the initial timing range values and value range values corresponding to each control signal specified by the signal transmission protocol;
[0055] Randomly select the corresponding initial timing range values using the timing probabilities to obtain intermediate timing range values and randomly select the corresponding value range values using the value probabilities to obtain output values;
[0056] Obtain a sampling signal and determine the control signal to be generated according to the sampling signal;
[0057] Randomly select the intermediate timing range values of the control signal to be generated to obtain timing points, and generate the control signal to be generated using the timing points and the corresponding output values.
[0058] In some embodiments, further comprising:
[0059] Amplify each timing probability and value probability by the same multiple.
[0060] In some embodiments, the corresponding initial timing range value is randomized using the timing probability to obtain an intermediate timing range value, which further includes:
[0061] Determine the probability of each value in the timing range value being randomized according to the timing probability.
[0062] In some embodiments, it further includes:
[0063] Use the randomized value and the minimum value in the initial timing range value to obtain the intermediate timing range value.
[0064] In some embodiments, determining the probability of each value in the timing range value being randomized according to the timing probability further includes:
[0065] Divide the timing probability by a preset size and use it as the probability of each value in the multiple values of the timing range value being randomized, where the preset size is the same as the number of the multiple values;
[0066] Use the value obtained by subtracting the timing probability from 1 as the probability of the remaining values in the timing range value being randomized.
[0067] In some embodiments, the corresponding value range value is randomized using the value probability to obtain an output value, which further includes:
[0068] Determine the probability of each value in the value range value being randomized according to the value probability.
[0069] In some embodiments, determining the probability of each value in the value range value being randomized according to the value probability further includes:
[0070] Divide the value probability by a preset size and use it as the probability of each value in the multiple values of the value range value being randomized, where the preset size is the same as the number of the multiple values;
[0071] Use the value obtained by subtracting the value probability from 1 as the probability of the remaining values in the value range value being randomized.
[0072] One of the beneficial technical effects of the present invention is as follows: This solution uses SV as the design language and adopts an object-oriented design method to replace the module-based design method. The probabilities of its generation timing and values are configurable, and it will perform timing randomization and value randomization according to the configured probabilities to generate external outputs. Its advantages are that the verification coverage rate is greatly improved, the convergence speed is significantly increased, and under the condition of generating the same coverage incentives, the dependence on the diversity of external input signal changes is reduced, which helps to discover design defects earlier and more comprehensively in simulation or verification, and reduces risks and human time costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0073] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other embodiments can be obtained based on these drawings.
[0074] Figure 1 It is a schematic flowchart of a method for generating a control signal provided by an embodiment of the present invention;
[0075] Figure 2 It is a schematic structural diagram of a model provided by an embodiment of the present invention;
[0076] Figure 3 It is a schematic structural diagram of a system for generating a control signal provided by an embodiment of the present invention;
[0077] Figure 4 It is a schematic structural diagram of a computer device provided by an embodiment of the present invention;
[0078] Figure 5 It is a schematic structural diagram of a computer-readable storage medium provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0079] In order to make the purpose, technical solutions and advantages of the present invention clearer and more understandable, the following further describes the embodiments of the present invention in detail with reference to specific embodiments and the accompanying drawings.
[0080] It should be noted that all the expressions using "first" and "second" in the embodiments of the present invention are used to distinguish two entities or parameters with the same name but different ones. It can be seen that "first" and "second" are only for the convenience of expression and should not be construed as a limitation on the embodiments of the present invention. This will not be repeated in the subsequent embodiments.
[0081] According to one aspect of the present invention, an embodiment of the present invention provides a method for generating a control signal, as Figure 1 shown, which may include the steps:
[0082] S1. Receive multiple timing probabilities and value probabilities respectively corresponding to different control signals;
[0083] S2. Determine the initial timing range value and value range value corresponding to each control signal specified by the signal transmission protocol;
[0084] S3. Randomly obtain an intermediate timing range value by using the timing probability for the corresponding initial timing range value and randomly obtain an output value by using the value probability for the corresponding value range value;
[0085] S4. Obtain a sampling signal and determine a control signal to be generated according to the sampling signal;
[0086] S5. Randomize the intermediate timing range value of the control signal to be generated to obtain a timing point, and generate the control signal to be generated by using the timing point and the corresponding output value.
[0087] This solution uses SV as the design language and adopts an object-oriented design method to replace the module-based design method. The generation timing and value probability are configurable, and timing randomization and value randomization will be performed according to the configured probability to generate external outputs. Its advantages are that the verification coverage is greatly improved, the convergence speed is significantly increased, and under the condition of generating the same coverage incentives, the dependence on the diversity of external input signal changes is reduced, which helps to discover design defects earlier and more comprehensively in simulation or verification, and reduces risks and human time costs.
[0088] In some embodiments, it can adopt, for example Figure 2 the model shown to implement the method for generating a control signal proposed in the embodiments of the present invention. In the Figure 2 shown axi slave model, its boundary and value module is used to generate the timing boundary value and output value of the signal according to the timing probability and value probability of the external input. The algorithm processing module processes the axi signal sampled by the signal driving module. The signal driving module is used to sample and drive the axi bus. The sampled signal is sent to the algorithm processing module for processing, and the driving part controls the signal driving of the axi bus according to the output of the algorithm processing module. That is, the boundary and value module can receive multiple timing probabilities and value probabilities corresponding to different control signals respectively, and according to the initial timing range value and value range value corresponding to each control signal, randomize the corresponding initial timing range value by using the timing probability to obtain an intermediate timing range value and randomize the corresponding value range value by using the value probability to obtain an output value. The algorithm processing module then randomizes the intermediate timing range value of the control signal to be generated to obtain a timing point and generates the control signal to be generated by using the timing point and the corresponding output value.
[0089] In some embodiments, in step S1, receiving multiple timing probabilities and value probabilities corresponding to different control signals respectively, specifically, as Figure 2 shown, the control signals may include port signals such as awready, wready, bready, arready, rid, rresp, rvalid, etc. stipulated by the axi protocol, and the timing probabilities and value probabilities corresponding to different control signals can all be generated by existing modules.
[0090] In some embodiments, in step S2, determine the initial timing range value and value range value corresponding to each control signal specified by the signal transmission protocol. Specifically, the initial timing range value and value range value corresponding to each control signal are determined by the design indicators specified in the signal transmission protocol.
[0091] For example, for the AXI protocol, if the default timeout is 16 clock cycles, the initial timing range value of control signals such as ready or valid is 0 to 16. Of course, the initial timing range values of other signals can be determined by other parameters of the AXI protocol. Similarly, according to the AXI protocol, the value range value of the ready signal is 0 to 1, the value range value of the valid signal is 0 to 1, and the value range value of the rresp signal is 0 to 3, etc.
[0092] In some embodiments, it further includes:
[0093] Multiply each timing probability and value probability by the same multiple.
[0094] Specifically, for the input timing probability, it is amplified to an integer. For example, 30% is amplified to 30, which means it is increased by 100 times. Similarly, for the value probability, the output value is obtained in the same way, that is, by multiplying by the same multiple to amplify the value probability to an integer. For example, 30% is amplified to 30, which means it is increased by 100 times. Use the system function str_randomize() with {}, and use the amplified integer as the probability constraint for the value range value of the input, randomize the value boundary value, and obtain the output value.
[0095] In some embodiments, randomly obtaining an intermediate timing range value by using the timing probability for the corresponding initial timing range value further includes:
[0096] Determine the probability that each value in the timing range value is randomly selected according to the timing probability.
[0097] In some embodiments, it further includes:
[0098] Obtain the intermediate timing range value by using the randomly selected value and the minimum value in the initial timing range value.
[0099] Specifically, after amplifying the timing probability to an integer, the system function std::randomize() with {} can be used, and use the amplified integer as the probability constraint for the initial timing range value of the input, randomize the timing boundary value, and obtain the intermediate timing range value.
[0100] In some embodiments, determining the probability that each value in the timing range value is randomly selected according to the timing probability further includes:
[0101] Divide the timing probability by a preset size to obtain the probability for each value among multiple values in the timing range value to be randomized, where the preset size is the same as the number of the multiple values;
[0102] Use the value obtained by subtracting the timing probability from 1 as the probability for the remaining values in the timing range value to be randomized.
[0103] For example, if the timing probability is 30%, the boundary value of the middle timing range value is a, and the initial timing range value is 0 - b, then std::randomize(a) with {a dist{[1:b]: / 30, 0 := 70}}, and the value of a can be obtained through the simulator simulation. Then use 0 - a as the middle timing range value.
[0104] Among them, each value in 1 - b has a probability of 30% / b to be randomized, while for the remaining value - 0, the probability for it to be randomized is 70%.
[0105] In some embodiments, using the value probability to randomize the corresponding value range value to obtain an output value further includes:
[0106] Determine the probability for each value in the value range value to be randomized according to the value probability.
[0107] In some embodiments, determining the probability for each value in the value range value to be randomized according to the value probability further includes:
[0108] Divide the value probability by a preset size to obtain the probability for each value among multiple values in the value range value to be randomized, where the preset size is the same as the number of the multiple values;
[0109] Use the value obtained by subtracting the value probability from 1 as the probability for the remaining values in the value range value to be randomized.
[0110] Specifically, after magnifying the value probability to an integer, the system function std::randomize() with {} can be used, with the magnified integer as the probability constraint input for the value range value, to randomize the timing boundary value to obtain the output value.
[0111] For example, if the value probability is 30% and the value range value is 0 - c, then std::randomize(a) with {a dist{[1:c]: / 30, 0 := 70}}, and the output value can be obtained through the simulator simulation.
[0112] Among them, each value in 1 - c has a probability of 30% / c to be randomized, while for the remaining value - 0, the probability for it to be randomized is 70%.
[0113] In some embodiments, in step S5, a random timing point is obtained from the intermediate timing range value of the control signal to be generated, and the control signal to be generated is generated by using the timing point and the corresponding output value. Specifically, after obtaining the intermediate timing range value, std::randomize(c) with {d <= b} can be used, and d, that is, the timing point, can be obtained through the simulator simulation. Then, the signal driving module drives the signals of the axi bus according to the timing point and the output value obtained through the above process. The driving module will follow the axi protocol according to the timing point and value generated by the algorithm processing module, and adopt a way of running five tasks in parallel: write command, write data, write response, read command, and read data, to implement the corresponding axi interface.
[0114] For example, if the previously obtained timing point is c and the output value is d, then repeat(c) @(io.cb); io.cb.wready <= d; is the processing method for the write data ready handshake signal.
[0115] This solution uses SV as the design language and adopts an object-oriented design method to replace the module-based design method. The generation timing and the probability of values are configurable, and timing randomization and value randomization will be performed according to the configured probability to generate external outputs. Its advantages are that the verification coverage rate is greatly improved, the convergence speed is significantly increased, and under the condition of generating the same coverage incentives, the dependence on the diversity of external input signal changes is reduced, which helps to discover design defects earlier and more comprehensively in simulation or verification, and reduces risks and human time costs.
[0116] Based on the same inventive concept, according to another aspect of the present invention, an embodiment of the present invention also provides a control signal generation system 400, as Figure 3 shown, including:
[0117] A receiving module 401, configured to receive a plurality of timing probabilities and value probabilities corresponding to different control signals respectively;
[0118] A determining module 402, configured to determine the initial timing range value and value range value corresponding to each control signal specified by the signal transmission protocol;
[0119] A random module 403, configured to randomly obtain an intermediate timing range value from the corresponding initial timing range value by using the timing probability and randomly obtain an output value from the corresponding value range value by using the value probability;
[0120] A sampling module 404, configured to acquire a sampling signal and determine the control signal to be generated according to the sampling signal;
[0121] A generation module 405, configured to randomly obtain a timing point from the intermediate timing range values of the to-be-generated control signal, and generate the to-be-generated control signal by using the timing point and the corresponding output value.
[0122] In some embodiments, it further includes:
[0123] Multiply each timing probability and value probability by the same multiple.
[0124] In some embodiments, using the timing probability to randomly obtain an intermediate timing range value from the corresponding initial timing range value, further includes:
[0125] Determine the probability that each value in the timing range value is randomly selected according to the timing probability.
[0126] In some embodiments, it further includes:
[0127] Use the randomly selected value and the minimum value in the initial timing range value to obtain the intermediate timing range value.
[0128] In some embodiments, determining the probability that each value in the timing range value is randomly selected according to the timing probability, further includes:
[0129] Divide the timing probability by a preset size and use the result as the probability that each value in the multiple values of the timing range value is randomly selected, where the preset size is the same as the number of the multiple values;
[0130] Use the value obtained by subtracting the timing probability from 1 as the probability that the remaining values in the timing range value are randomly selected.
[0131] In some embodiments, using the value probability to randomly obtain an output value from the corresponding value range value, further includes:
[0132] Determine the probability that each value in the value range value is randomly selected according to the value probability.
[0133] In some embodiments, determining the probability that each value in the value range value is randomly selected according to the value probability, further includes:
[0134] Divide the value probability by a preset size and use the result as the probability that each value in the multiple values of the value range value is randomly selected, where the preset size is the same as the number of the multiple values;
[0135] Use the value obtained by subtracting the value probability from 1 as the probability that the remaining values in the value range value are randomly selected.
[0136] This solution uses SV as the design language and adopts an object-oriented design method to replace the module-based design method. The generation timing and value probability are configurable, and random timing and value randomization will be performed according to the configured probability to generate external outputs. Its advantages are that the verification coverage is greatly improved, the convergence speed is significantly increased, and under the condition of generating stimuli with the same coverage, the dependence on the diversity of external input signal changes is reduced, which helps to discover design defects earlier and more comprehensively in simulation or verification, and reduces risks and human time costs.
[0137] Based on the same inventive concept, according to another aspect of the present invention, as Figure 4 shown, an embodiment of the present invention further provides a computer device 501, including:
[0138] At least one processor 520; and
[0139] A memory 510, where the memory 510 stores a computer program 511 that can run on the processor. When the processor 520 executes the program, the following steps are performed:
[0140] Receive multiple timing probabilities and value probabilities corresponding to different control signals respectively;
[0141] Determine the initial timing range value and value range value corresponding to each control signal specified by the signal transmission protocol;
[0142] Randomize the corresponding initial timing range value using the timing probability to obtain an intermediate timing range value and randomize the corresponding value range value using the value probability to obtain an output value;
[0143] Obtain a sampling signal and determine the control signal to be generated according to the sampling signal;
[0144] Randomize the intermediate timing range value of the control signal to be generated to obtain a timing point and generate the control signal to be generated using the timing point and the corresponding output value.
[0145] In some embodiments, it further includes:
[0146] Amplify each timing probability and value probability by the same multiple.
[0147] In some embodiments, randomizing the corresponding initial timing range value using the timing probability to obtain an intermediate timing range value further includes:
[0148] Determine the probability of each value in the timing range value being randomized according to the timing probability.
[0149] In some embodiments, it further includes:
[0150] The intermediate timing range value is obtained by using the randomly assigned value and the minimum value in the initial timing range value.
[0151] In some embodiments, determining the probability of each value in the timing range value being randomly assigned according to the timing probability further includes:
[0152] Dividing the timing probability by a preset size and using the result as the probability of each value in the multiple values of the timing range value being randomly assigned, where the preset size is the same as the number of the multiple values;
[0153] Using the value obtained by subtracting the timing probability from 1 as the probability of the remaining values in the timing range value being randomly assigned.
[0154] In some embodiments, randomly obtaining an output value by using a value probability for a corresponding value range value further includes:
[0155] Determining the probability of each value in the value range value being randomly assigned according to the value probability.
[0156] In some embodiments, determining the probability of each value in the value range value being randomly assigned according to the value probability further includes:
[0157] Dividing the value probability by a preset size and using the result as the probability of each value in the multiple values of the value range value being randomly assigned, where the preset size is the same as the number of the multiple values;
[0158] Using the value obtained by subtracting the value probability from 1 as the probability of the remaining values in the value range value being randomly assigned.
[0159] Based on the same inventive concept, according to another aspect of the present invention, as Figure 5 shown, an embodiment of the present invention further provides a computer-readable storage medium 601. The computer-readable storage medium 601 stores computer program instructions 610. When the computer program instructions 610 are executed by a processor, the following steps are performed:
[0160] Receiving multiple timing probabilities and value probabilities respectively corresponding to different control signals;
[0161] Determining an initial timing range value and a value range value corresponding to each control signal specified by a signal transmission protocol;
[0162] Randomly obtaining an intermediate timing range value by using the timing probability for a corresponding initial timing range value and randomly obtaining an output value by using the value probability for a corresponding value range value;
[0163] Obtaining a sampling signal and determining a control signal to be generated according to the sampling signal;
[0164] Randomize the intermediate timing range values of the to-be-generated control signal to obtain timing points, and generate the to-be-generated control signal by using the timing points and the corresponding output values.
[0165] In some embodiments, it further includes:
[0166] Amplify each timing probability and value probability by the same multiple.
[0167] In some embodiments, using the timing probability to randomly obtain intermediate timing range values for the corresponding initial timing range values, further includes:
[0168] Determine the probability of each value in the timing range value being randomized according to the timing probability.
[0169] In some embodiments, it further includes:
[0170] Use the randomized value and the minimum value in the initial timing range value to obtain the intermediate timing range value.
[0171] In some embodiments, determining the probability of each value in the timing range value being randomized according to the timing probability, further includes:
[0172] Divide the timing probability by a preset size and use it as the probability of each value in the multiple values of the timing range value being randomized, where the preset size is the same as the number of the multiple values;
[0173] Use the value obtained by subtracting the timing probability from 1 as the probability of the remaining values in the timing range value being randomized.
[0174] In some embodiments, using the value probability to randomly obtain output values for the corresponding value range values, further includes:
[0175] Determine the probability of each value in the value range value being randomized according to the value probability.
[0176] In some embodiments, determining the probability of each value in the value range value being randomized according to the value probability, further includes:
[0177] Divide the value probability by a preset size and use it as the probability of each value in the multiple values of the value range value being randomized, where the preset size is the same as the number of the multiple values;
[0178] Use the value obtained by subtracting the value probability from 1 as the probability of the remaining values in the value range value being randomized.
[0179] Finally, it should be noted that those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above methods.
[0180] In addition, it should be understood that the computer-readable storage medium (e.g., memory) herein can be a volatile memory or a non-volatile memory, or can include both volatile memory and non-volatile memory.
[0181] Those skilled in the art will also understand that the various exemplary logical blocks, modules, circuits, and algorithm steps described in connection with the disclosure herein can be implemented as electronic hardware, computer software, or a combination of both. To clearly illustrate this interchangeability of hardware and software, a general description of the functions of various illustrative components, blocks, modules, circuits, and steps has been given. Whether this function is implemented as software or hardware depends on the specific application and the design constraints imposed on the overall system. The functions that those skilled in the art can implement in various ways for each specific application, but such implementation decisions should not be construed as causing a departure from the scope of the disclosure of the embodiments of the present invention.
[0182] The above are the exemplary embodiments disclosed by the present invention. However, it should be noted that various changes and modifications can be made without departing from the scope of the disclosure of the embodiments of the present invention as defined by the claims. The functions, steps, and / or actions of the method claims according to the disclosed embodiments herein do not need to be performed in any specific order. In addition, although the elements disclosed in the embodiments of the present invention can be described or claimed in an individual form, they can also be understood as multiple unless clearly limited to the singular.
[0183] It should be understood that as used herein, unless the context clearly supports an exception, the singular form "a" is also intended to include the plural form. It should also be understood that "and / or" as used herein refers to any and all possible combinations of one or more of the associated listed items.
[0184] The serial numbers of the disclosed embodiments of the present invention above are only for description and do not represent the superiority or inferiority of the embodiments.
[0185] Those of ordinary skill in the art can understand that all or part of the steps of the above embodiments can be completed by hardware or by instructing relevant hardware through a program. The program can be stored in a computer-readable storage medium, and the above-mentioned storage medium can be a read-only memory, a magnetic disk, an optical disk, etc.
[0186] Those of ordinary skill in the art should understand that the discussion of any of the above embodiments is merely exemplary and is not intended to imply that the scope of the disclosure of the embodiments of the present invention (including the claims) is limited to these examples; under the concept of the embodiments of the present invention, the technical features in the above embodiments or different embodiments can also be combined, and there are many other variations in different aspects of the embodiments of the present invention as above, which are not provided in detail for the sake of brevity. Therefore, any omission, modification, equivalent replacement, improvement, etc. made within the spirit and principle of the embodiments of the present invention shall be included within the protection scope of the embodiments of the present invention.
Claims
1. A method for generating a control signal, characterized in that, It includes the following steps: Receiving a plurality of timing probabilities and value probabilities respectively corresponding to different control signals; Determining an initial timing range value and a value range value corresponding to each control signal specified by the signal transmission protocol; Randomly obtaining an intermediate timing range value by using the timing probability for the corresponding initial timing range value and randomly obtaining an output value by using the value probability for the corresponding value range value; Obtaining a sampling signal and determining a control signal to be generated according to the sampling signal; Randomly obtaining a timing point for the intermediate timing range value of the control signal to be generated and generating the control signal to be generated by using the timing point and the corresponding output value; Randomly obtaining an intermediate timing range value by using the timing probability for the corresponding initial timing range value, further including: Determining the probability of each value in the timing range value being randomly selected according to the timing probability; Obtaining the intermediate timing range value by using the randomly selected value and the minimum value in the initial timing range value.
2. The method according to claim 1, characterized in that, It further includes: Amplifying each timing probability and value probability by the same multiple.
3. The method according to claim 1, wherein Determining the probability of each value in the timing range value being randomly selected according to the timing probability, further including: Dividing the timing probability by a preset size as the probability of each value in the multiple values of the timing range value being randomly selected, where the preset size is the same as the number of the multiple values; Using the value obtained by subtracting the timing probability from 1 as the probability of the remaining values in the timing range value being randomly selected.
4. The method according to claim 1, wherein Randomly obtaining an output value by using the value probability for the corresponding value range value, further including: Determining the probability of each value in the value range value being randomly selected according to the value probability.
5. The method according to claim 4, wherein Determining the probability of each value in the value range value being randomly selected according to the value probability, further including: Dividing the value probability by a preset size as the probability of each value in the multiple values of the value range value being randomly selected, where the preset size is the same as the number of the multiple values; Using the value obtained by subtracting the value probability from 1 as the probability of the remaining values in the value range value being randomly selected.
6. A control signal generation system, characterized in that, It includes: A receiving module configured to receive a plurality of timing probabilities and value probabilities respectively corresponding to different control signals; A determining module configured to determine an initial timing range value and a value range value corresponding to each control signal specified by the signal transmission protocol; A random module configured to randomly obtain an intermediate timing range value by using the timing probability for the corresponding initial timing range value and randomly obtain an output value by using the value probability for the corresponding value range value; A sampling module configured to obtain a sampling signal and determine a control signal to be generated according to the sampling signal; A generating module configured to randomly obtain a timing point for the intermediate timing range value of the control signal to be generated and generate the control signal to be generated by using the timing point and the corresponding output value; The random module is further configured to: Determine the probability of each value in the timing range value being randomly selected according to the timing probability; Obtain the intermediate timing range value by using the randomly selected value and the minimum value in the initial timing range value.
7. A computer device, including: At least one processor; And A memory that stores a computer program executable on the processor, characterized in that when the processor executes the program, it performs the steps of the method according to any one of claims 1-5.
8. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it performs the steps of the method according to any one of claims 1-5.