Parameter info
Inside the parentheses of a call, an instance or a parameter list, View | Parameter Info (⌘P, Ctrl+P)
shows what goes there, with the one at the caret highlighted. It also opens by itself shortly after you type (, and
after you choose from the completion list a function, task, system task or macro that takes arguments.
| Inside | Example | Shows |
|---|---|---|
| A function or task call | add(1, , obj.run(, pkg::twice( |
Its arguments with direction, type and default: input byte data, output bit ok, input int retries = 3 |
| A constructor call | super.new(, h = new(, my_item it = new( (also through a typedef of the class), h = my_item::new( |
The arguments of the class’s own new; <no parameters> if it declares none (its implicit new() takes no arguments; constructors are not inherited) |
| A system task or function | $fopen(, $display( |
Its arguments, as listed in IEEE 1800-2017 (filename, [type]; args… for any number) |
| A macro call | `MAX(1, |
The macro’s formal arguments |
| An instance’s port list | counter u(.clk(clk), .count(, counter u(clk, , counter u[3:0]( |
The ports of the module, interface or program |
| A parameter value list | counter #(, registry #(.T(, pkg::registry #( |
The parameters that can be overridden (not the localparams), with their defaults |
The highlighted entry follows the caret: by position (the commas before the caret at the list’s own level; commas
inside an argument’s parentheses, brackets or braces do not count), or, in a list connected by name, the one named
after the . you are in (.count(, also while you are still typing the name: .cou); in a list connected by
name, a position after a comma highlights nothing. A . inside an argument (s.lhs, bus.data) is member access,
not a connection. When there are more arguments than parameters, nothing is highlighted and the signature is shown
greyed out. Opened inside nested calls, it shows the innermost one (inside a parenthesized expression or a cast in an
argument, the call around it); a popup open on a call stays while you type a
nested call in its arguments, keeping its own highlighted argument. A function without arguments shows
<no parameters>. It does not open in comments and strings (an open one stays while the caret is in a string
argument), in a declaration’s own header (function int f(,
module m #(), or when the name before ( does not resolve.
Try it
Section titled “Try it”- Open
rtl/top.svfrom the sample project and put the caret right after.count(in the instanceu_counter. Press ⌘P (Ctrl+P): the popup shows the ports ofcounter,input logic clk, input logic rst_n, output logic [7:0] count, output logic done, withoutput logic [7:0] counthighlighted. - Put the caret right after
counter #(on the same line and press ⌘P (Ctrl+P): the popup shows the parameterint MAX = 10. - Open
rtl/counter.sv, put the caret right afteris_done(in theassignline and press ⌘P (Ctrl+P): the popup shows the argument of the package function,state_t s. - In
rtl/counter.sv, on a new line afterstate_t state;, typeinitial $display(. The popup opens and showsargs…. Undo.