data/full_repos/permissive/516533387/morsedecoder.v
1: b'%Warning-MULTITOP: data/full_repos/permissive/516533387/morsedecoder.v:391: Multiple top level modules\n                                                                          : ... Suggest see manual; fix the duplicates, or use --top-module to select top.\n                   ... Use "/* verilator lint_off MULTITOP */" and lint_on around source to disable this message.\n                                                                          : ... Top module \'morse_decoder\'\nmodule morse_decoder(\n       ^~~~~~~~~~~~~\n                                                                          : ... Top module \'unit_conter\'\nmodule unit_conter(clk, unit_freq , out_clk);\n       ^~~~~~~~~~~\n                                                                          : ... Top module \'lcdlab3\'\nmodule lcdlab3(\n       ^~~~~~~\n%Warning-IMPLICIT: data/full_repos/permissive/516533387/morsedecoder.v:37: Signal definition not found, creating implicitly: \'GIPO_0\'\n                                                                         : ... Suggested alternative: \'GPIO_0\'\nassign GIPO_0 = 36\'hzzzzzzzzz;\n       ^~~~~~\n%Warning-IMPLICIT: data/full_repos/permissive/516533387/morsedecoder.v:38: Signal definition not found, creating implicitly: \'GIPO_1\'\n                                                                         : ... Suggested alternative: \'GIPO_0\'\nassign GIPO_1 = 36\'hzzzzzzzzz;\n       ^~~~~~\n%Warning-IMPLICIT: data/full_repos/permissive/516533387/morsedecoder.v:41: Signal definition not found, creating implicitly: \'RST\'\nassign RST = KEY[0];\n       ^~~\n%Warning-IMPLICIT: data/full_repos/permissive/516533387/morsedecoder.v:54: Signal definition not found, creating implicitly: \'newsletter\'\n                                                                         : ... Suggested alternative: \'new_letter\'\nfsm F (clk2, beep, letter , LEDR[17:12] , newsletter);\n                                          ^~~~~~~~~~\n%Warning-IMPLICIT: data/full_repos/permissive/516533387/morsedecoder.v:71: Signal definition not found, creating implicitly: \'now_letter\'\n                                                                         : ... Suggested alternative: \'new_letter\'\nmux8bit9tol MUX1 (letter , now_letter);\n                           ^~~~~~~~~~\n%Error: data/full_repos/permissive/516533387/morsedecoder.v:105: Pin not found: \'hex2\'\n                                                               : ... Suggested alternative: \'hex1\'\n    .hex2(rhex2),\n     ^~~~\n%Error: data/full_repos/permissive/516533387/morsedecoder.v:106: Pin not found: \'hex3\'\n                                                               : ... Suggested alternative: \'hex1\'\n    .hex3(rhex3),\n     ^~~~\n%Error: data/full_repos/permissive/516533387/morsedecoder.v:107: Pin not found: \'hex4\'\n                                                               : ... Suggested alternative: \'hex1\'\n    .hex4(rhex4),\n     ^~~~\n%Error: data/full_repos/permissive/516533387/morsedecoder.v:108: Pin not found: \'hex5\'\n                                                               : ... Suggested alternative: \'hex1\'\n    .hex5(rhex5),\n     ^~~~\n%Error: data/full_repos/permissive/516533387/morsedecoder.v:109: Pin not found: \'hex6\'\n                                                               : ... Suggested alternative: \'hex1\'\n    .hex6(rhex6),\n     ^~~~\n%Error: data/full_repos/permissive/516533387/morsedecoder.v:110: Pin not found: \'hex7\'\n                                                               : ... Suggested alternative: \'hex1\'\n    .hex7(rhex7),\n     ^~~~\n%Error: data/full_repos/permissive/516533387/morsedecoder.v:111: Pin not found: \'hex8\'\n                                                               : ... Suggested alternative: \'hex1\'\n    .hex8(rhex8),\n     ^~~~\n%Error: Exiting due to 7 error(s), 6 warning(s)\n'
module fsm(clk2, in, letter , LEDR , newletter);
    input clk2;
    input [1:0] in;
    output [5:0] LEDR;
    output reg [5:0] letter = 6'b000000;
    output reg newletter;
    reg [5:0] state = 6'b000000;

    parameter [1:0] DOT = 2'b01;
    parameter [1:0] DASH = 2'b11;
    parameter [1:0] GAP = 2'b00;

    parameter [5:0] BLANK = 6'b111111;
    parameter [5:0] A = 6'b011010;
    parameter [5:0] B = 6'b000001;
    parameter [5:0] C = 6'b000010;
    parameter [5:0] D = 6'b000011;
    parameter [5:0] E = 6'b000100;
    parameter [5:0] F = 6'b000101;
    parameter [5:0] G = 6'b000110;
    parameter [5:0] H = 6'b000111;
    parameter [5:0] I = 6'b001000;
    parameter [5:0] J = 6'b001001;
    parameter [5:0] K = 6'b001010;
    parameter [5:0] L = 6'b001011;
    parameter [5:0] M = 6'b001100;
    parameter [5:0] N = 6'b001101;
    parameter [5:0] O = 6'b001110;
    parameter [5:0] P = 6'b001111;
    parameter [5:0] Q = 6'b010000;
    parameter [5:0] R = 6'b010001;
    parameter [5:0] S = 6'b010010;
    parameter [5:0] T = 6'b010011;
    parameter [5:0] U = 6'b010100;
    parameter [5:0] V = 6'b010101;
    parameter [5:0] W = 6'b010110;
    parameter [5:0] X = 6'b010111;
    parameter [5:0] Y = 6'b011000;
    parameter [5:0] Z = 6'b011001;
    parameter [5:0] ONE  = 6'b011010;
    parameter [5:0] TWO = 6'b011011;
    parameter [5:0] THREE = 6'b011100;
    parameter [5:0] FOUR = 6'b011101;
    parameter [5:0] FIVE = 6'b011110;
    parameter [5:0] SIX = 6'b011111;
    parameter [5:0] SEVEN = 6'b100000;
    parameter [5:0] EIGHT = 6'b100001;
    parameter [5:0] NINE = 6'b100010;
    parameter [5:0] ZERO = 6'b100011;
    parameter [5:0] BEFORETWO = 6'b100100;
    parameter [5:0] BEFOREEIGHT = 6'b100101;
    parameter [5:0] BEFORENINE = 6'b100110;

  always @(posedge clk2 ) 
  begin
  newletter = 0;
      case (state)
          BLANK: case(in)
                 DOT: state = E;
                 DASH: state = T;
                 default :      begin newletter = 1;
                          letter = BLANK;
                          end
                endcase

          E : case(in)
                 DOT: state = I;
                 DASH: state = A;
                 default :      begin newletter = 1;
                          letter = E;
                          state = BLANK;
                          end
                endcase
          T : case(in)
                 DOT: state = N;
                 DASH: state = M;
                 default :      begin newletter = 1;
                          letter = T;
                          state = BLANK;
                          end
                endcase
          I : case(in)
                 DOT: state = S;
                 DASH: state = U;
                 default :      begin newletter = 1;
                          letter = I;
                          state = BLANK;
                          end
                endcase
          A : case(in)
                 DOT: state = R;
                 DASH: state = W;
                 default :      begin newletter = 1;
                          letter = A;
                          state = BLANK;
                          end
                endcase
          N : case(in)
                 DOT: state = D;
                 DASH: state = K;
                 default :      begin newletter = 1;
                          letter = N;
                          state = BLANK;
                          end
                endcase
          M : case(in)
                 DOT: state = G;
                 DASH: state = O;
                 default :      begin newletter = 1;
                          letter = M;
                          state = BLANK;
                          end
                endcase
          S : case(in)
                 DOT: state = H;
                 DASH: state = V;
                 default :      begin newletter = 1;
                          letter = S;
                          state = BLANK;
                          end
                endcase
          R : case(in)
                 DOT: state = L;
                 default :      begin newletter = 1;
                          letter = R;
                          state = BLANK;
                          end
                endcase
          U : case(in)
                 DOT: state = P;
                 DASH: state = BEFORETWO;
                 default :      begin newletter = 1;
                          letter = U;
                          state = BLANK;
                          end
                endcase
          W : case(in)
                 DOT: state = P;
                 DASH: state = J;
                 default :      begin newletter = 1;
                          letter = W;
                          state = BLANK;
                          end
                endcase
          D : case(in)
                 DOT: state = B;
                 DASH: state = X;
                 default :      begin newletter = 1;
                          letter = D;
                          state = BLANK;
                          end
                endcase
          K : case(in)
                 DOT: state = C;
                 DASH: state = Y;
                 default :      begin newletter = 1;
                          letter = K;
                          state = BLANK;
                          end
                endcase
          G : case(in)
                 DOT: state = Z;
                 DASH: state = Q;
                 default :      begin newletter = 1;
                          letter = G;
                          state = BLANK;
                          end
                endcase
          J : case(in)
                 DASH: state = ONE;
                 default :      begin newletter = 1;
                          letter = J;
                          state = BLANK;
                          end
                endcase
          V : case(in)
                 DASH: state = THREE;
                 default :      begin newletter = 1;
                          letter = V;
                          state = BLANK;
                          end
                endcase
          H : case(in)
                 DOT: state = FIVE;
                 DASH: state = FOUR;
                 default :      begin newletter = 1;
                          letter = H;
                          state = BLANK;
                          end
                endcase
          B : case(in)
                 DOT: state = SEVEN;
                 default :      begin newletter = 1;
                          letter = Z;
                          state = BLANK;
                          end
                endcase
          O : case(in)
                 default :      begin newletter = 1;
                          letter = C;
                          state = BLANK;
                          end
                endcase
          BEFORETWO : case(in)
                 DASH: state = TWO;
                 default :        state = state;
                endcase
          BEFOREEIGHT : case(in)
                 DASH: state = EIGHT;
                 default : state = state;
                endcase
          BEFORENINE : case(in)
                 DOT: state = NINE;
                 DASH: state = ZERO;
                 default :    state = state;
                endcase
          TWO : case(in)
                GAP: begin
                    letter = TWO;
                    state = BLANK;
                    end
                 default :   state = state;
                endcase
           default :      begin 
                          state = BLANK;
                          newletter = 1;
                          end
                endcase
            end
