automatic-verilog icon indicating copy to clipboard operation
automatic-verilog copied to clipboard

autoparam should not instantiate localparam

Open frankli998 opened this issue 2 years ago • 3 comments

In sytemverilog, localparam is allowed to show up in the "parameter area, for example

module fifo#
(
  parameter DP = 8,
  localparam PTRW = $clog2(DP)
)
(
  output [PTRW - 1:0] wptr,
  output [PTRW - 1:0] rptr
)

In this condition, localparam should not appear in the instance

frankli998 avatar Feb 03 '23 05:02 frankli998

Even those after portlist will be instantiated, wierd

frankli998 avatar Feb 03 '23 09:02 frankli998

Even those after portlist will be instantiated, wierd

use only_port config in your vimrc let g:atv_autopara_only_port = 1

HonkW93 avatar Jul 02 '23 15:07 HonkW93

In sytemverilog, localparam is allowed to show up in the "parameter area, for example

module fifo#
(
  parameter DP = 8,
  localparam PTRW = $clog2(DP)
)
(
  output [PTRW - 1:0] wptr,
  output [PTRW - 1:0] rptr
)

In this condition, localparam should not appear in the instance

will be fixed soon

HonkW93 avatar Jul 02 '23 15:07 HonkW93