module frame_counter_no_scan (
SCAN_EN , /*Scan Enable*/
SCAN_IN , /*Scan Input*/
RSTB , /*Asynchronous reset*/
SCLK , /*Counter Clock*/
FRAME_CNT_INC_EN, /*Increment enable*/
FRAME_COUNT, /*Frame count*/
SCAN_OUT
);
/*Port direction and types*/
input SCAN_IN ;
input SCAN_EN ;
input FRAME_CNT_INC_EN;
output [7:0] FRAME_COUNT ;
output SCAN_OUT;
reg [7:0] FRAME_COUNT;
input SCLK ;
input RSTB ;
/*Internal signal declaration*/
wire rb ;
/*Functional description*/
/*disabled reset in SCAN mode*/
assign rb= RSTB;
/*Upward counter */
always@(negedge rb or posedge SCLK)
if(!rb)
FRAME_COUNT<={8{1'b0}};
else if(FRAME_CNT_INC_EN)
FRAME_COUNT<=FRAME_COUNT+1'b1; /*Normal mode*/
endmodule