endmodule
module fsm(clk2, in, letter , LEDR , newletter);

    input clk2;
    input [1:0] in;
    output [5:0] LEDR;
    output reg [5:0] letter = 6'b000000;
    output reg newletter;
    reg [5:0] state = 6'b000000;

    parameter [1:0] DOT = 2'b01;
    parameter [1:0] DASH = 2'b11;
    parameter [1:0] GAP = 2'b00;

    parameter [5:0] BLANK = 6'b111111;
    parameter [5:0] A = 6'b011010;
    parameter [5:0] B = 6'b000001;
    parameter [5:0] C = 6'b000010;
    parameter [5:0] D = 6'b000011;
    parameter [5:0] E = 6'b000100;
    parameter [5:0] F = 6'b000101;
    parameter [5:0] G = 6'b000110;
    parameter [5:0] H = 6'b000111;
    parameter [5:0] I = 6'b001000;
    parameter [5:0] J = 6'b001001;
    parameter [5:0] K = 6'b001010;
    parameter [5:0] L = 6'b001011;
    parameter [5:0] M = 6'b001100;
    parameter [5:0] N = 6'b001101;
    parameter [5:0] O = 6'b001110;
    parameter [5:0] P = 6'b001111;
    parameter [5:0] Q = 6'b010000;
    parameter [5:0] R = 6'b010001;
    parameter [5:0] S = 6'b010010;
    parameter [5:0] T = 6'b010011;
    parameter [5:0] U = 6'b010100;
    parameter [5:0] V = 6'b010101;
    parameter [5:0] W = 6'b010110;
    parameter [5:0] X = 6'b010111;
    parameter [5:0] Y = 6'b011000;
    parameter [5:0] Z = 6'b011001;
    parameter [5:0] ONE  = 6'b011010;
    parameter [5:0] TWO = 6'b011011;
    parameter [5:0] THREE = 6'b011100;
    parameter [5:0] FOUR = 6'b011101;
    parameter [5:0] FIVE = 6'b011110;
    parameter [5:0] SIX = 6'b011111;
    parameter [5:0] SEVEN = 6'b100000;
    parameter [5:0] EIGHT = 6'b100001;
    parameter [5:0] NINE = 6'b100010;
    parameter [5:0] ZERO = 6'b100011;
    parameter [5:0] BEFORETWO = 6'b100100;
    parameter [5:0] BEFOREEIGHT = 6'b100101;
    parameter [5:0] BEFORENINE = 6'b100110;

  always @(posedge clk2 ) 
  begin
  newletter = 0;
      case (state)
          BLANK: case(in)
                 DOT: state = E;
                 DASH: state = T;
                 default :      begin newletter = 1;
                          letter = BLANK;
                          end
                endcase

          E : case(in)
                 DOT: state = I;
                 DASH: state = A;
                 default :      begin newletter = 1;
                          letter = E;
                          state = BLANK;
                          end
                endcase
          T : case(in)
                 DOT: state = N;
                 DASH: state = M;
                 default :      begin newletter = 1;
                          letter = T;
                          state = BLANK;
                          end
                endcase
          I : case(in)
                 DOT: state = S;
                 DASH: state = U;
                 default :      begin newletter = 1;
                          letter = I;
                          state = BLANK;
                          end
                endcase
          A : case(in)
                 DOT: state = R;
                 DASH: state = W;
                 default :      begin newletter = 1;
                          letter = A;
                          state = BLANK;
                          end
                endcase
          N : case(in)
                 DOT: state = D;
                 DASH: state = K;
                 default :      begin newletter = 1;
                          letter = N;
                          state = BLANK;
                          end
                endcase
          M : case(in)
                 DOT: state = G;
                 DASH: state = O;
                 default :      begin newletter = 1;
                          letter = M;
                          state = BLANK;
                          end
                endcase
          S : case(in)
                 DOT: state = H;
                 DASH: state = V;
                 default :      begin newletter = 1;
                          letter = S;
                          state = BLANK;
                          end
                endcase
          R : case(in)
                 DOT: state = L;
                 default :      begin newletter = 1;
                          letter = R;
                          state = BLANK;
                          end
                endcase
          U : case(in)
                 DOT: state = P;
                 DASH: state = BEFORETWO;
                 default :      begin newletter = 1;
                          letter = U;
                          state = BLANK;
                          end
                endcase
          W : case(in)
                 DOT: state = P;
                 DASH: state = J;
                 default :      begin newletter = 1;
                          letter = W;
                          state = BLANK;
                          end
                endcase
          D : case(in)
                 DOT: state = B;
                 DASH: state = X;
                 default :      begin newletter = 1;
                          letter = D;
                          state = BLANK;
                          end
                endcase
          K : case(in)
                 DOT: state = C;
                 DASH: state = Y;
                 default :      begin newletter = 1;
                          letter = K;
                          state = BLANK;
                          end
                endcase
          G : case(in)
                 DOT: state = Z;
                 DASH: state = Q;
                 default :      begin newletter = 1;
                          letter = G;
                          state = BLANK;
                          end
                endcase
          J : case(in)
                 DASH: state = ONE;
                 default :      begin newletter = 1;
                          letter = J;
                          state = BLANK;
                          end
                endcase
          V : case(in)
                 DASH: state = THREE;
                 default :      begin newletter = 1;
                          letter = V;
                          state = BLANK;
                          end
                endcase
          H : case(in)
                 DOT: state = FIVE;
                 DASH: state = FOUR;
                 default :      begin newletter = 1;
                          letter = H;
                          state = BLANK;
                          end
                endcase
          B : case(in)
                 DOT: state = SEVEN;
                 default :      begin newletter = 1;
                          letter = Z;
                          state = BLANK;
                          end
                endcase
          O : case(in)
                 default :      begin newletter = 1;
                          letter = C;
                          state = BLANK;
                          end
                endcase
          BEFORETWO : case(in)
                 DASH: state = TWO;
                 default :        state = state;
                endcase
          BEFOREEIGHT : case(in)
                 DASH: state = EIGHT;
                 default : state = state;
                endcase
          BEFORENINE : case(in)
                 DOT: state = NINE;
                 DASH: state = ZERO;
                 default :    state = state;
                endcase
          TWO : case(in)
                GAP: begin
                    letter = TWO;
                    state = BLANK;
                    end
                 default :   state = state;
                endcase
           default :      begin 
                          state = BLANK;
                          newletter = 1;
                          end
                endcase
            end
endmodule