Project

General

Profile

[logo] 
 
Home
News
Activity
About/Contact
Major Tools
  Dinotrace
  Verilator
  Verilog-mode
  Verilog-Perl
Other Tools
  BugVise
  CovVise
  Force-Gate-Sim
  Gspice
  IPC::Locker
  Rsvn
  SVN::S4
  Voneline
  WFH
General Info
  Papers

AUTOINST not working with SV parameters array

Added by Dr B 3 months ago

Hi,

The AUTOINST does not work for outputs which their width is defined by array of parameters. The error message is: Scan error: "Unbalanced parentheses"

Can this be fixed somehow?

The reason for using parameters array is that the design parameters are defined in a package so their values cannot be over-written from the top instance. By using parameters array (defined in the package) we can control with one parameters driven from the Top instance which parameters value to pick out of the array.


module son1 
 #(
    parameter integer AAA= {32'd4,32'd8}, 
    parameter integer BBB= 1
   )
   (
    output [AAA[BBB]-1:0] out_signal
   );
endmodule

module top 
  #(
     parameter integer AAA      = {32'd4,32'd8}, 
     parameter integer BBB      = 1 
   )
   (
    );

   /*AUTOLOGIC*/
   // Beginning of automatic wires (for undeclared instantiated-module outputs)
//   logic [AAA-1:0]    out_signal;             // From son1 of son1.v
   // End of automatics

   logic [AAA[BBB]-1:0] out_signal;             // From son1 of son1.v

        son1 #(/*AUTOINSTPARAM*/
               // Parameters
               .AAA                     (AAA),
               .BBB                     (BBB))
        son1 (/*AUTOINST*/
              // Outputs
              .out_signal               (out_signal[AAA[BBB]-1:0]));

        son2 #(/*AUTOINSTPARAM*/
               // Parameters
               .AAA                     (AAA),
               .BBB                     (BBB))
        son2 (/*AUTOINST*/
              // Inputs
              .out_signal               (out_signal[AAA[BBB]-1:0]));

endmodule
// Local Variables:
// verilog-library-directories:(".")
// End:


Replies (2)

RE: AUTOINST not working with SV parameters array - Added by Wilson Snyder 3 months ago

Thanks for the report.

Fixed in git and verilog-mode-2019-02-04-922d87a-vpo.

RE: AUTOINST not working with SV parameters array - Added by Dr B 3 months ago

Thank You! It's working great now!!!

    (1-2/2)