data/full_repos/permissive/174263347/htsc.v
 line:277: before: "#"
1: b'%Warning-STMTDLY: data/full_repos/permissive/174263347/htsc.v:256: Unsupported: Ignoring delay on this delayed statement.\n        # ((h == HD_J) & ~line_ff & field_ff)\n        ^\n                  ... Use "/* verilator lint_off STMTDLY */" and lint_on around source to disable this message.\n%Warning-STMTDLY: data/full_repos/permissive/174263347/htsc.v:259: Unsupported: Ignoring delay on this delayed statement.\n             # ((h == HD_K) & ~line_ff & field_ff)\n             ^\n%Error: data/full_repos/permissive/174263347/htsc.v:277: syntax error, unexpected \'#\'\n                  # ((h == HD_J) & ~line_ff &  field_ff)\n                  ^\n%Warning-STMTDLY: data/full_repos/permissive/174263347/htsc.v:298: Unsupported: Ignoring delay on this delayed statement.\n                 # ((h == HD_J) & ~line_ff &  field_ff)\n                 ^\n%Warning-STMTDLY: data/full_repos/permissive/174263347/htsc.v:301: Unsupported: Ignoring delay on this delayed statement.\n                      # ((h == HD_K) & ~line_ff &  field_ff)\n                      ^\n%Warning-STMTDLY: data/full_repos/permissive/174263347/htsc.v:315: Unsupported: Ignoring delay on this delayed statement.\n                  #((h == CSYNC_SUB_PH_J) & ~line_ff &   field_ff)\n                  ^\n%Warning-STMTDLY: data/full_repos/permissive/174263347/htsc.v:318: Unsupported: Ignoring delay on this delayed statement.\n                      # ((h == CSYNC_SUB_PH_K) & ~line_ff &  field_ff)\n                      ^\n%Warning-STMTDLY: data/full_repos/permissive/174263347/htsc.v:322: Unsupported: Ignoring delay on this delayed statement.\n                  #((h == HD_J) & ~line_ff &  field_ff)\n                  ^\n%Warning-STMTDLY: data/full_repos/permissive/174263347/htsc.v:325: Unsupported: Ignoring delay on this delayed statement.\n                       #((h == HD_K) & ~line_ff &  field_ff)\n                       ^\n%Warning-STMTDLY: data/full_repos/permissive/174263347/htsc.v:332: Unsupported: Ignoring delay on this delayed statement.\n                 # ((h == BURST_J) & ~line_ff &  field_ff)\n                 ^\n%Warning-STMTDLY: data/full_repos/permissive/174263347/htsc.v:335: Unsupported: Ignoring delay on this delayed statement.\n                      # ((h == BURST_K) & ~line_ff &  field_ff)\n                      ^\n%Warning-STMTDLY: data/full_repos/permissive/174263347/htsc.v:346: Unsupported: Ignoring delay on this delayed statement.\n                 # ((h == CSYNC_VID_ACT_J) & ~line_ff &  field_ff)\n                 ^\n%Warning-STMTDLY: data/full_repos/permissive/174263347/htsc.v:349: Unsupported: Ignoring delay on this delayed statement.\n                      # ((h == CSYNC_VID_ACT_K) & ~line_ff &  field_ff)\n                      ^\n%Error: data/full_repos/permissive/174263347/htsc.v:353: syntax error, unexpected \']\', expecting TYPE-IDENTIFIER\n                 # ((h[] == HD_J) & !line_ff & field_ff)\n                       ^\n%Warning-STMTDLY: data/full_repos/permissive/174263347/htsc.v:356: Unsupported: Ignoring delay on this delayed statement.\n                      # ((h == HD_K) & ~line_ff &  field_ff)\n                      ^\n%Warning-STMTDLY: data/full_repos/permissive/174263347/htsc.v:363: Unsupported: Ignoring delay on this delayed statement.\n                 # ((h == BURST_J) & ~line_ff &  field_ff)\n                 ^\n%Warning-STMTDLY: data/full_repos/permissive/174263347/htsc.v:366: Unsupported: Ignoring delay on this delayed statement.\n                      # ((h == BURST_K) & ~line_ff &  field_ff)\n                      ^\n%Warning-STMTDLY: data/full_repos/permissive/174263347/htsc.v:370: Unsupported: Ignoring delay on this delayed statement.\n                 # ((h == BLANK_J) & ~line_ff &  field_ff)\n                 ^\n%Warning-STMTDLY: data/full_repos/permissive/174263347/htsc.v:373: Unsupported: Ignoring delay on this delayed statement.\n                      # ((h == BLANK_K) & ~line_ff &  field_ff)\n                      ^\n%Error: data/full_repos/permissive/174263347/htsc.v:381: syntax error, unexpected end\nend\n^~~\n%Error: data/full_repos/permissive/174263347/htsc.v:415: syntax error, unexpected \',\'\n v   =  {((v, line_ff)  == \'bX1000000001) & ~vcnt_reset # vcnt_reset & v9,\n            ^\n%Error: data/full_repos/permissive/174263347/htsc.v:444: syntax error, unexpected \'#\'\nassign vcnt_reset = (v == VCNT_ROLL_OVER # cnt_reset);\n                                         ^\n%Error: data/full_repos/permissive/174263347/htsc.v:464: syntax error, unexpected end\nend\n^~~\n%Error: Cannot continue\n        ... See the manual and https://verilator.org for more assistance.\n'
module ntsc	(clock, reset, csync, hd, vd, fld, blank, burst );

	input   clock;
	input   reset;

	output  csync, hd, vd, fld, blank, burst;




	reg [2:0] line_decode;
    parameter   _power_up   = 3'b000, 	
                _pre_eq     = 3'b001,
				_serra      = 3'b010,
				_post_eq    = 3'b011,
				_sub_ph     = 3'b100,    
				_vid_act    = 3'b101;

	wire    gclk;
	wire    grst;

	reg csync_ff;
	reg hd_ff;
	reg vd_ff;
	reg fld_ff;
	reg blank_ff;
	reg burst_ff;

	wire    pwr_up;
	wire    cnt_reset; 



	reg     [9:0]v;
	reg     [8:0]h;
	reg     line_ff;
	reg     h_odd;
	reg     field_ff;
	wire    vcnt_reset;
	wire    hcnt_reset;


