Skip to content

Commit 3ab6351

Browse files
committed
Fix verilog-auto-ignore-concat with parenthesis signals.
* verilog-mode.el (verilog-read-sub-decls-line): Fix `verilog-auto-ignore-concat' with parenthesis signals. Reported by Dmitri Sorkin.
1 parent b526d6f commit 3ab6351

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

tests_ok/autoinput_concat_ignore.v

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
module xyz (/*AUTOARG*/
2+
// Outputs
3+
signal_f, signal_c,
24
// Inputs
3-
signal_e3, signal_e, signal_b
5+
signal_b
46
);
57

68
/*AUTOINPUT*/
79
// Beginning of automatic inputs (from unused autoinst inputs)
8-
input [2:0] signal_b; // To u_abc of abc.v
9-
input signal_e; // To u_def of def.v
10-
input signal_e3; // To u_def of def.v
10+
input [2:0] signal_b; // To u_abc of abc.v
1111
// End of automatics
1212

1313
/*AUTOOUTPUT*/
14+
// Beginning of automatic outputs (from unused autoinst outputs)
15+
output signal_c; // From u_abc of abc.v
16+
output signal_f; // From u_def of def.v
17+
// End of automatics
1418

1519
/*AUTOWIRE*/
16-
// Beginning of automatic wires (for undeclared instantiated-module outputs)
17-
wire signal_c; // From u_abc of abc.v
18-
wire signal_f; // From u_def of def.v
19-
// End of automatics
2020

2121
/* abc AUTO_TEMPLATE
2222
(

verilog-mode.el

+4-1
Original file line numberDiff line numberDiff line change
@@ -9758,7 +9758,10 @@ Inserts the list of signals found, using submodi to look up each port."
97589758
;; We intentionally ignore (non-escaped) signals with .s in them
97599759
;; this prevents AUTOWIRE etc from noticing hierarchical sigs.
97609760
(when port
9761-
(cond ((looking-at "[^\n]*AUTONOHOOKUP"))
9761+
(cond ((and verilog-auto-ignore-concat
9762+
(looking-at "[({]"))
9763+
nil) ; {...} or (...) historically ignored with auto-ignore-concat
9764+
((looking-at "[^\n]*AUTONOHOOKUP"))
97629765
((looking-at "\\([a-zA-Z_][a-zA-Z_0-9]*\\)\\s-*)")
97639766
(verilog-read-sub-decls-sig
97649767
submoddecls par-values comment port

0 commit comments

Comments
 (0)