Skip to content

Computing AUTOs with ifdef'd parameter list fails. #1761

@sjalloq

Description

@sjalloq

I've just been setting up a flow to run all our code through verilog-batch-auto-diff and have found some syntax that verilog-mode doesn't like. The following testcase shows the code:

module submod (/*AUTOARG*/);

    parameter TEST = 0;

    input logic clk;

endmodule

module test(/*AUTOARG*/);

	input logic clk;

    submod

    `ifdef PARAMS
    #( .TEST (1) )
    `endif

    u_submod (/*AUTOINST*/);

endmodule

And the output from running

Processing test.sv
%Error: test.sv:20: Can’t locate ‘`endif’ module definition (Expanded macro to endif)
    Check the verilog-library-directories variable.
    I looked in (if not listed, doesn’t exist):
	test.sv

The code in question is pretty horrific so we will likely rewrite it anyway but wanted to report it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions