title: Passing unpacked array type as parameter
body: <p>I created a module to soemthing simple like add some pipeline delay. I made the data type a parameter so it could handle complex things like structs. I have something like this:</p>
  
  <pre><code>module pipe
     #(parameter type T = int,
       parameter DELAY = 0)
     (
      input clk,
      input T data_in,
      output T data_out);
  
     T pipe[DELAY];
     always_ff @(posedge clk) begin
       pipe[0] &lt;= data_in;
       for(int i = 1; i&lt;DEPTH; i++) begin
         pipe[i] &lt;= pipe[i-1];
       end
     end
     assign data_out = pipe[DELAY-1];
  endmodule
  </code></pre>
  
  <p>This works great but then I found myself wanting to use it with an unpacked array and I couldn't figure out how to instance it. It would look something like this, but I don't think this is right:</p>
  
  <pre><code>logic [7:0] my_data [16];
  logic [7:0] my_data_delayed [16];
  pipe #(.T(logic [7:0] [16]), .DELAY(2)) i_pipe
    (
     .clk(clk),
     .data_in(my_data),
     .data_out(my_data_delayed)
    );
  </code></pre>
  
  <p>Is there a way to get the type of a variable so it can be passed to this parameter? </p>