`timescale 1ns/1ns module sequence_detect( input clk, input rst_n, input a, output reg match ); reg [3:0]state, next_state reg match_pre; localparam IDLE=8, S0=0, S01=1, S011=2, S0111=3, S01110=4, S011100=5, S0111000=6, S01110001=7; always@(posedge clk or negedge rst_n)begin if(!rst_n) state &l...