assign	gclk = clock;
assign	grst = reset;



    assign pwr_up      =	(line_decode == _power_up);
    assign cnt_reset   =	(line_decode == _power_up);

always  @   ( posedge gclk or posedge grst )
    begin 

    if(grst)
        line_decode <= _power_up;
    else


    	case ( line_decode ) 

    	_power_up:
            begin
                csync_ff    <=	1;
                hd_ff       <=	1;
                vd_ff       <=	0;
                fld_ff      <=	0;
                blank_ff    <=	0;
                burst_ff    <=	1;
                line_decode <=	_pre_eq;
            end
    	_pre_eq:
            begin
                if (h == CSYNC_PRE_EQ_J)
    		    	csync_ff	<=	1;
                else if (h == CSYNC_PRE_EQ_K)
    			    csync_ff	<= 0;	;
    			
                vd_ff 	    =	0;
    			
                if ((h == HD_J) & ~!line_ff & ~field_ff)
    			 # ((h == HD_J) & ~line_ff & field_ff)
                    hd_ff	    <= 1;
    			else if ((h == HD_K) & ~line_ff & ~field_ff)
    			      #	((h == HD_K) & ~line_ff & field_ff)
    			    hd_ff.k		<=	0;
                
                fld_ff	    <=	0;
    			blank_ff	<=	0;
    			burst_ff	<=	1;
			
    			if (v == START_SERRA ) 
    				line_decode = _serra ;
            end
    	_serra:
            begin
                if (h == CSYNC_SERRA_J)
    			    csync_ff	<=	1;
    			else if (h == CSYNC_SERRA_K)
                    csync_ff	<=	0;
                
                if (((h == HD_J) & ~line_ff & ~field_ff) 
                  # ((h == HD_J) & ~line_ff &  field_ff)
    			    hd_ff		<=	1;
    			else if ((h == HD_K) & ~line_ff & ~field_ff) 
                      # ((h == HD_K) & ~line_ff &  field_ff)
                    hd_ff		<=	0;
    			
                vd_ff   	<=	0;
    			fld_ff	    <=	1;
    			blank_ff	<=	0;
    			burst_ff    <=	1;
 
    			if (v == START_POST_EQ ) 
    				line_decode = _post_eq;
            end
    	_post_eq:
            begin
                if (h == CSYNC_POST_EQ_J)
    			    csync_ff	<=	1;
                else if (h == CSYNC_POST_EQ_K)
    			    csync_ff	<=	0;
                if ((h == HD_J) & ~line_ff & ~field_ff)
                 # ((h == HD_J) & ~line_ff &  field_ff)
                    hd_ff  <=   1;
                else if ((h == HD_K) & ~line_ff & ~field_ff)
                      # ((h == HD_K) & ~line_ff &  field_ff)
                      hd_ff     <=   0;

    			vd_ff		<=	0;
    			fld_ff  	<=	1;
    			blank_ff	<=	0;
    			burst_ff	<=	1;

    			if (v == START_SUB_PH ) 
    				line_decode = _sub_ph ;
            end
    	_sub_ph:
            begin
                if ((h == CSYNC_SUB_PH_J) & ~!line_ff & ~field_ff)
                  #((h == CSYNC_SUB_PH_J) & ~line_ff &   field_ff)
                    csync_ff  <=  1;  
                else if ((h == CSYNC_SUB_PH_K) & ~line_ff & ~field_ff) 
                      # ((h == CSYNC_SUB_PH_K) & ~line_ff &  field_ff)
                    csync_ff  <=  0;

                if ((h == HD_J) & ~line_ff & ~field_ff)
                  #((h == HD_J) & ~line_ff &  field_ff)
                    hd_ff <= 1;
                else if ((h == HD_K) & ~line_ff & ~field_ff)
                       #((h == HD_K) & ~line_ff &  field_ff)
                    hd_ff <= 0;

    			vd_ff		<=	1;
    			fld_ff  	<=	1;

                if ((h == BURST_J) & ~line_ff & ~field_ff)
                 # ((h == BURST_J) & ~line_ff &  field_ff)
                    burst_ff <= 1;
                else if ((h == BURST_K) & ~line_ff & ~field_ff)
                      # ((h == BURST_K) & ~line_ff &  field_ff)
                    burst_ff <= 0;

    			blank_ff	<=	0;

    			if (v == START_VID_ACT ) 
    				line_decode = _vid_act;
            end
    	_vid_act:
            begin
                if ((h == CSYNC_VID_ACT_J) & ~line_ff & ~field_ff)
                 # ((h == CSYNC_VID_ACT_J) & ~line_ff &  field_ff)
                    csync_ff <= 1;
                else if ((h == CSYNC_VID_ACT_K) & ~line_ff & ~field_ff) 
                      # ((h == CSYNC_VID_ACT_K) & ~line_ff &  field_ff)
                      csync_ff <= 0;

                if ((h == HD_J) & ~line_ff & ~field_ff)
                 # ((h[] == HD_J) & !line_ff & field_ff)
                    hd_ff <= 1;
                else if ((h == HD_K) & ~line_ff & ~field_ff)
                      # ((h == HD_K) & ~line_ff &  field_ff)
                      hd_ff <= 0;

    			vd_ff		<=	1;
    			fld_ff	    <=	1;

                if ((h == BURST_J) & ~line_ff & ~field_ff)
                 # ((h == BURST_J) & ~line_ff &  field_ff)
                    burst_ff <= 1;
                else if ((h == BURST_K) & ~line_ff & ~field_ff)
                      # ((h == BURST_K) & ~line_ff &  field_ff)
                    burst_ff <= 0;

                if ((h == BLANK_J) & ~line_ff & ~field_ff)
                 # ((h == BLANK_J) & ~line_ff &  field_ff)
                    blank_ff <= 1;
                else if ((h == BLANK_K) & ~line_ff & ~field_ff)
                      # ((h == BLANK_K) & ~line_ff &  field_ff)
                      blank_ff <= 0;
			
    			if (v == START_PRE_EQ ) 
    				line_decode = _pre_eq;
            end
        endcase
    end
end


assign csync				=	csync_ff;
assign hd					=	hd_ff;
assign vd					=	vd_ff;
assign fld					=	fld_ff;
assign burst				=	burst_ff;
assign blank				=	blank_ff;



assign line_ff			=	(h == HCNT_ROLL_OVER);
assign field_ff			=	(v == VCNT_ROLL_OVER & h == HCNT_ROLL_OVER);


always  @   ( posedge gclk )
    begin 

	if(!field_ff) 
    begin
	v   =  {((v, line_ff)  == 'bX1000000001) & ~vcnt_reset # vcnt_reset & v9,
			((v, line_ff)  == 'bXX100000001) & ~vcnt_reset # vcnt_reset & v8,
			((v, line_ff)  == 'bXXX10000001) & ~vcnt_reset # vcnt_reset & v7,
			((v, line_ff)  == 'bXXXX1000001) & ~vcnt_reset # vcnt_reset & v6,
			((v, line_ff)  == 'bXXXXX100001) & ~vcnt_reset # vcnt_reset & v5,
			((v, line_ff)  == 'bXXXXXX10001) & ~vcnt_reset # vcnt_reset & v4,
			((v, line_ff)  == 'bXXXXXXX1001) & ~vcnt_reset # vcnt_reset & v3,
			((v, line_ff)  == 'bXXXXXXXX101) & ~vcnt_reset # vcnt_reset & v2,
			((v, line_ff)  == 'bXXXXXXXXX11) & ~vcnt_reset # vcnt_reset & v1,
			((v, line_ff)  == 'bXXXXXXXXXX0) & ~vcnt_reset # vcnt_reset & v0
			}
			& (h == HCNT_ROLL_OVER);
	else
	v =    {((v, ~line_ff)  == 'bX1000000001) & ~vcnt_reset # vcnt_reset & v9,
			((v, ~line_ff)  == 'bXX100000001) & ~vcnt_reset # vcnt_reset & v8,
			((v, ~line_ff)  == 'bXXX10000001) & ~vcnt_reset # vcnt_reset & v7,
			((v, ~line_ff)  == 'bXXXX1000001) & ~vcnt_reset # vcnt_reset & v6,
			((v, ~line_ff)  == 'bXXXXX100001) & ~vcnt_reset # vcnt_reset & v5,
			((v, ~line_ff)  == 'bXXXXXX10001) & ~vcnt_reset # vcnt_reset & v4,
			((v, ~line_ff)  == 'bXXXXXXX1001) & ~vcnt_reset # vcnt_reset & v3,
			((v, ~line_ff)  == 'bXXXXXXXX101) & ~vcnt_reset # vcnt_reset & v2,
			((v, ~line_ff)  == 'bXXXXXXXXX11) & ~vcnt_reset # vcnt_reset & v1,
			((v, ~line_ff)  == 'bXXXXXXXXXX0) & ~vcnt_reset # vcnt_reset & v0
			}
			& (h == HCNT_ROLL_OVER);

	end;
end

assign vcnt_reset = (v == VCNT_ROLL_OVER # cnt_reset);

h_odd = h_odd | ~pwr_up;

always  @   ( posedge gclk )
begin 

	h =    {({h, h_odd}  == 'bX100000001) & ~hcnt_reset | hcnt_reset & h[8],
			({h, h_odd}  == 'bXX10000001) & ~hcnt_reset | hcnt_reset & h[7],
			({h, h_odd}  == 'bXXX1000001) & ~hcnt_reset | hcnt_reset & h[6],
			({h, h_odd}  == 'bXXXX100001) & ~hcnt_reset | hcnt_reset & h[5],
			({h, h_odd}  == 'bXXXXX10001) & ~hcnt_reset | hcnt_reset & h[4],
			({h, h_odd}  == 'bXXXXXX1001) & ~hcnt_reset | hcnt_reset & h[3],
			({h, h_odd}  == 'bXXXXXXX101) & ~hcnt_reset | hcnt_reset & h[2],
			({h, h_odd}  == 'bXXXXXXXX11) & ~hcnt_reset | hcnt_reset & h[1],
			({h, h_odd}  == 'bXXXXXXXXX0) & ~hcnt_reset | hcnt_reset & h[0]
			};
end
	assign hcnt_reset = (h == HCNT_ROLL_OVER) | pwr_up | cnt_reset;

end
endmodule
module ntsc	(clock, reset, csync, hd, vd, fld, blank, burst );


	input   clock;
	input   reset;

	output  csync, hd, vd, fld, blank, burst;




	reg [2:0] line_decode;
    parameter   _power_up   = 3'b000, 	
                _pre_eq     = 3'b001,
				_serra      = 3'b010,
				_post_eq    = 3'b011,
				_sub_ph     = 3'b100,    
				_vid_act    = 3'b101;

	wire    gclk;
	wire    grst;

	reg csync_ff;
	reg hd_ff;
	reg vd_ff;
	reg fld_ff;
	reg blank_ff;
	reg burst_ff;

	wire    pwr_up;
	wire    cnt_reset; 



	reg     [9:0]v;
	reg     [8:0]h;
	reg     line_ff;
	reg     h_odd;
	reg     field_ff;
	wire    vcnt_reset;
	wire    hcnt_reset;


assign	gclk = clock;
assign	grst = reset;



    assign pwr_up      =	(line_decode == _power_up);
    assign cnt_reset   =	(line_decode == _power_up);

always  @   ( posedge gclk or posedge grst )
    begin 

    if(grst)
        line_decode <= _power_up;
    else


    	case ( line_decode ) 

    	_power_up:
            begin
                csync_ff    <=	1;
                hd_ff       <=	1;
                vd_ff       <=	0;
                fld_ff      <=	0;
                blank_ff    <=	0;
                burst_ff    <=	1;
                line_decode <=	_pre_eq;
            end
    	_pre_eq:
            begin
                if (h == CSYNC_PRE_EQ_J)
    		    	csync_ff	<=	1;
                else if (h == CSYNC_PRE_EQ_K)
    			    csync_ff	<= 0;	;
    			
                vd_ff 	    =	0;
    			
                if ((h == HD_J) & ~!line_ff & ~field_ff)
    			 # ((h == HD_J) & ~line_ff & field_ff)
                    hd_ff	    <= 1;
    			else if ((h == HD_K) & ~line_ff & ~field_ff)
    			      #	((h == HD_K) & ~line_ff & field_ff)
    			    hd_ff.k		<=	0;
                
                fld_ff	    <=	0;
    			blank_ff	<=	0;
    			burst_ff	<=	1;
			
    			if (v == START_SERRA ) 
    				line_decode = _serra ;
            end
    	_serra:
            begin
                if (h == CSYNC_SERRA_J)
    			    csync_ff	<=	1;
    			else if (h == CSYNC_SERRA_K)
                    csync_ff	<=	0;
                
                if (((h == HD_J) & ~line_ff & ~field_ff) 
                  # ((h == HD_J) & ~line_ff &  field_ff)
    			    hd_ff		<=	1;
    			else if ((h == HD_K) & ~line_ff & ~field_ff) 
                      # ((h == HD_K) & ~line_ff &  field_ff)
                    hd_ff		<=	0;
    			
                vd_ff   	<=	0;
    			fld_ff	    <=	1;
    			blank_ff	<=	0;
    			burst_ff    <=	1;
 
    			if (v == START_POST_EQ ) 
    				line_decode = _post_eq;
            end
    	_post_eq:
            begin
                if (h == CSYNC_POST_EQ_J)
    			    csync_ff	<=	1;
                else if (h == CSYNC_POST_EQ_K)
    			    csync_ff	<=	0;
                if ((h == HD_J) & ~line_ff & ~field_ff)
                 # ((h == HD_J) & ~line_ff &  field_ff)
                    hd_ff  <=   1;
                else if ((h == HD_K) & ~line_ff & ~field_ff)
                      # ((h == HD_K) & ~line_ff &  field_ff)
                      hd_ff     <=   0;

    			vd_ff		<=	0;
    			fld_ff  	<=	1;
    			blank_ff	<=	0;
    			burst_ff	<=	1;

    			if (v == START_SUB_PH ) 
    				line_decode = _sub_ph ;
            end
    	_sub_ph:
            begin
                if ((h == CSYNC_SUB_PH_J) & ~!line_ff & ~field_ff)
                  #((h == CSYNC_SUB_PH_J) & ~line_ff &   field_ff)
                    csync_ff  <=  1;  
                else if ((h == CSYNC_SUB_PH_K) & ~line_ff & ~field_ff) 
                      # ((h == CSYNC_SUB_PH_K) & ~line_ff &  field_ff)
                    csync_ff  <=  0;

                if ((h == HD_J) & ~line_ff & ~field_ff)
                  #((h == HD_J) & ~line_ff &  field_ff)
                    hd_ff <= 1;
                else if ((h == HD_K) & ~line_ff & ~field_ff)
                       #((h == HD_K) & ~line_ff &  field_ff)
                    hd_ff <= 0;

    			vd_ff		<=	1;
    			fld_ff  	<=	1;

                if ((h == BURST_J) & ~line_ff & ~field_ff)
                 # ((h == BURST_J) & ~line_ff &  field_ff)
                    burst_ff <= 1;
                else if ((h == BURST_K) & ~line_ff & ~field_ff)
                      # ((h == BURST_K) & ~line_ff &  field_ff)
                    burst_ff <= 0;

    			blank_ff	<=	0;

    			if (v == START_VID_ACT ) 
    				line_decode = _vid_act;
            end
    	_vid_act:
            begin
                if ((h == CSYNC_VID_ACT_J) & ~line_ff & ~field_ff)
                 # ((h == CSYNC_VID_ACT_J) & ~line_ff &  field_ff)
                    csync_ff <= 1;
                else if ((h == CSYNC_VID_ACT_K) & ~line_ff & ~field_ff) 
                      # ((h == CSYNC_VID_ACT_K) & ~line_ff &  field_ff)
                      csync_ff <= 0;

                if ((h == HD_J) & ~line_ff & ~field_ff)
                 # ((h[] == HD_J) & !line_ff & field_ff)
                    hd_ff <= 1;
                else if ((h == HD_K) & ~line_ff & ~field_ff)
                      # ((h == HD_K) & ~line_ff &  field_ff)
                      hd_ff <= 0;

    			vd_ff		<=	1;
    			fld_ff	    <=	1;

                if ((h == BURST_J) & ~line_ff & ~field_ff)
                 # ((h == BURST_J) & ~line_ff &  field_ff)
                    burst_ff <= 1;
                else if ((h == BURST_K) & ~line_ff & ~field_ff)
                      # ((h == BURST_K) & ~line_ff &  field_ff)
                    burst_ff <= 0;

                if ((h == BLANK_J) & ~line_ff & ~field_ff)
                 # ((h == BLANK_J) & ~line_ff &  field_ff)
                    blank_ff <= 1;
                else if ((h == BLANK_K) & ~line_ff & ~field_ff)
                      # ((h == BLANK_K) & ~line_ff &  field_ff)
                      blank_ff <= 0;
			
    			if (v == START_PRE_EQ ) 
    				line_decode = _pre_eq;
            end
        endcase
    end
end


assign csync				=	csync_ff;
assign hd					=	hd_ff;
assign vd					=	vd_ff;
assign fld					=	fld_ff;
assign burst				=	burst_ff;
assign blank				=	blank_ff;



assign line_ff			=	(h == HCNT_ROLL_OVER);
assign field_ff			=	(v == VCNT_ROLL_OVER & h == HCNT_ROLL_OVER);


always  @   ( posedge gclk )
    begin 

	if(!field_ff) 
    begin
	v   =  {((v, line_ff)  == 'bX1000000001) & ~vcnt_reset # vcnt_reset & v9,
			((v, line_ff)  == 'bXX100000001) & ~vcnt_reset # vcnt_reset & v8,
			((v, line_ff)  == 'bXXX10000001) & ~vcnt_reset # vcnt_reset & v7,
			((v, line_ff)  == 'bXXXX1000001) & ~vcnt_reset # vcnt_reset & v6,
			((v, line_ff)  == 'bXXXXX100001) & ~vcnt_reset # vcnt_reset & v5,
			((v, line_ff)  == 'bXXXXXX10001) & ~vcnt_reset # vcnt_reset & v4,
			((v, line_ff)  == 'bXXXXXXX1001) & ~vcnt_reset # vcnt_reset & v3,
			((v, line_ff)  == 'bXXXXXXXX101) & ~vcnt_reset # vcnt_reset & v2,
			((v, line_ff)  == 'bXXXXXXXXX11) & ~vcnt_reset # vcnt_reset & v1,
			((v, line_ff)  == 'bXXXXXXXXXX0) & ~vcnt_reset # vcnt_reset & v0
			}
			& (h == HCNT_ROLL_OVER);
	else
	v =    {((v, ~line_ff)  == 'bX1000000001) & ~vcnt_reset # vcnt_reset & v9,
			((v, ~line_ff)  == 'bXX100000001) & ~vcnt_reset # vcnt_reset & v8,
			((v, ~line_ff)  == 'bXXX10000001) & ~vcnt_reset # vcnt_reset & v7,
			((v, ~line_ff)  == 'bXXXX1000001) & ~vcnt_reset # vcnt_reset & v6,
			((v, ~line_ff)  == 'bXXXXX100001) & ~vcnt_reset # vcnt_reset & v5,
			((v, ~line_ff)  == 'bXXXXXX10001) & ~vcnt_reset # vcnt_reset & v4,
			((v, ~line_ff)  == 'bXXXXXXX1001) & ~vcnt_reset # vcnt_reset & v3,
			((v, ~line_ff)  == 'bXXXXXXXX101) & ~vcnt_reset # vcnt_reset & v2,
			((v, ~line_ff)  == 'bXXXXXXXXX11) & ~vcnt_reset # vcnt_reset & v1,
			((v, ~line_ff)  == 'bXXXXXXXXXX0) & ~vcnt_reset # vcnt_reset & v0
			}
			& (h == HCNT_ROLL_OVER);

	end;
end

assign vcnt_reset = (v == VCNT_ROLL_OVER # cnt_reset);

h_odd = h_odd | ~pwr_up;

always  @   ( posedge gclk )
begin 

	h =    {({h, h_odd}  == 'bX100000001) & ~hcnt_reset | hcnt_reset & h[8],
			({h, h_odd}  == 'bXX10000001) & ~hcnt_reset | hcnt_reset & h[7],
			({h, h_odd}  == 'bXXX1000001) & ~hcnt_reset | hcnt_reset & h[6],
			({h, h_odd}  == 'bXXXX100001) & ~hcnt_reset | hcnt_reset & h[5],
			({h, h_odd}  == 'bXXXXX10001) & ~hcnt_reset | hcnt_reset & h[4],
			({h, h_odd}  == 'bXXXXXX1001) & ~hcnt_reset | hcnt_reset & h[3],
			({h, h_odd}  == 'bXXXXXXX101) & ~hcnt_reset | hcnt_reset & h[2],
			({h, h_odd}  == 'bXXXXXXXX11) & ~hcnt_reset | hcnt_reset & h[1],
			({h, h_odd}  == 'bXXXXXXXXX0) & ~hcnt_reset | hcnt_reset & h[0]
			};
end
	assign hcnt_reset = (h == HCNT_ROLL_OVER) | pwr_up | cnt_reset;

end
endmodule