0

My project is about finding the common factor value between two inputs P[3:0] and Q[3:0]. The display output is G[13:0]. P,Q and G are 2 digits values. I am trying to build a display module for two digits 7 segment display with the code below. However, the compilation is fail.

this is my code:

module display(
    input[3:0] p0,q0,
    output reg[13:0]LEDp,LEDq,LEDg);

    always @*
    begin
        case(p0)
            4'b0000 : LEDp = 14'b11111111000000;
            4'b0001 : LEDp = 14'b11111111111001;
            4'b0010 : LEDp = 14'b11111110100100;
            4'b0011 : LEDp = 14'b11111110110000;
            4'b0100 : LEDp = 14'b11111110011001;
            4'b0101 : LEDp = 14'b11111110010010;
            4'b0110 : LEDp = 14'b11111110000010; 
            4'b0111 : LEDp = 14'b11111111111000;
            4'b1000 : LEDp = 14'b11111110000000;
            4'b1001 : LEDp = 14'b11111110010000;
            4'b1010 : LEDp = 14'b11111101000000;
            4'b1011 : LEDp = 14'b11111101111001;
            4'b1100 : LEDp = 14'b11111100100100;
            4'b1101 : LEDp = 14'b11111100110000;
            4'b1110 : LEDp = 14'b11111100011001;
            4'b1111 : LEDp = 14'b11111100010010;
            default : LEDp = 14'b01111110111111;
        endcase
    end
        
    always @*
    begin
        case (q0)
            4'b0000: LEDq = 14'b11111111000000;
            4'b0001: LEDq = 14'b11111111111001;
            4'b0010: LEDq = 14'b11111110100100;
            4'b0011: LEDq = 14'b11111110110000;
            4'b0100: LEDq = 14'b11111110011001;
            4'b0101: LEDq = 14'b11111110010010;
            4'b0110: LEDq = 14'b11111110000010;
            4'b0111: LEDq = 14'b11111111111000;
            4'b1000: LEDq = 14'b11111110000000;
            4'b1001: LEDq = 14'b11111110010000;
            4'b1010: LEDq = 14'b11111101000000;
            4'b1011: LEDq = 14'b11111101111001;
            4'b1100: LEDq = 14'b11111100100100;
            4'b1101: LEDq = 14'b11111100110000;
            4'b1110: LEDq = 14'b11111100011001;
            4'b1111: LEDq = 14'b11111100010010;
            default: LEDq = 14'b01111110111111;
        endcase
    end
    
    always @*
    begin
        case (G)
            4'b0000: LEDg = 14'b11111111000000;
            4'b0001: LEDg = 14'b11111111111001;
            4'b0010: LEDg = 14'b11111110100100;
            4'b0011: LEDg = 14'b11111110110000;
            4'b0100: LEDg = 14'b11111110011001;
            4'b0101: LEDg = 14'b11111110010010;
            4'b0110: LEDg = 14'b11111110000010;
            4'b0111: LEDg = 14'b11111111111000;
            4'b1000: LEDg = 14'b11111110000000;
            4'b1001: LEDg = 14'b11111110010000;
            4'b1010: LEDg = 14'b11111101000000;
            4'b1011: LEDg = 14'b11111101111001;
            4'b1100: LEDg = 14'b11111100100100;
            4'b1101: LEDg = 14'b11111100110000;
            4'b1110: LEDg = 14'b11111100011001;
            4'b1111: LEDg = 14'b11111100010010;
            default: LEDg = 14'b01111110111111;
        endcase
    end
endmodule

The errors are:

Error (10170): Verilog HDL syntax error at display.v(8) near text ï

Error (10170): Verilog HDL syntax error at display.v(8) near text "ï"; expecting ":", or ","

Error (10170): Verilog HDL syntax error at display.v(8) near text ¼

Error (10170): Verilog HDL syntax error at display.v(8) near text š

May I know how should I correct it? I had searched through Internet but find no solutions.

Tang
  • 11
  • 2

1 Answers1

0

When I copied your code and executed it in my software I noticed that you don't have colons (:) in your code only fullwidth colons (). Changing this weird unicode colons to ascii colons almost solved all problems. You use also undefined G.

ToTamire
  • 1,425
  • 1
  • 13
  • 23
  • Thank you for explaining the error to me. May I know what/how this error can happen? Because my friends seem like don have this problem with their code, I am guessing it is because of the PC? Then, could you give me some hints or solution how should I fix this? Much appreciated! – Tang Jun 05 '21 at 09:49
  • I guess that you have to change your keyboard language in operating system settings. If you are using windows 10 this may help. https://support.microsoft.com/en-us/windows/manage-the-input-and-display-language-settings-in-windows-10-12a10cb4-8626-9b77-0ccb-5013e0c7c7a2 – ToTamire Jun 05 '21 at 10:41