...
parameter[7:0] delay_t=34;
parameter[7:0] delay_t1=35;
parameter[7:0] delay_t2=36;
parameter[7:0] delay_t3=37;
parameter[7:0] delay_t4=38;
parameter[7:0] delay_t5=39;
parameter[7:0] delay_t6=40;
parameter[7:0] delay_t7=41;
parameter[7:0] delay_t8=42;
parameter[7:0] delay_t9=43;
parameter[7:0] delay_t10=44;
parameter[7:0] delay_t11=45;
parameter[7:0] delay_t12=46;
parameter[7:0] delay_t13=47;
parameter[7:0] delay_t14=48;
parameter[7:0] clear_disp=49;
parameter[7:0] clear_disp1=50;
parameter[7:0] clear_disp2=51;
parameter[7:0] clear_disp3=52;
parameter[7:0] clear_disp4=53;
parameter[7:0] clear_disp5=54;
parameter[7:0] clear_disp6=55;
parameter[7:0] clear_disp7=56;
parameter[7:0] clear_disp8=57;
parameter[7:0] clear_disp9=58;
parameter[7:0] clear_disp10=59;
parameter[7:0] clear_disp11=60;
parameter[7:0] clear_disp12=61;
parameter[7:0] clear_disp13=62;
parameter[7:0] clear_disp14=63;
reg [7:0] lcd_state;
...
always @(rst or clk)
if ( rst == 1 ).
생략.
else if(clk==1'b1) begin
case(lcd_state)
function_set: begin lcd_rs <= 1'b0; lcd_rw <= 1'b0; lcd_data <= 8'b00111100; end
disp_onoff :begin lcd_rs <= 1'b0; lcd_rw <= 1'b0; lcd_data <= 8'b00001100; end
entry_mode :begin lcd_rs <= 1'b0; lcd_rw <= 1'b0; lcd_data <= 8'b00000110; end
clear_disp :begin lcd_rs <= 1'b0; lcd_rw <= 1'b0; lcd_data <= 8'b00000001; end
delay_t :begin lcd_rs <= 1'b0; lcd_rw <= 1'b0; lcd_data <= 8'b00000010;end
clear_disp1 :begin lcd_rs < = 1'b0; lcd_rw <= 1'b0; lcd_data <= 8'b00000001;end
delay_t1 : begin lcd_rs <= 1'b0; lcd_rw <= 1'b0; lcd_data <= 8'b00000010;end
clear_disp2 :begin lcd_rs <= 1'b0; lcd_rw <= 1'b0; lcd_data <= 8'b00000001;end
delay_t2 :begin lcd_rs <= 1'b0; lcd_rw <= 1'b0; lcd_data <= 8'b00000010;end
clear_disp3 :begin lcd_rs <= 1'b0; lcd_rw <= 1'b0; lcd_data <= 8'b00000001;end
delay_t3 :begin lcd_rs <= 1'b0; lcd_rw <= 1'b0; lcd_data <= 8'b00000010;end
clear_disp4 :begin lcd_rs <= 1'b0; lcd_rw <= 1'b0; lcd_data <= 8'b00000001;end
delay_t4 :begin lcd_rs <= 1'b0; lcd_rw <= 1'b0; lcd_data <= 8'b00000010;end
clear_disp5 :begin lcd_rs <= 1'b0; lcd_rw <= 1'b0; lcd_data <= 8'b00000001;end
delay_t5 :begin lcd_rs <= 1'b0; lcd_rw <= 1'b0; lcd_data <= 8'b00000010;end
clear_disp6 :begin lcd_rs <= 1'b0; lcd_rw <= 1'b0; lcd_data <= 8'b00000001;end
delay_t6 :begin lcd_rs <= 1'b0; lcd_rw <= 1'b0; lcd_data <= 8'b00000010;end
clear_disp7 :begin lcd_rs <= 1'b0; lcd_rw <= 1'b0; lcd_data <= 8'b00000001;end
delay_t7 :begin lcd_rs <= 1'b0; lcd_rw <= 1'b0; lcd_data <= 8'b00000010;end
clear_disp8 :begin lcd_rs <= 1'b0; lcd_rw <= 1'b0; lcd_data <= 8'b00000001;end
delay_t8 :begin lcd_rs <= 1'b0; lcd_rw <= 1'b0; lcd_data <= 8'b00000010;end
clear_disp9 :begin lcd_rs <= 1'b0; lcd_rw <= 1'b0; lcd_data <= 8'b00000001;end
delay_t9 :begin lcd_rs <= 1'b0; lcd_rw <= 1'b0; lcd_data <= 8'b00000010;end
clear_disp10 :begin lcd_rs <= 1'b0; lcd_rw <= 1'b0; lcd_data <= 8'b00000001;end
delay_t10 :begin lcd_rs <= 1'b0; lcd_rw <= 1'b0; lcd_data <= 8'b00000010;end
clear_disp11 :begin lcd_rs <= 1'b0; lcd_rw <= 1'b0; lcd_data <= 8'b00000001;end
delay_t11:begin lcd_rs <= 1'b0; lcd_rw <= 1'b0; lcd_data <= 8'b00000010;end
clear_disp12 :begin lcd_rs <= 1'b0; lcd_rw <= 1'b0; lcd_data <= 8'b00000001;end
delay_t12 :begin lcd_rs <= 1'b0; lcd_rw <= 1'b0; lcd_data <= 8'b00000010;end
clear_disp13 :begin lcd_rs <= 1'b0; lcd_rw <= 1'b0; lcd_data <= 8'b00000001;end
delay_t13 :begin lcd_rs <= 1'b0; lcd_rw <= 1'b0; lcd_data <= 8'b00000010;end
clear_disp14 :begin lcd_rs <= 1'b0; lcd_rw <= 1'b0; lcd_data <= 8'b00000001;end
delay_t14 :begin lcd_rs <= 1'b0; lcd_rw <= 1'b0; lcd_data <= 8'b00000010;end
ERROR:HDLCompilers:26 - "Car_Game.v" line 358 unexpected token: 'lcd_rs'
ERROR:HDLCompilers:26 - "Car_Game.v" line 358 expecting 'end', found '1'
ERROR:HDLCompilers:26 - "Car_Game.v" line 358 expecting ':', found ';'
ERROR:HDLCompilers:26 - "Car_Game.v" line 358 expecting ':', found ';'
ERROR:HDLCompilers:26 - "Car_Game.v" line 358 expecting ':', found ';'
첫댓글 글쎄요. Car_Game.v 의 행 358번째 줄을 봐야 알 것 같은데요. 그리고 지금 소스를 보니 Case문 안에서
lcd_rs와 lcd_rw값을 1'b0로 많이 하는 것 같은데 default를 제외하고 case문 상단에 blocking문으로 미리 대입해주는 것이 코드 보기에 편할 듯 싶네요.
lcd_rs=1'b0; lcd_rw=1'b0 ;
case( ~)
delay: lcd_data=~~~;
default: lcd_rs=1'b1; lcd_rw=1'b1 ; lcd_data=~~~;
endcase
lcd_rs와 lcd_ws는 reg형으로 당연히 선언해 준것은 맞겠지요.
alway는 이벤트를 level 이벤트 말고 edge 이벤트를 사용하세요
친절한댓글 감사합니다