F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

0_0_37312792_17945.cpp:12:8: error: stray '@' in program
  always@(A,B,K,Clk)
        ^
0_0_37312792_17945.cpp:15:4: error: missing terminating ' character
    2'b00: C = A+B;
    ^
0_0_37312792_17945.cpp:16:4: error: missing terminating ' character
    2'b01: C = A-B;
    ^
0_0_37312792_17945.cpp:17:4: error: missing terminating ' character
    2'b10: C = A*B;
    ^
0_0_37312792_17945.cpp:18:4: error: missing terminating ' character
    2'b11: C = A/B;
    ^
0_0_37312792_17945.cpp:20:3: error: missing terminating ' character
   if ((K==2'b01) && (A<B))
   ^
0_0_37312792_17945.cpp:22:4: error: missing terminating ' character
    C = 8'b00000000-C;
    ^
0_0_37312792_17945.cpp:23:4: error: missing terminating ' character
    Sign = 1'b1;
    ^
0_0_37312792_17945.cpp:26:4: error: missing terminating ' character
    Sign = 1'b0;
    ^
0_0_37312792_17945.cpp:30:4: error: missing terminating ' character
    2'b00:
    ^
0_0_37312792_17945.cpp:50:6: error: missing terminating ' character
      Who = 4'b1110;
      ^
0_0_37312792_17945.cpp:52:4: error: missing terminating ' character
    2'b01:
    ^
0_0_37312792_17945.cpp:72:6: error: missing terminating ' character
      Who = 4'b1101;
      ^
0_0_37312792_17945.cpp:74:4: error: missing terminating ' character
    2'b10:
    ^
0_0_37312792_17945.cpp:94:6: error: missing terminating ' character
      Who = 4'b1011;
      ^
0_0_37312792_17945.cpp:96:4: error: missing terminating ' character
    2'b11:
    ^
0_0_37312792_17945.cpp:116:6: error: missing terminating ' character
      Who = 4'b0111;
      ^
0_0_37312792_17945.cpp:1:1: error: 'module' does not name a type
 module test(A,B,K,Clk,Led,Sign,Who);
 ^
0_0_37312792_17945.cpp:2:2: error: 'input' does not name a type
  input [3:0] A, B;
  ^
0_0_37312792_17945.cpp:3:2: error: 'input' does not name a type
  input [1:0] K, Clk; // 这里的Clk指定输出哪一位
  ^
0_0_37312792_17945.cpp:4:2: error: 'output' does not name a type
  output [6:0] Led;
  ^
0_0_37312792_17945.cpp:5:2: error: 'output' does not name a type
  output Sign;
  ^
0_0_37312792_17945.cpp:6:2: error: 'output' does not name a type
  output [3:0] Who;
  ^
0_0_37312792_17945.cpp:7:2: error: 'reg' does not name a type
  reg [6:0] Led;
  ^
0_0_37312792_17945.cpp:8:2: error: 'reg' does not name a type
  reg Sign;
  ^
0_0_37312792_17945.cpp:9:2: error: 'reg' does not name a type
  reg [3:0] Who;
  ^
0_0_37312792_17945.cpp:10:2: error: 'reg' does not name a type
  reg [7:0] C; // 临时存一下结果
  ^
0_0_37312792_17945.cpp:12:9: error: expected constructor, destructor, or type conversion before '(' token
  always@(A,B,K,Clk)
         ^
0_0_37312792_17945.cpp:34:7: error: expected unqualified-id before numeric constant
       4'b0001: Led = 7'b0110000;
       ^
0_0_37312792_17945.cpp:35:7: error: expected unqualified-id before numeric constant
       4'b0010: Led = 7'b1101101;
       ^
0_0_37312792_17945.cpp:36:7: error: expected unqualified-id before numeric constant
       4'b0011: Led = 7'b1111001;
       ^
0_0_37312792_17945.cpp:37:7: error: expected unqualified-id before numeric constant
       4'b0100: Led = 7'b0110011;
       ^
0_0_37312792_17945.cpp:38:7: error: expected unqualified-id before numeric constant
       4'b0101: Led = 7'b1011011;
       ^
0_0_37312792_17945.cpp:39:7: error: expected unqualified-id before numeric constant
       4'b0110: Led = 7'b1011111;
       ^
0_0_37312792_17945.cpp:40:7: error: expected unqualified-id before numeric constant
       4'b0111: Led = 7'b1110000;
       ^
0_0_37312792_17945.cpp:41:7: error: expected unqualified-id before numeric constant
       4'b1000: Led = 7'b1111111;
       ^
0_0_37312792_17945.cpp:42:7: error: expected unqualified-id before numeric constant
       4'b1001: Led = 7'b1111011;
       ^
0_0_37312792_17945.cpp:43:7: error: expected unqualified-id before numeric constant
       4'b1010: Led = 7'b1111101;
       ^
0_0_37312792_17945.cpp:44:7: error: expected unqualified-id before numeric constant
       4'b1011: Led = 7'b0011111;
       ^
0_0_37312792_17945.cpp:45:7: error: expected unqualified-id before numeric constant
       4'b1100: Led = 7'b0001101;
       ^
0_0_37312792_17945.cpp:46:7: error: expected unqualified-id before numeric constant
       4'b1101: Led = 7'b0111101;
       ^
0_0_37312792_17945.cpp:47:7: error: expected unqualified-id before numeric constant
       4'b1110: Led = 7'b1101111;
       ^
0_0_37312792_17945.cpp:48:7: error: expected unqualified-id before numeric constant
       4'b1111: Led = 7'b1000111;
       ^
0_0_37312792_17945.cpp:49:6: error: 'endcase' does not name a type
      endcase
      ^
0_0_37312792_17945.cpp:56:7: error: expected unqualified-id before numeric constant
       4'b0001: Led = 7'b0110000;
       ^
0_0_37312792_17945.cpp:57:7: error: expected unqualified-id before numeric constant
       4'b0010: Led = 7'b1101101;
       ^
0_0_37312792_17945.cpp:58:7: error: expected unqualified-id before numeric constant
       4'b0011: Led = 7'b1111001;
       ^
0_0_37312792_17945.cpp:59:7: error: expected unqualified-id before numeric constant
       4'b0100: Led = 7'b0110011;
       ^
0_0_37312792_17945.cpp:60:7: error: expected unqualified-id before numeric constant
       4'b0101: Led = 7'b1011011;
       ^
0_0_37312792_17945.cpp:61:7: error: expected unqualified-id before numeric constant
       4'b0110: Led = 7'b1011111;
       ^
0_0_37312792_17945.cpp:62:7: error: expected unqualified-id before numeric constant
       4'b0111: Led = 7'b1110000;
       ^
0_0_37312792_17945.cpp:63:7: error: expected unqualified-id before numeric constant
       4'b1000: Led = 7'b1111111;
       ^
0_0_37312792_17945.cpp:64:7: error: expected unqualified-id before numeric constant
       4'b1001: Led = 7'b1111011;
       ^
0_0_37312792_17945.cpp:65:7: error: expected unqualified-id before numeric constant
       4'b1010: Led = 7'b1111101;
       ^
0_0_37312792_17945.cpp:66:7: error: expected unqualified-id before numeric constant
       4'b1011: Led = 7'b0011111;
       ^
0_0_37312792_17945.cpp:67:7: error: expected unqualified-id before numeric constant
       4'b1100: Led = 7'b0001101;
       ^
0_0_37312792_17945.cpp:68:7: error: expected unqualified-id before numeric constant
       4'b1101: Led = 7'b0111101;
       ^
0_0_37312792_17945.cpp:69:7: error: expected unqualified-id before numeric constant
       4'b1110: Led = 7'b1101111;
       ^
0_0_37312792_17945.cpp:70:7: error: expected unqualified-id before numeric constant
       4'b1111: Led = 7'b1000111;
       ^
0_0_37312792_17945.cpp:71:6: error: 'endcase' does not name a type
      endcase
      ^
0_0_37312792_17945.cpp:78:7: error: expected unqualified-id before numeric constant
       4'b0001: Led = 7'b0110000;
       ^
0_0_37312792_17945.cpp:79:7: error: expected unqualified-id before numeric constant
       4'b0010: Led = 7'b1101101;
       ^
0_0_37312792_17945.cpp:80:7: error: expected unqualified-id before numeric constant
       4'b0011: Led = 7'b1111001;
       ^
0_0_37312792_17945.cpp:81:7: error: expected unqualified-id before numeric constant
       4'b0100: Led = 7'b0110011;
       ^
0_0_37312792_17945.cpp:82:7: error: expected unqualified-id before numeric constant
       4'b0101: Led = 7'b1011011;
       ^
0_0_37312792_17945.cpp:83:7: error: expected unqualified-id before numeric constant
       4'b0110: Led = 7'b1011111;
       ^
0_0_37312792_17945.cpp:84:7: error: expected unqualified-id before numeric constant
       4'b0111: Led = 7'b1110000;
       ^
0_0_37312792_17945.cpp:85:7: error: expected unqualified-id before numeric constant
       4'b1000: Led = 7'b1111111;
       ^
0_0_37312792_17945.cpp:86:7: error: expected unqualified-id before numeric constant
       4'b1001: Led = 7'b1111011;
       ^
0_0_37312792_17945.cpp:87:7: error: expected unqualified-id before numeric constant
       4'b1010: Led = 7'b1111101;
       ^
0_0_37312792_17945.cpp:88:7: error: expected unqualified-id before numeric constant
       4'b1011: Led = 7'b0011111;
       ^
0_0_37312792_17945.cpp:89:7: error: expected unqualified-id before numeric constant
       4'b1100: Led = 7'b0001101;
       ^
0_0_37312792_17945.cpp:90:7: error: expected unqualified-id before numeric constant
       4'b1101: Led = 7'b0111101;
       ^
0_0_37312792_17945.cpp:91:7: error: expected unqualified-id before numeric constant
       4'b1110: Led = 7'b1101111;
       ^
0_0_37312792_17945.cpp:92:7: error: expected unqualified-id before numeric constant
       4'b1111: Led = 7'b1000111;
       ^
0_0_37312792_17945.cpp:93:6: error: 'endcase' does not name a type
      endcase
      ^
0_0_37312792_17945.cpp:100:7: error: expected unqualified-id before numeric constant
       4'b0001: Led = 7'b0110000;
       ^
0_0_37312792_17945.cpp:101:7: error: expected unqualified-id before numeric constant
       4'b0010: Led = 7'b1101101;
       ^
0_0_37312792_17945.cpp:102:7: error: expected unqualified-id before numeric constant
       4'b0011: Led = 7'b1111001;
       ^
0_0_37312792_17945.cpp:103:7: error: expected unqualified-id before numeric constant
       4'b0100: Led = 7'b0110011;
       ^
0_0_37312792_17945.cpp:104:7: error: expected unqualified-id before numeric constant
       4'b0101: Led = 7'b1011011;
       ^
0_0_37312792_17945.cpp:105:7: error: expected unqualified-id before numeric constant
     


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2025 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2025-01-10 17:58:44, Gzip enabled