``` `timescale 1ns/1ns module fsm2( input wire clk , input wire rst , input wire data , output reg flag ); //**code// /reg[2:0] s; always @(posedge clk or negedge rst )begin if (!rst)begin s<=0; flag<=0; end else begin if(data==1)begin if(s<=3)begin s<=s+1; flag<=0; end if(s==4)begi...