veripool / verilog-mode

Verilog-Mode for Emacs with Indentation, Hightlighting and AUTOs. Master repository for pushing to GNU, verilog.com and veripool.org.
http://veripool.org/verilog-mode
GNU General Public License v3.0
247 stars 90 forks source link

Have AUTOOUTPUT ignore signals that have been declared #1727

Closed imgod2u closed 3 years ago

imgod2u commented 3 years ago

I have signals declared in my module like such:

module top_module(
  /*AUTOINPUT*/
  /*AUTOOUTPUT*/
)

logic sig1;
logic [2:0] sig2;

my_module dut (
  /*AUTOINST*/
  sig1(sig1);
  sig2(sig2);
);
endmodule

sig1 and sig2 are signals I'd like to leave dangling (and the testbench will drive it through hierarchical references).

Problem is, /AUTOOUTPUT/ will see that it isn't the input of another module and declare the output automatically.

Is there a way to have AUTOOUTPUT ignore signals that are declared?

wsnyder commented 3 years ago

See here please https://github.com/veripool/verilog-mode/blob/master/FAQ.rst#how-do-i-remove-outputs-from-autooutput

imgod2u commented 3 years ago

Hmm, that isn't quite what I'm looking for though. I'd have to list the signals I want ignored twice (once for the dangling wire declaration and once in the ignore list or fake output declaration). I take it there's no way to get it to see dangling wire declarations as a sink?

wsnyder commented 3 years ago

Perhaps this

`ifdef NEVER   // For autos as driven by testbench
    assign out = FROM_TB;
`endif
wsnyder commented 3 years ago

Or I think you want the other direction:

`ifdef NEVER   // For autos as driven by testbench
    tbdriven  tbdriven (// Inputs
                                   .out);
`endif