`timescale 1ns/1ns module sequence_detect ( input clk, input rst_n, input data, input data_valid, output reg match ); // 状态定义 parameter IDLE = 0, S1 = 1, S2 = 2, S3 = 3, MATCH = 4; reg [2:0] state_c; // 当前状态 reg [2:0] state_n; // 下一个状态 // 状态更新逻辑 alwa...