data/full_repos/permissive/209644662/hardware/unused/sb/rtl/test_mux_var.svp
 line:7: before: "parameter"
1: b"%Error: data/full_repos/permissive/209644662/hardware/unused/sb/rtl/test_mux_var.svp:6: Define or directive not defined: '`mname'\nmodule `mname`  #(\n       ^~~~~~\n%Error: data/full_repos/permissive/209644662/hardware/unused/sb/rtl/test_mux_var.svp:6: syntax error, unexpected $undefined, expecting IDENTIFIER or PACKAGE-IDENTIFIER or TYPE-IDENTIFIER\nmodule `mname`  #(\n             ^\n%Error: data/full_repos/permissive/209644662/hardware/unused/sb/rtl/test_mux_var.svp:8: syntax error, unexpected ')', expecting ';'\n) (\n^\n%Error: data/full_repos/permissive/209644662/hardware/unused/sb/rtl/test_mux_var.svp:16: Unsupported or unknown PLI call: $i\n  input  [DataWidth-1:0]       data_in_`$i`,\n                                        ^~\n%Error: data/full_repos/permissive/209644662/hardware/unused/sb/rtl/test_mux_var.svp:19: Unsupported or unknown PLI call: $sel_bits\n  input  [`$sel_bits-1`:0]            sel,\n           ^~~~~~~~~\n%Error: data/full_repos/permissive/209644662/hardware/unused/sb/rtl/test_mux_var.svp:25: syntax error, unexpected ')', expecting ',' or ';'\n);\n^\n%Error: data/full_repos/permissive/209644662/hardware/unused/sb/rtl/test_mux_var.svp:30: syntax error, unexpected always_comb\n  always_comb begin\n  ^~~~~~~~~~~\n%Error: data/full_repos/permissive/209644662/hardware/unused/sb/rtl/test_mux_var.svp:35: Unsupported or unknown PLI call: $sel_bits\n      `$sel_bits`'d`$i`: res_w = data_in_`$i`;\n       ^~~~~~~~~\n%Error: data/full_repos/permissive/209644662/hardware/unused/sb/rtl/test_mux_var.svp:35: Number is missing value digits: 'd\n      `$sel_bits`'d`$i`: res_w = data_in_`$i`;\n                 ^~\n%Error: data/full_repos/permissive/209644662/hardware/unused/sb/rtl/test_mux_var.svp:35: Unsupported or unknown PLI call: $i\n      `$sel_bits`'d`$i`: res_w = data_in_`$i`;\n                    ^~\n%Error: data/full_repos/permissive/209644662/hardware/unused/sb/rtl/test_mux_var.svp:35: Unsupported or unknown PLI call: $i\n      `$sel_bits`'d`$i`: res_w = data_in_`$i`;\n                                          ^~\n%Error: data/full_repos/permissive/209644662/hardware/unused/sb/rtl/test_mux_var.svp:44: syntax error, unexpected always_ff\n  always_ff @(posedge clk or negedge rst_n) begin\n  ^~~~~~~~~\n%Error: Exiting due to 12 error(s)\n"
module `mname`  #(
  parameter DataWidth = 16
) (

  input                        clk,
  input                        rst_n,




  input  [DataWidth-1:0]       data_in_`$i`,


  input  [`$sel_bits-1`:0]            sel,

  input                        reg_en,


  output logic [DataWidth-1:0] res
);

  logic [DataWidth-1:0] res_w;
  integer j;

  always_comb begin
    res_w = 'hX;

    case(sel)

      `$sel_bits`'d`$i`: res_w = data_in_`$i`;

      default: res_w = 'hX;
    endcase
  end


  logic [DataWidth-1:0] res_reg;

  always_ff @(posedge clk or negedge rst_n) begin
    if(~rst_n) begin
      res_reg <= 16'h0;
    end else if(reg_en) begin
      res_reg <= res_w;
    end
  end

  assign res = reg_en ? res_reg : res_w;

    assign res = res_w;


endmodule
module `mname`  #(
  parameter DataWidth = 16
) (

  input                        clk,
  input                        rst_n,




  input  [DataWidth-1:0]       data_in_`$i`,


  input  [`$sel_bits-1`:0]            sel,

  input                        reg_en,


  output logic [DataWidth-1:0] res
);


  logic [DataWidth-1:0] res_w;
  integer j;

  always_comb begin
    res_w = 'hX;

    case(sel)

      `$sel_bits`'d`$i`: res_w = data_in_`$i`;

      default: res_w = 'hX;
    endcase
  end


  logic [DataWidth-1:0] res_reg;

  always_ff @(posedge clk or negedge rst_n) begin
    if(~rst_n) begin
      res_reg <= 16'h0;
    end else if(reg_en) begin
      res_reg <= res_w;
    end
  end

  assign res = reg_en ? res_reg : res_w;

    assign res = res_w;


endmodule