Skip to content

Commit c274d69

Browse files
committed
give autonc priority over autointerface again.
1 parent d6e4d3b commit c274d69

File tree

5 files changed

+18
-13
lines changed

5 files changed

+18
-13
lines changed

verilogpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1606,11 +1606,11 @@ sub expand_all_macros {
16061606
$self->expand_macro('FORINST', \&expand_forinst);
16071607
$self->expand_macro('AUTOTOSTRING', \&expand_autotostring);
16081608
$self->expand_macro('AUTOINC', \&expand_includes);
1609+
$self->expand_macro('AUTONC', \&expand_autonc);
16091610
# note: AUTOINTERFACE must expand before AUTONET, as it will change
16101611
# AUTONET's behavior.
16111612
$self->expand_macro('AUTOINTERFACE', \&expand_autointerface);
16121613
$self->expand_macro('AUTONET', \&expand_autonet);
1613-
$self->expand_macro('AUTONC', \&expand_autonc);
16141614
$self->expand_macro('TIEOUTPUTSTOZERO', \&expand_tieoutputs);
16151615
}
16161616
}

verilogpp_tests/autonc.vpp

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,18 @@ module inst_of_unpacked (
66
output [7:0] fee [0:10-1],
77
/**AUTOINTERFACE**/
88
/*PPSTART*/
9-
output wire [7:0] another_output,
10-
output wire [7:0] bar,
11-
input wire fee_en[0:5],
12-
input wire [7:0] fie[0:5],
13-
input wire fie_en[0:5],
14-
input wire [7:0] foo[0:5],
15-
input wire foo_en[0:5]
9+
input wire fee_en[0:5],
10+
input wire [7:0] fie[0:5],
11+
input wire fie_en[0:5]
1612
/*PPSTOP*/
1713
);
1814

1915
/**AUTONET --init **/
2016
/*PPSTART*/
21-
17+
wire [7:0] another_output;
18+
wire [7:0] bar;
19+
wire [7:0] foo[0:5];
20+
wire foo_en[0:5];
2221
/*PPSTOP*/
2322

2423
/**AUTONC
@@ -29,7 +28,13 @@ module inst_of_unpacked (
2928
/^foo/
3029
**/
3130
/*PPSTART*/
31+
assign foo = '0;
32+
assign foo_en = '0;
3233

34+
logic lint_unused_signals;
35+
assign lint_unused_signals =
36+
(another_output == '0) ||
37+
(bar == '0);
3338
/*PPSTOP*/
3439

3540

verilogpp_tests/autonc2.vpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ module inst_of_unpacked (
1313
/*PPSTART*/
1414
wire [7:0] another_output;
1515
wire [7:0] bar;
16-
reg [7:0] foo[0:5] = '{default: '0};
17-
reg foo_en[0:5] = '{default: '0};
16+
wire [7:0] foo[0:5];
17+
wire foo_en[0:5];
1818
/*PPSTOP*/
1919

2020
/**AUTONC

verilogpp_tests/autonc3.vpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ module inst_of_unpacked (
1313
/*PPSTART*/
1414
wire [7:0] another_output;
1515
wire [7:0] bar;
16-
reg [7:0] foo[0:5] = '{default: '0};
16+
wire [7:0] foo[0:5];
1717
wire foo_en[0:5];
1818
/*PPSTOP*/
1919

verilogpp_tests/autonc4.vpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ module inst_of_unpacked (
1414
wire [7:0] another_output;
1515
wire [7:0] bar;
1616
wire derived;
17-
reg [7:0] foo[0:5] = '{default: '0};
17+
wire [7:0] foo[0:5];
1818
wire foo_en[0:5];
1919
/*PPSTOP*/
2020

0 commit comments

Comments
 (0)