Contact us Start a Trial

Non-standard implicit type conversions

Some tools permit implicit type conversions that are not specified by the Verilog or SystemVerilog standards. Making use of such non-standard conversions will reduce the portability of the design. Sigasi will mark non-standard implicit conversions as warnings.

Streaming concatenations

The SystemVerilog standard does not allow streaming concatenations to be used as expression operands without an explicit type cast. However, certain tools allow it and will perform an implicit type cast. Sigasi will mark these implicit conversions as warnings (rule 173).

VERILOG
module top;
	logic [31:0] a = '0, b = '0;
	initial begin
		b = 32'h12345678;
		a = cond ? {<<4 {b}} : b;
	end
endmodule

Integral to enum conversion

Many tools will allow implicit conversions from integral to enum types. Such implicit conversions are not supported by the SystemVerilog standard and will be marked as a warning by Sigasi (rule 176).

VERILOG
module top;
	enum {RED, YELLOW, GREEN} light;
	initial begin
		light = 2;
	end
endmodule

Rule configuration

This rule can be disabled for your project, or its severity and parameters can be modified in the project linting settings. Alternatively, it can be manually configured using one of the following templates, depending on the type of project you use.

  • For Modular Projects, add these entries to your project's .sigasi/settings.json settings file. To scope the settings to a specific folder or file instead of the whole project, place them inside an @override block; to scope them to a specific target, place them inside a @targets block.

    JSONC
    {
        "verilog.rules.173.severity": "{ERROR|WARNING|INFO|IGNORE}",
        "verilog.rules.176.severity": "{ERROR|WARNING|INFO|IGNORE}"
    }
  • For Classic Projects, add the VHDL lines to .settings/com.sigasi.hdt.vhdl.linting.prefs and the Verilog/SystemVerilog lines to .settings/com.sigasi.hdt.verilog.linting.prefs:

    PREFS
    173/severity/${path}={error|warning|info|ignore}
    176/severity/${path}={error|warning|info|ignore}