C,
pasted
on Apr 26:
|
/****************************************************
7SEQ/LED点灯モジュール
===========================
7SEQに入力されたデータ情報をもとに、各7SEQとLEDを点灯させる
*****************************************************/
`ifdef DEFAULT_NETTYPE_NONE
`default_nettype none
`endif
module LED_Lighting(CLK,SEQ_POINT, S1, S2, S3, S4,SG,LED);
//入力
input CLK;
input[1:0] SEQ_POINT; //ダイナミックドライブ 7SEQの位置
input[3:0] S1,S3; //7SEQデータ
input[2:0] S2,S4; //7SEQデータ
//出力
output[7:0] SG,LED;
//一時保存変数
reg[7:0] SG,LED;
/*************************************
7SEQ点灯処理
**************************************/
always @(posedge CLK) //SG 7Seg
begin
if(SEQ_POINT== 2'b00)
case(S1)
4'b0000:SG <= 8'b00000011; // 0
4'b0001:SG <= 8'b10011111; // 1
4'b0010:SG <= 8'b00100101; // 2
4'b0011:SG <= 8'b00001101; // 3
4'b0100:SG <= 8'b10011001; // 4
4'b0101:SG <= 8'b01001001; // 5
4'b0110:SG <= 8'b01000001; // 6
4'b0111:SG <= 8'b00011011; // 7
4'b1000:SG <= 8'b00000001; // 8
4'b1001:SG <= 8'b00001001; // 9
default:SG <= 8'bzzzzzzzz;
endcase
else if(SEQ_POINT == 2'b01)
case(S2)
3'b000:SG <= 8'b00000011; // 0
3'b001:SG <= 8'b10011111; // 1
3'b010:SG <= 8'b00100101; // 2
3'b011:SG <= 8'b00001101; // 3
3'b100:SG <= 8'b10011001; // 4
3'b101:SG <= 8'b01001001; // 5
default:SG <= 8'bzzzzzzzz; // それ以外
endcase
else if(SEQ_POINT == 2'b10)
case(S3)
4'b0000:SG <= 8'b00000011; // 0
4'b0001:SG <= 8'b10011111; // 1
4'b0010:SG <= 8'b00100101; // 2
4'b0011:SG <= 8'b00001101; // 3
4'b0100:SG <= 8'b10011001; // 4
4'b0101:SG <= 8'b01001001; // 5
4'b0110:SG <= 8'b01000001; // 6
4'b0111:SG <= 8'b00011011; // 7
4'b1000:SG <= 8'b00000001; // 8
4'b1001:SG <= 8'b00001001; // 9
default:SG <= 8'bzzzzzzzz;
endcase
else if(SEQ_POINT == 2'b11)
case(S4)
3'b000:SG <= 8'b00000011; // 0
3'b001:SG <= 8'b10011111; // 1
3'b010:SG <= 8'b00100101; // 2
3'b011:SG <= 8'b00001101; // 3
3'b100:SG <= 8'b10011001; // 4
3'b101:SG <= 8'b01001001; // 5
default:SG <= 8'bzzzzzzzz; // それ以外
endcase
else
SG <= 8'bzzzzzzzz;
end
/**********************************************
LED点灯処理
***********************************************/
always @(posedge CLK)
begin
LED <= ‾(S1 + (S2 * 10)); //RED点灯
end
endmodule
`default_nettype wire
|
Output:
|
Line 6: error: stray '`' in program
Line 6: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'DEFAULT_NETTYPE_NONE'
Line 7: error: stray '`' in program
Line 8: error: stray '`' in program
Line 12: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'CLK'
Line 13: error: expected ']' before ':' token
Line 14: error: expected ']' before ':' token
Line 15: error: expected ']' before ':' token
Line 18: error: expected ']' before ':' token
Line 21: error: expected ']' before ':' token
Line 26: error: stray '@' in program
Line 26: error: expected ')' before 'CLK'
Line 28: error: missing terminating ' character
Line 4: warning: character constant too long for its type
Line 31: error: expected identifier or '(' before numeric constant
Line 4: warning: character constant too long for its type
Line 32: error: expected identifier or '(' before numeric constant
Line 4: warning: character constant too long for its type
Line 33: error: expected identifier or '(' before numeric constant
Line 4: warning: character constant too long for its type
Line 34: error: expected identifier or '(' before numeric constant
Line 4: warning: character constant too long for its type
Line 35: error: expected identifier or '(' before numeric constant
Line 4: warning: character constant too long for its type
Line 36: error: expected identifier or '(' before numeric constant
Line 4: warning: character constant too long for its type
Line 37: error: expected identifier or '(' before numeric constant
Line 4: warning: character constant too long for its type
Line 38: error: expected identifier or '(' before numeric constant
Line 4: warning: character constant too long for its type
Line 39: error: expected identifier or '(' before numeric constant
Line 4: warning: character constant too long for its type
Line 40: error: expected identifier or '(' before 'default'
Line 40: error: missing terminating ' character
Line 42: error: missing terminating ' character
Line 4: warning: character constant too long for its type
Line 45: error: expected identifier or '(' before numeric constant
Line 4: warning: character constant too long for its type
Line 46: error: expected identifier or '(' before numeric constant
Line 4: warning: character constant too long for its type
Line 47: error: expected identifier or '(' before numeric constant
Line 4: warning: character constant too long for its type
Line 48: error: expected identifier or '(' before numeric constant
Line 4: warning: character constant too long for its type
Line 49: error: expected identifier or '(' before numeric constant
Line 4: warning: character constant too long for its type
Line 50: error: expected identifier or '(' before 'default'
Line 50: error: missing terminating ' character
Line 52: error: missing terminating ' character
Line 4: warning: character constant too long for its type
Line 55: error: expected identifier or '(' before numeric constant
Line 4: warning: character constant too long for its type
Line 56: error: expected identifier or '(' before numeric constant
Line 4: warning: character constant too long for its type
Line 57: error: expected identifier or '(' before numeric constant
Line 4: warning: character constant too long for its type
Line 58: error: expected identifier or '(' before numeric constant
Line 4: warning: character constant too long for its type
Line 59: error: expected identifier or '(' before numeric constant
Line 4: warning: character constant too long for its type
Line 60: error: expected identifier or '(' before numeric constant
Line 4: warning: character constant too long for its type
Line 61: error: expected identifier or '(' before numeric constant
Line 4: warning: character constant too long for its type
Line 62: error: expected identifier or '(' before numeric constant
Line 4: warning: character constant too long for its type
Line 63: error: expected identifier or '(' before numeric constant
Line 4: warning: character constant too long for its type
Line 64: error: expected identifier or '(' before 'default'
Line 64: error: missing terminating ' character
Line 66: error: missing terminating ' character
Line 4: warning: character constant too long for its type
Line 69: error: expected identifier or '(' before numeric constant
Line 4: warning: character constant too long for its type
Line 70: error: expected identifier or '(' before numeric constant
Line 4: warning: character constant too long for its type
Line 71: error: expected identifier or '(' before numeric constant
Line 4: warning: character constant too long for its type
Line 72: error: expected identifier or '(' before numeric constant
Line 4: warning: character constant too long for its type
Line 73: error: expected identifier or '(' before numeric constant
Line 4: warning: character constant too long for its type
Line 74: error: expected identifier or '(' before 'default'
Line 74: error: missing terminating ' character
Line 77: error: missing terminating ' character
Line 83: error: stray '@' in program
Line 85: error: stray '\342' in program
Line 85: error: stray '\200' in program
Line 85: error: stray '\276' in program
Line 88: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'endmodule'
Line 90: error: stray '`' in program
|
|