A dual-agent driven abnormal test waveform sample generation method and system
Patent Information
- Application Number
- CN202611443305.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-17
- Publication Date
- 2026-10-20
AI Technical Summary
[0007]本发明的有益效果是:本方案针对现有技术仅追求样本与真实数据的分布相似度、忽视异常样本缺陷风险暴露潜力、易产生大量无测试价值冗余样本的问题,通过波形去噪清洗得到基底波形,经多层级语义解析生成结构化语义描述体,为精准异常注入提供语义支撑;由异常规划智能体结合测试目标与领域知识库做约束式推理,定向生成异常注入规则,经波形编辑生成合成异常波形后,以异常语义引导的多维评判筛选优质样本。最终输出的异常波形既契合真实信号的时序与协议特征,又具备高缺陷触发能力,可有效剔除低价值冗余样本,显著提升测试样本的有效性与缺陷检出效率。
Smart Images

Figure FT_1 
Figure FT_2 
Figure SMS_1
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and in particular to a method and system for generating abnormal test waveform samples driven by a dual-agent system. Background Technology
[0002] Timing signal waveforms are the core basis for determining the operating status of devices under test in integrated circuit verification, automotive electronics testing, communication protocol testing, and power management quality inspection. Traditional waveform verification relies on manual visual inspection, which is inefficient, highly subjective, and difficult to adapt to the highly complex testing scenarios of today. Existing waveform interpretation solutions based on large language models rely on cloud computing power and cannot be deployed in resource-constrained scenarios such as production line testers and embedded devices; while industrial sites often require local real-time detection, making lightweight machine learning models a more feasible path for intelligent waveform interpretation.
[0003] The detection performance of lightweight models heavily relies on high-quality anomaly training samples covering various faults. However, obtaining anomaly samples faces a core bottleneck: the incidence of serious faults in real-world scenarios is extremely low, making it difficult to collect anomaly samples; manually injecting faults is costly and difficult to scale up to generate controllable anomaly samples. Traditional simple data augmentation methods such as adding noise and scaling cannot generate physically compliant anomaly waveforms with clear testing value, resulting in insufficient generalization ability of the trained model and difficulty in identifying potential defects in real-world systems.
[0004] While existing generative techniques such as generative adversarial networks and diffusion models can be used to generate time-series signals, their optimization only pursues the similarity of the distribution of samples with real data, ignoring the core requirement that abnormal samples in the test scenario must have a high potential for exposing defect risks. This easily generates a large number of redundant samples with no test value, and may even produce invalid waveforms that violate electrical specifications. It cannot meet the requirements for constructing high-quality abnormal samples, and there is an urgent need for new test waveform generation solutions. Summary of the Invention
[0005] Based on this, the purpose of this invention is to provide a dual-agent driven method and system for generating abnormal test waveform samples, in order to solve the problem that the existing technology only pursues the similarity of the distribution of samples with real data, and ignores the core requirement that abnormal samples in the test scenario must have high potential for exposing defect risks, which leads to the generation of a large number of redundant samples with no testing value.
[0006] The first aspect of the present invention proposes: A method for generating abnormal test waveform samples driven by a dual-agent system, wherein the method includes: Normal waveform data is acquired and the transition events of each signal are recorded using a preset VCD format. Based on the transition events, the waveform data is subjected to noise reduction and cleaning processing to obtain the base waveform. The base waveform is subjected to multi-level semantic parsing, which involves signal preprocessing, edge and level feature extraction, and protocol and timing context construction to generate a structured semantic description. The anomaly planning agent is invoked to perform constraint-based reasoning based on the structured semantic description, preset test targets, and a pre-set test domain knowledge base, generating structured anomaly injection rules. The waveform editing agent is invoked to parse the structured anomaly injection rules and execute timing perturbations to generate synthetic anomaly waveforms. A local waveform evaluation mechanism based on anomaly semantics is used to perform multi-dimensional comprehensive evaluation of the synthetic anomaly waveforms and select anomaly waveform samples.
[0007] The beneficial effects of this invention are as follows: This solution addresses the problems of existing technologies that only pursue the similarity of sample distribution to real data, neglect the potential for exposing defects in abnormal samples, and easily generate a large number of redundant samples with no testing value. It obtains a base waveform through waveform denoising and cleaning, and generates a structured semantic description through multi-level semantic parsing, providing semantic support for accurate anomaly injection. An anomaly planning agent combines the test target and domain knowledge base to perform constrained reasoning, generating targeted anomaly injection rules. After waveform editing to generate a synthesized anomaly waveform, high-quality samples are selected through multi-dimensional evaluation guided by anomaly semantics. The final output anomaly waveform not only matches the timing and protocol characteristics of real signals but also possesses high defect triggering capability, effectively eliminating low-value redundant samples and significantly improving the effectiveness of test samples and defect detection efficiency.
[0008] Furthermore, the step of performing multi-level semantic parsing on the base waveform includes: The minimum high-level and low-level pulse widths are determined based on the design specifications or datasheet of the device under test, and are used as the physical validity thresholds. Traverse the sequence of transition events of the target signal. If the duration of a certain level state is less than the physical validity threshold, it is determined to be a false transition caused by noise and removed. At the same time, adjacent opposite level states are merged into a single continuous state to complete the signal preprocessing.
[0009] Furthermore, after completing the signal preprocessing, the process also includes: For clock signals, all rising and falling edge times are identified, and the time interval between adjacent rising edges is calculated to generate a clock cycle sequence. For data and control signals, consecutive identical level states are merged to generate a level duration interval. For enable signals, the interval corresponding to the valid state is marked as the protocol valid window, and synchronous integration processing is performed to generate a signal feature set. Based on the signal feature set, the timing relationship between signals is fused with the preset interface specifications and protocol prior knowledge to identify the injection window in the waveform and construct a structured timing context description body; By integrating the temporal context description and the attribute parameters of each signal, a hierarchical, machine-readable structured semantic description is generated, which serves as the input to the anomaly planning agent.
[0010] Furthermore, the step of invoking the exception planning agent to generate structured exception injection rules includes: The user's test objective, the structured semantic description of the current waveform, and the list of available tools are encapsulated as structured prompts and input into a locally deployed large language model that has been fine-tuned by instructions; The large language model calls the test domain knowledge base to retrieve matching fault templates and parameter ranges, while accessing historical defect logs to extract historical parameters of similar disturbances. The retrieval results are then concatenated with the input prompts as the basis for reasoning. Guide the large language model to perform chained reasoning within a restricted context to generate anomaly injection rules that include parameters such as anomaly type, action signal, time location, and intensity.
[0011] Furthermore, the generation of the exception injection rule also includes a verification step: The output parser performs format compliance and parameter range checks on the generated anomaly injection rules to verify whether the rules conform to the predefined field specifications, whether the timestamp is within the valid waveform range, and whether the disturbance parameters meet the physical constraints. If the validation fails, the large language model is triggered to regenerate the rules until a structured exception injection rule that meets the preset requirements is output.
[0012] Furthermore, the step of invoking the waveform editing agent to perform timing perturbations and generate synthetic abnormal waveforms includes: The structured semantic description of the original waveform, the structured anomaly injection rules, and the predefined VCD editing operation specifications are concatenated into input prompts, which are then input into the locally deployed large language model. The large language model generates structured waveform editing instructions that include operation type, target signal, and timing parameters. The editing instructions are sequentially checked for syntax validity, signal existence, and parameter rationality. Editing instructions that pass the checks are passed to the waveform execution engine. Based on the waveform execution engine, the corresponding timing perturbation operation is performed on the VCD event list to generate a synthetic abnormal waveform in standard VCD format.
[0013] Furthermore, the step of performing multi-dimensional comprehensive evaluation after generating the synthesized abnormal waveform includes: Based on structured anomaly rules and structured semantic descriptions, the key signal set and effective time window related to the current disturbance are located, and the corresponding local event sequence is extracted from the synthetic anomaly waveform; The local event sequence is standardized to generate a local waveform representation with fixed size and a unified coordinate system, and then compared with a historical anomaly pattern library for similarity. Perform semantic consistency checks to verify whether the disturbance affects the functionally sensitive timing region of the corresponding protocol or circuit state; When the similarity between a local waveform representation and a historical sample is higher than a preset threshold, and the disturbance location is consistent with the functionally sensitive area, the synthesized abnormal waveform is determined to be an abnormal waveform sample, and the corresponding information is stored in the historical abnormal pattern library. Representative samples are periodically selected and pushed to testing experts for sampling verification. Based on the negative feedback from the experts, the contextual features of invalid perturbations are extracted and transformed into a prompt template for updating the abnormal planning agent using constraint statements.
[0014] The second aspect of the present invention proposes: A dual-agent driven anomaly test waveform sample generation system, wherein the system comprises: The module is used to acquire normal waveform data and record the transition events of each signal in a preset VCD format. Based on the transition events, the waveform data is subjected to noise reduction and cleaning processing to obtain the base waveform. The parsing module is used to perform multi-level semantic parsing on the base waveform, which sequentially goes through signal preprocessing, edge and level feature extraction, and protocol and timing context construction to generate a structured semantic description. The generation module is used to call the exception planning agent to perform constraint reasoning based on the structured semantic description, preset test targets and preset test domain knowledge base to generate structured exception injection rules. The evaluation module is used to call the waveform editing agent to parse the structured anomaly injection rules and execute timing perturbations to generate synthetic anomaly waveforms. It adopts a local waveform evaluation mechanism based on anomaly semantic guidance to perform multi-dimensional comprehensive evaluation of the synthetic anomaly waveforms and select anomaly waveform samples.
[0015] Furthermore, the step of performing multi-level semantic parsing on the base waveform includes: The minimum high-level and low-level pulse widths are determined based on the design specifications or datasheet of the device under test, and are used as the physical validity thresholds. Traverse the sequence of transition events of the target signal. If the duration of a certain level state is less than the physical validity threshold, it is determined to be a false transition caused by noise and removed. At the same time, adjacent opposite level states are merged into a single continuous state to complete the signal preprocessing.
[0016] Furthermore, after completing the signal preprocessing, the process also includes: For clock signals, all rising and falling edge times are identified, and the time interval between adjacent rising edges is calculated to generate a clock cycle sequence. For data and control signals, consecutive identical level states are merged to generate a level duration interval. For enable signals, the interval corresponding to the valid state is marked as the protocol valid window, and synchronous integration processing is performed to generate a signal feature set. Based on the signal feature set, the timing relationship between signals is fused with the preset interface specifications and protocol prior knowledge to identify the injection window in the waveform and construct a structured timing context description body; By integrating the temporal context description and the attribute parameters of each signal, a hierarchical, machine-readable structured semantic description is generated, which serves as the input to the anomaly planning agent.
[0017] Furthermore, the step of invoking the exception planning agent to generate structured exception injection rules includes: The user's test objective, the structured semantic description of the current waveform, and the list of available tools are encapsulated as structured prompts and input into a locally deployed large language model that has been fine-tuned by instructions; The large language model calls the test domain knowledge base to retrieve matching fault templates and parameter ranges, while accessing historical defect logs to extract historical parameters of similar disturbances. The retrieval results are then concatenated with the input prompts as the basis for reasoning. Guide the large language model to perform chained reasoning within a restricted context to generate anomaly injection rules that include parameters such as anomaly type, action signal, time location, and intensity.
[0018] Furthermore, the generation of the exception injection rule also includes a verification step: The output parser performs format compliance and parameter range checks on the generated anomaly injection rules to verify whether the rules conform to the predefined field specifications, whether the timestamp is within the valid waveform range, and whether the disturbance parameters meet the physical constraints. If the validation fails, the large language model is triggered to regenerate the rules until a structured exception injection rule that meets the preset requirements is output.
[0019] Furthermore, the step of invoking the waveform editing agent to perform timing perturbations and generate synthetic abnormal waveforms includes: The structured semantic description of the original waveform, the structured anomaly injection rules, and the predefined VCD editing operation specifications are concatenated into input prompts, which are then input into the locally deployed large language model. The large language model generates structured waveform editing instructions that include operation type, target signal, and timing parameters. The editing instructions are sequentially checked for syntax validity, signal existence, and parameter rationality. Editing instructions that pass the checks are passed to the waveform execution engine. Based on the waveform execution engine, the corresponding timing perturbation operation is performed on the VCD event list to generate a synthetic abnormal waveform in standard VCD format.
[0020] Furthermore, the step of performing multi-dimensional comprehensive evaluation after generating the synthesized abnormal waveform includes: Based on structured anomaly rules and structured semantic descriptions, the key signal set and effective time window related to the current disturbance are located, and the corresponding local event sequence is extracted from the synthetic anomaly waveform; The local event sequence is standardized to generate a local waveform representation with fixed size and a unified coordinate system, and then compared with a historical anomaly pattern library for similarity. Perform semantic consistency checks to verify whether the disturbance affects the functionally sensitive timing region of the corresponding protocol or circuit state; When the similarity between a local waveform representation and a historical sample is higher than a preset threshold, and the disturbance location is consistent with the functionally sensitive area, the synthesized abnormal waveform is determined to be an abnormal waveform sample, and the corresponding information is stored in the historical abnormal pattern library. Representative samples are periodically selected and pushed to testing experts for sampling verification. Based on the negative feedback from the experts, the contextual features of invalid perturbations are extracted and transformed into a prompt template for updating the abnormal planning agent using constraint statements.
[0021] The third aspect of the present invention proposes: A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the dual-agent driven abnormal test waveform sample generation method as described above.
[0022] The fourth aspect of the present invention proposes: A readable storage medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the dual-agent-driven method for generating abnormal test waveform samples as described above.
[0023] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description
[0024] Figure 1 A flowchart of the dual-agent-driven abnormal test waveform sample generation method provided in the first embodiment of the present invention; Figure 2The diagram shows the structure of the dual-agent driven abnormal test waveform sample generation system provided in the third embodiment of the present invention.
[0025] The following detailed description, in conjunction with the accompanying drawings, will further illustrate the present invention. Detailed Implementation
[0026] To facilitate understanding of the present invention, a more complete description will be given below with reference to the accompanying drawings. Several embodiments of the invention are illustrated in the drawings. However, the invention can be implemented in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete.
[0027] It should be noted that when a component is said to be "fixed to" another component, it can be directly on the other component or there may be an intervening component. When a component is said to be "connected to" another component, it can be directly connected to the other component or there may be an intervening component. The terms "vertical," "horizontal," "left," "right," and similar expressions used in this document are for illustrative purposes only.
[0028] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.
[0029] Please see Figure 1 The dual-agent driven abnormal test waveform sample generation method provided in the first embodiment of the present invention can output abnormal waveforms that not only match the timing and protocol characteristics of real signals, but also have high defect triggering capability. It can effectively eliminate low-value redundant samples and significantly improve the effectiveness of test samples and defect detection efficiency.
[0030] Specifically, this embodiment provides: A method for generating abnormal test waveform samples driven by a dual-agent system, wherein the method includes: Step S10: Collect normal waveform data and record the transition events of each signal using a preset VCD format. Perform noise reduction and cleaning processing on the waveform data based on the transition events to obtain the base waveform. Step S20: Perform multi-level semantic parsing on the base waveform, sequentially performing signal preprocessing, edge and level feature extraction, and protocol and timing context construction to generate a structured semantic description body; Step S30: Invoke the anomaly planning agent to perform constraint reasoning based on the structured semantic description, preset test target and preset test domain knowledge base to generate structured anomaly injection rules; Step S40: Call the waveform editing agent to parse the structured anomaly injection rules and execute timing perturbation to generate synthetic anomaly waveforms. Use a local waveform evaluation mechanism guided by anomaly semantics to perform multi-dimensional comprehensive evaluation of the synthetic anomaly waveforms and select anomaly waveform samples.
[0031] Second Embodiment Furthermore, the step of performing multi-level semantic parsing on the base waveform includes: The minimum high-level and low-level pulse widths are determined based on the design specifications or datasheet of the device under test, and are used as the physical validity thresholds. Traverse the sequence of transition events of the target signal. If the duration of a certain level state is less than the physical validity threshold, it is determined to be a false transition caused by noise and removed. At the same time, adjacent opposite level states are merged into a single continuous state to complete the signal preprocessing.
[0032] Furthermore, after completing the signal preprocessing, the process also includes: For clock signals, all rising and falling edge times are identified, and the time interval between adjacent rising edges is calculated to generate a clock cycle sequence. For data and control signals, consecutive identical level states are merged to generate a level duration interval. For enable signals, the interval corresponding to the valid state is marked as the protocol valid window, and synchronous integration processing is performed to generate a signal feature set. Based on the signal feature set, the timing relationship between signals is fused with the preset interface specifications and protocol prior knowledge to identify the injection window in the waveform and construct a structured timing context description body; By integrating the temporal context description and the attribute parameters of each signal, a hierarchical, machine-readable structured semantic description is generated, which serves as the input to the anomaly planning agent.
[0033] Furthermore, the step of invoking the exception planning agent to generate structured exception injection rules includes: The user's test objective, the structured semantic description of the current waveform, and the list of available tools are encapsulated as structured prompts and input into a locally deployed large language model that has been fine-tuned by instructions; The large language model calls the test domain knowledge base to retrieve matching fault templates and parameter ranges, while accessing historical defect logs to extract historical parameters of similar disturbances. The retrieval results are then concatenated with the input prompts as the basis for reasoning. Guide the large language model to perform chained reasoning within a restricted context to generate anomaly injection rules that include parameters such as anomaly type, action signal, time location, and intensity.
[0034] Furthermore, the generation of the exception injection rule also includes a verification step: The output parser performs format compliance and parameter range checks on the generated anomaly injection rules to verify whether the rules conform to the predefined field specifications, whether the timestamp is within the valid waveform range, and whether the disturbance parameters meet the physical constraints. If the validation fails, the large language model is triggered to regenerate the rules until a structured exception injection rule that meets the preset requirements is output.
[0035] Furthermore, the step of invoking the waveform editing agent to perform timing perturbations and generate synthetic abnormal waveforms includes: The structured semantic description of the original waveform, the structured anomaly injection rules, and the predefined VCD editing operation specifications are concatenated into input prompts, which are then input into the locally deployed large language model. The large language model generates structured waveform editing instructions that include operation type, target signal, and timing parameters. The editing instructions are sequentially checked for syntax validity, signal existence, and parameter rationality. Editing instructions that pass the checks are passed to the waveform execution engine. Based on the waveform execution engine, the corresponding timing perturbation operation is performed on the VCD event list to generate a synthetic abnormal waveform in standard VCD format.
[0036] Furthermore, the step of performing multi-dimensional comprehensive evaluation after generating the synthesized abnormal waveform includes: Based on structured anomaly rules and structured semantic descriptions, the key signal set and effective time window related to the current disturbance are located, and the corresponding local event sequence is extracted from the synthetic anomaly waveform; The local event sequence is standardized to generate a local waveform representation with fixed size and a unified coordinate system, and then compared with a historical anomaly pattern library for similarity. Perform semantic consistency checks to verify whether the disturbance affects the functionally sensitive timing region of the corresponding protocol or circuit state; When the similarity between a local waveform representation and a historical sample is higher than a preset threshold, and the disturbance location is consistent with the functionally sensitive area, the synthesized abnormal waveform is determined to be an abnormal waveform sample, and the corresponding information is stored in the historical abnormal pattern library. Representative samples are periodically selected and pushed to testing experts for sampling verification. Based on the negative feedback from the experts, the contextual features of invalid perturbations are extracted and transformed into a prompt template for updating the abnormal planning agent using constraint statements.
[0037] In addition, it should be noted in this embodiment that the abnormal test waveform sample generation method provided in this embodiment is specifically implemented by the following: Step 1: Construct a real, normal waveform base library Collect a large amount of normal waveform data that has been confirmed to be defect-free during the production line functional testing or laboratory verification stage. Use an industry-standard VCD (ValueChangeDump) to record the transition events of each signal at a precise timestamp and store them in a local storage system (such as a database).
[0038] In practice, a logic analyzer or FPGA embedded sampler is used to acquire waveform signals. The VCD file is then exported using the accompanying software and cleaned to remove noise and glitches (for example, a sliding window majority voting method can be used to determine whether the current point is noise by observing the majority value within a local window. The window width can be set to 3 sampling periods) to ensure the purity of the base waveform.
[0039] Step 2: Perform semantic parsing on the normal waveform This step transforms the original waveform (stored in a VCD file) into a structured high-level semantic description that the anomaly planning agent can understand. The entire parsing process is divided into four sub-stages.
[0040] Before performing high-level semantic parsing on normal waveforms, signal preprocessing must be performed to eliminate sub-periodic glitches or spurious transition events caused by metastability that may be introduced during the acquisition process.
[0041] In one specific embodiment, a deterministic filtering strategy based on a minimum pulse width constraint can be employed: using the minimum high / low level pulse width specified in the device under test (DUT) datasheet or design specification as a physical validity threshold, the event sequence of the target signal is traversed; if the duration of a certain level state is less than this threshold, it is determined to be a spurious transition caused by noise, removed, and adjacent opposite level states are merged into a single continuous state. It should be noted that the above filtering strategy is merely an exemplary implementation; those skilled in the art can also use other equivalent noise suppression techniques to achieve the same purpose.
[0042] In this sub-step, the system performs precise extraction of edge and level features for each target signal to construct a basic temporal structure that can be used for high-level semantic reasoning. Its core task is to transform the denoised event sequence into a structured list of edge times and level duration intervals.
[0043] Specifically, for clock signals, the event sequence is traversed, and all transitions from low to high level are identified as rising edge timestamps, and all transitions from high to low level are identified as falling edge timestamps. The time interval between adjacent rising edges is further calculated to form a clock cycle sequence, which is used to evaluate clock stability and determine the reference benchmark for injecting jitter. For data or control signals, consecutive identical level states are merged to generate a series of high-level duration intervals and low-level duration intervals, each interval being uniquely determined by its start and end times. For enable signals (such as chip select CS), the interval corresponding to its valid state (usually low level) is marked as the protocol valid window, serving as the key context region for subsequent anomaly injection.
[0044] All extraction operations are performed based on precise timestamp information, with the time unit uniformly set to nanoseconds (ns), while preserving the timing resolution of the original acquisition system. The extraction results are organized in a structured format (e.g., JSON) to ensure that each edge or interval can be traced back to a specific event in the original waveform, avoiding information loss or ambiguity. The final output is a feature set for each signal, including but not limited to: a list of rise / fall times, a list of level duration intervals, and period statistics, serving as direct input for the next stage of protocol and timing context construction.
[0045] After extracting edge and level features, the system further integrates the timing relationships between signals, pre-defined interface specifications, and prior protocol knowledge to construct a structured timing context description. The core objective of this description is to identify key timing regions in the waveform that have a decisive impact on functional behavior, namely the "high-value injection window" where disturbances are most likely to expose defects and risks.
[0046] The timing context description is organized in a machine-readable format (such as JSON) and includes, but is not limited to, the following elements: the role definition of each signal (such as clock, data, enable, reset); the dependencies between signals (such as "DATA is sampled on the rising edge of CLK"); the function-sensitive window and its constraint parameters corresponding to each key event (such as setup time tsu, hold time th, minimum pulse width, etc.); and the protocol phase division (such as the command phase, address phase, and data phase of SPI).
[0047] For ease of understanding, two examples are provided here. In one specific embodiment, for synchronous interfaces (such as I²C, SPI), the system calculates the data stability window of the data signal as [t_clkrise-tsu,t_clkrise+th] based on the rising edge time t_clkrise of the clock signal and the timing parameters (tsu,th) provided by the user, and marks this as a function-sensitive window (injecting glitches or edge offsets into this window may violate setup / hold constraints, thereby exposing defects). In another embodiment, for asynchronous control signals (such as reset or interrupt), the system identifies the configuration window within N clock cycles after reset release as a sensitive region based on the duration of its effective level and the initialization period after release, where N is the minimum number of stable cycles determined according to the datasheet, design specifications, or protocol standards of the device under test. The final output structured temporal context will serve as the direct basis for the anomaly planning agent to generate reasonable perturbation locations and types.
[0048] The system integrates the obtained timing context results with the role attributes (e.g., "clock", "data"), sampling relationships (e.g., "DATA is sampled by CLK"), and referenced timing constraint parameters (e.g., setup time = 5ns) of each signal to generate a machine-readable structured semantic description. This description is organized in a hierarchical data format (e.g., a set of key-value pairs), explicitly associating each signal with its functional semantics and timing rules. This ensures that subsequent modules (e.g., anomaly planning agents) can understand the test meaning of the waveform without having to backtrack to the original waveform file or user-configured scripts. For ease of understanding, an example of this description is provided below. In a typical embodiment, this description can be represented as follows:
[0049] This structured description, as the final output of this step, is directly passed to the anomaly planning agent, providing it with an actionable test semantic context.
[0050] Step 3: The anomaly planning agent generates structured anomaly injection rules. After obtaining the structured semantic description of the output, the anomaly planning agent generates a structured anomaly injection rule based on the preset test objectives, the embedded test domain knowledge base, and historical defect logs. This rule explicitly specifies the anomaly type, the action signal, the time location, and the intensity parameters, and is both executable and interpretable.
[0051] The knowledge base for this testing domain is stored in the form of static configuration files (such as JSON or XML). It is manually constructed based on well-known engineering practices and design specifications of the device under test in the testing domain. Its content belongs to the technical common sense that can be directly obtained or reasonably deduced by those skilled in the art. One of the following methods can be selected to construct the knowledge base: (1) Extract typical timing violation types and parameter ranges from the datasheet, timing constraint file or interface protocol standard (such as SPI, I²C specification document) of the device under test (DUT); (2) The test engineer writes a structured template based on experience rules, such as: "Inject ±10% cycle jitter into the clock signal to verify the robustness of PLL lockout" or "Inject DATA glitches 0.5ns before the establishment time window to simulate crosstalk".
[0052] It should be noted that the anomaly planning agent adopts a Large Language Model (LLM)-based approach, whose core is an open-source language model (e.g., Qwen2-7B-Instruct) fine-tuned by instructions, deployed on a local computing node. Specifically, the agent's workflow includes the following stages: (1) Task prompt construction: The system encapsulates the user's test target (such as "coverage establishment time violation"), the semantic context of the current waveform (such as DATA valid window [5.0,10.0]ns, CLK rising edge 10.0ns) and the list of available tools into a structured prompt, guiding the LLM to play the role of "test expert".
[0053] (2) Tool Invocation and Information Acquisition: The agent first performs knowledge retrieval by reading the aforementioned test domain knowledge base and returning a fault template that matches the current target (e.g., “clock_jitter:{default_magnitude:6.0ns,applicable_to:[CLK]}”); then it performs log query, accesses historical defect logs (containing fields: defect ID, fault type, action signal, disturbance intensity, test result, etc.), and performs structured retrieval based on field matching (e.g., find all historical records with fault_type='clock_jitter', target_signal='CLK', and outcome='FAIL'), and extracts its disturbance parameters as a reference.
[0054] (3) Reasoning and Rule Generation: The above search results are organized into structured text and concatenated into the input prompts given to the LLM, serving as the sole basis for its reasoning. For example, the prompt content includes:
[0055] LLM performs chained reasoning in this restricted context and must reference the specific numerical values provided above in the output.
[0056] (4) Structured output and verification: Ultimately, the anomaly planning agent will output a structured anomaly rule. An example is shown below:
[0057] This rule is passed to the waveform editing module in a machine-readable format, serving as the sole basis for subsequent precise perturbation.
[0058] It should be noted that the prompts given to the LLM can strictly limit the output to conform to the predefined JSON Schema, including the fields: fault_type, target_signal, reference_time_ns, magnitude_ns, and semantic_context. The system is equipped with an output parser that automatically retryes if the LLM returns a format error or an out-of-bounds value, ensuring that the final output is always valid and executable.
[0059] Step 4: The waveform editing agent performs exception injection. After receiving the structured anomaly rules from the output, the waveform editing agent performs precise timing perturbations on the original normal waveform (VCD format), generating a synthetic waveform file containing the target anomaly and producing a corresponding waveform diagram as an anomaly sample. This agent employs an inference architecture based on a Large Language Model (LLM), the core of which is an open-source large language model fine-tuned by instructions, deployed on a local computing node. It's important to note that the LLM does not directly output the final VCD file; instead, it generates a structured waveform editing instruction based on the anomaly rules and the original waveform metadata, which is then parsed and applied to the original waveform by the execution engine. This design leverages the LLM's ability to understand complex operational intentions while ensuring the accuracy and safety of the operation through a backend executor.
[0060] The specific implementation process is as follows: Context building The system will concatenate the following information into an LLM input prompt: Structured semantic description of the original waveform; Received exception injection rules (e.g., {"fault_type":"clock_jitter","target_signal":"CLK","reference_time_ns":10.0,"magnitude_ns":6.0}); Predefined VCD editing operation specifications (such as "jitter = modify the timestamp of the specified edge; glitch = insert a pair of temporary jump events").
[0061] (2) LLM generates editing instructions Guided by prompts, LLM generates a set of grammatically correct editing instructions, such as:
[0062] or
[0063] The instruction is in a machine-readable format and does not depend on a specific programming language.
[0064] (3) Editing command verification The verification script first parses the editing instructions output by the LLM, identifying their operation type, target signal, and parameter values; then, it performs three checks in sequence: (a) Syntax validity: Whether the operation type (e.g., modify_edge, insert_glitch) belongs to the predefined instruction set; (b) Signal Existence: Whether the target signal is defined in the original waveform; (c) Parameter rationality: whether the timestamp is within the waveform time range, and whether the generated pulse width is not less than the minimum pulse width allowed by the device under test.
[0065] If any check fails, the LLM will retry until a valid instruction is output.
[0066] (4) Exception injection execution The verified editing instructions are passed to the waveform execution engine, which is programmatically implemented and can directly manipulate the VCD event list. For example, for "clock jitter," the timestamp of the corresponding edge event is modified; for "data glitches," two new events (flip → restore) are inserted at specified positions. All modifications maintain signal level consistency and event timing monotonicity. Finally, the engine reserializes the updated event sequence into standard VCD format and adds metadata (such as exception type and injection time point). The resulting synthesized waveform file can be directly used for hardware playback testing or automated verification platforms.
[0067] (5) Generation of abnormal waveform image samples Subsequently, the local waveform rendering module is invoked to convert the synthesized VCD file into waveform image samples of fixed size and a unified coordinate system. Specifically, the rendering module performs the following operations based on an open-source visualization library (such as the Matplotlib + PyVCD combination for Python): loading the synthesized VCD and associated signal list, setting a unified time window (e.g., from 5ns before the first valid event to 5ns after the last event), fixing the voltage / logic level display ratio (high level = 1.0, low level = 0.0), and finally rendering it as a PNG or JPEG image with a resolution of 512×256 pixels (configurable). The generated waveform image samples are stored and used as input for external machine learning systems in the future.
[0068] Step 5: Multidimensional evaluation of abnormal waveforms After the waveform editing agent generates abnormal waveforms, the system needs to evaluate their testing value, that is, their ability to effectively expose design vulnerabilities or potential physical faults. Design vulnerabilities originate from the design stage (e.g., the existence of timing or electrical parameters approaching the constraint threshold), and may still cause functional abnormalities due to specific stimuli under ideal manufacturing conditions; potential physical faults refer to hidden anomalies introduced by manufacturing process deviations or physical defects (such as high metal interconnect resistance, transistor threshold voltage drift, local electromigration, etc.).
[0069] Since high-value samples that can successfully expose any of the above-mentioned problems (i.e., samples with hardware test results of FAIL) are extremely scarce in actual verification, making it difficult to support the training of supervised machine learning models, this invention abandons the data-driven approach and instead adopts an unsupervised evaluation mechanism based on historical experience comparison and semantic verification. However, directly performing global similarity comparison on the complete waveform has very limited effect, because effective perturbations usually only manifest as local timing events (such as single clock edge jitter, narrow pulse glitches, or level shifts), while the main body of the waveform consists of a large number of normal signals. Global comparison is easily affected by irrelevant background interference and cannot accurately identify abnormal patterns with high testing value. To this end, this invention proposes a local waveform evaluation mechanism based on anomaly semantic guidance: using structured anomaly rules to accurately locate the spatiotemporal context of the perturbation, extracting and comparing only the features of this local area, thereby significantly improving the discrimination sensitivity. The specific implementation is as follows: (1) Local anomaly context extraction Based on the output structured anomaly rules and semantic descriptions, a large model LLM or script is used to automatically identify the set of key signals related to the current disturbance (e.g., if the DATA signal is disturbed and sampled by the CLK signal, then both the CLK and DATA signals are included) and the effective time window (e.g., a ±Δt interval centered at a reference time point, where Δt can be configured to 5 ns). Subsequently, this local event sequence is extracted from the synthesized VCD.
[0070] (2) Local representation generation and standardization The aforementioned local event sequences are standardized to generate a local waveform representation (e.g., rendered as a PNG image) with a fixed size (e.g., 128×64 pixels) and a unified coordinate system. This representation focuses on the microscopic temporal environment in which the disturbance occurs, making the anomalous features dominant and significantly improving the signal-to-noise ratio. Those skilled in the art can also use other equivalent local feature encoding methods (e.g., event sequence hashing or symbolic trajectories), not limited to visualized images.
[0071] (3) Construction and retrieval of historical local representation database All known FAIL samples from the past that can effectively expose design vulnerabilities or potential physical failures are archived using the same strategy, generating and storing their corresponding local representations to form a structured, high-value anomaly pattern library. The local representations of new samples are compared to this library using lightweight algorithms (such as structural similarity criterion SSIM). If a historical sample with a similarity exceeding a preset threshold (determined by the user) exists, the current perturbation is considered to have a similar risk exposure capability; if the historical library is empty or has no matching entries, the evaluation is based solely on semantic consistency verification results.
[0072] (4) Multidimensional comprehensive evaluation The system further performs semantic consistency verification: logically comparing the anomaly rules with the structured timing context to verify whether the disturbance is applied to the truly sensitive timing region under the current protocol or circuit state. Specifically, this includes: For time-based disturbances, check whether they affect the [t_clk_rise-tsu,t_clk_rise] window; For hold-time perturbations, check whether they affect the interval [t_clk_rise, t_clk_rise+th]. For disturbances to reset or enable signals, check whether they occur within the initialization cycle or the function's effective window. For bus protocol disturbances, check whether they affect the address / command / data phases rather than the idle cycle.
[0073] Only when the disturbance simultaneously meets the following conditions: (a) Its local representation has a similarity to historical high-value samples that is higher than a preset threshold (or this condition is skipped when the historical database is empty). (b) Its location of action is consistent with the functionally sensitive area in the context; Only after determining that the abnormal waveform has the ability to effectively expose design vulnerabilities or potential physical faults is it determined that the sample meets the criteria. The sample is marked as "high value" and stored in the abnormal waveform sample set; its local representation, anomaly rules, test results and metadata will also be automatically added to the historical database for subsequent generation of closed-loop optimization, continuously improving the system's detection efficiency for the two types of core risks.
[0074] Step 6: Expert Sampling Evaluation and Feedback Injection Although step 5 performs multidimensional prediction of abnormal waveform samples through local representation similarity and semantic consistency, and adopts high-value samples, this judgment may still carry a certain risk of misjudgment. Therefore, the system supports the introduction of human experts for sample validation to calibrate potential cognitive biases.
[0075] Specifically, the system periodically selects representative samples (such as newly appearing disturbance types) from the adopted samples and presents their local waveform representation, structured anomaly rules, and contextual information to testing experts. Based on their engineering experience, experts determine whether the sample can effectively expose design vulnerabilities or potential physical faults and mark it as "valid" or "invalid." If a sample is marked as "invalid," the system removes it from the currently generated set of anomalous waveform samples and marks it as an "invalid sample" in the historical anomaly pattern library to ensure that it is no longer used as a high-value reference during subsequent similarity searches.
[0076] At the same time, the system parses the corresponding structured exception rules (such as {"fault_type":"glitch","target_signal":"DATA","reference_time_ns":12.3,"context":{"RESET":"LOW"}}), extracts the key context features that cause invalidity (such as "injecting a glitch into DATA when RESET is low"), and explicitly adds a negative guidance statement to the next round of task prompt template of the exception planning agent, for example:
[0077] This update only applies to subsequent generation tasks and can be enabled or cleared via a configuration switch to prevent the prompts from expanding indefinitely. Through this lightweight "human-in-the-loop" mechanism, negative feedback from experts is instantly transformed into precise constraints on the LLM planning logic, significantly improving the engineering rationality of abnormal waveform generation and its ability to expose real functional risks.
[0078] Please see Figure 2 The third embodiment of the present invention provides: A dual-agent driven anomaly test waveform sample generation system, wherein the system comprises: The module is used to acquire normal waveform data and record the transition events of each signal in a preset VCD format. Based on the transition events, the waveform data is subjected to noise reduction and cleaning processing to obtain the base waveform. The parsing module is used to perform multi-level semantic parsing on the base waveform, which sequentially goes through signal preprocessing, edge and level feature extraction, and protocol and timing context construction to generate a structured semantic description. The generation module is used to call the exception planning agent to perform constraint reasoning based on the structured semantic description, preset test targets and preset test domain knowledge base to generate structured exception injection rules. The evaluation module is used to call the waveform editing agent to parse the structured anomaly injection rules and execute timing perturbations to generate synthetic anomaly waveforms. It adopts a local waveform evaluation mechanism based on anomaly semantic guidance to perform multi-dimensional comprehensive evaluation of the synthetic anomaly waveforms and select anomaly waveform samples.
[0079] Furthermore, the step of performing multi-level semantic parsing on the base waveform includes: The minimum high-level and low-level pulse widths are determined based on the design specifications or datasheet of the device under test, and are used as the physical validity thresholds. Traverse the sequence of transition events of the target signal. If the duration of a certain level state is less than the physical validity threshold, it is determined to be a false transition caused by noise and removed. At the same time, adjacent opposite level states are merged into a single continuous state to complete the signal preprocessing.
[0080] Furthermore, after completing the signal preprocessing, the process also includes: For clock signals, all rising and falling edge times are identified, and the time interval between adjacent rising edges is calculated to generate a clock cycle sequence. For data and control signals, consecutive identical level states are merged to generate a level duration interval. For enable signals, the interval corresponding to the valid state is marked as the protocol valid window, and synchronous integration processing is performed to generate a signal feature set. Based on the signal feature set, the timing relationship between signals is fused with the preset interface specifications and protocol prior knowledge to identify the injection window in the waveform and construct a structured timing context description body; By integrating the temporal context description and the attribute parameters of each signal, a hierarchical, machine-readable structured semantic description is generated, which serves as the input to the anomaly planning agent.
[0081] Furthermore, the step of invoking the exception planning agent to generate structured exception injection rules includes: The user's test objective, the structured semantic description of the current waveform, and the list of available tools are encapsulated as structured prompts and input into a locally deployed large language model that has been fine-tuned by instructions; The large language model calls the test domain knowledge base to retrieve matching fault templates and parameter ranges, while accessing historical defect logs to extract historical parameters of similar disturbances. The retrieval results are then concatenated with the input prompts as the basis for reasoning. Guide the large language model to perform chained reasoning within a restricted context to generate anomaly injection rules that include parameters such as anomaly type, action signal, time location, and intensity.
[0082] Furthermore, the generation of the exception injection rule also includes a verification step: The output parser performs format compliance and parameter range checks on the generated anomaly injection rules to verify whether the rules conform to the predefined field specifications, whether the timestamp is within the valid waveform range, and whether the disturbance parameters meet the physical constraints. If the validation fails, the large language model is triggered to regenerate the rules until a structured exception injection rule that meets the preset requirements is output.
[0083] Furthermore, the step of invoking the waveform editing agent to perform timing perturbations and generate synthetic abnormal waveforms includes: The structured semantic description of the original waveform, the structured anomaly injection rules, and the predefined VCD editing operation specifications are concatenated into input prompts, which are then input into the locally deployed large language model. The large language model generates structured waveform editing instructions that include operation type, target signal, and timing parameters. The editing instructions are sequentially checked for syntax validity, signal existence, and parameter rationality. Editing instructions that pass the checks are passed to the waveform execution engine. Based on the waveform execution engine, the corresponding timing perturbation operation is performed on the VCD event list to generate a synthetic abnormal waveform in standard VCD format.
[0084] Furthermore, the step of performing multi-dimensional comprehensive evaluation after generating the synthesized abnormal waveform includes: Based on structured anomaly rules and structured semantic descriptions, the key signal set and effective time window related to the current disturbance are located, and the corresponding local event sequence is extracted from the synthetic anomaly waveform; The local event sequence is standardized to generate a local waveform representation with fixed size and a unified coordinate system, and then compared with a historical anomaly pattern library for similarity. Perform semantic consistency checks to verify whether the disturbance affects the functionally sensitive timing region of the corresponding protocol or circuit state; When the similarity between a local waveform representation and a historical sample is higher than a preset threshold, and the disturbance location is consistent with the functionally sensitive area, the synthesized abnormal waveform is determined to be an abnormal waveform sample, and the corresponding information is stored in the historical abnormal pattern library. Representative samples are periodically selected and pushed to testing experts for sampling verification. Based on the negative feedback from the experts, the contextual features of invalid perturbations are extracted and transformed into a prompt template for updating the abnormal planning agent using constraint statements.
[0085] The fourth embodiment of the present invention provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the dual-agent driven abnormal test waveform sample generation method as described above.
[0086] The fifth embodiment of the present invention provides a readable storage medium storing a computer program thereon, wherein the program, when executed by a processor, implements the dual-agent driven abnormal test waveform sample generation method as described above.
[0087] In summary, the abnormal waveforms ultimately output by the above embodiments of the present invention not only match the timing and protocol characteristics of real signals, but also have a high defect triggering capability, which can effectively eliminate low-value redundant samples and significantly improve the effectiveness of test samples and the efficiency of defect detection.
[0088] It should be noted that the above modules can be functional modules or program modules, and can be implemented through software or hardware. For modules implemented through hardware, the above modules can reside in the same processor; or the above modules can be located in different processors in any combination.
[0089] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-including system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device.
[0090] More specific examples of computer-readable media (a non-exhaustive list) include: electrical connections (electronic devices) having one or more wires, portable computer disk drives (magnetic devices), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which the program can be printed, because the program can be obtained electronically, for example, by optical scanning of the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.
[0091] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0092] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0093] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the appended claims.
Claims
1. A method for generating abnormal test waveform samples driven by a dual-agent system, characterized in that, The method includes: Normal waveform data is acquired and the transition events of each signal are recorded using a preset VCD format. Based on the transition events, the waveform data is subjected to noise reduction and cleaning processing to obtain the base waveform. The base waveform is subjected to multi-level semantic parsing, which involves signal preprocessing, edge and level feature extraction, and protocol and timing context construction to generate a structured semantic description. The anomaly planning agent is invoked to perform constraint-based reasoning based on the structured semantic description, preset test targets, and a pre-set test domain knowledge base, generating structured anomaly injection rules. The waveform editing agent is invoked to parse the structured anomaly injection rules and execute timing perturbations to generate synthetic anomaly waveforms. A local waveform evaluation mechanism based on anomaly semantics is used to perform multi-dimensional comprehensive evaluation of the synthetic anomaly waveforms and select anomaly waveform samples.
2. The method for generating abnormal test waveform samples driven by dual agents according to claim 1, characterized in that, The steps of performing multi-level semantic parsing on the base waveform include: The minimum high-level and low-level pulse widths are determined based on the design specifications or datasheet of the device under test, and are used as the physical validity thresholds. Traverse the sequence of transition events of the target signal. If the duration of a certain level state is less than the physical validity threshold, it is determined to be a false transition caused by noise and removed. At the same time, adjacent opposite level states are merged into a single continuous state to complete the signal preprocessing.
3. The method for generating abnormal test waveform samples driven by dual agents according to claim 2, characterized in that, After completing the signal preprocessing, the process also includes: For clock signals, all rising and falling edge times are identified, and the time interval between adjacent rising edges is calculated to generate a clock cycle sequence. For data and control signals, consecutive identical level states are merged to generate a level duration interval. For enable signals, the interval corresponding to the valid state is marked as the protocol valid window, and synchronous integration processing is performed to generate a signal feature set. Based on the signal feature set, the timing relationship between signals is fused with the preset interface specifications and protocol prior knowledge to identify the injection window in the waveform and construct a structured timing context description body; By integrating the temporal context description and the attribute parameters of each signal, a hierarchical, machine-readable, structured semantic description is generated, which serves as the input to the anomaly planning agent.
4. The method for generating abnormal test waveform samples driven by dual agents according to claim 1, characterized in that, The steps for generating structured exception injection rules by invoking the exception planning agent include: The user's test objective, the structured semantic description of the current waveform, and the list of available tools are encapsulated as structured prompts and input into a locally deployed large language model that has been fine-tuned by instructions; The large language model calls the test domain knowledge base to retrieve matching fault templates and parameter ranges, while accessing historical defect logs to extract historical parameters of similar disturbances. The retrieval results are then concatenated with the input prompts as the basis for reasoning. Guide the large language model to perform chained reasoning within a restricted context to generate anomaly injection rules that include anomaly type, action signal, time location, and intensity parameters.
5. The method for generating abnormal test waveform samples driven by dual agents according to claim 4, characterized in that, The generation of the anomaly injection rule also includes a verification step: The output parser performs format compliance and parameter range checks on the generated anomaly injection rules to verify whether the rules conform to the predefined field specifications, whether the timestamp is within the valid waveform range, and whether the disturbance parameters meet the physical constraints. If the validation fails, the large language model is triggered to regenerate the rules until a structured exception injection rule that meets the preset requirements is output.
6. The method for generating abnormal test waveform samples driven by dual agents according to claim 1, characterized in that, The step of calling the waveform editing agent to perform timing perturbation to generate synthetic abnormal waveforms includes: The structured semantic description of the original waveform, the structured anomaly injection rules, and the predefined VCD editing operation specifications are concatenated into input prompts, which are then input into the locally deployed large language model. The large language model generates structured waveform editing instructions that include operation type, target signal, and timing parameters; The editing instructions are sequentially checked for syntax validity, signal existence, and parameter rationality. Editing instructions that pass the checks are passed to the waveform execution engine. Based on the waveform execution engine, the corresponding timing perturbation operation is performed on the VCD event list to generate a synthetic abnormal waveform in standard VCD format.
7. The method for generating abnormal test waveform samples driven by dual agents according to claim 6, characterized in that, The steps for performing multi-dimensional comprehensive evaluation after generating the synthetic abnormal waveform include: Based on structured anomaly rules and structured semantic descriptions, the key signal set and effective time window related to the current disturbance are located, and the corresponding local event sequence is extracted from the synthetic anomaly waveform; The local event sequence is standardized to generate a local waveform representation with fixed size and a unified coordinate system, and then compared with a historical anomaly pattern library for similarity. Perform semantic consistency checks to verify whether the disturbance affects the functionally sensitive timing region of the corresponding protocol or circuit state; When the similarity between a local waveform representation and a historical sample is higher than a preset threshold, and the disturbance location is consistent with the functionally sensitive area, the synthesized abnormal waveform is determined to be an abnormal waveform sample, and the corresponding information is stored in the historical abnormal pattern library. Representative samples are periodically selected and pushed to testing experts for sampling verification. Based on the negative feedback from the experts, the contextual features of invalid perturbations are extracted and transformed into a prompt template for updating the abnormal planning agent using constraint statements.
8. A dual-agent driven anomaly test waveform sample generation system, characterized in that, The system includes: The module is used to acquire normal waveform data and record the transition events of each signal in a preset VCD format. Based on the transition events, the waveform data is subjected to noise reduction and cleaning processing to obtain the base waveform. The parsing module is used to perform multi-level semantic parsing on the base waveform, which sequentially goes through signal preprocessing, edge and level feature extraction, and protocol and timing context construction to generate a structured semantic description. The generation module is used to call the exception planning agent to perform constraint reasoning based on the structured semantic description, preset test targets and preset test domain knowledge base to generate structured exception injection rules. The evaluation module is used to call the waveform editing agent to parse the structured anomaly injection rules and execute timing perturbations to generate synthetic anomaly waveforms. It adopts a local waveform evaluation mechanism based on anomaly semantic guidance to perform multi-dimensional comprehensive evaluation of the synthetic anomaly waveforms and select anomaly waveform samples.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the dual-agent driven abnormal test waveform sample generation method as described in any one of claims 1 to 7.
10. A readable storage medium having a computer program stored thereon, characterized in that, When executed by the processor, the program implements the dual-agent driven abnormal test waveform sample generation method as described in any one of claims 1 to 7.