[ create a new paste ] login | about

Link: http://codepad.org/kxEDtmrq    [ raw code | output | fork ]

C, pasted on Apr 23:
module LED_Lighting(CLK,SEQ_POINT, S1, S2, S3, S4,SG,LED);

input CLK;
input[1:0] SEQ_POINT;
input[3:0] S1,S3;
input[2:0] S2,S4;
output[7:0] SG,LED;

//wire [3:0] S1,S3;		//7SEQ 0-9
//wire [2:0] S2,S4;		//7SEQ 0-5

reg[7:0] SSG,LLED;

always @(posedge CLK)		//SG 7Seg
begin
	if(SEQ_POINT== 2'b00)
 		case(S1)
			4'b0000:SSG <= 8'b00000011;			// 0
			4'b0001:SSG <= 8'b10011111;			// 1
			4'b0010:SSG <= 8'b00100101;			// 2
			4'b0011:SSG <= 8'b00001101;			// 3
			4'b0100:SSG <= 8'b10011001;			// 4
			4'b0101:SSG <= 8'b01001001;			// 5
			4'b0110:SSG <= 8'b01000001;			// 6
			4'b0111:SSG <= 8'b00011011;			// 7
			4'b1000:SSG <= 8'b00000001;			// 8
			4'b1001:SSG <= 8'b00001001;			// 9
			default:SSG <= 8'bzzzzzzzz;
		endcase
	else if(SEQ_POINT == 2'b01)
		case(S2)
			3'b000:SSG <= 8'b00000011;				// 0
			3'b001:SSG <= 8'b10011111;				// 1
			3'b010:SSG <= 8'b00100101;				// 2					
			3'b011:SSG <= 8'b00001101;				// 3
			3'b100:SSG <= 8'b10011001;				// 4
			3'b101:SSG <= 8'b01001001;				// 5
			default:SSG <= 8'bzzzzzzzz;			// それ以外
		endcase
	else if(SEQ_POINT == 2'b10)
		case(S3)
			4'b0000:SSG <= 8'b00000011;			// 0
			4'b0001:SSG <= 8'b10011111;			// 1
			4'b0010:SSG <= 8'b00100101;			// 2
			4'b0011:SSG <= 8'b00001101;			// 3
			4'b0100:SSG <= 8'b10011001;			// 4
			4'b0101:SSG <= 8'b01001001;			// 5
			4'b0110:SSG <= 8'b01000001;			// 6
			4'b0111:SSG <= 8'b00011011;			// 7
			4'b1000:SSG <= 8'b00000001;			// 8
			4'b1001:SSG <= 8'b00001001;			// 9
			default:SSG <= 8'bzzzzzzzz;
		endcase
	else if(SEQ_POINT == 2'b11)
		case(S4)
			3'b000:SSG <= 8'b00000011;				// 0
			3'b001:SSG <= 8'b10011111;				// 1
			3'b010:SSG <= 8'b00100101;				// 2					
			3'b011:SSG <= 8'b00001101;				// 3
			3'b100:SSG <= 8'b10011001;				// 4
			3'b101:SSG <= 8'b01001001;				// 5
			default:SSG <= 8'bzzzzzzzz;			// それ以外
		endcase
	else	
		SSG <= 8'bzzzzzzzz;
	LLED <= (S1 + (S2 * 10));	//RED点灯
end

assign SG = SSG;
assign LED = LLED;

endmodule


Output:
Line 1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'LED_Lighting'
Line 3: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'CLK'
Line 4: error: expected ']' before ':' token
Line 5: error: expected ']' before ':' token
Line 6: error: expected ']' before ':' token
Line 7: error: expected ']' before ':' token
Line 12: error: expected ']' before ':' token
Line 14: error: stray '@' in program
Line 14: error: expected ')' before 'CLK'
Line 16: error: missing terminating ' character
Line 4: warning: character constant too long for its type
Line 19: error: expected identifier or '(' before numeric constant
Line 4: warning: character constant too long for its type
Line 20: error: expected identifier or '(' before numeric constant
Line 4: warning: character constant too long for its type
Line 21: error: expected identifier or '(' before numeric constant
Line 4: warning: character constant too long for its type
Line 22: error: expected identifier or '(' before numeric constant
Line 4: warning: character constant too long for its type
Line 23: error: expected identifier or '(' before numeric constant
Line 4: warning: character constant too long for its type
Line 24: error: expected identifier or '(' before numeric constant
Line 4: warning: character constant too long for its type
Line 25: error: expected identifier or '(' before numeric constant
Line 4: warning: character constant too long for its type
Line 26: error: expected identifier or '(' before numeric constant
Line 4: warning: character constant too long for its type
Line 27: error: expected identifier or '(' before numeric constant
Line 4: warning: character constant too long for its type
Line 28: error: expected identifier or '(' before 'default'
Line 28: error: missing terminating ' character
Line 30: error: missing terminating ' character
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 'default'
Line 38: error: missing terminating ' character
Line 40: error: missing terminating ' character
Line 4: warning: character constant too long for its type
Line 43: error: expected identifier or '(' before numeric constant
Line 4: warning: character constant too long for its type
Line 44: error: expected identifier or '(' before numeric constant
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 numeric constant
Line 4: warning: character constant too long for its type
Line 51: error: expected identifier or '(' before numeric constant
Line 4: warning: character constant too long for its type
Line 52: error: expected identifier or '(' before 'default'
Line 52: error: missing terminating ' character
Line 54: error: missing terminating ' character
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 'default'
Line 62: error: missing terminating ' character
Line 65: error: missing terminating ' character
Line 66: error: stray '\342' in program
Line 66: error: stray '\200' in program
Line 66: error: stray '\276' in program
Line 69: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'assign'
Line 70: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'LED'
Line 72: error: expected '=', ',', ';', 'asm' or '__attribute__' at end of input


Create a new paste based on this one


Comments: